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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 167683002: Simplify type argument instantiation cache lookup by introducing an array (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | runtime/vm/intermediate_language_ia32.cc » ('J')
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 32709)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -2197,13 +2197,11 @@
__ LoadObject(R2, type_arguments());
__ ldr(R2, FieldAddress(R2, TypeArguments::instantiations_offset()));
- __ ldr(R3, FieldAddress(R2, Array::length_offset()));
__ AddImmediate(R2, Array::data_offset() - kHeapObjectTag);
- __ add(R3, R2, ShifterOperand(R3, LSL, 1)); // R3 is Smi.
+ // The instantiations cache is initialized with Object::zero_array() and is
+ // therefore guaranteed to contain kNoInstantiator. No length check needed.
Label loop, found, slow_case;
__ Bind(&loop);
- __ cmp(R2, ShifterOperand(R3));
- __ b(&slow_case, CS); // Unsigned higher or equal.
__ ldr(R1, Address(R2, 0 * kWordSize)); // Cached instantiator.
__ cmp(R1, ShifterOperand(R0));
__ b(&found, EQ);
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_ia32.cc » ('j') | runtime/vm/intermediate_language_ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698