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

Unified Diff: src/liveedit.cc

Issue 3561012: More refactoring of class Compiler's interface. (Closed)
Patch Set: Reindent some code, change some copyright dates. Created 10 years, 2 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
« src/compiler.h ('K') | « src/ia32/codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit.cc
diff --git a/src/liveedit.cc b/src/liveedit.cc
index ecbc115301172c0cbd5d2b0d4bdb5ac1b6b89a0b..3cbd244693368a433d6674b2caed878cc5d13490 100644
--- a/src/liveedit.cc
+++ b/src/liveedit.cc
@@ -404,18 +404,16 @@ static void CompileScriptForTracker(Handle<Script> script) {
// Build AST.
CompilationInfo info(script);
info.MarkAsGlobal();
- if (!Parser::Parse(&info)) return;
-
- // Compile the code.
- LiveEditFunctionTracker tracker(info.function());
- Handle<Code> code = MakeCodeForLiveEdit(&info);
-
- // Check for stack-overflow exceptions.
- if (code.is_null()) {
- Top::StackOverflow();
- return;
+ if (Parser::Parse(&info)) {
+ // Compile the code.
+ LiveEditFunctionTracker tracker(info.function());
+ if (Compiler::MakeCodeForLiveEdit(&info)) {
+ ASSERT(!info.code().is_null());
+ tracker.RecordRootFunctionInfo(info.code());
+ } else {
+ Top::StackOverflow();
+ }
}
- tracker.RecordRootFunctionInfo(code);
}
« src/compiler.h ('K') | « src/ia32/codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698