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_RAW_OBJECT_H_ | 5 #ifndef VM_RAW_OBJECT_H_ |
6 #define VM_RAW_OBJECT_H_ | 6 #define VM_RAW_OBJECT_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 #include "vm/atomic.h" | 9 #include "vm/atomic.h" |
10 #include "vm/globals.h" | 10 #include "vm/globals.h" |
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); | 670 DISALLOW_IMPLICIT_CONSTRUCTORS(RawObject); |
671 }; | 671 }; |
672 | 672 |
673 | 673 |
674 class RawClass : public RawObject { | 674 class RawClass : public RawObject { |
675 public: | 675 public: |
676 enum ClassFinalizedState { | 676 enum ClassFinalizedState { |
677 kAllocated = 0, // Initial state. | 677 kAllocated = 0, // Initial state. |
678 kPreFinalized, // VM classes: size precomputed, but no checks done. | 678 kPreFinalized, // VM classes: size precomputed, but no checks done. |
679 kFinalized, // Class parsed, finalized and ready for use. | 679 kFinalized, // Class parsed, finalized and ready for use. |
| 680 kRefinalizeAfterPatch, // Class needs to be refinalized (patched). |
680 }; | 681 }; |
681 | 682 |
682 private: | 683 private: |
683 RAW_HEAP_OBJECT_IMPLEMENTATION(Class); | 684 RAW_HEAP_OBJECT_IMPLEMENTATION(Class); |
684 | 685 |
685 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 686 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
686 RawString* name_; | 687 RawString* name_; |
687 NOT_IN_PRODUCT(RawString* user_name_); | 688 NOT_IN_PRODUCT(RawString* user_name_); |
688 RawArray* functions_; | 689 RawArray* functions_; |
689 RawArray* functions_hash_table_; | 690 RawArray* functions_hash_table_; |
(...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2365 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2366 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2366 kTypedDataInt8ArrayViewCid + 15); | 2367 kTypedDataInt8ArrayViewCid + 15); |
2367 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2368 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2368 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2369 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2369 return (kNullCid - kTypedDataInt8ArrayCid); | 2370 return (kNullCid - kTypedDataInt8ArrayCid); |
2370 } | 2371 } |
2371 | 2372 |
2372 } // namespace dart | 2373 } // namespace dart |
2373 | 2374 |
2374 #endif // VM_RAW_OBJECT_H_ | 2375 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |