| Index: src/compiler/js-inlining.cc
|
| diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
|
| index b70a3d270b92039d2aee862c53f596cc5b0061e5..bab3308cb86deb9c74a28d89bafce93b8a2f350e 100644
|
| --- a/src/compiler/js-inlining.cc
|
| +++ b/src/compiler/js-inlining.cc
|
| @@ -59,6 +59,17 @@ 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.
|
| @@ -374,8 +385,7 @@ void JSInliner::TryInlineJSCall(Node* call_node) {
|
| }
|
|
|
| CompilationInfoWithZone info(function);
|
| - CHECK(Compiler::ParseAndAnalyze(&info));
|
| - CHECK(Compiler::EnsureDeoptimizationSupport(&info));
|
| + Parse(function, &info);
|
|
|
| if (info.scope()->arguments() != NULL && info.strict_mode() != STRICT) {
|
| // For now do not inline functions that use their arguments array.
|
|
|