Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1230)

Unified Diff: src/machine-type.h

Issue 2258073002: [Turbofan]: Use new MachineTypes in access-builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: A bit of refactoring. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698