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

Unified Diff: runtime/vm/intermediate_language_ia32.cc

Issue 294223003: Last cross-platform cleanup in preparation of improved ARM code for indexed (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/intermediate_language_ia32.cc
===================================================================
--- runtime/vm/intermediate_language_ia32.cc (revision 36535)
+++ runtime/vm/intermediate_language_ia32.cc (working copy)
@@ -1043,21 +1043,14 @@
Location index = locs()->in(1);
Address element_address(kNoRegister, 0);
- if (IsExternal()) {
- element_address = index.IsRegister()
- ? compiler->ExternalElementAddressForRegIndex(
- index_scale(), array, index.reg())
- : compiler->ExternalElementAddressForIntIndex(
- index_scale(), array, Smi::Cast(index.constant()).Value());
- } else {
- ASSERT(this->array()->definition()->representation() == kTagged);
- element_address = index.IsRegister()
- ? compiler->ElementAddressForRegIndex(
- class_id(), index_scale(), array, index.reg())
- : compiler->ElementAddressForIntIndex(
- class_id(), index_scale(), array,
- Smi::Cast(index.constant()).Value());
- }
+ element_address = index.IsRegister()
+ ? compiler->ElementAddressForRegIndex(
+ true, // Load.
+ IsExternal(), class_id(), index_scale(), array, index.reg())
+ : compiler->ElementAddressForIntIndex(
+ true, // Load.
+ IsExternal(), class_id(), index_scale(), array,
+ Smi::Cast(index.constant()).Value());
if ((representation() == kUnboxedDouble) ||
(representation() == kUnboxedFloat32x4) ||
@@ -1277,21 +1270,14 @@
Location index = locs()->in(1);
Address element_address(kNoRegister, 0);
- if (IsExternal()) {
- element_address = index.IsRegister()
- ? compiler->ExternalElementAddressForRegIndex(
- index_scale(), array, index.reg())
- : compiler->ExternalElementAddressForIntIndex(
- index_scale(), array, Smi::Cast(index.constant()).Value());
- } else {
- ASSERT(this->array()->definition()->representation() == kTagged);
- element_address = index.IsRegister()
- ? compiler->ElementAddressForRegIndex(
- class_id(), index_scale(), array, index.reg())
- : compiler->ElementAddressForIntIndex(
- class_id(), index_scale(), array,
+ element_address = index.IsRegister()
+ ? compiler->ElementAddressForRegIndex(
+ false, // Store.
+ IsExternal(), class_id(), index_scale(), array, index.reg())
+ : compiler->ElementAddressForIntIndex(
+ false, // Store.
+ IsExternal(), class_id(), index_scale(), array,
Smi::Cast(index.constant()).Value());
- }
if ((index_scale() == 1) && index.IsRegister()) {
__ SmiUntag(index.reg());

Powered by Google App Engine
This is Rietveld 408576698