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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1015 } | 1015 } |
1016 }; | 1016 }; |
1017 | 1017 |
1018 | 1018 |
1019 class RawICData : public RawObject { | 1019 class RawICData : public RawObject { |
1020 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); | 1020 RAW_HEAP_OBJECT_IMPLEMENTATION(ICData); |
1021 | 1021 |
1022 RawObject** from() { | 1022 RawObject** from() { |
1023 return reinterpret_cast<RawObject**>(&ptr()->function_); | 1023 return reinterpret_cast<RawObject**>(&ptr()->function_); |
1024 } | 1024 } |
1025 RawFunction* function_; // Parent/calling function of this IC. | 1025 RawFunction* function_; // Parent/calling function of this IC. |
1026 RawString* target_name_; // Name of target function. | 1026 RawString* target_name_; // Name of target function. |
1027 RawArray* ic_data_; // Contains test class-ids and target functions. | 1027 RawArray* args_descriptor_; // Arguments descriptor. |
| 1028 RawArray* ic_data_; // Contains test class-ids and target functions. |
1028 RawObject** to() { | 1029 RawObject** to() { |
1029 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); | 1030 return reinterpret_cast<RawObject**>(&ptr()->ic_data_); |
1030 } | 1031 } |
1031 intptr_t deopt_id_; // Deoptimization id corresponding to this IC. | 1032 intptr_t deopt_id_; // Deoptimization id corresponding to this IC. |
1032 intptr_t num_args_tested_; // Number of arguments tested in IC. | 1033 intptr_t num_args_tested_; // Number of arguments tested in IC. |
1033 uint8_t deopt_reason_; // Last deoptimization reason. | 1034 uint8_t deopt_reason_; // Last deoptimization reason. |
1034 uint8_t is_closure_call_; // 0 or 1. | 1035 uint8_t is_closure_call_; // 0 or 1. |
1035 }; | 1036 }; |
1036 | 1037 |
1037 | 1038 |
1038 class RawMegamorphicCache : public RawObject { | 1039 class RawMegamorphicCache : public RawObject { |
1039 RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache); | 1040 RAW_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache); |
1040 | 1041 |
1041 RawObject** from() { | 1042 RawObject** from() { |
1042 return reinterpret_cast<RawObject**>(&ptr()->buckets_); | 1043 return reinterpret_cast<RawObject**>(&ptr()->buckets_); |
1043 } | 1044 } |
1044 RawArray* buckets_; | 1045 RawArray* buckets_; |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 // Make sure this is updated when new TypedData types are added. | 1689 // Make sure this is updated when new TypedData types are added. |
1689 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); | 1690 ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 12); |
1690 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); | 1691 ASSERT(kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 13); |
1691 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); | 1692 ASSERT(kNullCid == kExternalTypedDataInt8ArrayCid + 12); |
1692 return (kNullCid - kTypedDataInt8ArrayCid); | 1693 return (kNullCid - kTypedDataInt8ArrayCid); |
1693 } | 1694 } |
1694 | 1695 |
1695 } // namespace dart | 1696 } // namespace dart |
1696 | 1697 |
1697 #endif // VM_RAW_OBJECT_H_ | 1698 #endif // VM_RAW_OBJECT_H_ |
OLD | NEW |