Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1051)

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1657153002: Clean up global variables related to precompilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed unnecessary includes Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index eabcbf164d7c063bbfe4cc511014d685bedc0571..2221615d71a77cb35cf5c5179c27182767a9b8fa 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -107,11 +107,6 @@ static void PrecompilationModeHandler(bool value) {
FLAG_load_deferred_eagerly = true;
FLAG_deoptimize_alot = false; // Used in some tests.
FLAG_deoptimize_every = 0; // Used in some tests.
- Compiler::set_always_optimize(true);
- // Triggers assert if we try to recompile (e.g., because of deferred
- // loading, deoptimization, ...). Noopt mode simulates behavior
- // of precompiled code, therefore do not allow recompilation.
- Compiler::set_allow_recompilation(false);
// Precompilation finalizes all classes and thus allows CHA optimizations.
// Do not require CHA triggered deoptimization.
FLAG_use_cha_deopt = false;
@@ -940,7 +935,7 @@ Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id,
}
// No deoptimization allowed when 'always_optimize' is set.
- if (Compiler::always_optimize()) {
+ if (FLAG_precompilation) {
if (FLAG_trace_compiler) {
THR_Print(
"Retrying compilation %s, suppressing inlining of deopt_id:%" Pd "\n",
@@ -988,7 +983,7 @@ void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) {
RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) {
// No deopt information if we 'always_optimize' (no deoptimization allowed).
- if (Compiler::always_optimize()) {
+ if (FLAG_precompilation) {
return Array::empty_array().raw();
}
// For functions with optional arguments, all incoming arguments are copied
@@ -1145,7 +1140,7 @@ void FlowGraphCompiler::GenerateInstanceCall(
LocationSummary* locs,
const ICData& ic_data_in) {
const ICData& ic_data = ICData::ZoneHandle(ic_data_in.Original());
- if (Compiler::always_optimize()) {
+ if (FLAG_precompilation) {
EmitSwitchableInstanceCall(ic_data, argument_count,
deopt_id, token_pos, locs);
return;
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698