Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Side by Side Diff: vm/assembler_macros_ia32.h

Issue 10375059: Use a reserved stack local variable to store the Code object so that it can be looked up easily whe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | vm/assembler_macros_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // The class 'AssemblerMacros' contains assembler instruction groups that 4 // The class 'AssemblerMacros' contains assembler instruction groups that
5 // are used in Dart. 5 // are used in Dart.
6 6
7 #ifndef VM_ASSEMBLER_MACROS_IA32_H_ 7 #ifndef VM_ASSEMBLER_MACROS_IA32_H_
8 #define VM_ASSEMBLER_MACROS_IA32_H_ 8 #define VM_ASSEMBLER_MACROS_IA32_H_
9 9
10 #ifndef VM_ASSEMBLER_MACROS_H_ 10 #ifndef VM_ASSEMBLER_MACROS_H_
(...skipping 15 matching lines...) Expand all
26 // Inlined allocation of an instance of class 'cls', code has no runtime 26 // Inlined allocation of an instance of class 'cls', code has no runtime
27 // calls. Jump to 'failure' if the instance cannot be allocated here. 27 // calls. Jump to 'failure' if the instance cannot be allocated here.
28 // Class must be loaded in 'class_reg'. Allocated instance is returned 28 // Class must be loaded in 'class_reg'. Allocated instance is returned
29 // in 'instance_reg'. Only the class field of the object is initialized. 29 // in 'instance_reg'. Only the class field of the object is initialized.
30 // 'class_reg' and 'instance_reg' may not be the same register. 30 // 'class_reg' and 'instance_reg' may not be the same register.
31 static void TryAllocate(Assembler* assembler, 31 static void TryAllocate(Assembler* assembler,
32 const Class& cls, 32 const Class& cls,
33 Register class_reg, 33 Register class_reg,
34 Label* failure, 34 Label* failure,
35 Register instance_reg); 35 Register instance_reg);
36
37 // Set up a dart frame on entry with a frame pointer and PC information to
38 // enable easy access to the RawInstruction object of code corresponding
39 // to this frame.
40 // The dart frame layout is as follows:
41 // ....
42 // ret PC
43 // saved EBP <=== EBP
44 // pc (used to derive the RawInstruction Object of the dart code)
45 // locals space <=== ESP
46 // .....
47 // This code sets this up with the sequence:
48 // pushl ebp
49 // movl ebp, esp
50 // call L
51 // L: <code to adjust saved pc if there is any intrinsification code>
52 // .....
53 static void EnterDartFrame(Assembler* assembler, intptr_t frame_size);
54
55 // Set up a stub frame so that the stack traversal code can easily identify
56 // a stub frame.
57 // The stub frame layout is as follows:
58 // ....
59 // ret PC
60 // saved EBP
61 // 0 (used to indicate frame is a stub frame)
62 // .....
63 // This code sets this up with the sequence:
64 // pushl ebp
65 // movl ebp, esp
66 // pushl immediate(0)
67 // .....
68 static void EnterStubFrame(Assembler* assembler);
69
70 // Instruction pattern from entrypoint is used in dart frame prologs
71 // to set up the frame and save a PC which can be used to figure out the
72 // RawInstruction object corresponding to the code running in the frame.
73 // entrypoint:
74 // pushl ebp (size is 1 byte)
75 // movl ebp, esp (size is 2 bytes)
76 // call L (size is 5 bytes)
77 // L:
78 static const intptr_t kOffsetOfSavedPCfromEntrypoint = 8;
36 }; 79 };
37 80
38 } // namespace dart. 81 } // namespace dart.
39 82
40 #endif // VM_ASSEMBLER_MACROS_IA32_H_ 83 #endif // VM_ASSEMBLER_MACROS_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | vm/assembler_macros_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698