Chromium Code Reviews| Index: src/arm/builtins-arm.cc |
| diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
| index 7ae29242b2e48d68d5a96cd40abe0ebab610a48a..eae6f74bdebb07a3984f4df6f929b92a76e37f3d 100644 |
| --- a/src/arm/builtins-arm.cc |
| +++ b/src/arm/builtins-arm.cc |
| @@ -622,12 +622,13 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
| masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); |
| } |
| - // Restore context from the frame. |
| + // Restore context and pool pointer from the frame. |
| // r0: result |
| // sp[0]: receiver |
| // sp[1]: constructor function |
| // sp[2]: number of arguments (smi-tagged) |
| __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
| + __ RestoreConstantPoolPointer(); |
| // If the result is an object (in the ECMA sense), we should get rid |
| // of the receiver and use the result; see ECMA-262 section 13.2.2-7 |
| @@ -705,6 +706,7 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm, |
| // Set up the context from the function argument. |
| __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
| + __ LoadConstantPoolPointer(r1); |
| __ InitializeRootRegister(); |
| @@ -843,7 +845,7 @@ void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) { |
| __ ldm(ia_w, sp, r0.bit() | r1.bit() | fp.bit() | lr.bit()); |
| // Perform prologue operations usually performed by the young code stub. |
| - __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
| + __ PushFixedFrame(r1); |
|
JF
2013/11/26 18:43:59
Maybe I'm missing some context, but why is this ne
rmcilroy
2013/11/27 17:33:56
If code is pre-aged it will hit call this stub (ra
|
| __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| // Jump to point after the code-age stub. |
| @@ -1026,6 +1028,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
| { Label convert_to_object, use_global_receiver, patch_receiver; |
| // Change context eagerly in case we need the global receiver. |
| __ ldr(cp, FieldMemOperand(r1, JSFunction::kContextOffset)); |
| + __ LoadConstantPoolPointer(r1); |
| // Do not transform the receiver for strict mode functions. |
| __ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset)); |
| @@ -1353,7 +1356,12 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
| static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
| __ SmiTag(r0); |
| __ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
| - __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | fp.bit() | lr.bit()); |
| + if (FLAG_enable_ool_constant_pool) { |
| + __ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
| + __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit()); |
|
JF
2013/11/26 18:43:59
Can you explain why r4 is spilled twice?
rmcilroy
2013/11/27 17:33:56
The second r4 is pushed where pp would usually be
|
| + } else { |
| + __ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | fp.bit() | lr.bit()); |
| + } |
| __ add(fp, sp, |
| Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); |
| } |