| 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 #ifndef VM_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2006 void set_guarded_cid(intptr_t cid) const { | 2006 void set_guarded_cid(intptr_t cid) const { |
| 2007 raw_ptr()->guarded_cid_ = cid; | 2007 raw_ptr()->guarded_cid_ = cid; |
| 2008 } | 2008 } |
| 2009 static intptr_t guarded_cid_offset() { | 2009 static intptr_t guarded_cid_offset() { |
| 2010 return OFFSET_OF(RawField, guarded_cid_); | 2010 return OFFSET_OF(RawField, guarded_cid_); |
| 2011 } | 2011 } |
| 2012 // Return the list length that any list stored in this field is guaranteed | 2012 // Return the list length that any list stored in this field is guaranteed |
| 2013 // to have. If length is kUnknownFixedLength the length has not | 2013 // to have. If length is kUnknownFixedLength the length has not |
| 2014 // been determined. If length is kNoFixedLength this field has multiple | 2014 // been determined. If length is kNoFixedLength this field has multiple |
| 2015 // list lengths associated with it and cannot be predicted. | 2015 // list lengths associated with it and cannot be predicted. |
| 2016 intptr_t guarded_list_length() const { | 2016 intptr_t guarded_list_length() const; |
| 2017 return raw_ptr()->guarded_list_length_; | 2017 void set_guarded_list_length(intptr_t list_length) const; |
| 2018 } | |
| 2019 void set_guarded_list_length(intptr_t list_length) const { | |
| 2020 raw_ptr()->guarded_list_length_ = list_length; | |
| 2021 } | |
| 2022 static intptr_t guarded_list_length_offset() { | 2018 static intptr_t guarded_list_length_offset() { |
| 2023 return OFFSET_OF(RawField, guarded_list_length_); | 2019 return OFFSET_OF(RawField, guarded_list_length_); |
| 2024 } | 2020 } |
| 2025 bool needs_length_check() const { | 2021 bool needs_length_check() const { |
| 2026 const bool r = guarded_list_length() >= Field::kUnknownFixedLength; | 2022 const bool r = guarded_list_length() >= Field::kUnknownFixedLength; |
| 2027 ASSERT(!r || is_final()); | 2023 ASSERT(!r || is_final()); |
| 2028 return r; | 2024 return r; |
| 2029 } | 2025 } |
| 2030 | 2026 |
| 2031 static bool IsExternalizableCid(intptr_t cid) { | 2027 static bool IsExternalizableCid(intptr_t cid) { |
| (...skipping 4125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6157 | 6153 |
| 6158 | 6154 |
| 6159 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6155 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6160 intptr_t index) { | 6156 intptr_t index) { |
| 6161 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6157 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6162 } | 6158 } |
| 6163 | 6159 |
| 6164 } // namespace dart | 6160 } // namespace dart |
| 6165 | 6161 |
| 6166 #endif // VM_OBJECT_H_ | 6162 #endif // VM_OBJECT_H_ |
| OLD | NEW |