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

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

Issue 15110003: Make deoptimization architecture dependent (it depends on the frame layout). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
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 | current ret addr | (PC of current frame) 14 | saved EBP | (EBP of current frame)
15 | saved PC | (PC of current frame)
15 +--------------------+ 16 +--------------------+
16 Current frame | ... | <- ESP of current frame 17 Current frame | ... | <- ESP of current frame
17 | first local | 18 | first local |
18 | PC marker | (current frame's code entry + offset) 19 | PC marker | (current frame's code entry + offset)
19 | caller's EBP | <- EBP of current frame 20 | caller's EBP | <- EBP of current frame
20 | caller's ret addr | (PC of caller frame) 21 | caller's ret addr | (PC of caller frame)
21 +--------------------+ 22 +--------------------+
22 Caller frame | last parameter | <- ESP of caller frame 23 Caller frame | last parameter | <- ESP of caller frame
23 | ... | 24 | ... |
24 */ 25 */
25 26
27 static const int kDartFrameFixedSize = 3; // PC marker, EBP, PC.
26 static const int kSavedPcSlotFromSp = -1; 28 static const int kSavedPcSlotFromSp = -1;
27 static const int kFirstLocalSlotFromFp = -2; 29 static const int kFirstLocalSlotFromFp = -2;
28 static const int kPcMarkerSlotFromFp = -1; 30 static const int kPcMarkerSlotFromFp = -1;
29 static const int kSavedCallerFpSlotFromFp = 0; 31 static const int kSavedCallerFpSlotFromFp = 0;
30 static const int kParamEndSlotFromFp = 1; // Same slot as caller's ret addr. 32 static const int kSavedCallerPcSlotFromFp = 1;
33 static const int kParamEndSlotFromFp = 1; // One slot past last parameter.
31 static const int kCallerSpSlotFromFp = 2; 34 static const int kCallerSpSlotFromFp = 2;
32 35
36 // No pool pointer on IA32 (indicated by aliasing saved fp).
37 static const int kSavedCallerPpSlotFromFp = kSavedCallerFpSlotFromFp;
srdjan 2013/05/14 22:16:39 This looks fragile. Maybe implement as a getter in
regis 2013/05/14 23:23:42 I added a getter in the common header and left the
38
33 // Entry and exit frame layout. 39 // Entry and exit frame layout.
34 static const int kSavedContextSlotFromEntryFp = -5; 40 static const int kSavedContextSlotFromEntryFp = -5;
35 static const int kExitLinkSlotFromEntryFp = -4; 41 static const int kExitLinkSlotFromEntryFp = -4;
36 42
37 } // namespace dart 43 } // namespace dart
38 44
39 #endif // VM_STACK_FRAME_IA32_H_ 45 #endif // VM_STACK_FRAME_IA32_H_
40 46
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698