Index: src/a64/full-codegen-a64.cc |
diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc |
index a5f7311717971745a17d9899d51f3f286dda5fa0..34c22e056f0890880ec684fafa1ca66cbfb2cf7f 100644 |
--- a/src/a64/full-codegen-a64.cc |
+++ b/src/a64/full-codegen-a64.cc |
@@ -1848,13 +1848,9 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) { |
void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
+ ASSERT(expr->target()->IsValidLeftHandSide()); |
+ |
Comment cmnt(masm_, "[ Assignment"); |
- // Invalid left-hand sides are rewritten to have a 'throw ReferenceError' |
- // on the left-hand side. |
- if (!expr->target()->IsValidLeftHandSide()) { |
- VisitForEffect(expr->target()); |
- return; |
- } |
// Left-hand side can only be a property, a global or a (parameter or local) |
// slot. |
@@ -2093,12 +2089,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
void FullCodeGenerator::EmitAssignment(Expression* expr) { |
- // Invalid left-hand sides are rewritten to have a 'throw |
- // ReferenceError' on the left-hand side. |
- if (!expr->IsValidLeftHandSide()) { |
- VisitForEffect(expr); |
- return; |
- } |
+ ASSERT(expr->IsValidLeftHandSide()); |
// Left-hand side can only be a property, a global or a (parameter or local) |
// slot. |
@@ -3978,16 +3969,11 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
+ ASSERT(expr->expression()->IsValidLeftHandSide()); |
+ |
Comment cmnt(masm_, "[ CountOperation"); |
SetSourcePosition(expr->position()); |
- // Invalid left-hand sides are rewritten to have a 'throw ReferenceError' |
- // as the left-hand side. |
- if (!expr->expression()->IsValidLeftHandSide()) { |
- VisitForEffect(expr->expression()); |
- return; |
- } |
- |
// Expression can only be a property, a global or a (parameter or local) |
// slot. |
enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |