| Index: src/x64/stub-cache-x64.cc
|
| diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc
|
| index b120efb376b6c5def906887d3dbf8f29ae53ecb0..866a14232a217d30a334c85eda6ae5255e6316b2 100644
|
| --- a/src/x64/stub-cache-x64.cc
|
| +++ b/src/x64/stub-cache-x64.cc
|
| @@ -350,18 +350,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;
|
| __ movq(dst, FieldOperand(src, offset));
|
| } else {
|
| - // Calculate the offset into the properties array.
|
| - int offset = index * kPointerSize + FixedArray::kHeaderSize;
|
| - __ movq(dst, FieldOperand(src, JSObject::kPropertiesOffset));
|
| - __ movq(dst, FieldOperand(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);
|
| + __ movq(dst, FieldOperand(src, offset));
|
| + } else {
|
| + // Calculate the offset into the properties array.
|
| + int offset = slot * kPointerSize + FixedArray::kHeaderSize;
|
| + __ movq(dst, FieldOperand(src, JSObject::kPropertiesOffset));
|
| + __ movq(dst, FieldOperand(dst, offset));
|
| + }
|
| }
|
| }
|
|
|
|
|