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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 15564004: Refactor the IL for object allocation with type arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 22932)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -1617,12 +1617,10 @@
// instantiated from null becomes a vector of dynamic, then use null as
// the type arguments.
Label type_arguments_instantiated;
- const intptr_t len = type_arguments().Length();
- if (type_arguments().IsRawInstantiatedRaw(len)) {
- __ CompareImmediate(instantiator_reg,
- reinterpret_cast<intptr_t>(Object::null()));
- __ b(&type_arguments_instantiated, EQ);
- }
+ ASSERT(type_arguments().IsRawInstantiatedRaw(type_arguments().Length()));
regis 2013/05/21 16:39:36 Do I understand correctly that you only use this E
+ __ CompareImmediate(instantiator_reg,
+ reinterpret_cast<intptr_t>(Object::null()));
+ __ b(&type_arguments_instantiated, EQ);
// Instantiate non-null type arguments.
// In the non-factory case, we rely on the allocation stub to
// instantiate the type arguments.
@@ -1660,18 +1658,16 @@
// If the instantiator is null and if the type argument vector
// instantiated from null becomes a vector of dynamic, then use null as
// the type arguments and do not pass the instantiator.
- const intptr_t len = type_arguments().Length();
- if (type_arguments().IsRawInstantiatedRaw(len)) {
- Label instantiator_not_null;
- __ CompareImmediate(instantiator_reg,
- reinterpret_cast<intptr_t>(Object::null()));
- __ b(&instantiator_not_null, NE);
- // Null was used in VisitExtractConstructorTypeArguments as the
- // instantiated type arguments, no proper instantiator needed.
- __ LoadImmediate(instantiator_reg,
- Smi::RawValue(StubCode::kNoInstantiator));
- __ Bind(&instantiator_not_null);
- }
+ ASSERT(type_arguments().IsRawInstantiatedRaw(type_arguments().Length()));
+ Label instantiator_not_null;
+ __ CompareImmediate(instantiator_reg,
+ reinterpret_cast<intptr_t>(Object::null()));
+ __ b(&instantiator_not_null, NE);
+ // Null was used in VisitExtractConstructorTypeArguments as the
+ // instantiated type arguments, no proper instantiator needed.
+ __ LoadImmediate(instantiator_reg,
+ Smi::RawValue(StubCode::kNoInstantiator));
+ __ Bind(&instantiator_not_null);
// instantiator_reg: instantiator or kNoInstantiator.
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698