Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index bad1003eea687a33725cb734c1c5fb0cc0c07f9e..5a17d5748dffcef5c78c782a9fa9ee56d73c72f5 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -1859,13 +1859,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. |
@@ -2396,12 +2392,7 @@ void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
void FullCodeGenerator::EmitAssignment(Expression* expr) { |
- // Invalid left-hand sides are rewritten by the parser 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. |
@@ -4270,16 +4261,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 }; |