Index: src/ia32/lithium-codegen-ia32.cc |
diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc |
index 739f042cb84df04fc96865d78167adac2bdf9a78..4ff0593b4b7a1cc345e871c0d28806f7ad96496c 100644 |
--- a/src/ia32/lithium-codegen-ia32.cc |
+++ b/src/ia32/lithium-codegen-ia32.cc |
@@ -3451,8 +3451,7 @@ void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { |
key, |
instr->hydrogen()->key()->representation(), |
elements_kind, |
- 0, |
- instr->additional_index())); |
+ instr->base_offset())); |
if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
@@ -3514,14 +3513,11 @@ void LCodeGen::DoLoadKeyedExternalArray(LLoadKeyed* instr) { |
void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { |
if (instr->hydrogen()->RequiresHoleCheck()) { |
- int offset = FixedDoubleArray::kHeaderSize - kHeapObjectTag + |
- sizeof(kHoleNanLower32); |
Operand hole_check_operand = BuildFastArrayOperand( |
instr->elements(), instr->key(), |
instr->hydrogen()->key()->representation(), |
FAST_DOUBLE_ELEMENTS, |
- offset, |
- instr->additional_index()); |
+ instr->base_offset() + sizeof(kHoleNanLower32)); |
__ cmp(hole_check_operand, Immediate(kHoleNanUpper32)); |
DeoptimizeIf(equal, instr->environment()); |
} |
@@ -3531,8 +3527,7 @@ void LCodeGen::DoLoadKeyedFixedDoubleArray(LLoadKeyed* instr) { |
instr->key(), |
instr->hydrogen()->key()->representation(), |
FAST_DOUBLE_ELEMENTS, |
- FixedDoubleArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index()); |
+ instr->base_offset()); |
if (CpuFeatures::IsSupported(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
XMMRegister result = ToDoubleRegister(instr->result()); |
@@ -3552,8 +3547,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) { |
instr->key(), |
instr->hydrogen()->key()->representation(), |
FAST_ELEMENTS, |
- FixedArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index())); |
+ instr->base_offset())); |
// Check for the hole value. |
if (instr->hydrogen()->RequiresHoleCheck()) { |
@@ -3584,8 +3578,7 @@ Operand LCodeGen::BuildFastArrayOperand( |
LOperand* key, |
Representation key_representation, |
ElementsKind elements_kind, |
- uint32_t offset, |
- uint32_t additional_index) { |
+ uint32_t base_offset) { |
Register elements_pointer_reg = ToRegister(elements_pointer); |
int element_shift_size = ElementsKindToShiftSize(elements_kind); |
int shift_size = element_shift_size; |
@@ -3595,8 +3588,8 @@ Operand LCodeGen::BuildFastArrayOperand( |
Abort(kArrayIndexConstantValueTooBig); |
} |
return Operand(elements_pointer_reg, |
- ((constant_value + additional_index) << shift_size) |
- + offset); |
+ ((constant_value) << shift_size) |
+ + base_offset); |
} else { |
// Take the tag bit into account while computing the shift size. |
if (key_representation.IsSmi() && (shift_size >= 1)) { |
@@ -3606,7 +3599,7 @@ Operand LCodeGen::BuildFastArrayOperand( |
return Operand(elements_pointer_reg, |
ToRegister(key), |
scale_factor, |
- offset + (additional_index << element_shift_size)); |
+ base_offset); |
} |
} |
@@ -4613,8 +4606,7 @@ void LCodeGen::DoStoreKeyedExternalArray(LStoreKeyed* instr) { |
key, |
instr->hydrogen()->key()->representation(), |
elements_kind, |
- 0, |
- instr->additional_index())); |
+ instr->base_offset())); |
if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
if (CpuFeatures::IsSafeForSnapshot(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
@@ -4673,8 +4665,7 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
instr->key(), |
instr->hydrogen()->key()->representation(), |
FAST_DOUBLE_ELEMENTS, |
- FixedDoubleArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index()); |
+ instr->base_offset()); |
if (CpuFeatures::IsSafeForSnapshot(SSE2)) { |
CpuFeatureScope scope(masm(), SSE2); |
@@ -4707,8 +4698,7 @@ void LCodeGen::DoStoreKeyedFixedDoubleArray(LStoreKeyed* instr) { |
instr->key(), |
instr->hydrogen()->key()->representation(), |
FAST_DOUBLE_ELEMENTS, |
- FixedDoubleArray::kHeaderSize - kHeapObjectTag + kPointerSize, |
- instr->additional_index()); |
+ kPointerSize + instr->base_offset()); |
__ mov(double_store_operand2, Immediate(upper)); |
} else { |
Label no_special_nan_handling; |
@@ -4750,8 +4740,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) { |
instr->key(), |
instr->hydrogen()->key()->representation(), |
FAST_ELEMENTS, |
- FixedArray::kHeaderSize - kHeapObjectTag, |
- instr->additional_index()); |
+ instr->base_offset()); |
if (instr->value()->IsRegister()) { |
__ mov(operand, ToRegister(instr->value())); |
} else { |
@@ -6414,7 +6403,7 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { |
__ j(less, &out_of_object, Label::kNear); |
__ mov(object, FieldOperand(object, |
index, |
- times_half_pointer_size, |
+ times_pointer_size, |
JSObject::kHeaderSize)); |
__ jmp(&done, Label::kNear); |
@@ -6424,7 +6413,7 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { |
// Index is now equal to out of object property index plus 1. |
__ mov(object, FieldOperand(object, |
index, |
- times_half_pointer_size, |
+ times_pointer_size, |
FixedArray::kHeaderSize - kPointerSize)); |
__ bind(&done); |
} |