| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index a8536a1841f379a5078e5fc79716f16e9564024f..f9207d7ec0a03ce4c1c1812b9c4c887358f3b71b 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -2896,7 +2896,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
| }
|
|
|
| Representation representation = access.representation();
|
| - if (representation.IsSmi() &&
|
| + if (representation.IsSmi() && SmiValuesAre32Bits() &&
|
| instr->hydrogen()->representation().IsInteger32()) {
|
| #ifdef DEBUG
|
| Register scratch = kScratchRegister;
|
| @@ -2906,7 +2906,7 @@ void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) {
|
|
|
| // Read int value directly from upper half of the smi.
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| + ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| offset += kPointerSize / 2;
|
| representation = Representation::Integer32();
|
| }
|
| @@ -3110,7 +3110,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
|
| int offset = FixedArray::kHeaderSize - kHeapObjectTag;
|
| Representation representation = hinstr->representation();
|
|
|
| - if (representation.IsInteger32() &&
|
| + if (representation.IsInteger32() && SmiValuesAre32Bits() &&
|
| hinstr->elements_kind() == FAST_SMI_ELEMENTS) {
|
| ASSERT(!requires_hole_check);
|
| #ifdef DEBUG
|
| @@ -3126,7 +3126,7 @@ void LCodeGen::DoLoadKeyedFixedArray(LLoadKeyed* instr) {
|
| #endif
|
| // Read int value directly from upper half of the smi.
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| + ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| offset += kPointerSize / 2;
|
| }
|
|
|
| @@ -4034,7 +4034,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
| __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset));
|
| }
|
|
|
| - if (representation.IsSmi() &&
|
| + if (representation.IsSmi() && SmiValuesAre32Bits() &&
|
| hinstr->value()->representation().IsInteger32()) {
|
| ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
|
| #ifdef DEBUG
|
| @@ -4044,7 +4044,7 @@ void LCodeGen::DoStoreNamedField(LStoreNamedField* instr) {
|
| #endif
|
| // Store int value directly to upper half of the smi.
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| + ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| offset += kPointerSize / 2;
|
| representation = Representation::Integer32();
|
| }
|
| @@ -4257,7 +4257,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
|
| int offset = FixedArray::kHeaderSize - kHeapObjectTag;
|
| Representation representation = hinstr->value()->representation();
|
|
|
| - if (representation.IsInteger32()) {
|
| + if (representation.IsInteger32() && SmiValuesAre32Bits()) {
|
| ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
|
| ASSERT(hinstr->elements_kind() == FAST_SMI_ELEMENTS);
|
| #ifdef DEBUG
|
| @@ -4273,7 +4273,7 @@ void LCodeGen::DoStoreKeyedFixedArray(LStoreKeyed* instr) {
|
| #endif
|
| // Store int value directly to upper half of the smi.
|
| STATIC_ASSERT(kSmiTag == 0);
|
| - STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| + ASSERT(kSmiTagSize + kSmiShiftSize == 32);
|
| offset += kPointerSize / 2;
|
| }
|
|
|
|
|