Lines Matching refs:runtime
131 #include "runtime.h"
242 Runtime* const runtime = Runtime::Current();
243 if (!runtime->IsAotCompiler()) { // Give info if this occurs at runtime.
261 if (runtime->IsAotCompiler()) {
263 ObjPtr<mirror::Throwable> pre_allocated = runtime->GetPreAllocatedNoClassDefFoundError();
303 if (klass->GetClassLoader() == nullptr && !Runtime::Current()->IsAotCompiler()) {
308 bool known_impossible = kIsDebugBuild && !Runtime::Current()->AreAsyncExceptionsThrown();
420 cha_(Runtime::Current()->IsAotCompiler() ? nullptr : new ClassHierarchyAnalysis()) {
452 Runtime* const runtime = Runtime::Current();
453 gc::Heap* const heap = runtime->GetHeap();
455 CHECK(!heap->HasBootImageSpace()) << "Runtime has image. We should use it.";
458 // Use the pointer size from the runtime since we are probably creating the image.
459 image_pointer_size_ = InstructionSetPointerSize(runtime->GetInstructionSet());
498 runtime->SetSentinel(heap->AllocNonMovableObject<true>(self,
607 LinearAlloc* linear_alloc = runtime->GetLinearAlloc();
608 // Create runtime resolution and imt conflict methods.
609 runtime->SetResolutionMethod(runtime->CreateResolutionMethod());
610 runtime->SetImtConflictMethod(runtime->CreateImtConflictMethod(linear_alloc));
611 runtime->SetImtUnimplementedMethod(runtime->CreateImtConflictMethod(linear_alloc));
634 if (!runtime->IsAotCompiler()) {
831 runtime->FixupConflictTables();
859 // as the types of the field can't be resolved prior to the runtime being
906 if (kMemoryToolIsAvailable && !Runtime::Current()->IsAotCompiler()) {
948 Runtime* const runtime = Runtime::Current();
950 gc::Heap* const heap = runtime->GetHeap();
960 if (!runtime->IsAotCompiler()) {
962 // runtime. This happens on the host for compiling 32 bit tests since we use a 64 bit libart
965 *error_msg = StringPrintf("Runtime must use current image pointer size: %zu vs %zu",
971 DCHECK(!runtime->HasResolutionMethod());
972 runtime->SetResolutionMethod(image_header.GetImageMethod(ImageHeader::kResolutionMethod));
973 runtime->SetImtConflictMethod(image_header.GetImageMethod(ImageHeader::kImtConflictMethod));
974 runtime->SetImtUnimplementedMethod(
976 runtime->SetCalleeSaveMethod(
979 runtime->SetCalleeSaveMethod(
982 runtime->SetCalleeSaveMethod(
985 runtime->SetCalleeSaveMethod(
988 runtime->SetCalleeSaveMethod(
991 runtime->SetCalleeSaveMethod(
996 runtime->GetOatFileManager().RegisterImageOatFiles(spaces);
1066 runtime->SetSentinel(heap->AllocNonMovableObject<true>(
1069 const std::vector<std::string>& boot_class_path_locations = runtime->GetBootClassPathLocations();
1311 : allocator_(alloc), cha_(Runtime::Current()->GetClassLinker()->GetClassHierarchyAnalysis()),
1312 pointer_size_(Runtime::Current()->GetClassLinker()->GetImagePointerSize()),
1335 intern_table_(*Runtime::Current()->GetInternTable()) {}
1466 Runtime* const runtime = Runtime::Current();
1467 gc::Heap* const heap = runtime->GetHeap();
1469 runtime->LoadAppImageStartupCache();
1565 InternTable* const intern_table = Runtime::Current()->GetInternTable();
1669 Runtime* const runtime = Runtime::Current();
1670 InternTable* const intern_table = runtime->GetInternTable();
1672 const bool load_startup_cache = runtime->LoadAppImageStartupCache();
1947 if (klass != nullptr && !Runtime::Current()->GetHeap()->ObjectIsInBootImageSpace(klass)) {
1999 Runtime* const runtime = Runtime::Current();
2000 gc::Heap* const heap = runtime->GetHeap();
2004 *error_msg = StringPrintf("Application image pointer size does not match runtime: %zu vs %zu",
2035 *error_msg = "App image class roots must have pointer equality with runtime ones.";
2158 if (!runtime->IsAotCompiler() && runtime->GetInstrumentation()->InterpretOnly()) {
2495 Runtime* const runtime = Runtime::Current();
2496 JavaVMExt* const vm = runtime->GetJavaVM();
2499 if (runtime->GetJit() != nullptr) {
2500 jit::JitCodeCache* code_cache = runtime->GetJit()->GetCodeCache();
2569 gc::Heap* heap = Runtime::Current()->GetHeap();
2820 throwable->InstanceOf(Runtime::Current()->GetPreAllocatedNoClassDefFoundError()->GetClass());
2931 Runtime::Current()->GetPreAllocatedNoClassDefFoundError();
2964 // The runtime is not allowed to call into java from a runtime-thread so just abort.
2969 Runtime::Current()->GetPreAllocatedNoClassDefFoundError();
2993 !Runtime::Current()->IsJavaDebuggable()) {
3122 // some runtime modules. Prevent definition of classes in app class loader that could clash
3125 Runtime::Current()->IsAotCompiler() &&
3128 Runtime::Current()->GetPreAllocatedNoClassDefFoundError();
3139 Runtime::Current()->GetPreAllocatedNoClassDefFoundError();
3161 Runtime::Current()->GetRuntimeCallbacks()->ClassPreDefine(descriptor,
3168 // Check to see if an exception happened during runtime callbacks. Return if so.
3228 Runtime::Current()->GetRuntimeCallbacks()->ClassLoad(klass);
3251 if (Runtime::Current()->GetInstrumentation()->AreExitStubsInstalled()) {
3256 Runtime::Current()->GetInstrumentation()->InstallStubsForClass(h_new_class.Get());
3270 Runtime::Current()->GetRuntimeCallbacks()->ClassPrepare(klass, h_new_class);
3363 Runtime* runtime = Runtime::Current();
3364 instrumentation::Instrumentation* instr = runtime->GetInstrumentation();
3369 if (runtime->GetClassLinker()->IsQuickToInterpreterBridge(quick_code)) {
3391 if (runtime->IsJavaDebuggable()) {
3397 jit::Jit* jit = Runtime::Current()->GetJit();
3401 if (runtime->IsNativeDebuggable()) {
3402 DCHECK(runtime->UseJitCompilation() && runtime->GetJit()->JitAtFirstUse());
3408 return !runtime->GetHeap()->IsInBootImageOatFile(quick_code);
3420 Runtime* runtime = Runtime::Current();
3421 if (!runtime->IsStarted()) {
3422 if (runtime->IsAotCompiler() || runtime->GetHeap()->HasBootImageSpace()) {
3450 if (quick_code == nullptr && Runtime::Current()->GetJit() != nullptr) {
3451 quick_code = Runtime::Current()->GetJit()->GetCodeCache()->GetZygoteSavedEntryPoint(method);
3460 runtime->GetInstrumentation()->UpdateMethodsCode(method, quick_code);
3480 Runtime* const runtime = Runtime::Current();
3481 if (runtime->IsAotCompiler()) {
3482 // The following code only applies to a non-compiler runtime.
3589 return Runtime::Current()->GetLinearAlloc();
3598 return Runtime::Current()->GetLinearAlloc();
3620 Runtime* const runtime = Runtime::Current();
3642 const OatFile::OatClass oat_class = (runtime->IsStarted() && !runtime->IsAotCompiler())
3728 // Get access flags from the DexFile and set hiddenapi runtime access flags.
3745 // Get access flags from the DexFile and set hiddenapi runtime access flags.
3798 Runtime::Current()->GetLinearAlloc());
3825 if (!(Runtime::Current()->IsAotCompiler() && class_loader == nullptr && !kIsTargetBuild)) {
4119 Runtime::Current()->GetPreAllocatedNoClassDefFoundError();
4267 Runtime::Current()->GetRuntimeCallbacks()->ClassLoad(new_class);
4268 Runtime::Current()->GetRuntimeCallbacks()->ClassPrepare(new_class, new_class);
4463 DCHECK(supertype->IsVerified() || Runtime::Current()->IsAotCompiler());
4484 if (Runtime::Current()->IsAotCompiler()) {
4485 Runtime::Current()->GetCompilerCallbacks()->ClassRejected(ref);
4528 // verify at runtime.
4529 if (Runtime::Current()->IsAotCompiler() && klass->ShouldVerifyAtRuntime()) {
4538 CHECK(!Runtime::Current()->IsAotCompiler());
4543 if (!Runtime::Current()->IsVerificationEnabled()) {
4604 // Try to use verification information from the oat file, otherwise do runtime verification.
4641 // super-default-interfaces were verified or requiring runtime reverification.
4652 // Soft failures at compile time should be retried at runtime. Soft
4653 // failures at runtime will be handled by slow paths in the generated
4655 if (Runtime::Current()->IsAotCompiler()) {
4676 // Note: we're going here during compilation and at runtime. When we set the
4680 if (UNLIKELY(Runtime::Current()->IsVerificationSoftFail())) {
4690 if (Runtime::Current()->IsAotCompiler()) {
4691 Runtime::Current()->GetCompilerCallbacks()->UpdateClassState(
4701 Runtime* const runtime = Runtime::Current();
4704 runtime->GetCompilerCallbacks(),
4705 runtime->IsAotCompiler(),
4707 Runtime::Current()->GetTargetSdkVersion(),
4718 if (Runtime::Current()->IsAotCompiler()) {
4719 CompilerCallbacks* callbacks = Runtime::Current()->GetCompilerCallbacks();
4741 // will be verified at runtime.
4742 if (Runtime
4847 Runtime::Current()->GetPreAllocatedNoClassDefFoundError();
4944 Runtime::Current()->GetRuntimeCallbacks()->ClassLoad(temp_klass);
4971 Runtime::Current()->GetRuntimeCallbacks()->ClassPrepare(temp_klass, klass);
5077 // At runtime the method looks like a reference and argument saving method, clone the code
5147 // Fast fail if initialization requires a full runtime. Not part of the JLS.
5194 CHECK(Runtime::Current()->IsAotCompiler());
5197 self->SetException(Runtime::Current()->GetPreAllocatedNoClassDefFoundError());
5236 // Runtime correctness is guaranteed by classpath checks done on loading. If the classpath
5237 // is different at runtime than it was at compile time, the oat file is rejected. So if the
5238 // oat file is present, the classpaths must match, and the runtime time check can be skipped.
5240 const Runtime* runtime = Runtime::Current();
5241 const OatFile::OatClass oat_class = (runtime->IsStarted() && !runtime->IsAotCompiler())
5365 if (Runtime::Current()->IsActiveTransaction()) {
5399 } else if (Runtime::Current()->IsTransactionAborted()) {
5405 Runtime::Current()->ThrowTransactionAbortError(self);
5409 RuntimeStats* global_stats = Runtime::Current()->GetStats();
5504 Runtime::Current()->IsAotCompiler()) {
5796 data.allocator = Runtime::Current()->CreateLinearAlloc();
5843 std::fill_n(imt_data, arraysize(imt_data), Runtime::Current()->GetImtUnimplementedMethod());
6649 Runtime* const runtime = Runtime::Current();
6651 bool new_entry = conflict_method == runtime->GetImtConflictMethod() || force_new_conflict_method;
6655 ? runtime->CreateImtConflictMethod(linear_alloc)
6753 Runtime* const runtime = Runtime::Current();
6754 ArtMethod* const unimplemented_method = runtime->GetImtUnimplementedMethod();
6755 ArtMethod* const conflict_method = runtime->GetImtConflictMethod();
6888 Runtime::Current()->CreateImtConflictMethod(linear_alloc);
7405 Runtime* runtime)
7411 stack_(runtime->GetLinearAlloc()->GetArenaPool()),
7704 // We need to copy the default methods into our own method table since the runtime requires that
7898 Runtime* const runtime = Runtime::Current();
7909 ArtMethod* const unimplemented_method = runtime->GetImtUnimplementedMethod();
7910 ArtMethod* const imt_conflict_method = runtime->GetImtConflictMethod();
7928 LinkInterfaceMethodsHelper helper(this, klass, self, runtime);
8836 DCHECK(Runtime::Current()->IsMethodHandlesEnabled());
9433 // FinalizerReference which will never get cleaned up without a started runtime.