 Chromium Code Reviews
 Chromium Code Reviews Issue 2399833002:
  Teach Scopes whether they will end up being lazily compiled or not  (Closed)
    
  
    Issue 2399833002:
  Teach Scopes whether they will end up being lazily compiled or not  (Closed) 
  | Index: src/compiler.cc | 
| diff --git a/src/compiler.cc b/src/compiler.cc | 
| index ec402fa82209339f2bddfcee9066b7e17ef90763..2673fee1a1d19e5c20978761cbbd84ddb8c2c612 100644 | 
| --- a/src/compiler.cc | 
| +++ b/src/compiler.cc | 
| @@ -1431,6 +1431,7 @@ bool Compiler::EnsureDeoptimizationSupport(CompilationInfo* info) { | 
| RecordFunctionCompilation(CodeEventListener::LAZY_COMPILE_TAG, | 
| &unoptimized); | 
| } | 
| + info->parse_info()->set_will_serialize(false); | 
| 
marja
2016/10/06 11:53:06
Why is this needed, shouldn't there be a default t
 
jochen (gone - plz use gerrit)
2016/10/06 15:05:04
In EnsureDeoptimizationSupport we might recompile
 
marja
2016/10/07 08:25:59
Offline discussion: this code for resetting the fl
 | 
| return true; | 
| } | 
| @@ -1794,6 +1795,8 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo( | 
| lazy &= | 
| !(FLAG_ignition && FLAG_ignition_eager && !isolate->serializer_enabled()); | 
| + DCHECK_EQ(lazy, literal->scope()->should_compile_lazily()); | 
| + | 
| // Generate code | 
| TimerEventScope<TimerEventCompileCode> timer(isolate); | 
| RuntimeCallTimerScope runtimeTimer(isolate, &RuntimeCallStats::CompileCode); |