| Index: runtime/vm/object.h
|
| ===================================================================
|
| --- runtime/vm/object.h (revision 29540)
|
| +++ runtime/vm/object.h (working copy)
|
| @@ -863,6 +863,10 @@
|
| RawArray* fields() const { return raw_ptr()->fields_; }
|
| void SetFields(const Array& value) const;
|
|
|
| + // Returns an array of all fields of this class and its superclasses indexed
|
| + // by offset in words.
|
| + RawArray* OffsetToFieldMap() const;
|
| +
|
| // Returns true if non-static fields are defined.
|
| bool HasInstanceFields() const;
|
|
|
| @@ -2124,13 +2128,9 @@
|
| return OFFSET_OF(RawField, is_nullable_);
|
| }
|
|
|
| - // Update guarded class id and nullability of the field to reflect assignment
|
| - // of the value with the given class id to this field. May trigger
|
| - // deoptimization of dependent code.
|
| - void UpdateCid(intptr_t cid) const;
|
| - // Update guarded class length of the field to reflect assignment of the
|
| - // value with the given length. May trigger deoptimization of dependent code.
|
| - void UpdateLength(intptr_t length) const;
|
| + // Update guarded cid and guarded length for this field. May trigger
|
| + // deoptimization of dependent optimized code.
|
| + bool UpdateGuardedCidAndLength(const Object& value) const;
|
|
|
| // Return the list of optimized code objects that were optimized under
|
| // assumptions about guarded class id and nullability of this field.
|
| @@ -2169,6 +2169,16 @@
|
| class FinalBit : public BitField<bool, kFinalBit, 1> {};
|
| class HasInitializerBit : public BitField<bool, kHasInitializerBit, 1> {};
|
|
|
| + // Update guarded class id and nullability of the field to reflect assignment
|
| + // of the value with the given class id to this field. Returns true, if
|
| + // deoptimization of dependent code is required.
|
| + bool UpdateCid(intptr_t cid) const;
|
| +
|
| + // Update guarded class length of the field to reflect assignment of the
|
| + // value with the given length. Returns true if deoptimization of dependent
|
| + // code is required.
|
| + bool UpdateLength(intptr_t length) const;
|
| +
|
| void set_name(const String& value) const;
|
| void set_is_static(bool is_static) const {
|
| set_kind_bits(StaticBit::update(is_static, raw_ptr()->kind_bits_));
|
| @@ -3828,6 +3838,7 @@
|
| }
|
|
|
| void SetField(const Field& field, const Object& value) const {
|
| + field.UpdateGuardedCidAndLength(value);
|
| StorePointer(FieldAddr(field), value.raw());
|
| }
|
|
|
|
|