Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 4287c3c85af18cf7ae1a3ad734d0bc7fd8eae3b9..0845915dc5ded8b2e034c778829183dd5c046bd0 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2497,24 +2497,28 @@ void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
Register result = ToRegister(instr->result()); |
- // Check for arguments adapter frame. |
- Label done, adapted; |
- __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
- __ Cmp(Operand(result, StandardFrameConstants::kContextOffset), |
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
- __ j(equal, &adapted, Label::kNear); |
- |
- // No arguments adaptor frame. |
- __ movq(result, rbp); |
- __ jmp(&done, Label::kNear); |
+ if (instr->from_inlined()) { |
+ __ lea(result, Operand(rsp, -2 * kPointerSize)); |
+ } else { |
+ // Check for arguments adapter frame. |
+ Label done, adapted; |
+ __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
+ __ Cmp(Operand(result, StandardFrameConstants::kContextOffset), |
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |
+ __ j(equal, &adapted, Label::kNear); |
+ |
+ // No arguments adaptor frame. |
+ __ movq(result, rbp); |
+ __ jmp(&done, Label::kNear); |
- // Arguments adaptor frame present. |
- __ bind(&adapted); |
- __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
+ // Arguments adaptor frame present. |
+ __ bind(&adapted); |
+ __ movq(result, Operand(rbp, StandardFrameConstants::kCallerFPOffset)); |
- // Result is the frame pointer for the frame if not adapted and for the real |
- // frame below the adaptor frame if adapted. |
- __ bind(&done); |
+ // Result is the frame pointer for the frame if not adapted and for the real |
+ // frame below the adaptor frame if adapted. |
+ __ bind(&done); |
+ } |
} |
@@ -2640,6 +2644,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()); |