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

Unified Diff: runtime/vm/compiler.cc

Issue 1211273011: Added full deferred loading semantic to precompiled/--noopt/eager-loading code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: m Created 5 years, 5 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
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 885208bec66d0a42b5755ee8bd0e7166d887d890..b540eb7b3ae020e15dfa7cfd6ecf810b251d17d0 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -71,6 +71,7 @@ DECLARE_FLAG(bool, trace_patching);
bool Compiler::always_optimize_ = false;
+bool Compiler::allow_recompilation_ = true;
// TODO(zerny): Factor out unoptimizing/optimizing pipelines and remove
@@ -972,6 +973,11 @@ static RawError* CompileFunctionHelper(CompilationPipeline* pipeline,
const Function& function,
bool optimized,
intptr_t osr_id) {
+ // Check that we optimize if 'Compiler::always_optimize()' is set to true,
+ // except if the function is marked as not optimizable.
+ ASSERT(!function.IsOptimizable() ||
+ !Compiler::always_optimize() || optimized);
+ ASSERT(Compiler::allow_recompilation() || !function.HasCode());
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
Thread* const thread = Thread::Current();

Powered by Google App Engine
This is Rietveld 408576698