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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 8664005: Fix slow path for allocation of implicit closures (issue 613). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 1871)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -1354,22 +1354,27 @@
const Closure& new_closure = Closure::ZoneHandle();
__ PushObject(new_closure); // Push Null closure for return value.
__ PushObject(func);
- if (has_type_arguments) {
- __ pushl(ECX); // Push type arguments of closure to be allocated.
- } else {
- __ pushl(raw_null); // Push null type arguments.
- }
if (is_implicit_static_closure) {
__ CallRuntimeFromStub(kAllocateImplicitStaticClosureRuntimeEntry);
- } else if (is_implicit_instance_closure) {
- __ pushl(EAX); // Receiver.
- __ CallRuntimeFromStub(kAllocateImplicitInstanceClosureRuntimeEntry);
- __ popl(EAX); // Pop receiver.
} else {
- ASSERT(func.IsNonImplicitClosureFunction());
- __ CallRuntimeFromStub(kAllocateClosureRuntimeEntry);
+ if (is_implicit_instance_closure) {
+ __ pushl(EAX); // Receiver.
+ }
+ if (has_type_arguments) {
+ __ pushl(ECX); // Push type arguments of closure to be allocated.
+ } else {
+ __ pushl(raw_null); // Push null type arguments.
+ }
+ if (is_implicit_instance_closure) {
+ __ CallRuntimeFromStub(kAllocateImplicitInstanceClosureRuntimeEntry);
+ __ popl(EAX); // Pop argument (type arguments of object).
+ __ popl(EAX); // Pop receiver.
+ } else {
+ ASSERT(func.IsNonImplicitClosureFunction());
+ __ CallRuntimeFromStub(kAllocateClosureRuntimeEntry);
+ __ popl(EAX); // Pop argument (type arguments of object).
+ }
}
- __ popl(EAX); // Pop argument (type arguments of object).
__ popl(EAX); // Pop function object.
__ popl(EAX);
// EAX: new object
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698