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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1105513002: [turbofan] Use FastNewClosureStub if possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 8 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index d299aec2ac5395c2903dfe8e4cd4937b30a94c9f..21d867169ac3b553b78247fcdce6048af20bd134 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1473,10 +1473,9 @@ void AstGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) {
}
// Create node to instantiate a new closure.
- Node* info = jsgraph()->Constant(shared_info);
- Node* pretenure = jsgraph()->BooleanConstant(expr->pretenure());
- const Operator* op = javascript()->CallRuntime(Runtime::kNewClosure, 3);
- Node* value = NewNode(op, context, info, pretenure);
+ PretenureFlag pretenure = expr->pretenure() ? TENURED : NOT_TENURED;
+ const Operator* op = javascript()->CreateClosure(shared_info, pretenure);
+ Node* value = NewNode(op, context);
ast_context()->ProduceValue(value);
}

Powered by Google App Engine
This is Rietveld 408576698