Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index bedf1be4371ef960bed101e30e299ebbb5d6d8a5..99ceea4d3bf076bee569999ff23c2983c235de46 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -2219,11 +2219,11 @@ void LCodeGen::DoLoadElements(LLoadElements* instr) { |
__ movzxbq(temp, FieldOperand(temp, Map::kBitField2Offset)); |
__ and_(temp, Immediate(Map::kElementsKindMask)); |
__ shr(temp, Immediate(Map::kElementsKindShift)); |
- __ cmpl(temp, Immediate(JSObject::FAST_ELEMENTS)); |
+ __ cmpl(temp, Immediate(FAST_ELEMENTS)); |
__ j(equal, &ok, Label::kNear); |
- __ cmpl(temp, Immediate(JSObject::FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND)); |
+ __ cmpl(temp, Immediate(FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND)); |
__ j(less, &fail, Label::kNear); |
- __ cmpl(temp, Immediate(JSObject::LAST_EXTERNAL_ARRAY_ELEMENTS_KIND)); |
+ __ cmpl(temp, Immediate(LAST_EXTERNAL_ARRAY_ELEMENTS_KIND)); |
__ j(less_equal, &ok, Label::kNear); |
__ bind(&fail); |
__ Abort("Check for fast or external elements failed"); |
@@ -2267,7 +2267,7 @@ void LCodeGen::DoLoadKeyedFastElement(LLoadKeyedFastElement* instr) { |
// Load the result. |
__ movq(result, |
BuildFastArrayOperand(instr->elements(), instr->key(), |
- JSObject::FAST_ELEMENTS, |
+ FAST_ELEMENTS, |
FixedArray::kHeaderSize - kHeapObjectTag)); |
// Check for the hole value. |
@@ -2288,14 +2288,14 @@ void LCodeGen::DoLoadKeyedFastDoubleElement( |
Operand hole_check_operand = BuildFastArrayOperand( |
instr->elements(), |
instr->key(), |
- JSObject::FAST_DOUBLE_ELEMENTS, |
+ FAST_DOUBLE_ELEMENTS, |
offset); |
__ cmpl(hole_check_operand, Immediate(kHoleNanUpper32)); |
DeoptimizeIf(equal, instr->environment()); |
} |
Operand double_load_operand = BuildFastArrayOperand( |
- instr->elements(), instr->key(), JSObject::FAST_DOUBLE_ELEMENTS, |
+ instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, |
FixedDoubleArray::kHeaderSize - kHeapObjectTag); |
__ movsd(result, double_load_operand); |
} |
@@ -2304,7 +2304,7 @@ void LCodeGen::DoLoadKeyedFastDoubleElement( |
Operand LCodeGen::BuildFastArrayOperand( |
LOperand* elements_pointer, |
LOperand* key, |
- JSObject::ElementsKind elements_kind, |
+ ElementsKind elements_kind, |
uint32_t offset) { |
Register elements_pointer_reg = ToRegister(elements_pointer); |
int shift_size = ElementsKindToShiftSize(elements_kind); |
@@ -2325,35 +2325,35 @@ Operand LCodeGen::BuildFastArrayOperand( |
void LCodeGen::DoLoadKeyedSpecializedArrayElement( |
LLoadKeyedSpecializedArrayElement* instr) { |
- JSObject::ElementsKind elements_kind = instr->elements_kind(); |
+ ElementsKind elements_kind = instr->elements_kind(); |
Operand operand(BuildFastArrayOperand(instr->external_pointer(), |
instr->key(), elements_kind, 0)); |
- if (elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
XMMRegister result(ToDoubleRegister(instr->result())); |
__ movss(result, operand); |
__ cvtss2sd(result, result); |
- } else if (elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS) { |
+ } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
__ movsd(ToDoubleRegister(instr->result()), operand); |
} else { |
Register result(ToRegister(instr->result())); |
switch (elements_kind) { |
- case JSObject::EXTERNAL_BYTE_ELEMENTS: |
+ case EXTERNAL_BYTE_ELEMENTS: |
__ movsxbq(result, operand); |
break; |
- case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
- case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
+ case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
+ case EXTERNAL_PIXEL_ELEMENTS: |
__ movzxbq(result, operand); |
break; |
- case JSObject::EXTERNAL_SHORT_ELEMENTS: |
+ case EXTERNAL_SHORT_ELEMENTS: |
__ movsxwq(result, operand); |
break; |
- case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
+ case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
__ movzxwq(result, operand); |
break; |
- case JSObject::EXTERNAL_INT_ELEMENTS: |
+ case EXTERNAL_INT_ELEMENTS: |
__ movsxlq(result, operand); |
break; |
- case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
+ case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
__ movl(result, operand); |
__ testl(result, result); |
// TODO(danno): we could be more clever here, perhaps having a special |
@@ -2361,12 +2361,12 @@ void LCodeGen::DoLoadKeyedSpecializedArrayElement( |
// happens, and generate code that returns a double rather than int. |
DeoptimizeIf(negative, instr->environment()); |
break; |
- case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
- case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
- case JSObject::FAST_ELEMENTS: |
- case JSObject::FAST_DOUBLE_ELEMENTS: |
- case JSObject::DICTIONARY_ELEMENTS: |
- case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
+ case EXTERNAL_FLOAT_ELEMENTS: |
+ case EXTERNAL_DOUBLE_ELEMENTS: |
+ case FAST_ELEMENTS: |
+ case FAST_DOUBLE_ELEMENTS: |
+ case DICTIONARY_ELEMENTS: |
+ case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
break; |
} |
@@ -3061,37 +3061,37 @@ void LCodeGen::DoStoreNamedGeneric(LStoreNamedGeneric* instr) { |
void LCodeGen::DoStoreKeyedSpecializedArrayElement( |
LStoreKeyedSpecializedArrayElement* instr) { |
- JSObject::ElementsKind elements_kind = instr->elements_kind(); |
+ ElementsKind elements_kind = instr->elements_kind(); |
Operand operand(BuildFastArrayOperand(instr->external_pointer(), |
instr->key(), elements_kind, 0)); |
- if (elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) { |
+ if (elements_kind == EXTERNAL_FLOAT_ELEMENTS) { |
XMMRegister value(ToDoubleRegister(instr->value())); |
__ cvtsd2ss(value, value); |
__ movss(operand, value); |
- } else if (elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS) { |
+ } else if (elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
__ movsd(operand, ToDoubleRegister(instr->value())); |
} else { |
Register value(ToRegister(instr->value())); |
switch (elements_kind) { |
- case JSObject::EXTERNAL_PIXEL_ELEMENTS: |
- case JSObject::EXTERNAL_BYTE_ELEMENTS: |
- case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
+ case EXTERNAL_PIXEL_ELEMENTS: |
+ case EXTERNAL_BYTE_ELEMENTS: |
+ case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
__ movb(operand, value); |
break; |
- case JSObject::EXTERNAL_SHORT_ELEMENTS: |
- case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
+ case EXTERNAL_SHORT_ELEMENTS: |
+ case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
__ movw(operand, value); |
break; |
- case JSObject::EXTERNAL_INT_ELEMENTS: |
- case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: |
+ case EXTERNAL_INT_ELEMENTS: |
+ case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
__ movl(operand, value); |
break; |
- case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
- case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
- case JSObject::FAST_ELEMENTS: |
- case JSObject::FAST_DOUBLE_ELEMENTS: |
- case JSObject::DICTIONARY_ELEMENTS: |
- case JSObject::NON_STRICT_ARGUMENTS_ELEMENTS: |
+ case EXTERNAL_FLOAT_ELEMENTS: |
+ case EXTERNAL_DOUBLE_ELEMENTS: |
+ case FAST_ELEMENTS: |
+ case FAST_DOUBLE_ELEMENTS: |
+ case DICTIONARY_ELEMENTS: |
+ case NON_STRICT_ARGUMENTS_ELEMENTS: |
UNREACHABLE(); |
break; |
} |
@@ -3164,7 +3164,7 @@ void LCodeGen::DoStoreKeyedFastDoubleElement( |
__ bind(&have_value); |
Operand double_store_operand = BuildFastArrayOperand( |
- instr->elements(), instr->key(), JSObject::FAST_DOUBLE_ELEMENTS, |
+ instr->elements(), instr->key(), FAST_DOUBLE_ELEMENTS, |
FixedDoubleArray::kHeaderSize - kHeapObjectTag); |
__ movsd(double_store_operand, value); |
} |