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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 } | 1258 } |
1259 void set_is_finalized() const; | 1259 void set_is_finalized() const; |
1260 | 1260 |
1261 bool is_prefinalized() const { | 1261 bool is_prefinalized() const { |
1262 return ClassFinalizedBits::decode(raw_ptr()->state_bits_) | 1262 return ClassFinalizedBits::decode(raw_ptr()->state_bits_) |
1263 == RawClass::kPreFinalized; | 1263 == RawClass::kPreFinalized; |
1264 } | 1264 } |
1265 | 1265 |
1266 void set_is_prefinalized() const; | 1266 void set_is_prefinalized() const; |
1267 | 1267 |
| 1268 bool is_refinalize_after_patch() const { |
| 1269 return ClassFinalizedBits::decode(raw_ptr()->state_bits_) |
| 1270 == RawClass::kRefinalizeAfterPatch; |
| 1271 } |
| 1272 |
| 1273 void SetRefinalizeAfterPatch() const; |
1268 void ResetFinalization() const; | 1274 void ResetFinalization() const; |
1269 | 1275 |
1270 bool is_marked_for_parsing() const { | 1276 bool is_marked_for_parsing() const { |
1271 return MarkedForParsingBit::decode(raw_ptr()->state_bits_); | 1277 return MarkedForParsingBit::decode(raw_ptr()->state_bits_); |
1272 } | 1278 } |
1273 void set_is_marked_for_parsing() const; | 1279 void set_is_marked_for_parsing() const; |
1274 void reset_is_marked_for_parsing() const; | 1280 void reset_is_marked_for_parsing() const; |
1275 | 1281 |
1276 bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); } | 1282 bool is_const() const { return ConstBit::decode(raw_ptr()->state_bits_); } |
1277 void set_is_const() const; | 1283 void set_is_const() const; |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1371 void RegisterCHACode(const Code& code); | 1377 void RegisterCHACode(const Code& code); |
1372 | 1378 |
1373 void DisableCHAOptimizedCode(const Class& subclass); | 1379 void DisableCHAOptimizedCode(const Class& subclass); |
1374 | 1380 |
1375 RawArray* cha_codes() const { return raw_ptr()->cha_codes_; } | 1381 RawArray* cha_codes() const { return raw_ptr()->cha_codes_; } |
1376 void set_cha_codes(const Array& value) const; | 1382 void set_cha_codes(const Array& value) const; |
1377 | 1383 |
1378 bool TraceAllocation(Isolate* isolate) const; | 1384 bool TraceAllocation(Isolate* isolate) const; |
1379 void SetTraceAllocation(bool trace_allocation) const; | 1385 void SetTraceAllocation(bool trace_allocation) const; |
1380 | 1386 |
| 1387 bool ValidatePostFinalizePatch(const Class& orig_class, Error* error) const; |
| 1388 |
1381 private: | 1389 private: |
1382 enum MemberKind { | 1390 enum MemberKind { |
1383 kAny = 0, | 1391 kAny = 0, |
1384 kStatic, | 1392 kStatic, |
1385 kInstance, | 1393 kInstance, |
1386 kInstanceAllowAbstract, | 1394 kInstanceAllowAbstract, |
1387 kConstructor, | 1395 kConstructor, |
1388 kFactory, | 1396 kFactory, |
1389 }; | 1397 }; |
1390 enum StateBits { | 1398 enum StateBits { |
(...skipping 7024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8415 | 8423 |
8416 | 8424 |
8417 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 8425 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
8418 intptr_t index) { | 8426 intptr_t index) { |
8419 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 8427 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
8420 } | 8428 } |
8421 | 8429 |
8422 } // namespace dart | 8430 } // namespace dart |
8423 | 8431 |
8424 #endif // VM_OBJECT_H_ | 8432 #endif // VM_OBJECT_H_ |
OLD | NEW |