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 2936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2947 | 2947 |
2948 bool needs_length_check() const { | 2948 bool needs_length_check() const { |
2949 const bool r = guarded_list_length() >= Field::kUnknownFixedLength; | 2949 const bool r = guarded_list_length() >= Field::kUnknownFixedLength; |
2950 ASSERT(!r || is_final()); | 2950 ASSERT(!r || is_final()); |
2951 return r; | 2951 return r; |
2952 } | 2952 } |
2953 | 2953 |
2954 const char* GuardedPropertiesAsCString() const; | 2954 const char* GuardedPropertiesAsCString() const; |
2955 | 2955 |
2956 intptr_t UnboxedFieldCid() const { | 2956 intptr_t UnboxedFieldCid() const { |
2957 ASSERT(IsUnboxedField()); | |
2958 return guarded_cid(); | 2957 return guarded_cid(); |
2959 } | 2958 } |
2960 | 2959 |
2961 bool IsUnboxedField() const; | |
2962 | |
2963 bool IsPotentialUnboxedField() const; | |
2964 | |
2965 bool is_unboxing_candidate() const { | 2960 bool is_unboxing_candidate() const { |
2966 return UnboxingCandidateBit::decode(raw_ptr()->kind_bits_); | 2961 return UnboxingCandidateBit::decode(raw_ptr()->kind_bits_); |
2967 } | 2962 } |
2968 void set_is_unboxing_candidate(bool b) const { | 2963 void set_is_unboxing_candidate(bool b) const { |
2969 set_kind_bits(UnboxingCandidateBit::update(b, raw_ptr()->kind_bits_)); | 2964 set_kind_bits(UnboxingCandidateBit::update(b, raw_ptr()->kind_bits_)); |
2970 } | 2965 } |
2971 | 2966 |
2972 static bool IsExternalizableCid(intptr_t cid) { | 2967 static bool IsExternalizableCid(intptr_t cid) { |
2973 return (cid == kOneByteStringCid) || (cid == kTwoByteStringCid); | 2968 return (cid == kOneByteStringCid) || (cid == kTwoByteStringCid); |
2974 } | 2969 } |
(...skipping 5253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8228 | 8223 |
8229 | 8224 |
8230 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8225 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8231 intptr_t index) { | 8226 intptr_t index) { |
8232 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8227 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8233 } | 8228 } |
8234 | 8229 |
8235 } // namespace dart | 8230 } // namespace dart |
8236 | 8231 |
8237 #endif // VM_OBJECT_H_ | 8232 #endif // VM_OBJECT_H_ |
OLD | NEW |