Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Unified Diff: src/compiler.cc

Issue 177973002: Lazy preparsing vs. lazy parsing fix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index d466778069b19f22b58008507702e0d6fadc3e0a..743d3336881a760894a6fabfe0a0855d86508b93 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -789,6 +789,13 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
String::cast(script->source())->length() > FLAG_min_preparse_length) &&
!DebuggerWantsEagerCompilation(info);
+ if (!parse_allow_lazy && info->pre_parse_data() != NULL) {
+ // We are going to parse eagerly, but we have preparse data produced by lazy
+ // preparsing. We cannot use it, since it won't contain all the symbols we
+ // need for eager parsing.
+ info->SetPreParseData(NULL);
+ }
+
Handle<SharedFunctionInfo> result;
{ VMState<COMPILER> state(info->isolate());
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698