| Index: runtime/vm/object.h
|
| ===================================================================
|
| --- runtime/vm/object.h (revision 25890)
|
| +++ runtime/vm/object.h (working copy)
|
| @@ -1961,7 +1961,14 @@
|
| // Return class id that any non-null value read from this field is guaranteed
|
| // to have or kDynamicCid if such class id is not known.
|
| // Stores to this field must update this information hence the name.
|
| - intptr_t guarded_cid() const { return raw_ptr()->guarded_cid_; }
|
| + intptr_t guarded_cid() const {
|
| + const intptr_t cid = raw_ptr()->guarded_cid_;
|
| + if (IsExternalizableCid(cid)) {
|
| + return kDynamicCid;
|
| + } else {
|
| + return cid;
|
| + }
|
| + }
|
| void set_guarded_cid(intptr_t cid) const {
|
| raw_ptr()->guarded_cid_ = cid;
|
| }
|
| @@ -1969,6 +1976,10 @@
|
| return OFFSET_OF(RawField, guarded_cid_);
|
| }
|
|
|
| + static bool IsExternalizableCid(intptr_t cid) {
|
| + return (cid == kOneByteStringCid) || (cid == kTwoByteStringCid);
|
| + }
|
| +
|
| // Returns false if any value read from this field is guaranteed to be
|
| // not null.
|
| // Internally we is_nullable_ field contains either kNullCid (nullable) or
|
|
|