| 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/globals.h" | 9 #include "vm/globals.h" |
| 10 #include "vm/token.h" | 10 #include "vm/token.h" |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 intptr_t data_length = num_vars * (sizeof(VariableDesc)/kWordSize); | 1014 intptr_t data_length = num_vars * (sizeof(VariableDesc)/kWordSize); |
| 1015 return reinterpret_cast<RawObject**>(&ptr()->data_[data_length - 1]); | 1015 return reinterpret_cast<RawObject**>(&ptr()->data_[data_length - 1]); |
| 1016 } | 1016 } |
| 1017 }; | 1017 }; |
| 1018 | 1018 |
| 1019 | 1019 |
| 1020 class RawICData : public RawObject { | 1020 class RawICData : public RawObject { |
| 1021 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); | 1021 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); |
| 1022 | 1022 |
| 1023 RawObject** from() { | 1023 RawObject** from() { |
| 1024 return reinterpret_cast<RawObject**>(&ptr()->function_); | 1024 return reinterpret_cast<RawObject**>(&ptr()->owner_); |
| 1025 } | 1025 } |
| 1026 RawFunction* function_; // Parent/calling function of this IC. | 1026 RawFunction* owner_; // Parent/calling function of this IC. |
| 1027 RawString* target_name_; // Name of target function. | 1027 RawString* target_name_; // Name of target function. |
| 1028 RawArray* args_descriptor_; // Arguments descriptor. | 1028 RawArray* args_descriptor_; // Arguments descriptor. |
| 1029 RawArray* ic_data_; // Contains class-ids, target and count. | 1029 RawArray* ic_data_; // Contains class-ids, target and count. |
| 1030 RawObject** to() { | 1030 RawObject** to() { |
| 1031 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); | 1031 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); |
| 1032 } | 1032 } |
| 1033 intptr_t deopt_id_; // Deoptimization id corresponding to this IC. | 1033 int32_t deopt_id_; // Deoptimization id corresponding to this IC. |
| 1034 intptr_t num_args_tested_; // Number of arguments tested in IC. | 1034 uint32_t state_bits_; // Number of arguments tested in IC, deopt reasons, |
| 1035 uint8_t deopt_reason_; // Last deoptimization reason. | 1035 // is closure call, JS warning issued. |
| 1036 uint8_t is_closure_call_; // 0 or 1. | |
| 1037 }; | 1036 }; |
| 1038 | 1037 |
| 1039 | 1038 |
| 1040 class RawMegamorphicCache : public RawObject { | 1039 class RawMegamorphicCache : public RawObject { |
| 1041 RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache); | 1040 RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache); |
| 1042 | 1041 |
| 1043 RawObject** from() { | 1042 RawObject** from() { |
| 1044 return reinterpret_cast<RawObject**>(&ptr()->buckets_); | 1043 return reinterpret_cast<RawObject**>(&ptr()->buckets_); |
| 1045 } | 1044 } |
| 1046 RawArray* buckets_; | 1045 RawArray* buckets_; |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 // Make sure this is updated when new TypedData types are added. | 1835 // Make sure this is updated when new TypedData types are added. |
| 1837 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); | 1836 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14); |
| 1838 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); | 1837 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15); |
| 1839 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); | 1838 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 14); |
| 1840 return (kNullCid - kTypedDataInt8ArrayCid); | 1839 return (kNullCid - kTypedDataInt8ArrayCid); |
| 1841 } | 1840 } |
| 1842 | 1841 |
| 1843 } // namespace dart | 1842 } // namespace dart |
| 1844 | 1843 |
| 1845 #endif // VM_RAW_OBJECT_H_ | 1844 #endif // VM_RAW_OBJECT_H_ |
| OLD | NEW |