Index: src/mips/full-codegen-mips.cc |
diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc |
index 4318b7a428119ef3dbc5cb6144d79e51c4ac86a7..9ab961319731d94e94e6805ee3c10cb9f17070ae 100644 |
--- a/src/mips/full-codegen-mips.cc |
+++ b/src/mips/full-codegen-mips.cc |
@@ -648,6 +648,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); |
} |