Chromium Code Reviews| Index: src/compiler.cc |
| diff --git a/src/compiler.cc b/src/compiler.cc |
| index 1b623c2b477029d86098ffc28d4a08a95dab06f9..130e977ead3eab816b718a708394f84fcdc925fc 100644 |
| --- a/src/compiler.cc |
| +++ b/src/compiler.cc |
| @@ -977,6 +977,20 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) { |
| return cached_code; |
| } |
| + if (function->shared()->was_marked_for_optimization()) { |
|
Michael Starzinger
2016/10/21 11:37:58
The flag never seems to be cleared. This will mark
Leszek Swirski
2016/10/21 11:44:13
That's a very good point, I hadn't considered opti
|
| + if (FLAG_trace_opt) { |
| + PrintF("[optimizing function "); |
| + function->PrintName(); |
| + PrintF(" eagerly because shared function was previously marked]\n"); |
| + } |
| + |
| + Handle<Code> opt_code; |
| + if (GetOptimizedCode(function, Compiler::NOT_CONCURRENT) |
| + .ToHandle(&opt_code)) { |
| + return opt_code; |
| + } |
| + } |
| + |
| if (function->shared()->is_compiled()) { |
| return Handle<Code>(function->shared()->code()); |
| } |