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

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 9939003: Use null type argument vector instead of vector of Dynamic for a generic raw (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/stub_code_ia32.cc
===================================================================
--- runtime/vm/stub_code_ia32.cc (revision 6066)
+++ runtime/vm/stub_code_ia32.cc (working copy)
@@ -744,9 +744,7 @@
__ pushl(raw_null); // Setup space on stack for return value.
__ pushl(EDX); // Array length as Smi.
__ pushl(ECX); // Element type.
- __ pushl(raw_null); // Null instantiator.
__ CallRuntimeFromStub(kAllocateArrayRuntimeEntry);
- __ popl(EAX); // Pop instantiator.
__ popl(EAX); // Pop element type argument.
__ popl(EDX); // Pop array length argument.
__ popl(EAX); // Pop return value from return slot.
@@ -1125,12 +1123,13 @@
if (is_cls_parameterized) {
__ movl(ECX, EBX);
// A new InstantiatedTypeArguments object only needs to be allocated if
- // the instantiator is non-null.
- Label null_instantiator;
- __ cmpl(Address(ESP, kInstantiatorTypeArgumentsOffset), raw_null);
- __ j(EQUAL, &null_instantiator, Assembler::kNearJump);
+ // the instantiator is provided (not kNoInstantiator, but may be null).
+ Label no_instantiator;
+ __ cmpl(Address(ESP, kInstantiatorTypeArgumentsOffset),
+ Immediate(Smi::RawValue(StubCode::kNoInstantiator)));
+ __ j(EQUAL, &no_instantiator, Assembler::kNearJump);
__ addl(EBX, Immediate(type_args_size));
- __ Bind(&null_instantiator);
+ __ Bind(&no_instantiator);
// ECX: potential new object end and, if ECX != EBX, potential new
// InstantiatedTypeArguments object start.
}
@@ -1272,7 +1271,7 @@
__ pushl(EDX); // Push type arguments of instantiator.
} else {
__ pushl(raw_null); // Push null type arguments.
- __ pushl(raw_null); // Push null instantiator.
+ __ pushl(Immediate(Smi::RawValue(StubCode::kNoInstantiator)));
}
__ CallRuntimeFromStub(kAllocateObjectRuntimeEntry); // Allocate object.
__ popl(EAX); // Pop argument (instantiator).

Powered by Google App Engine
This is Rietveld 408576698