Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 2ee1594f8671227fad384b33ea3192ce531c3a73..9cbf0d2866a964df02b5e94a3c4e31fdd43b4de3 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -1225,9 +1225,17 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(Variable* var, |
} else if (var->mode() == Variable::DYNAMIC_LOCAL) { |
Variable* local = var->local_if_not_shadowed(); |
__ ldr(r0, ContextSlotOperandCheckExtensions(local, slow)); |
- if (local->mode() == Variable::CONST) { |
+ if (local->mode() == Variable::CONST || |
+ local->mode() == Variable::LET) { |
__ CompareRoot(r0, Heap::kTheHoleValueRootIndex); |
- __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq); |
+ if (local->mode() == Variable::CONST) { |
+ __ LoadRoot(r0, Heap::kUndefinedValueRootIndex, eq); |
+ } else { // Variable::LE |
rossberg
2011/10/06 13:34:04
Typo
|
+ __ b(ne, done); |
+ __ mov(r0, Operand(var->name())); |
+ __ push(r0); |
+ __ CallRuntime(Runtime::kThrowReferenceError, 1); |
+ } |
} |
__ jmp(done); |
} |