| 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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1989 void set_guarded_cid(intptr_t cid) const { | 1989 void set_guarded_cid(intptr_t cid) const { |
| 1990 raw_ptr()->guarded_cid_ = cid; | 1990 raw_ptr()->guarded_cid_ = cid; |
| 1991 } | 1991 } |
| 1992 static intptr_t guarded_cid_offset() { | 1992 static intptr_t guarded_cid_offset() { |
| 1993 return OFFSET_OF(RawField, guarded_cid_); | 1993 return OFFSET_OF(RawField, guarded_cid_); |
| 1994 } | 1994 } |
| 1995 // Return the list length that any list stored in this field is guaranteed | 1995 // Return the list length that any list stored in this field is guaranteed |
| 1996 // to have. If length is kUnknownFixedLength the length has not | 1996 // to have. If length is kUnknownFixedLength the length has not |
| 1997 // been determined. If length is kNoFixedLength this field has multiple | 1997 // been determined. If length is kNoFixedLength this field has multiple |
| 1998 // list lengths associated with it and cannot be predicted. | 1998 // list lengths associated with it and cannot be predicted. |
| 1999 intptr_t guarded_list_length() const { | 1999 intptr_t guarded_list_length() const; |
| 2000 return raw_ptr()->guarded_list_length_; | 2000 void set_guarded_list_length(intptr_t list_length) const; |
| 2001 } | |
| 2002 void set_guarded_list_length(intptr_t list_length) const { | |
| 2003 raw_ptr()->guarded_list_length_ = list_length; | |
| 2004 } | |
| 2005 static intptr_t guarded_list_length_offset() { | 2001 static intptr_t guarded_list_length_offset() { |
| 2006 return OFFSET_OF(RawField, guarded_list_length_); | 2002 return OFFSET_OF(RawField, guarded_list_length_); |
| 2007 } | 2003 } |
| 2008 bool needs_length_check() const { | 2004 bool needs_length_check() const { |
| 2009 const bool r = guarded_list_length() >= Field::kUnknownFixedLength; | 2005 const bool r = guarded_list_length() >= Field::kUnknownFixedLength; |
| 2010 ASSERT(!r || is_final()); | 2006 ASSERT(!r || is_final()); |
| 2011 return r; | 2007 return r; |
| 2012 } | 2008 } |
| 2013 | 2009 |
| 2014 static bool IsExternalizableCid(intptr_t cid) { | 2010 static bool IsExternalizableCid(intptr_t cid) { |
| (...skipping 4106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6121 | 6117 |
| 6122 | 6118 |
| 6123 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 6119 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 6124 intptr_t index) { | 6120 intptr_t index) { |
| 6125 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 6121 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 6126 } | 6122 } |
| 6127 | 6123 |
| 6128 } // namespace dart | 6124 } // namespace dart |
| 6129 | 6125 |
| 6130 #endif // VM_OBJECT_H_ | 6126 #endif // VM_OBJECT_H_ |
| OLD | NEW |