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

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

Issue 1340313003: [turbofan] Make arguments object materialization inlinable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_turbofan-arguments-2
Patch Set: Rebased Created 5 years, 3 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
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index 6718535c9f338d35922e3375c8bf862534f2fc20..48600b7553b957045a62898aac469e886d38e375 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -3151,17 +3151,17 @@ Node* AstGraphBuilder::BuildArgumentsObject(Variable* arguments) {
if (arguments == NULL) return NULL;
// Allocate and initialize a new arguments object.
- Node* callee = GetFunctionClosure();
CreateArgumentsParameters::Type type =
is_strict(language_mode()) || !info()->has_simple_parameters()
? CreateArgumentsParameters::kUnmappedArguments
: CreateArgumentsParameters::kMappedArguments;
const Operator* op = javascript()->CreateArguments(type, 0);
- Node* object = NewNode(op, callee);
+ Node* object = NewNode(op, GetFunctionClosure());
+ PrepareFrameState(object, BailoutId::None());
- // Assign the object to the arguments variable.
+ // Assign the object to the {arguments} variable. This should never lazy
+ // deopt, so it is fine to send invalid bailout id.
DCHECK(arguments->IsContextSlot() || arguments->IsStackAllocated());
- // This should never lazy deopt, so it is fine to send invalid bailout id.
FrameStateBeforeAndAfter states(this, BailoutId::None());
BuildVariableAssignment(arguments, object, Token::ASSIGN, VectorSlotPair(),
BailoutId::None(), states);
@@ -3175,7 +3175,8 @@ Node* AstGraphBuilder::BuildThisFunctionVariable(Variable* this_function_var) {
// Retrieve the closure we were called with.
Node* this_function = GetFunctionClosure();
- // Assign the object to the {.this_function} variable.
+ // Assign the object to the {.this_function} variable. This should never lazy
+ // deopt, so it is fine to send invalid bailout id.
FrameStateBeforeAndAfter states(this, BailoutId::None());
BuildVariableAssignment(this_function_var, this_function, Token::INIT_CONST,
VectorSlotPair(), BailoutId::None(), states);
@@ -3191,7 +3192,8 @@ Node* AstGraphBuilder::BuildNewTargetVariable(Variable* new_target_var) {
javascript()->CallRuntime(Runtime::kGetOriginalConstructor, 0);
Node* object = NewNode(op);
- // Assign the object to the {new.target} variable.
+ // Assign the object to the {new.target} variable. This should never lazy
+ // deopt, so it is fine to send invalid bailout id.
FrameStateBeforeAndAfter states(this, BailoutId::None());
BuildVariableAssignment(new_target_var, object, Token::INIT_CONST,
VectorSlotPair(), BailoutId::None(), states);
« no previous file with comments | « no previous file | src/compiler/js-generic-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698