Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 7c37e8ee8b2214ae6f9d901f3613c9e6101c86d7..d77d2ed496461e333cf884258a9ad00284d7f325 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -2764,16 +2764,20 @@ void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
Register scratch = scratch0(); |
Register result = ToRegister(instr->result()); |
- // Check if the calling frame is an arguments adaptor frame. |
- Label done, adapted; |
- __ ldr(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
- __ ldr(result, MemOperand(scratch, StandardFrameConstants::kContextOffset)); |
- __ cmp(result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
+ if (instr->from_inlined()) { |
+ __ add(result, sp, Operand(-2 * kPointerSize)); |
Kevin Millikin (Chromium)
2012/04/11 11:49:18
add? sub?
I think it's weird to have this off-by
Vyacheslav Egorov (Chromium)
2012/04/11 12:47:28
Off by one is there to avoid changing access code.
|
+ } else { |
+ // Check if the calling frame is an arguments adaptor frame. |
+ Label done, adapted; |
+ __ ldr(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |
+ __ ldr(result, MemOperand(scratch, StandardFrameConstants::kContextOffset)); |
+ __ cmp(result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
- // Result is the frame pointer for the frame if not adapted and for the real |
- // frame below the adaptor frame if adapted. |
- __ mov(result, fp, LeaveCC, ne); |
- __ mov(result, scratch, LeaveCC, eq); |
+ // Result is the frame pointer for the frame if not adapted and for the real |
+ // frame below the adaptor frame if adapted. |
+ __ mov(result, fp, LeaveCC, ne); |
+ __ mov(result, scratch, LeaveCC, eq); |
+ } |
} |
@@ -2907,6 +2911,11 @@ void LCodeGen::DoPushArgument(LPushArgument* instr) { |
} |
+void LCodeGen::DoPop(LPop* instr) { |
+ __ Drop(instr->count()); |
+} |
+ |
+ |
void LCodeGen::DoThisFunction(LThisFunction* instr) { |
Register result = ToRegister(instr->result()); |
__ LoadHeapObject(result, instr->hydrogen()->closure()); |