Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 8ca06b8a52bfa8554759804e55f691621782600c..fe5cb0169a24f702031fb48a993a2e1d5170808e 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -746,23 +746,24 @@ 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 a illegal redeclaration. |
Kevin Millikin (Chromium)
2011/05/24 14:36:25
"a" ==> "an" :)
|
+ ASSERT(mode != Variable::CONST); |
+ // Do nothing for a regular var declaration. |
+ // Store the function for a function declaration. |
Kevin Millikin (Chromium)
2011/05/24 14:36:25
This whole function is doing nothing for a regular
|
+ 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())); |