Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index e1f82304e0bc1704ef056a5bd619f49f41ddf863..22846c38b6f9193503dadfe76261623d9100afc6 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -760,23 +760,22 @@ void FullCodeGenerator::EmitDeclaration(Variable* variable, |
} |
} else if (prop != NULL) { |
- if (function != NULL || mode == Variable::CONST) { |
- // We are declaring a function or constant that rewrites to a |
- // property. Use (keyed) IC to set the initial value. We |
- // cannot visit the rewrite because it's shared and we risk |
- // recording duplicate AST IDs for bailouts from optimized code. |
+ // A const declaration aliasing a parameter is an illegal redeclaration. |
+ ASSERT(mode != Variable::CONST); |
+ if (function != NULL) { |
+ // We are declaring a function that rewrites to a property. |
+ // Use (keyed) IC to set the initial value. We cannot visit the |
+ // rewrite because it's shared and we risk recording duplicate AST |
+ // IDs for bailouts from optimized code. |
ASSERT(prop->obj()->AsVariableProxy() != NULL); |
{ AccumulatorValueContext for_object(this); |
EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); |
} |
- if (function != NULL) { |
- __ push(r0); |
- VisitForAccumulatorValue(function); |
- __ pop(r2); |
- } else { |
- __ mov(r2, r0); |
- __ LoadRoot(r0, Heap::kTheHoleValueRootIndex); |
- } |
+ |
+ __ push(r0); |
+ VisitForAccumulatorValue(function); |
+ __ pop(r2); |
+ |
ASSERT(prop->key()->AsLiteral() != NULL && |
prop->key()->AsLiteral()->handle()->IsSmi()); |
__ mov(r1, Operand(prop->key()->AsLiteral()->handle())); |