Chromium Code Reviews| Index: runtime/vm/assembler_x64.h |
| =================================================================== |
| --- runtime/vm/assembler_x64.h (revision 19430) |
| +++ runtime/vm/assembler_x64.h (working copy) |
| @@ -701,6 +701,58 @@ |
| buffer_.FinalizeInstructions(region); |
| } |
| + // Set up a dart frame on entry with a frame pointer and PC information to |
|
srdjan
2013/03/04 23:46:43
ditto
regis
2013/03/04 23:51:24
Done.
|
| + // enable easy access to the RawInstruction object of code corresponding |
| + // to this frame. |
| + // The dart frame layout is as follows: |
| + // .... |
| + // ret PC |
| + // saved RBP <=== RBP |
| + // pc (used to derive the RawInstruction Object of the dart code) |
| + // locals space <=== RSP |
| + // ..... |
| + // This code sets this up with the sequence: |
| + // pushq rbp |
| + // movq rbp, rsp |
| + // call L |
| + // L: <code to adjust saved pc if there is any intrinsification code> |
| + // ..... |
| + void EnterDartFrame(intptr_t frame_size); |
| + |
| + // Set up a stub frame so that the stack traversal code can easily identify |
| + // a stub frame. |
| + // The stub frame layout is as follows: |
| + // .... |
| + // ret PC |
| + // saved RBP |
| + // pc (used to derive the RawInstruction Object of the stub) |
| + // ..... |
| + // This code sets this up with the sequence: |
| + // pushq rbp |
| + // movq rbp, rsp |
| + // pushq immediate(0) |
| + // ..... |
| + void EnterStubFrame(); |
| + |
| + // Instruction pattern from entrypoint is used in dart frame prologs |
| + // to set up the frame and save a PC which can be used to figure out the |
| + // RawInstruction object corresponding to the code running in the frame. |
| + // entrypoint: |
| + // pushq rbp (size is 1 byte) |
| + // movq rbp, rsp (size is 3 bytes) |
| + // call L (size is 5 bytes) |
| + // L: |
| + static const intptr_t kOffsetOfSavedPCfromEntrypoint = 9; |
| + |
| + // Inlined allocation of an instance of class 'cls', code has no runtime |
| + // calls. Jump to 'failure' if the instance cannot be allocated here. |
| + // Allocated instance is returned in 'instance_reg'. |
| + // Only the tags field of the object is initialized. |
| + void TryAllocate(const Class& cls, |
| + Label* failure, |
| + bool near_jump, |
| + Register instance_reg); |
| + |
| // Debugging and bringup support. |
| void Stop(const char* message); |
| void Unimplemented(const char* message); |