Index: src/mips/lithium-codegen-mips.cc |
diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc |
index 67dbe69def967f89729e7ba435a5875b9a93ad63..2a022b5aa078938f486ce39c1b11acad9a02a3d5 100644 |
--- a/src/mips/lithium-codegen-mips.cc |
+++ b/src/mips/lithium-codegen-mips.cc |
@@ -446,7 +446,10 @@ void LCodeGen::WriteTranslation(LEnvironment* environment, |
int height = translation_size - environment->parameter_count(); |
WriteTranslation(environment->outer(), translation); |
- int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
+ int closure_id = *info()->closure() != *environment->closure() |
+ ? DefineDeoptimizationLiteral(environment->closure()) |
+ : Translation::kSelfLiteralId; |
+ |
switch (environment->frame_type()) { |
case JS_FUNCTION: |
translation->BeginJSFrame(environment->ast_id(), closure_id, height); |
@@ -2847,7 +2850,7 @@ void LCodeGen::DoDrop(LDrop* instr) { |
void LCodeGen::DoThisFunction(LThisFunction* instr) { |
Register result = ToRegister(instr->result()); |
- __ LoadHeapObject(result, instr->hydrogen()->closure()); |
+ __ lw(result, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); |
} |