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

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

Issue 10668034: Recognize leaf functions: skip stack check and populating the pc slot, store the pc slot lazily in … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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) 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // pc (used to derive the RawInstruction Object of the dart code) 42 // pc (used to derive the RawInstruction Object of the dart code)
43 // locals space <=== ESP 43 // locals space <=== ESP
44 // ..... 44 // .....
45 // This code sets this up with the sequence: 45 // This code sets this up with the sequence:
46 // pushl ebp 46 // pushl ebp
47 // movl ebp, esp 47 // movl ebp, esp
48 // call L 48 // call L
49 // L: <code to adjust saved pc if there is any intrinsification code> 49 // L: <code to adjust saved pc if there is any intrinsification code>
50 // ..... 50 // .....
51 static void EnterDartFrame(Assembler* assembler, intptr_t frame_size); 51 static void EnterDartFrame(Assembler* assembler, intptr_t frame_size);
52 // Populates pc local slot lazily.
53 static void EnterDartLeafFrame(Assembler* assembler, intptr_t frame_size);
52 54
53 // Set up a stub frame so that the stack traversal code can easily identify 55 // Set up a stub frame so that the stack traversal code can easily identify
54 // a stub frame. 56 // a stub frame.
55 // The stub frame layout is as follows: 57 // The stub frame layout is as follows:
56 // .... 58 // ....
57 // ret PC 59 // ret PC
58 // saved EBP 60 // saved EBP
59 // 0 (used to indicate frame is a stub frame) 61 // 0 (used to indicate frame is a stub frame)
60 // ..... 62 // .....
61 // This code sets this up with the sequence: 63 // This code sets this up with the sequence:
(...skipping 10 matching lines...) Expand all
72 // pushl ebp (size is 1 byte) 74 // pushl ebp (size is 1 byte)
73 // movl ebp, esp (size is 2 bytes) 75 // movl ebp, esp (size is 2 bytes)
74 // call L (size is 5 bytes) 76 // call L (size is 5 bytes)
75 // L: 77 // L:
76 static const intptr_t kOffsetOfSavedPCfromEntrypoint = 8; 78 static const intptr_t kOffsetOfSavedPCfromEntrypoint = 8;
77 }; 79 };
78 80
79 } // namespace dart. 81 } // namespace dart.
80 82
81 #endif // VM_ASSEMBLER_MACROS_IA32_H_ 83 #endif // VM_ASSEMBLER_MACROS_IA32_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_macros_ia32.cc » ('j') | runtime/vm/flow_graph_compiler_ia32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698