Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index c588ae2358a64c4f6add590a75d30f4a73edc6ab..775861574d1183aa8e234e3071070130c0a4af57 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -880,13 +880,21 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation, |
DCHECK(constant_object->IsSmi()); |
break; |
case Constant::kFloat32: |
- DCHECK(type.representation() == MachineRepresentation::kFloat32 || |
- CanBeTaggedPointer(type.representation())); |
+ if (type.representation() == MachineRepresentation::kTaggedSigned) { |
+ DCHECK(IsSmiDouble(constant.ToFloat32())); |
+ } else { |
+ DCHECK(type.representation() == MachineRepresentation::kFloat32 || |
+ CanBeTaggedPointer(type.representation())); |
+ } |
constant_object = isolate()->factory()->NewNumber(constant.ToFloat32()); |
break; |
case Constant::kFloat64: |
- DCHECK(type.representation() == MachineRepresentation::kFloat64 || |
- CanBeTaggedPointer(type.representation())); |
+ if (type.representation() == MachineRepresentation::kTaggedSigned) { |
+ DCHECK(IsSmiDouble(constant.ToFloat64())); |
+ } else { |
+ DCHECK(type.representation() == MachineRepresentation::kFloat64 || |
+ CanBeTaggedPointer(type.representation())); |
+ } |
constant_object = isolate()->factory()->NewNumber(constant.ToFloat64()); |
break; |
case Constant::kHeapObject: |