Index: src/machine-type.h |
diff --git a/src/machine-type.h b/src/machine-type.h |
index bcc85b3e7c0f42bce6a19984bd0baf8d5b03d4c6..0a519cf0bc4145a8f3154ac092f2a73224d16133 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,11 @@ inline bool IsFloatingPoint(MachineRepresentation rep) { |
rep == MachineRepresentation::kSimd128; |
} |
+inline bool CanBeTaggedPointer(MachineRepresentation rep) { |
+ return rep == MachineRepresentation::kTagged || |
+ rep == MachineRepresentation::kTaggedPointer; |
+} |
+ |
// Gets the log2 of the element size in bytes of the machine type. |
inline int ElementSizeLog2Of(MachineRepresentation rep) { |
switch (rep) { |