| 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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 static bool CheckUsageCounter(RawFunction* raw_fun); | 753 static bool CheckUsageCounter(RawFunction* raw_fun); |
| 754 | 754 |
| 755 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } | 755 RawObject** from() { return reinterpret_cast<RawObject**>(&ptr()->name_); } |
| 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() { | |
| 764 return reinterpret_cast<RawObject**>(&ptr()->data_); | |
| 765 } | |
| 766 // Fields below are not part of the snapshot. | 763 // Fields below are not part of the snapshot. |
| 767 RawArray* ic_data_array_; // ICData of unoptimized code. | 764 RawArray* ic_data_array_; // ICData of unoptimized code. |
| 765 RawObject** to_snapshot() { |
| 766 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); |
| 767 } |
| 768 RawObject** to_no_code() { | 768 RawObject** to_no_code() { |
| 769 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); | 769 return reinterpret_cast<RawObject**>(&ptr()->ic_data_array_); |
| 770 } | 770 } |
| 771 RawInstructions* instructions_; // Instructions of currently active code. | 771 RawInstructions* instructions_; // Instructions of currently active code. |
| 772 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. | 772 RawCode* unoptimized_code_; // Unoptimized code, keep it after optimization. |
| 773 RawObject** to() { | 773 RawObject** to() { |
| 774 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); | 774 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); |
| 775 } | 775 } |
| 776 uword entry_point_; | 776 uword entry_point_; |
| 777 | 777 |
| (...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2224 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2224 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2225 kTypedDataInt8ArrayViewCid + 15); | 2225 kTypedDataInt8ArrayViewCid + 15); |
| 2226 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2226 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2227 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2227 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2228 return (kNullCid - kTypedDataInt8ArrayCid); | 2228 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2229 } | 2229 } |
| 2230 | 2230 |
| 2231 } // namespace dart | 2231 } // namespace dart |
| 2232 | 2232 |
| 2233 #endif // VM_RAW_OBJECT_H_ | 2233 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |