Index: src/machine-type.h |
diff --git a/src/machine-type.h b/src/machine-type.h |
index bcc85b3e7c0f42bce6a19984bd0baf8d5b03d4c6..d31c21880e92dc0dfb832871ce17606baf69d55d 100644 |
--- a/src/machine-type.h |
+++ b/src/machine-type.h |
@@ -119,6 +119,14 @@ class MachineType { |
return MachineType(MachineRepresentation::kWord64, |
MachineSemantic::kUint64); |
} |
+ static MachineType TaggedPointer() { |
+ return MachineType(MachineRepresentation::kTaggedPointer, |
+ MachineSemantic::kAny); |
+ } |
+ static MachineType TaggedSigned() { |
+ return MachineType(MachineRepresentation::kTaggedSigned, |
+ MachineSemantic::kInt32); |
+ } |
static MachineType AnyTagged() { |
return MachineType(MachineRepresentation::kTagged, MachineSemantic::kAny); |
} |
@@ -214,6 +222,15 @@ inline bool IsFloatingPoint(MachineRepresentation rep) { |
rep == MachineRepresentation::kSimd128; |
} |
+inline bool CanBeTaggedPointer(MachineRepresentation rep) { |
+ return rep == MachineRepresentation::kTagged || |
+ rep == MachineRepresentation::kTaggedPointer; |
+} |
+ |
+inline bool IsAnyTagged(MachineRepresentation rep) { |
+ return CanBeTaggedPointer(rep) || rep == MachineRepresentation::kTaggedSigned; |
+} |
+ |
// Gets the log2 of the element size in bytes of the machine type. |
inline int ElementSizeLog2Of(MachineRepresentation rep) { |
switch (rep) { |