| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 9cec9f3aadd82dd39697485e9997827d7e230108..9c04b9f052dba9d528552fe33e192b8cd770471e 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -895,11 +895,16 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
|
| AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy());
|
|
|
| if (FLAG_turbo_cache_shared_code) {
|
| - CodeAndLiterals result;
|
| - result = function->shared()->SearchOptimizedCodeMap(
|
| - *isolate->native_context(), BailoutId::None());
|
| - if (result.code != nullptr) {
|
| - return Handle<Code>(result.code);
|
| + Handle<Code> cached_code;
|
| + if (GetCodeFromOptimizedCodeMap(function, BailoutId::None())
|
| + .ToHandle(&cached_code)) {
|
| + if (FLAG_trace_opt) {
|
| + PrintF("[found optimized code for ");
|
| + function->ShortPrint();
|
| + PrintF(" during unoptimized compile]\n");
|
| + }
|
| + DCHECK(function->shared()->is_compiled());
|
| + return cached_code;
|
| }
|
| }
|
|
|
|
|