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

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

Issue 701853002: [turbofan] Fix deopt for assignments in non-effect context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « src/compiler/ast-graph-builder.h ('k') | test/mjsunit/regress/regress-assignment-in-test-context.js » ('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 7b5abd191cfe4c12dd2651d953516099833bc168..805afc5a3c515c1d28118e2160c6bca6424807be 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -1173,8 +1173,8 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
switch (assign_type) {
case VARIABLE: {
Variable* variable = expr->target()->AsVariableProxy()->var();
- BuildVariableAssignment(variable, value, expr->op(),
- expr->AssignmentId());
+ BuildVariableAssignment(variable, value, expr->op(), expr->AssignmentId(),
+ ast_context()->GetStateCombine());
break;
}
case NAMED_PROPERTY: {
@@ -1183,7 +1183,8 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
MakeUnique(property->key()->AsLiteral()->AsPropertyName());
Node* store =
NewNode(javascript()->StoreNamed(strict_mode(), name), object, value);
- PrepareFrameState(store, expr->AssignmentId());
+ PrepareFrameState(store, expr->AssignmentId(),
+ ast_context()->GetStateCombine());
break;
}
case KEYED_PROPERTY: {
@@ -1191,7 +1192,8 @@ void AstGraphBuilder::VisitAssignment(Assignment* expr) {
Node* object = environment()->Pop();
Node* store = NewNode(javascript()->StoreProperty(strict_mode()), object,
key, value);
- PrepareFrameState(store, expr->AssignmentId());
+ PrepareFrameState(store, expr->AssignmentId(),
+ ast_context()->GetStateCombine());
break;
}
}
@@ -1957,9 +1959,9 @@ Node* AstGraphBuilder::BuildVariableDelete(
}
-Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value,
- Token::Value op,
- BailoutId bailout_id) {
+Node* AstGraphBuilder::BuildVariableAssignment(
+ Variable* variable, Node* value, Token::Value op, BailoutId bailout_id,
+ OutputFrameStateCombine combine) {
Node* the_hole = jsgraph()->TheHoleConstant();
VariableMode mode = variable->mode();
switch (variable->location()) {
@@ -1969,7 +1971,7 @@ Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value,
Unique<Name> name = MakeUnique(variable->name());
const Operator* op = javascript()->StoreNamed(strict_mode(), name);
Node* store = NewNode(op, global, value);
- PrepareFrameState(store, bailout_id);
+ PrepareFrameState(store, bailout_id, combine);
return store;
}
case Variable::PARAMETER:
@@ -2035,7 +2037,7 @@ Node* AstGraphBuilder::BuildVariableAssignment(Variable* variable, Node* value,
const Operator* op =
javascript()->CallRuntime(Runtime::kStoreLookupSlot, 4);
Node* store = NewNode(op, value, current_context(), name, strict);
- PrepareFrameState(store, bailout_id);
+ PrepareFrameState(store, bailout_id, combine);
return store;
}
}
« no previous file with comments | « src/compiler/ast-graph-builder.h ('k') | test/mjsunit/regress/regress-assignment-in-test-context.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698