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

Unified Diff: runtime/vm/assembler_macros_ia32.cc

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, 6 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/assembler_macros_ia32.cc
===================================================================
--- runtime/vm/assembler_macros_ia32.cc (revision 9089)
+++ runtime/vm/assembler_macros_ia32.cc (working copy)
@@ -63,6 +63,20 @@
}
+void AssemblerMacros::EnterDartLeafFrame(Assembler* assembler,
+ intptr_t frame_size) {
+ __ EnterFrame(0);
+ Label dart_entry;
+ // Leave room for the saved PC, it will be filled in lazily, leave
+ // uninitialized.
+ __ subl(ESP, Immediate(frame_size + kWordSize));
+#if defined(DEBUG)
+ // Store an invalid object in saved PC slot.
+ __ movl(Address(EBP, -kWordSize), Immediate(kHeapObjectTag));
+#endif
+}
+
+
void AssemblerMacros::EnterStubFrame(Assembler* assembler) {
__ EnterFrame(0);
__ pushl(Immediate(0)); // Push 0 in the saved PC area for stub frames.

Powered by Google App Engine
This is Rietveld 408576698