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

Unified Diff: runtime/vm/intrinsifier_ia32.cc

Issue 11880022: Immediate index operand for string [] and streamline code for generating array ops. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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/intrinsifier_ia32.cc
===================================================================
--- runtime/vm/intrinsifier_ia32.cc (revision 17016)
+++ runtime/vm/intrinsifier_ia32.cc (working copy)
@@ -161,7 +161,7 @@
__ j(ABOVE_EQUAL, &fall_through, Assembler::kNearJump);
// Note that EBX is Smi, i.e, times 2.
ASSERT(kSmiTagShift == 1);
- __ movl(EAX, FieldAddress(EAX, EBX, TIMES_2, sizeof(RawArray)));
+ __ movl(EAX, FieldAddress(EAX, EBX, TIMES_2, Array::data_offset()));
__ ret();
__ Bind(&fall_through);
return false;
@@ -238,7 +238,7 @@
// Destroy ECX as we will not continue in the function.
__ movl(ECX, Address(ESP, + 1 * kWordSize)); // Value.
__ StoreIntoObject(EAX,
- FieldAddress(EAX, EBX, TIMES_2, sizeof(RawArray)),
+ FieldAddress(EAX, EBX, TIMES_2, Array::data_offset()),
ECX);
// Caller is responsible of preserving the value if necessary.
__ ret();
@@ -350,7 +350,7 @@
// Note that EBX is Smi, i.e, times 2.
ASSERT(kSmiTagShift == 1);
- __ movl(EAX, FieldAddress(EAX, EBX, TIMES_2, sizeof(RawArray)));
+ __ movl(EAX, FieldAddress(EAX, EBX, TIMES_2, Array::data_offset()));
__ ret();
__ Bind(&fall_through);
return false;
@@ -377,7 +377,7 @@
// Note that EBX is Smi, i.e, times 2.
ASSERT(kSmiTagShift == 1);
__ StoreIntoObject(EAX,
- FieldAddress(EAX, EBX, TIMES_2, sizeof(RawArray)),
+ FieldAddress(EAX, EBX, TIMES_2, Array::data_offset()),
EDI);
__ ret();
__ Bind(&fall_through);
@@ -447,7 +447,7 @@
__ movl(EAX, Address(ESP, + 1 * kWordSize)); // Value
ASSERT(kSmiTagShift == 1);
__ StoreIntoObject(EDI,
- FieldAddress(EDI, EBX, TIMES_2, sizeof(RawArray)),
+ FieldAddress(EDI, EBX, TIMES_2, Array::data_offset()),
EAX);
const Immediate raw_null =
Immediate(reinterpret_cast<int32_t>(Object::null()));

Powered by Google App Engine
This is Rietveld 408576698