Chromium Code Reviews| Index: src/compiler.cc |
| diff --git a/src/compiler.cc b/src/compiler.cc |
| index a5d303044d8e474accfe77aafb68d4d092593d10..e4edfaf27064cc1bb980b7d423431b889a487b1b 100644 |
| --- a/src/compiler.cc |
| +++ b/src/compiler.cc |
| @@ -510,7 +510,10 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() { |
| os << "]" << std::endl; |
| } |
| - if (info()->shared_info()->asm_function()) { |
| + // Do not enable context specialization if the code is intended to be |
| + // included in a start-up snapshot. |
| + if (info()->shared_info()->asm_function() && |
| + !isolate()->serializer_enabled()) { |
|
Michael Starzinger
2015/03/04 13:43:50
As discussed offline: Instead of narrowing the int
|
| info()->MarkAsContextSpecializing(); |
| } |
| @@ -947,7 +950,10 @@ MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) { |
| PostponeInterruptsScope postpone(isolate); |
| info.SetOptimizing(BailoutId::None(), handle(function->shared()->code())); |
| - info.MarkAsContextSpecializing(); |
| + |
| + // Do not enable context specialization if the code is intended to be |
| + // included in a start-up snapshot. |
| + if (!isolate->serializer_enabled()) info.MarkAsContextSpecializing(); |
| if (GetOptimizedCodeNow(&info)) { |
| DCHECK(function->shared()->is_compiled()); |