| Index: runtime/vm/raw_object.h
|
| ===================================================================
|
| --- runtime/vm/raw_object.h (revision 35287)
|
| +++ runtime/vm/raw_object.h (working copy)
|
| @@ -60,15 +60,18 @@
|
| V(Double) \
|
| V(Bool) \
|
| V(GrowableObjectArray) \
|
| + V(Float32x4) \
|
| + V(Int32x4) \
|
| + V(Float64x2) \
|
| V(TypedData) \
|
| V(ExternalTypedData) \
|
| + V(Capability) \
|
| + V(ReceivePort) \
|
| + V(SendPort) \
|
| V(Stacktrace) \
|
| V(JSRegExp) \
|
| V(WeakProperty) \
|
| V(MirrorReference) \
|
| - V(Float32x4) \
|
| - V(Int32x4) \
|
| - V(Float64x2) \
|
| V(UserTag) \
|
|
|
| #define CLASS_LIST_ARRAYS(V) \
|
| @@ -1504,7 +1507,35 @@
|
| friend class RawTokenStream;
|
| };
|
|
|
| +// VM implementations of the basic types in the isolate.
|
| +class RawCapability : public RawInstance {
|
| + RAW_HEAP_OBJECT_IMPLEMENTATION(Capability);
|
| + uint64_t id_;
|
| +};
|
|
|
| +
|
| +class RawSendPort : public RawInstance {
|
| + RAW_HEAP_OBJECT_IMPLEMENTATION(SendPort);
|
| + Dart_Port id_;
|
| +
|
| + friend class ReceivePort;
|
| +};
|
| +
|
| +
|
| +class RawReceivePort : public RawInstance {
|
| + RAW_HEAP_OBJECT_IMPLEMENTATION(ReceivePort);
|
| +
|
| + RawObject** from() {
|
| + return reinterpret_cast<RawObject**>(&ptr()->send_port_);
|
| + }
|
| + RawSendPort* send_port_;
|
| + RawInstance* handler_;
|
| + RawObject** to() {
|
| + return reinterpret_cast<RawObject**>(&ptr()->handler_);
|
| + }
|
| +};
|
| +
|
| +
|
| // VM type for capturing stacktraces when exceptions are thrown,
|
| // Currently we don't have any interface that this object is supposed
|
| // to implement so we just support the 'toString' method which
|
| @@ -1685,10 +1716,9 @@
|
|
|
| inline bool RawObject::IsBuiltinListClassId(intptr_t index) {
|
| // Make sure this function is updated when new builtin List types are added.
|
| - ASSERT(kImmutableArrayCid == kArrayCid + 1 &&
|
| - kTypedDataCid == kGrowableObjectArrayCid + 1);
|
| + ASSERT(kImmutableArrayCid == kArrayCid + 1);
|
| return ((index >= kArrayCid && index <= kImmutableArrayCid) ||
|
| - (index >= kGrowableObjectArrayCid && index < kTypedDataCid) ||
|
| + (index == kGrowableObjectArrayCid) ||
|
| IsTypedDataClassId(index) ||
|
| IsTypedDataViewClassId(index) ||
|
| IsExternalTypedDataClassId(index));
|
|
|