Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index fc6760d3f26386b8a23cb09316dbf78a5b17de30..b71e72b12784d0c4f3f33a3057c796b620a6f830 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -1072,6 +1072,8 @@ static Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) { |
} |
} |
+ DCHECK(!info->is_debug() || !parse_info->allow_lazy_parsing()); |
+ |
info->MarkAsFirstCompile(); |
FunctionLiteral* lit = info->function(); |
@@ -1333,8 +1335,10 @@ Handle<SharedFunctionInfo> Compiler::CompileStreamedScript( |
static_cast<LanguageMode>(parse_info->language_mode() | language_mode)); |
CompilationInfo compile_info(parse_info); |
- // TODO(marja): FLAG_serialize_toplevel is not honoured and won't be; when the |
- // real code caching lands, streaming needs to be adapted to use it. |
+ |
+ // If compiling for debugging, parse eagerly from scratch. |
+ if (compile_info.is_debug()) parse_info->set_literal(NULL); |
+ |
return CompileToplevel(&compile_info); |
} |