diff --git a/runtime/vm/compiler/backend/il_test_helper.cc b/runtime/vm/compiler/backend/il_test_helper.cc index 621847589dd..0bc24f1919f 100644 --- a/runtime/vm/compiler/backend/il_test_helper.cc +++ b/runtime/vm/compiler/backend/il_test_helper.cc @@ -46,10 +46,8 @@ RawFunction* GetFunction(const Library& lib, const char* name) { void Invoke(const Library& lib, const char* name) { // These tests rely on running unoptimized code to collect type feedback. The - // interpreter does not collect type feedback for interface calls, so set - // compilation threshold to 0 in order to compile invoked function - // immediately and executed compiled code. - SetFlagScope sfs(&FLAG_compilation_counter_threshold, 0); + // interpreter does not collect type feedback for interface calls. + SetFlagScope sfs(&FLAG_enable_interpreter, false); Thread* thread = Thread::Current(); Dart_Handle api_lib = Api::NewHandle(thread, lib.raw()); diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc index a7e431a6434..b2b2c2919af 100644 --- a/runtime/vm/compiler/jit/compiler.cc +++ b/runtime/vm/compiler/jit/compiler.cc @@ -231,14 +231,14 @@ DEFINE_RUNTIME_ENTRY(CompileFunction, 1) { Exceptions::PropagateError(Error::Cast(result)); } } - if (function.HasBytecode() && (FLAG_compilation_counter_threshold != 0)) { + if (function.HasBytecode()) { // If interpreter is enabled and there is bytecode, LazyCompile stub // (which calls CompileFunction) should proceed to InterpretCall in order // to enter interpreter. In such case, compilation is postponed and // triggered by interpreter later via CompileInterpretedFunction. return; } - // Fall back to compilation. + // No bytecode, fall back to compilation. } else { ASSERT(!function.HasCode()); } diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc index 749f5671c1a..4bd384cb9bf 100644 --- a/runtime/vm/dart_entry.cc +++ b/runtime/vm/dart_entry.cc @@ -152,7 +152,7 @@ RawObject* DartEntry::InvokeFunction(const Function& function, } // If we have bytecode but no native code then invoke the interpreter. - if (function.HasBytecode() && (FLAG_compilation_counter_threshold != 0)) { + if (function.HasBytecode()) { ASSERT(thread->no_callback_scope_depth() == 0); SuspendLongJumpScope suspend_long_jump_scope(thread); TransitionToGenerated transition(thread); @@ -160,7 +160,7 @@ RawObject* DartEntry::InvokeFunction(const Function& function, arguments, thread); } - // Fall back to compilation. + // No bytecode, fall back to compilation. } const Object& result = diff --git a/runtime/vm/profiler_test.cc b/runtime/vm/profiler_test.cc index b7bdf6de2e0..497954eedec 100644 --- a/runtime/vm/profiler_test.cc +++ b/runtime/vm/profiler_test.cc @@ -1528,7 +1528,7 @@ ISOLATE_UNIT_TEST_CASE(Profiler_FunctionInline) { DisableNativeProfileScope dnps; DisableBackgroundCompilationScope dbcs; SetFlagScope sfs(&FLAG_optimization_counter_threshold, 30000); - SetFlagScope sfs2(&FLAG_compilation_counter_threshold, 0); + SetFlagScope sfs2(&FLAG_enable_interpreter, false); const char* kScript = "class A {\n" @@ -1814,7 +1814,7 @@ ISOLATE_UNIT_TEST_CASE(Profiler_InliningIntervalBoundry) { DisableNativeProfileScope dnps; DisableBackgroundCompilationScope dbcs; SetFlagScope sfs(&FLAG_optimization_counter_threshold, 30000); - SetFlagScope sfs2(&FLAG_compilation_counter_threshold, 0); + SetFlagScope sfs2(&FLAG_enable_interpreter, false); const char* kScript = "class A {\n" @@ -2162,8 +2162,8 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BasicSourcePositionOptimized) { DisableNativeProfileScope dnps; DisableBackgroundCompilationScope dbcs; // Optimize quickly. - SetFlagScope sfs(&FLAG_optimization_counter_threshold, 5); - SetFlagScope sfs2(&FLAG_compilation_counter_threshold, 0); + SetFlagScope sfs2(&FLAG_optimization_counter_threshold, 5); + SetFlagScope sfs3(&FLAG_enable_interpreter, false); const char* kScript = "class A {\n" " var a;\n" @@ -2348,8 +2348,8 @@ ISOLATE_UNIT_TEST_CASE(Profiler_SourcePositionOptimized) { DisableNativeProfileScope dnps; DisableBackgroundCompilationScope dbcs; // Optimize quickly. - SetFlagScope sfs(&FLAG_optimization_counter_threshold, 5); - SetFlagScope sfs2(&FLAG_compilation_counter_threshold, 0); + SetFlagScope sfs2(&FLAG_optimization_counter_threshold, 5); + SetFlagScope sfs3(&FLAG_enable_interpreter, false); const char* kScript = "class A {\n" @@ -2574,8 +2574,8 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) { DisableNativeProfileScope dnps; DisableBackgroundCompilationScope dbcs; // Optimize quickly. - SetFlagScope sfs(&FLAG_optimization_counter_threshold, 5); - SetFlagScope sfs2(&FLAG_compilation_counter_threshold, 0); + SetFlagScope sfs2(&FLAG_optimization_counter_threshold, 5); + SetFlagScope sfs3(&FLAG_enable_interpreter, false); const char* kScript = "class A {\n" @@ -2654,9 +2654,11 @@ ISOLATE_UNIT_TEST_CASE(Profiler_BinaryOperatorSourcePositionOptimized) { EXPECT(walker.Down()); EXPECT_STREQ("DRT_AllocateObject", walker.CurrentName()); EXPECT(walker.Down()); - EXPECT_STREQ("[Stub] Allocate A", walker.CurrentName()); - EXPECT_EQ(1, walker.CurrentExclusiveTicks()); - EXPECT(walker.Down()); + if (!FLAG_enable_interpreter) { + EXPECT_STREQ("[Stub] Allocate A", walker.CurrentName()); + EXPECT_EQ(1, walker.CurrentExclusiveTicks()); + EXPECT(walker.Down()); + } EXPECT_STREQ("B.boo", walker.CurrentName()); EXPECT_EQ(1, walker.CurrentNodeTickCount()); EXPECT_EQ(1, walker.CurrentInclusiveTicks()); diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn index e3fbf669417..9f926e39a91 100644 --- a/utils/kernel-service/BUILD.gn +++ b/utils/kernel-service/BUILD.gn @@ -101,13 +101,6 @@ template("kernel_service_dill") { "--output=" + rebase_path(output), rebase_path(kernel_service_script), ] - - if (dart_platform_bytecode) { - args += [ - "--gen-bytecode", - "--drop-ast", - ] - } } }