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

Side by Side Diff: runtime/vm/stack_frame_ia32.h

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments Created 5 years, 3 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
« no previous file with comments | « runtime/vm/stack_frame_arm64.h ('k') | runtime/vm/stack_frame_mips.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 4
5 #ifndef VM_STACK_FRAME_IA32_H_ 5 #ifndef VM_STACK_FRAME_IA32_H_
6 #define VM_STACK_FRAME_IA32_H_ 6 #define VM_STACK_FRAME_IA32_H_
7 7
8 namespace dart { 8 namespace dart {
9 9
10 /* IA32 Dart Frame Layout 10 /* IA32 Dart Frame Layout
11 11
12 | | <- TOS 12 | | <- TOS
13 Callee frame | ... | 13 Callee frame | ... |
14 | saved EBP | (EBP of current frame) 14 | saved EBP | (EBP of current frame)
15 | saved PC | (PC of current frame) 15 | saved PC | (PC of current frame)
16 +--------------------+ 16 +--------------------+
17 Current frame | ... T| <- ESP of current frame 17 Current frame | ... T| <- ESP of current frame
18 | first local T| 18 | first local T|
19 | PC marker | (current frame's code entry + offset) 19 | code object T| (current frame's code object)
20 | caller's EBP | <- EBP of current frame 20 | caller's EBP | <- EBP of current frame
21 | caller's ret addr | (PC of caller frame) 21 | caller's ret addr | (PC of caller frame)
22 +--------------------+ 22 +--------------------+
23 Caller frame | last parameter | <- ESP of caller frame 23 Caller frame | last parameter | <- ESP of caller frame
24 | ... | 24 | ... |
25 25
26 T against a slot indicates it needs to be traversed during GC. 26 T against a slot indicates it needs to be traversed during GC.
27 */ 27 */
28 28
29 static const int kDartFrameFixedSize = 3; // PC marker, EBP, PC. 29 static const int kDartFrameFixedSize = 3; // PC marker, EBP, PC.
30 static const int kSavedPcSlotFromSp = -1; 30 static const int kSavedPcSlotFromSp = -1;
31 31
32 static const int kFirstObjectSlotFromFp = -2; // Used by GC to traverse stack. 32 static const int kFirstObjectSlotFromFp = -1; // Used by GC to traverse stack.
33 33
34 static const int kFirstLocalSlotFromFp = -2; 34 static const int kFirstLocalSlotFromFp = -2;
35 static const int kPcMarkerSlotFromFp = -1; 35 static const int kPcMarkerSlotFromFp = -1;
36 static const int kSavedCallerFpSlotFromFp = 0; 36 static const int kSavedCallerFpSlotFromFp = 0;
37 static const int kSavedCallerPcSlotFromFp = 1; 37 static const int kSavedCallerPcSlotFromFp = 1;
38 static const int kParamEndSlotFromFp = 1; // One slot past last parameter. 38 static const int kParamEndSlotFromFp = 1; // One slot past last parameter.
39 static const int kCallerSpSlotFromFp = 2; 39 static const int kCallerSpSlotFromFp = 2;
40 40
41 // No pool pointer on IA32 (indicated by aliasing saved fp). 41 // No pool pointer on IA32 (indicated by aliasing saved fp).
42 static const int kSavedCallerPpSlotFromFp = kSavedCallerFpSlotFromFp; 42 static const int kSavedCallerPpSlotFromFp = kSavedCallerFpSlotFromFp;
43 43
44 // Entry and exit frame layout. 44 // Entry and exit frame layout.
45 static const int kExitLinkSlotFromEntryFp = -6; 45 static const int kExitLinkSlotFromEntryFp = -7;
46 46
47 } // namespace dart 47 } // namespace dart
48 48
49 #endif // VM_STACK_FRAME_IA32_H_ 49 #endif // VM_STACK_FRAME_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/stack_frame_arm64.h ('k') | runtime/vm/stack_frame_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698