| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/become.h" | 10 #include "vm/become.h" |
| (...skipping 8151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8162 | 8162 |
| 8163 bool Field::IsConsistentWith(const Field& other) const { | 8163 bool Field::IsConsistentWith(const Field& other) const { |
| 8164 return (raw_ptr()->guarded_cid_ == other.raw_ptr()->guarded_cid_) && | 8164 return (raw_ptr()->guarded_cid_ == other.raw_ptr()->guarded_cid_) && |
| 8165 (raw_ptr()->is_nullable_ == other.raw_ptr()->is_nullable_) && | 8165 (raw_ptr()->is_nullable_ == other.raw_ptr()->is_nullable_) && |
| 8166 (raw_ptr()->guarded_list_length_ == | 8166 (raw_ptr()->guarded_list_length_ == |
| 8167 other.raw_ptr()->guarded_list_length_) && | 8167 other.raw_ptr()->guarded_list_length_) && |
| 8168 (is_unboxing_candidate() == other.is_unboxing_candidate()); | 8168 (is_unboxing_candidate() == other.is_unboxing_candidate()); |
| 8169 } | 8169 } |
| 8170 | 8170 |
| 8171 | 8171 |
| 8172 bool Field::IsFinalAndInitialized() const { |
| 8173 return is_final() && (guarded_cid() != kIllegalCid); |
| 8174 } |
| 8175 |
| 8176 |
| 8172 bool Field::IsUninitialized() const { | 8177 bool Field::IsUninitialized() const { |
| 8173 const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_); | 8178 const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_); |
| 8174 ASSERT(value.raw() != Object::transition_sentinel().raw()); | 8179 ASSERT(value.raw() != Object::transition_sentinel().raw()); |
| 8175 return value.raw() == Object::sentinel().raw(); | 8180 return value.raw() == Object::sentinel().raw(); |
| 8176 } | 8181 } |
| 8177 | 8182 |
| 8178 | 8183 |
| 8179 void Field::SetPrecompiledInitializer(const Function& initializer) const { | 8184 void Field::SetPrecompiledInitializer(const Function& initializer) const { |
| 8180 ASSERT(IsOriginal()); | 8185 ASSERT(IsOriginal()); |
| 8181 StorePointer(&raw_ptr()->initializer_.precompiled_, initializer.raw()); | 8186 StorePointer(&raw_ptr()->initializer_.precompiled_, initializer.raw()); |
| (...skipping 15194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 23376 return UserTag::null(); | 23381 return UserTag::null(); |
| 23377 } | 23382 } |
| 23378 | 23383 |
| 23379 | 23384 |
| 23380 const char* UserTag::ToCString() const { | 23385 const char* UserTag::ToCString() const { |
| 23381 const String& tag_label = String::Handle(label()); | 23386 const String& tag_label = String::Handle(label()); |
| 23382 return tag_label.ToCString(); | 23387 return tag_label.ToCString(); |
| 23383 } | 23388 } |
| 23384 | 23389 |
| 23385 } // namespace dart | 23390 } // namespace dart |
| OLD | NEW |