Index: src/arm/full-codegen-arm.cc |
diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc |
index 8c3e825d191e29a47c5de391fa4a8217202dbd67..a71ae73f0b9b869d7dba9f0e3fdd108506df19c4 100644 |
--- a/src/arm/full-codegen-arm.cc |
+++ b/src/arm/full-codegen-arm.cc |
@@ -636,6 +636,11 @@ MemOperand FullCodeGenerator::StackOperand(Variable* var) { |
offset += (info_->scope()->num_parameters() + 1) * kPointerSize; |
} else { |
offset += JavaScriptFrameConstants::kLocal0Offset; |
+ // Test if the variable is from a nested block scope. |
+ if (info_->scope() != var->scope()) { |
+ // Skip handlers and stack locals from enclosing block scopes. |
+ offset -= var->scope()->stack_slots_depth() * kPointerSize; |
+ } |
} |
return MemOperand(fp, offset); |
} |