| Index: runtime/vm/object.h
|
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h
|
| index 11edabf8b7e21b5069368576859d0a20f244482f..bddf24178102a810df583bb1680b89f503b3af0f 100644
|
| --- a/runtime/vm/object.h
|
| +++ b/runtime/vm/object.h
|
| @@ -2214,12 +2214,20 @@ class Field : public Object {
|
| static intptr_t guarded_list_length_offset() {
|
| return OFFSET_OF(RawField, guarded_list_length_);
|
| }
|
| + intptr_t guarded_list_length_in_object_offset() const;
|
| + void set_guarded_list_length_in_object_offset(intptr_t offset) const;
|
| + static intptr_t guarded_list_length_in_object_offset_offset() {
|
| + return OFFSET_OF(RawField, guarded_list_length_in_object_offset_);
|
| + }
|
| +
|
| bool needs_length_check() const {
|
| const bool r = guarded_list_length() >= Field::kUnknownFixedLength;
|
| ASSERT(!r || is_final());
|
| return r;
|
| }
|
|
|
| + const char* GuardedPropertiesAsCString() const;
|
| +
|
| intptr_t UnboxedFieldCid() const {
|
| ASSERT(IsUnboxedField());
|
| return guarded_cid();
|
| @@ -2241,6 +2249,7 @@ class Field : public Object {
|
| }
|
|
|
| enum {
|
| + kUnknownLengthOffset = -1,
|
| kUnknownFixedLength = -1,
|
| kNoFixedLength = -2,
|
| };
|
| @@ -2259,9 +2268,11 @@ class Field : public Object {
|
| return OFFSET_OF(RawField, is_nullable_);
|
| }
|
|
|
| - // Update guarded cid and guarded length for this field. May trigger
|
| + // Record store of the given value into this field. May trigger
|
| // deoptimization of dependent optimized code.
|
| - bool UpdateGuardedCidAndLength(const Object& value) const;
|
| + void RecordStore(const Object& value) const;
|
| +
|
| + void InitializeGuardedListLengthInObjectOffset() const;
|
|
|
| // Return the list of optimized code objects that were optimized under
|
| // assumptions about guarded class id and nullability of this field.
|
| @@ -2306,15 +2317,9 @@ class Field : public Object {
|
| kUnboxingCandidateBit, 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
|
| + // Update guarded cid and guarded length for 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;
|
| + bool UpdateGuardedCidAndLength(const Object& value) const;
|
|
|
| void set_name(const String& value) const;
|
| void set_is_static(bool is_static) const {
|
| @@ -4159,7 +4164,7 @@ class Instance : public Object {
|
| }
|
|
|
| void SetField(const Field& field, const Object& value) const {
|
| - field.UpdateGuardedCidAndLength(value);
|
| + field.RecordStore(value);
|
| StorePointer(FieldAddr(field), value.raw());
|
| }
|
|
|
|
|