Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 02a890a3565975cccdf6e4f71a285ceb9d54d593..a696b4957621fe20c6bbc9141bb1c994b9c3c9de 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -1880,13 +1880,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. |
@@ -2424,12 +2420,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. |
@@ -4338,16 +4329,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 }; |