Index: src/compiler/representation-change.cc |
diff --git a/src/compiler/representation-change.cc b/src/compiler/representation-change.cc |
index 93566da6cab237a312b34e0b8235f029cf7135ad..6e1341321cf2dc81ce51879b7be943810ae5000f 100644 |
--- a/src/compiler/representation-change.cc |
+++ b/src/compiler/representation-change.cc |
@@ -307,7 +307,12 @@ Node* RepresentationChanger::GetTaggedPointerRepresentationFor( |
// We just provide a dummy value here. |
return jsgraph()->TheHoleConstant(); |
} else if (output_rep == MachineRepresentation::kBit) { |
- return node; |
+ if (output_type->Is(Type::Boolean())) { |
+ op = simplified()->ChangeBitToTagged(); |
+ } else { |
+ return TypeError(node, output_rep, output_type, |
+ MachineRepresentation::kTagged); |
+ } |
} else if (IsWord(output_rep)) { |
if (output_type->Is(Type::Unsigned32())) { |
// uint32 -> float64 -> tagged |