Commit a7c63607 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[interpreter] Compiler shortcut when bytecode present.

This adds a shortcut to the compilation pipeline that makes sure we are
not regenerating bytecode when it has been preserved from a previous
request. This can happen when code flushing removes baseline code,
thereby clearing the entry trampoline but leaving bytecode intact.

R=yangguo@chromium.org
BUG=v8:5265

Review-Url: https://codereview.chromium.org/2241783002
Cr-Commit-Position: refs/heads/master@{#38620}
parent 0a93ebaa
......@@ -1033,6 +1033,12 @@ MaybeHandle<Code> GetLazyCode(Handle<JSFunction> function) {
return Handle<Code>(function->shared()->code());
}
if (function->shared()->HasBytecodeArray()) {
Handle<Code> entry = isolate->builtins()->InterpreterEntryTrampoline();
function->shared()->ReplaceCode(*entry);
return entry;
}
Zone zone(isolate->allocator());
ParseInfo parse_info(&zone, function);
CompilationInfo info(&parse_info, function);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment