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

Unified Diff: vm/runtime_entry_ia32.cc

Issue 10592006: Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
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
« no previous file with comments | « vm/runtime_entry.h ('k') | vm/runtime_entry_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/runtime_entry_ia32.cc
===================================================================
--- vm/runtime_entry_ia32.cc (revision 8859)
+++ vm/runtime_entry_ia32.cc (working copy)
@@ -17,16 +17,20 @@
// Generate code to call into the stub which will call the runtime
// function. Input for the stub is as follows:
+// For regular runtime calls -
// ESP : points to the arguments and return value array.
// ECX : address of the runtime function to call.
// EDX : number of arguments to the call.
+// For leaf calls the caller is responsible to setup the arguments
+// and look for return values based on the C calling convention.
void RuntimeEntry::Call(Assembler* assembler) const {
- __ movl(ECX, Immediate(GetEntryPoint()));
- __ movl(EDX, Immediate(argument_count()));
- if (is_leaf()) {
- __ call(&StubCode::CallToLeafRuntimeLabel());
+ if (!is_leaf()) {
+ __ movl(ECX, Immediate(GetEntryPoint()));
+ __ movl(EDX, Immediate(argument_count()));
+ __ call(&StubCode::CallToRuntimeLabel());
} else {
- __ call(&StubCode::CallToRuntimeLabel());
+ ExternalLabel label(name(), GetEntryPoint());
+ __ call(&label);
}
}
« no previous file with comments | « vm/runtime_entry.h ('k') | vm/runtime_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698