Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index bd15775d4b000f8e8a0478526b3c8c0c3939a5ce..f6c9a85c8d584f5935b4ded74a42a778f9e1047a 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -314,18 +314,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; |
__ lw(dst, FieldMemOperand(src, offset)); |
} else { |
- // Calculate the offset into the properties array. |
- int offset = index * kPointerSize + FixedArray::kHeaderSize; |
- __ lw(dst, FieldMemOperand(src, JSObject::kPropertiesOffset)); |
- __ lw(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); |
+ __ lw(dst, FieldMemOperand(src, offset)); |
+ } else { |
+ // Calculate the offset into the properties array. |
+ int offset = slot * kPointerSize + FixedArray::kHeaderSize; |
+ __ lw(dst, FieldMemOperand(src, JSObject::kPropertiesOffset)); |
+ __ lw(dst, FieldMemOperand(dst, offset)); |
+ } |
} |
} |
@@ -1200,7 +1205,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. |