Index: runtime/vm/raw_object.h |
=================================================================== |
--- runtime/vm/raw_object.h (revision 14314) |
+++ runtime/vm/raw_object.h (working copy) |
@@ -59,10 +59,8 @@ |
V(String) \ |
V(OneByteString) \ |
V(TwoByteString) \ |
- V(FourByteString) \ |
V(ExternalOneByteString) \ |
V(ExternalTwoByteString) \ |
- V(ExternalFourByteString) \ |
V(Bool) \ |
V(Array) \ |
V(ImmutableArray) \ |
@@ -1125,16 +1123,6 @@ |
}; |
-class RawFourByteString : public RawString { |
- RAW_HEAP_OBJECT_IMPLEMENTATION(FourByteString); |
- |
- // Variable length data follows here. |
- uint32_t data_[0]; |
- |
- friend class SnapshotReader; |
-}; |
- |
- |
template<typename T> |
class ExternalStringData { |
public: |
@@ -1175,14 +1163,6 @@ |
}; |
-class RawExternalFourByteString : public RawString { |
- RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalFourByteString); |
- |
- ExternalStringData<uint32_t>* external_data_; |
- friend class Api; |
-}; |
- |
- |
class RawBool : public RawInstance { |
RAW_HEAP_OBJECT_IMPLEMENTATION(Bool); |
@@ -1473,6 +1453,7 @@ |
uint8_t data_[0]; |
}; |
+ |
class RawWeakProperty : public RawInstance { |
RAW_HEAP_OBJECT_IMPLEMENTATION(WeakProperty); |
@@ -1491,6 +1472,7 @@ |
friend class ScavengerVisitor; |
}; |
+ |
// Class Id predicates. |
inline bool RawObject::IsErrorClassId(intptr_t index) { |
@@ -1503,6 +1485,7 @@ |
return (index >= kErrorCid && index < kInstanceCid); |
} |
+ |
inline bool RawObject::IsNumberClassId(intptr_t index) { |
// Make sure this function is updated when new Number types are added. |
ASSERT(kIntegerCid == kNumberCid + 1 && |
@@ -1514,6 +1497,7 @@ |
return (index >= kNumberCid && index < kStringCid); |
} |
+ |
inline bool RawObject::IsIntegerClassId(intptr_t index) { |
// Make sure this function is updated when new Integer types are added. |
ASSERT(kSmiCid == kIntegerCid + 1 && |
@@ -1523,59 +1507,55 @@ |
return (index >= kIntegerCid && index < kDoubleCid); |
} |
+ |
inline bool RawObject::IsStringClassId(intptr_t index) { |
// Make sure this function is updated when new StringCid types are added. |
ASSERT(kOneByteStringCid == kStringCid + 1 && |
kTwoByteStringCid == kStringCid + 2 && |
- kFourByteStringCid == kStringCid + 3 && |
- kExternalOneByteStringCid == kStringCid + 4 && |
- kExternalTwoByteStringCid == kStringCid + 5 && |
- kExternalFourByteStringCid == kStringCid + 6 && |
- kBoolCid == kStringCid + 7); |
+ kExternalOneByteStringCid == kStringCid + 3 && |
+ kExternalTwoByteStringCid == kStringCid + 4 && |
+ kBoolCid == kStringCid + 5); |
return (index >= kStringCid && index < kBoolCid); |
} |
+ |
inline bool RawObject::IsOneByteStringClassId(intptr_t index) { |
// Make sure this function is updated when new StringCid types are added. |
ASSERT(kOneByteStringCid == kStringCid + 1 && |
kTwoByteStringCid == kStringCid + 2 && |
- kFourByteStringCid == kStringCid + 3 && |
- kExternalOneByteStringCid == kStringCid + 4 && |
- kExternalTwoByteStringCid == kStringCid + 5 && |
- kExternalFourByteStringCid == kStringCid + 6 && |
- kBoolCid == kStringCid + 7); |
+ kExternalOneByteStringCid == kStringCid + 3 && |
+ kExternalTwoByteStringCid == kStringCid + 4 && |
+ kBoolCid == kStringCid + 5); |
return (index == kOneByteStringCid || index == kExternalOneByteStringCid); |
} |
+ |
inline bool RawObject::IsTwoByteStringClassId(intptr_t index) { |
// Make sure this function is updated when new StringCid types are added. |
ASSERT(kOneByteStringCid == kStringCid + 1 && |
kTwoByteStringCid == kStringCid + 2 && |
- kFourByteStringCid == kStringCid + 3 && |
- kExternalOneByteStringCid == kStringCid + 4 && |
- kExternalTwoByteStringCid == kStringCid + 5 && |
- kExternalFourByteStringCid == kStringCid + 6 && |
- kBoolCid == kStringCid + 7); |
+ kExternalOneByteStringCid == kStringCid + 3 && |
+ kExternalTwoByteStringCid == kStringCid + 4 && |
+ kBoolCid == kStringCid + 5); |
return (index == kOneByteStringCid || |
index == kTwoByteStringCid || |
index == kExternalOneByteStringCid || |
index == kExternalTwoByteStringCid); |
} |
+ |
inline bool RawObject::IsExternalStringClassId(intptr_t index) { |
// Make sure this function is updated when new StringCid types are added. |
ASSERT(kOneByteStringCid == kStringCid + 1 && |
kTwoByteStringCid == kStringCid + 2 && |
- kFourByteStringCid == kStringCid + 3 && |
- kExternalOneByteStringCid == kStringCid + 4 && |
- kExternalTwoByteStringCid == kStringCid + 5 && |
- kExternalFourByteStringCid == kStringCid + 6 && |
- kBoolCid == kStringCid + 7); |
+ kExternalOneByteStringCid == kStringCid + 3 && |
+ kExternalTwoByteStringCid == kStringCid + 4 && |
+ kBoolCid == kStringCid + 5); |
return (index == kExternalOneByteStringCid || |
- index == kExternalTwoByteStringCid || |
- index == kExternalFourByteStringCid); |
+ index == kExternalTwoByteStringCid); |
} |
+ |
inline bool RawObject::IsBuiltinListClassId(intptr_t index) { |
// Make sure this function is updated when new builtin List types are added. |
ASSERT(kImmutableArrayCid == kArrayCid + 1 && |
@@ -1585,6 +1565,7 @@ |
IsByteArrayClassId(index); |
} |
+ |
inline bool RawObject::IsByteArrayClassId(intptr_t index) { |
// Make sure this function is updated when new ByteArray types are added. |
ASSERT(kInt8ArrayCid == kByteArrayCid + 1 && |