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

Unified Diff: src/types.h

Issue 795993002: Introduce unsigned representation types (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/verifier.cc ('k') | src/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/types.h
diff --git a/src/types.h b/src/types.h
index 0f21073de103aa323401bf3b150f687d4ce6edfa..969a81de1b80677e45097f7da869081f6420540c 100644
--- a/src/types.h
+++ b/src/types.h
@@ -154,35 +154,44 @@ namespace internal {
// Values for bitset types
#define MASK_BITSET_TYPE_LIST(V) \
- V(Representation, 0xff800000u) \
- V(Semantic, 0x007ffffeu)
+ V(Representation, 0xfff00000u) \
+ V(Semantic, 0x000ffffeu)
#define REPRESENTATION(k) ((k) & BitsetType::kRepresentation)
#define SEMANTIC(k) ((k) & BitsetType::kSemantic)
-#define REPRESENTATION_BITSET_TYPE_LIST(V) \
- V(None, 0) \
- V(UntaggedInt1, 1u << 23 | kSemantic) \
- V(UntaggedInt8, 1u << 24 | kSemantic) \
- V(UntaggedInt16, 1u << 25 | kSemantic) \
- V(UntaggedInt32, 1u << 26 | kSemantic) \
- V(UntaggedFloat32, 1u << 27 | kSemantic) \
- V(UntaggedFloat64, 1u << 28 | kSemantic) \
- V(UntaggedPtr, 1u << 29 | kSemantic) \
- V(TaggedInt, 1u << 30 | kSemantic) \
- V(TaggedPtr, 1u << 31 | kSemantic) \
+#define REPRESENTATION_BITSET_TYPE_LIST(V) \
+ V(None, 0) \
+ V(UntaggedBit, 1u << 20 | kSemantic) \
+ V(UntaggedSigned8, 1u << 21 | kSemantic) \
+ V(UntaggedSigned16, 1u << 22 | kSemantic) \
+ V(UntaggedSigned32, 1u << 23 | kSemantic) \
+ V(UntaggedUnsigned8, 1u << 24 | kSemantic) \
+ V(UntaggedUnsigned16, 1u << 25 | kSemantic) \
+ V(UntaggedUnsigned32, 1u << 26 | kSemantic) \
+ V(UntaggedFloat32, 1u << 27 | kSemantic) \
+ V(UntaggedFloat64, 1u << 28 | kSemantic) \
+ V(UntaggedPointer, 1u << 29 | kSemantic) \
+ V(TaggedSigned, 1u << 30 | kSemantic) \
+ V(TaggedPointer, 1u << 31 | kSemantic) \
\
- V(UntaggedInt, kUntaggedInt1 | kUntaggedInt8 | \
- kUntaggedInt16 | kUntaggedInt32) \
- V(UntaggedFloat, kUntaggedFloat32 | kUntaggedFloat64) \
- V(UntaggedNumber, kUntaggedInt | kUntaggedFloat) \
- V(Untagged, kUntaggedNumber | kUntaggedPtr) \
- V(Tagged, kTaggedInt | kTaggedPtr)
+ V(UntaggedSigned, kUntaggedSigned8 | kUntaggedSigned16 | \
+ kUntaggedSigned32) \
+ V(UntaggedUnsigned, kUntaggedUnsigned8 | kUntaggedUnsigned16 | \
+ kUntaggedUnsigned32) \
+ V(UntaggedIntegral8, kUntaggedSigned8 | kUntaggedUnsigned8) \
+ V(UntaggedIntegral16, kUntaggedSigned16 | kUntaggedUnsigned16) \
+ V(UntaggedIntegral32, kUntaggedSigned32 | kUntaggedUnsigned32) \
+ V(UntaggedIntegral, kUntaggedBit | kUntaggedSigned | kUntaggedUnsigned) \
+ V(UntaggedFloat, kUntaggedFloat32 | kUntaggedFloat64) \
+ V(UntaggedNumber, kUntaggedIntegral | kUntaggedFloat) \
+ V(Untagged, kUntaggedNumber | kUntaggedPointer) \
+ V(Tagged, kTaggedSigned | kTaggedPointer)
#define SEMANTIC_BITSET_TYPE_LIST(V) \
- V(Null, 1u << 1 | REPRESENTATION(kTaggedPtr)) \
- V(Undefined, 1u << 2 | REPRESENTATION(kTaggedPtr)) \
- V(Boolean, 1u << 3 | REPRESENTATION(kTaggedPtr)) \
+ V(Null, 1u << 1 | REPRESENTATION(kTaggedPointer)) \
+ V(Undefined, 1u << 2 | REPRESENTATION(kTaggedPointer)) \
+ V(Boolean, 1u << 3 | REPRESENTATION(kTaggedPointer)) \
V(UnsignedSmall, 1u << 4 | REPRESENTATION(kTagged | kUntaggedNumber)) \
V(OtherSignedSmall, 1u << 5 | REPRESENTATION(kTagged | kUntaggedNumber)) \
V(OtherUnsigned31, 1u << 6 | REPRESENTATION(kTagged | kUntaggedNumber)) \
@@ -191,17 +200,14 @@ namespace internal {
V(MinusZero, 1u << 9 | REPRESENTATION(kTagged | kUntaggedNumber)) \
V(NaN, 1u << 10 | REPRESENTATION(kTagged | kUntaggedNumber)) \
V(OtherNumber, 1u << 11 | REPRESENTATION(kTagged | kUntaggedNumber)) \
- V(Symbol, 1u << 12 | REPRESENTATION(kTaggedPtr)) \
- V(InternalizedString, 1u << 13 | REPRESENTATION(kTaggedPtr)) \
- V(OtherString, 1u << 14 | REPRESENTATION(kTaggedPtr)) \
- V(Undetectable, 1u << 15 | REPRESENTATION(kTaggedPtr)) \
- V(Array, 1u << 16 | REPRESENTATION(kTaggedPtr)) \
- V(Buffer, 1u << 17 | REPRESENTATION(kTaggedPtr)) \
- V(Function, 1u << 18 | REPRESENTATION(kTaggedPtr)) \
- V(RegExp, 1u << 19 | REPRESENTATION(kTaggedPtr)) \
- V(OtherObject, 1u << 20 | REPRESENTATION(kTaggedPtr)) \
- V(Proxy, 1u << 21 | REPRESENTATION(kTaggedPtr)) \
- V(Internal, 1u << 22 | REPRESENTATION(kTagged | kUntagged)) \
+ V(Symbol, 1u << 12 | REPRESENTATION(kTaggedPointer)) \
+ V(InternalizedString, 1u << 13 | REPRESENTATION(kTaggedPointer)) \
+ V(OtherString, 1u << 14 | REPRESENTATION(kTaggedPointer)) \
+ V(Undetectable, 1u << 15 | REPRESENTATION(kTaggedPointer)) \
+ V(Array, 1u << 16 | REPRESENTATION(kTaggedPointer)) \
+ V(OtherObject, 1u << 17 | REPRESENTATION(kTaggedPointer)) \
+ V(Proxy, 1u << 18 | REPRESENTATION(kTaggedPointer)) \
+ V(Internal, 1u << 19 | REPRESENTATION(kTagged | kUntagged)) \
\
V(SignedSmall, kUnsignedSmall | kOtherSignedSmall) \
V(Signed32, kSignedSmall | kOtherUnsigned31 | kOtherSigned32) \
@@ -215,7 +221,7 @@ namespace internal {
V(NumberOrString, kNumber | kString) \
V(PlainPrimitive, kNumberOrString | kBoolean | kNull | kUndefined) \
V(Primitive, kSymbol | kPlainPrimitive) \
- V(DetectableObject, kArray | kFunction | kRegExp | kOtherObject) \
+ V(DetectableObject, kArray | kOtherObject) \
V(DetectableReceiver, kDetectableObject | kProxy) \
V(Detectable, kDetectableReceiver | kNumber | kName) \
V(Object, kDetectableObject | kUndetectable) \
« no previous file with comments | « src/compiler/verifier.cc ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698