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

Unified Diff: src/compiler/js-inlining.cc

Issue 683023002: Move AST node counting to post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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.cc ('K') | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index bab3308cb86deb9c74a28d89bafce93b8a2f350e..58d490449fd77971a0e81623d89e2460b3a50e15 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -59,17 +59,6 @@ void JSInliner::Inline() {
}
-// TODO(sigurds) Find a home for this function and reuse it everywhere (esp. in
-// test cases, where similar code is currently duplicated).
-static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) {
- CHECK(Parser::Parse(info));
- CHECK(Rewriter::Rewrite(info));
- CHECK(Scope::Analyze(info));
- CHECK(AstNumbering::Renumber(info->function(), info->zone()));
- CHECK(Compiler::EnsureDeoptimizationSupport(info));
-}
-
-
// A facade on a JSFunction's graph to facilitate inlining. It assumes the
// that the function graph has only one return statement, and provides
// {UnifyReturn} to convert a function graph to that end.
@@ -385,7 +374,9 @@ void JSInliner::TryInlineJSCall(Node* call_node) {
}
CompilationInfoWithZone info(function);
- Parse(function, &info);
+ // TODO(wingo): ParseAndAnalyze can fail due to stack overflow.
wingo 2014/10/28 08:31:02 Here I added this TODO. Should we just return if
+ CHECK(Compiler::ParseAndAnalyze(&info));
+ CHECK(Compiler::EnsureDeoptimizationSupport(&info));
if (info.scope()->arguments() != NULL && info.strict_mode() != STRICT) {
// For now do not inline functions that use their arguments array.
« src/compiler.cc ('K') | « src/compiler.cc ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698