Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 046edbdda2ddb942fafe74cac53475964fe71981..a98346e088de9cf922bc6ec994e31ea35eff0b7a 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2991,8 +2991,7 @@ void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { |
instr->elements(), |
key, |
elements_kind, |
- 0, |
- instr->additional_index())); |
+ instr->base_offset())); |
if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
XMMRegister result(ToDoubleRegister(instr->result())); |
@@ -3060,14 +3059,11 @@ void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { |
} |
if (instr->hydrogen()->RequiresHoleCheck()) { |
- int offset = FixedDoubleArray::kHeaderSize - kHeapObjectTag + |
- sizeof(kHoleNanLower32); |
Operand hole_check_operand = BuildFastArrayOperand( |
instr->elements(), |
key, |
FAST_DOUBLE_ELEMENTS, |
- offset, |
- instr->additional_index()); |
+ instr->base_offset() + sizeof(kHoleNanLower32)); |
__ cmpl(hole_check_operand, Immediate(kHoleNanUpper32)); |
DeoptimizeIf(equal, instr->environment()); |
} |
@@ -3076,8 +3072,7 @@ void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { |
instr->elements(), |
key, |
FAST_DOUBLE_ELEMENTS, |
- FixedDoubleArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index()); |
+ instr->base_offset()); |
__ movsd(result, double_load_operand); |
} |
@@ -3104,8 +3099,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { |
BuildFastArrayOperand(instr->elements(), |
key, |
FAST_ELEMENTS, |
- FixedArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index())); |
+ instr->base_offset())); |
// Check for the hole value. |
if (instr->hydrogen()->RequiresHoleCheck()) { |
@@ -3135,8 +3129,7 @@ Operand LCodeGen::BuildFastArrayOperand( |
LOperand* elements_pointer, |
LOperand* key, |
ElementsKind elements_kind, |
- uint32_t offset, |
- uint32_t additional_index) { |
+ uint32_t offset) { |
Register elements_pointer_reg = ToRegister(elements_pointer); |
int shift_size = ElementsKindToShiftSize(elements_kind); |
if (key->IsConstantOperand()) { |
@@ -3145,14 +3138,13 @@ Operand LCodeGen::BuildFastArrayOperand( |
Abort(kArrayIndexConstantValueTooBig); |
} |
return Operand(elements_pointer_reg, |
- ((constant_value + additional_index) << shift_size) |
- + offset); |
+ (constant_value << shift_size) + offset); |
} else { |
ScaleFactor scale_factor = static_cast<ScaleFactor>(shift_size); |
return Operand(elements_pointer_reg, |
ToRegister(key), |
scale_factor, |
- offset + (additional_index << shift_size)); |
+ offset); |
} |
} |
@@ -4180,8 +4172,7 @@ void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { |
instr->elements(), |
key, |
elements_kind, |
- 0, |
- instr->additional_index())); |
+ instr->base_offset())); |
if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
XMMRegister value(ToDoubleRegister(instr->value())); |
@@ -4256,8 +4247,7 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
instr->elements(), |
key, |
FAST_DOUBLE_ELEMENTS, |
- FixedDoubleArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index()); |
+ instr->base_offset()); |
__ movsd(double_store_operand, value); |
} |
@@ -4284,8 +4274,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { |
BuildFastArrayOperand(instr->elements(), |
key, |
FAST_ELEMENTS, |
- FixedArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index()); |
+ instr->base_offset()); |
if (instr->value()->IsRegister()) { |
__ movq(operand, ToRegister(instr->value())); |
} else { |
@@ -5620,7 +5609,6 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { |
Register index = ToRegister(instr->index()); |
Label out_of_object, done; |
- __ SmiToInteger32(index, index); |
__ cmpl(index, Immediate(0)); |
__ j(less, &out_of_object, Label::kNear); |
__ movq(object, FieldOperand(object, |