Chromium Code Reviews| Index: src/x64/code-stubs-x64.cc |
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
| index b3ab8c1e7588306dda1dacc8d8f6f6f032700c7f..3371e5515414833fa8a53a14b9fbc1f85f255595 100644 |
| --- a/src/x64/code-stubs-x64.cc |
| +++ b/src/x64/code-stubs-x64.cc |
| @@ -5817,6 +5817,31 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) { |
| } |
| +void RecordObjectAllocationStub::Generate(MacroAssembler* masm) { |
| + // ----------- S t a t e ------------- |
| + // -- rsp[0] : return address |
| + // -- rsp[8] : new object address |
| + // -- rsp[16] : object size |
| + // ----------------------------------- |
| + Isolate* isolate = masm->isolate(); |
| + FrameScope scope(masm, StackFrame::MANUAL); |
| + __ EnterApiExitFrame(0); |
| + |
| + __ PushSafepointRegisters(); |
| + __ PrepareCallCFunction(3); |
| + __ movq(arg_reg_3, Operand(rbp, |
| + kFPOnStackSize + kPCOnStackSize + 1 * kPointerSize)); |
| + __ movq(arg_reg_2, Operand(rbp, kFPOnStackSize + kPCOnStackSize)); |
| + __ movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); |
|
Yang
2013/10/30 15:12:57
If you need to erect a frame and also pass the iso
yurys
2013/10/31 08:56:01
There are two reasons for this:
1. CallRuntime doe
|
| + __ CallCFunction( |
| + ExternalReference::record_object_allocation_function(isolate), 3); |
| + __ PopSafepointRegisters(); |
| + |
| + __ LeaveApiExitFrame(false); |
| + __ ret(0); |
| +} |
| + |
| + |
| #undef __ |
| } } // namespace v8::internal |