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

Unified Diff: vm/assembler_macros_ia32.cc

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 side-by-side diff with in-line comments
Download patch
Index: vm/assembler_macros_ia32.cc
===================================================================
--- vm/assembler_macros_ia32.cc (revision 7576)
+++ vm/assembler_macros_ia32.cc (working copy)
@@ -57,6 +57,31 @@
}
}
+
+void AssemblerMacros::EnterDartFrame(Assembler* assembler,
+ intptr_t frame_size) {
+ intptr_t offset = assembler->CodeSize();
srdjan 2012/05/14 20:00:17 const
siva 2012/05/15 23:52:39 Done.
+ __ EnterFrame(0);
+ Label dart_entry;
+ __ call(&dart_entry);
+ __ Bind(&dart_entry);
+ // Adjust saved PC for any intrinsic code that could have been generated
+ // before a frame is created.
+ if (offset != 0) {
+ __ addl(Address(ESP, 0), Immediate(-offset));
+ }
+ if (frame_size != 0) {
+ Immediate frame_space(frame_size);
+ __ subl(ESP, frame_space);
srdjan 2012/05/14 20:00:17 This could fit well into one line, your choice.
siva 2012/05/15 23:52:39 Made it one line. On 2012/05/14 20:00:17, srdjan
+ }
+}
+
+
+void AssemblerMacros::EnterStubFrame(Assembler* assembler) {
+ __ EnterFrame(0);
+ __ pushl(Immediate(0)); // Push 0 in the saved PC area for stub frames.
+}
+
#undef __
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698