Commit 479e30c0 authored by verwaest's avatar verwaest Committed by Commit bot

Decide ParseLazy vs ParseProgram based on is_toplevel

BUG=v8:5501

Review-Url: https://codereview.chromium.org/2410413003
Cr-Commit-Position: refs/heads/master@{#40231}
parent 9b55c076
......@@ -3824,11 +3824,11 @@ bool Parser::Parse(ParseInfo* info) {
Isolate* isolate = info->isolate();
pre_parse_timer_ = isolate->counters()->pre_parse();
if (!info->shared_info().is_null() && info->shared_info()->is_function()) {
result = ParseLazy(isolate, info);
} else {
if (info->is_toplevel()) {
SetCachedData(info);
result = ParseProgram(isolate, info);
} else {
result = ParseLazy(isolate, info);
}
info->set_literal(result);
......
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