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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 RawString* name_; | 756 RawString* name_; |
757 RawObject* owner_; // Class or patch class or mixin class | 757 RawObject* owner_; // Class or patch class or mixin class |
758 // where this function is defined. | 758 // where this function is defined. |
759 RawAbstractType* result_type_; | 759 RawAbstractType* result_type_; |
760 RawArray* parameter_types_; | 760 RawArray* parameter_types_; |
761 RawArray* parameter_names_; | 761 RawArray* parameter_names_; |
762 RawObject* data_; // Additional data specific to the function kind. | 762 RawObject* data_; // Additional data specific to the function kind. |
763 RawObject** to_snapshot() { | 763 RawObject** to_snapshot() { |
764 return reinterpret_cast<RawObject**>(&ptr()->data_); | 764 return reinterpret_cast<RawObject**>(&ptr()->data_); |
765 } | 765 } |
766 // Fields below are not part of the snapshot. | |
767 RawArray* ic_data_array_; // ICData of unoptimized code. | 766 RawArray* ic_data_array_; // ICData of unoptimized code. |
| 767 RawObject** to_optimized_snapshot() { |
| 768 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); |
| 769 } |
768 RawObject** to_no_code() { | 770 RawObject** to_no_code() { |
769 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); | 771 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); |
770 } | 772 } |
771 RawInstructions* instructions_; // Instructions of currently active code. | 773 RawInstructions* instructions_; // Instructions of currently active code. |
772 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. | 774 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. |
773 RawObject** to() { | 775 RawObject** to() { |
774 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); | 776 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); |
775 } | 777 } |
776 uword entry_point_; | 778 uword entry_point_; |
777 | 779 |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2224 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2226 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
2225 kTypedDataInt8ArrayViewCid + 15); | 2227 kTypedDataInt8ArrayViewCid + 15); |
2226 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2228 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
2227 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2229 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
2228 return (kNullCid - kTypedDataInt8ArrayCid); | 2230 return (kNullCid - kTypedDataInt8ArrayCid); |
2229 } | 2231 } |
2230 | 2232 |
2231 } // namespace dart | 2233 } // namespace dart |
2232 | 2234 |
2233 #endif // VM_RAW_OBJECT_H_ | 2235 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |