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

Unified Diff: src/stub-cache-arm.cc

Issue 6607: Fix CALL_IC to read properties out of the object in the presence... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 | src/stub-cache-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache-arm.cc
===================================================================
--- src/stub-cache-arm.cc (revision 502)
+++ src/stub-cache-arm.cc (working copy)
@@ -209,10 +209,19 @@
Register reg =
__ CheckMaps(JSObject::cast(object), r1, holder, r3, r2, &miss);
- // Get the properties array of the holder and get the function from the field.
- int offset = index * kPointerSize + Array::kHeaderSize;
- __ ldr(r1, FieldMemOperand(reg, JSObject::kPropertiesOffset));
- __ ldr(r1, FieldMemOperand(r1, offset));
+ // Adjust for the number of properties stored in the holder.
+ index -= holder->map()->inobject_properties();
+ if (index < 0) {
+ // Get the property straight out of the holder.
+ int offset = holder->map()->instance_size() + (index * kPointerSize);
+ __ ldr(r1, FieldMemOperand(reg, offset));
+ } else {
+ // Get the properties array of the holder and get the function from
+ // the field.
+ int offset = index * kPointerSize + Array::kHeaderSize;
+ __ ldr(r1, FieldMemOperand(reg, JSObject::kPropertiesOffset));
+ __ ldr(r1, FieldMemOperand(r1, offset));
+ }
// Check that the function really is a function.
__ tst(r1, Operand(kSmiTagMask));
« no previous file with comments | « no previous file | src/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698