Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index 9fc39d4ad8610d4687a758bd56734dd5a6173904..260cdcef0b9f21d813df864eae793f5787d42c80 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -327,18 +327,23 @@ void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm, |
Register dst, |
Register src, |
Handle<JSObject> holder, |
- int index) { |
- // 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); |
+ PropertyIndex index) { |
+ if (index.IsHeaderIndex()) { |
+ int offset = index.HeaderIndex() * kPointerSize; |
__ ldr(dst, FieldMemOperand(src, offset)); |
} else { |
- // Calculate the offset into the properties array. |
- int offset = index * kPointerSize + FixedArray::kHeaderSize; |
- __ ldr(dst, FieldMemOperand(src, JSObject::kPropertiesOffset)); |
- __ ldr(dst, FieldMemOperand(dst, offset)); |
+ // Adjust for the number of properties stored in the holder. |
+ int slot = index.FieldIndex() - holder->map()->inobject_properties(); |
+ if (slot < 0) { |
+ // Get the property straight out of the holder. |
+ int offset = holder->map()->instance_size() + (slot * kPointerSize); |
+ __ ldr(dst, FieldMemOperand(src, offset)); |
+ } else { |
+ // Calculate the offset into the properties array. |
+ int offset = slot * kPointerSize + FixedArray::kHeaderSize; |
+ __ ldr(dst, FieldMemOperand(src, JSObject::kPropertiesOffset)); |
+ __ ldr(dst, FieldMemOperand(dst, offset)); |
+ } |
} |
} |
@@ -1196,7 +1201,7 @@ void StubCompiler::GenerateLoadField(Handle<JSObject> object, |
Register scratch1, |
Register scratch2, |
Register scratch3, |
- int index, |
+ PropertyIndex index, |
Handle<String> name, |
Label* miss) { |
// Check that the receiver isn't a smi. |
@@ -1429,7 +1434,7 @@ void StubCompiler::GenerateLoadInterceptor(Handle<JSObject> object, |
// Retrieve a field from field's holder. |
GenerateFastPropertyLoad(masm(), r0, holder_reg, |
Handle<JSObject>(lookup->holder()), |
- lookup->GetFieldIndex()); |
+ lookup->GetFieldIndex().FieldIndex()); |
__ Ret(); |
} else { |
// We found CALLBACKS property in prototype chain of interceptor's |