Chromium Code Reviews| Index: src/compiler/code-generator.cc |
| diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
| index 4513c248fc8f886cbe22f2bac4700cc297f5d0ad..0e308e964248a48e756d5c0d95f2c4cb89476080 100644 |
| --- a/src/compiler/code-generator.cc |
| +++ b/src/compiler/code-generator.cc |
| @@ -820,7 +820,9 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
| } else if (type == MachineType::Uint8() || type == MachineType::Uint16() || |
| type == MachineType::Uint32()) { |
| translation->StoreUint32StackSlot(LocationOperand::cast(op)->index()); |
| - } else if (type.representation() == MachineRepresentation::kTagged) { |
| + } else if (type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedSigned || |
| + type.representation() == MachineRepresentation::kTaggedPointer) { |
| translation->StoreStackSlot(LocationOperand::cast(op)->index()); |
| } else { |
| CHECK(false); |
| @@ -842,7 +844,9 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
| } else if (type == MachineType::Uint8() || type == MachineType::Uint16() || |
| type == MachineType::Uint32()) { |
| translation->StoreUint32Register(converter.ToRegister(op)); |
| - } else if (type.representation() == MachineRepresentation::kTagged) { |
| + } else if (type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedSigned || |
| + type.representation() == MachineRepresentation::kTaggedPointer) { |
| translation->StoreRegister(converter.ToRegister(op)); |
| } else { |
| CHECK(false); |
| @@ -861,7 +865,8 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
| Handle<Object> constant_object; |
| switch (constant.type()) { |
| case Constant::kInt32: |
| - if (type.representation() == MachineRepresentation::kTagged) { |
| + if (type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedSigned) { |
| // When pointers are 4 bytes, we can use int32 constants to represent |
| // Smis. |
| DCHECK_EQ(4, kPointerSize); |
| @@ -869,10 +874,11 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
| handle(reinterpret_cast<Smi*>(constant.ToInt32()), isolate()); |
| DCHECK(constant_object->IsSmi()); |
| } else { |
| - DCHECK(type == MachineType::Int32() || |
| - type == MachineType::Uint32() || |
| - type.representation() == MachineRepresentation::kBit || |
| - type.representation() == MachineRepresentation::kNone); |
| + DCHECK( |
| + type == MachineType::Int32() || type == MachineType::Uint32() || |
| + type.representation() == MachineRepresentation::kBit || |
| + type.representation() == MachineRepresentation::kTaggedPointer || |
|
Jarin
2016/08/22 14:23:22
Why has the tagged pointer appeared here?
mvstanton
2016/08/24 16:06:28
There is no good reason. Ay dios mio. Removed.
|
| + type.representation() == MachineRepresentation::kNone); |
| DCHECK(type.representation() != MachineRepresentation::kNone || |
| constant.ToInt32() == FrameStateDescriptor::kImpossibleValue); |
| @@ -883,7 +889,8 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
| case Constant::kInt64: |
| // When pointers are 8 bytes, we can use int64 constants to represent |
| // Smis. |
| - DCHECK_EQ(type.representation(), MachineRepresentation::kTagged); |
| + DCHECK(type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedSigned); |
| DCHECK_EQ(8, kPointerSize); |
| constant_object = |
| handle(reinterpret_cast<Smi*>(constant.ToInt64()), isolate()); |
| @@ -891,16 +898,19 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
| break; |
| case Constant::kFloat32: |
| DCHECK(type.representation() == MachineRepresentation::kFloat32 || |
| - type.representation() == MachineRepresentation::kTagged); |
| + type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedPointer); |
| constant_object = isolate()->factory()->NewNumber(constant.ToFloat32()); |
| break; |
| case Constant::kFloat64: |
| DCHECK(type.representation() == MachineRepresentation::kFloat64 || |
| - type.representation() == MachineRepresentation::kTagged); |
| + type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedPointer); |
| constant_object = isolate()->factory()->NewNumber(constant.ToFloat64()); |
| break; |
| case Constant::kHeapObject: |
| - DCHECK(type.representation() == MachineRepresentation::kTagged); |
| + DCHECK(type.representation() == MachineRepresentation::kTagged || |
| + type.representation() == MachineRepresentation::kTaggedPointer); |
| constant_object = constant.ToHeapObject(); |
| break; |
| default: |