| Index: src/compiler.cc
|
| ===================================================================
|
| --- src/compiler.cc (revision 7281)
|
| +++ src/compiler.cc (working copy)
|
| @@ -629,6 +629,11 @@
|
| } else {
|
| ASSERT(!info->code().is_null());
|
| Handle<Code> code = info->code();
|
| + // Set optimizable to false if this is disallowed by the shared
|
| + // function info, e.g., we might have flushed the code and must
|
| + // reset this bit when lazy compiling the code again.
|
| + if (shared->optimization_disabled()) code->set_optimizable(false);
|
| +
|
| Handle<JSFunction> function = info->closure();
|
| RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info, shared);
|
|
|
| @@ -665,7 +670,7 @@
|
| ASSERT(shared->is_compiled());
|
| shared->set_code_age(0);
|
|
|
| - if (V8::UseCrankshaft() && info->AllowOptimize()) {
|
| + if (info->AllowOptimize() && !shared->optimization_disabled()) {
|
| // If we're asked to always optimize, we compile the optimized
|
| // version of the function right away - unless the debugger is
|
| // active as it makes no sense to compile optimized code then.
|
|
|