| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index f928bcc9866aa0ae75a2b94ea7210386c9c53fc2..d4d7f385b44b818f958625786b6049853a76fc35 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -5355,7 +5355,11 @@ RawField* Field::New(const String& name,
|
| result.set_has_initializer(false);
|
| result.set_guarded_cid(kIllegalCid);
|
| result.set_is_nullable(false);
|
| - result.set_guarded_list_length(Field::kUnknownFixedLength);
|
| + if (is_final) {
|
| + result.set_guarded_list_length(Field::kUnknownFixedLength);
|
| + } else {
|
| + result.set_guarded_list_length(Field::kNoFixedLength);
|
| + }
|
| result.set_dependent_code(Object::null_array());
|
| return result.raw();
|
| }
|
| @@ -5383,6 +5387,16 @@ RawString* Field::UserVisibleName() const {
|
| }
|
|
|
|
|
| +intptr_t Field::guarded_list_length() const {
|
| + return Smi::Value(raw_ptr()->guarded_list_length_);
|
| +}
|
| +
|
| +
|
| +void Field::set_guarded_list_length(intptr_t list_length) const {
|
| + raw_ptr()->guarded_list_length_ = Smi::New(list_length);
|
| +}
|
| +
|
| +
|
| const char* Field::ToCString() const {
|
| if (IsNull()) {
|
| return "Field::null";
|
| @@ -5575,7 +5589,6 @@ void Field::UpdateLength(intptr_t list_length) const {
|
| // List length unchanged.
|
| return;
|
| }
|
| -
|
| // Multiple list lengths assigned here, stop tracking length.
|
| set_guarded_list_length(Field::kNoFixedLength);
|
| DeoptimizeDependentCode();
|
|
|