Chromium Code Reviews| Index: src/compiler.cc |
| diff --git a/src/compiler.cc b/src/compiler.cc |
| index 3c51baa30e9881d3a8ac739166ba01c2673d1c1f..174b6e93cdb3a5fef7c90a617f8a8b564a3626c0 100644 |
| --- a/src/compiler.cc |
| +++ b/src/compiler.cc |
| @@ -908,7 +908,7 @@ static bool InstallCodeFromOptimizedCodeMap(CompilationInfo* info) { |
| } |
| -bool Compiler::CompileLazy(CompilationInfo* info) { |
| +bool Compiler::CompileLazy(CompilationInfo* info, bool install) { |
| Isolate* isolate = info->isolate(); |
| // The VM is in the COMPILER state until exiting this function. |
| @@ -920,7 +920,7 @@ bool Compiler::CompileLazy(CompilationInfo* info) { |
| int compiled_size = shared->end_position() - shared->start_position(); |
| isolate->counters()->total_compile_size()->Increment(compiled_size); |
| - if (InstallCodeFromOptimizedCodeMap(info)) return true; |
| + if (install && InstallCodeFromOptimizedCodeMap(info)) return true; |
|
Michael Starzinger
2013/07/31 14:55:50
Both InsertCodeIntoOptimizedCodeMap() and InstallC
|
| // Generate the AST for the lazily compiled function. |
| if (Parser::Parse(info)) { |
| @@ -940,15 +940,17 @@ bool Compiler::CompileLazy(CompilationInfo* info) { |
| isolate->StackOverflow(); |
| } |
| } else { |
| - InstallCodeCommon(info); |
| + if (install) InstallCodeCommon(info); |
| if (info->IsOptimizing()) { |
| Handle<Code> code = info->code(); |
| ASSERT(shared->scope_info() != ScopeInfo::Empty(isolate)); |
| - info->closure()->ReplaceCode(*code); |
| - InsertCodeIntoOptimizedCodeMap(info); |
| + if (install) { |
|
Michael Starzinger
2013/07/31 14:55:50
Instead of passing the "install" boolean flag we c
|
| + info->closure()->ReplaceCode(*code); |
| + InsertCodeIntoOptimizedCodeMap(info); |
| + } |
| return true; |
| - } else { |
| + } else if (install) { |
| return InstallFullCode(info); |
| } |
| } |