--turbo-cache-shared-code shouldn't control lookup in optimized code map.

This flag is meant to control whether we add a special context-free
entry to the optimized code map or not. A usage of the flag was
bogus.

BUG=

Review-Url: https://codereview.chromium.org/2374723002
Cr-Commit-Position: refs/heads/master@{#39784}
This commit is contained in:
mvstanton 2016-09-27 09:44:06 -07:00 committed by Commit bot
parent f26c4d2d55
commit 7abb0c69fb

View File

@ -991,18 +991,16 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.compile"), "V8.CompileCode");
AggregatedHistogramTimerScope timer(isolate->counters()->compile_lazy());
if (FLAG_turbo_cache_shared_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;
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;
}
if (function->shared()->is_compiled()) {