| 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 RUNTIME_VM_RAW_OBJECT_H_ | 5 #ifndef RUNTIME_VM_RAW_OBJECT_H_ |
| 6 #define RUNTIME_VM_RAW_OBJECT_H_ | 6 #define RUNTIME_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/exceptions.h" | 10 #include "vm/exceptions.h" |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 RawObject** to() { | 892 RawObject** to() { |
| 893 #if defined(DART_PRECOMPILED_RUNTIME) | 893 #if defined(DART_PRECOMPILED_RUNTIME) |
| 894 return reinterpret_cast<RawObject**>(&ptr()->code_); | 894 return reinterpret_cast<RawObject**>(&ptr()->code_); |
| 895 #else | 895 #else |
| 896 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); | 896 return reinterpret_cast<RawObject**>(&ptr()->unoptimized_code_); |
| 897 #endif | 897 #endif |
| 898 } | 898 } |
| 899 | 899 |
| 900 NOT_IN_PRECOMPILED(TokenPosition token_pos_); | 900 NOT_IN_PRECOMPILED(TokenPosition token_pos_); |
| 901 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); | 901 NOT_IN_PRECOMPILED(TokenPosition end_token_pos_); |
| 902 NOT_IN_PRECOMPILED(intptr_t kernel_offset_); | |
| 903 NOT_IN_PRECOMPILED(int32_t usage_counter_); // Accessed from generated code | |
| 904 // (JIT only). | |
| 905 uint32_t kind_tag_; // See Function::KindTagBits. | 902 uint32_t kind_tag_; // See Function::KindTagBits. |
| 906 int16_t num_fixed_parameters_; | 903 int16_t num_fixed_parameters_; |
| 907 int16_t num_optional_parameters_; // > 0: positional; < 0: named. | 904 int16_t num_optional_parameters_; // > 0: positional; < 0: named. |
| 908 NOT_IN_PRECOMPILED(uint16_t optimized_instruction_count_); | 905 |
| 909 NOT_IN_PRECOMPILED(uint16_t optimized_call_site_count_); | 906 #define JIT_FUNCTION_COUNTERS(F) \ |
| 910 NOT_IN_PRECOMPILED(int8_t deoptimization_counter_); | 907 F(intptr_t, intptr_t, kernel_offset) \ |
| 911 NOT_IN_PRECOMPILED(int8_t was_compiled_); | 908 F(intptr_t, int32_t, usage_counter) \ |
| 909 F(intptr_t, uint16_t, optimized_instruction_count) \ |
| 910 F(intptr_t, uint16_t, optimized_call_site_count) \ |
| 911 F(int8_t, int8_t, deoptimization_counter) \ |
| 912 F(intptr_t, int8_t, was_compiled_numeric) \ |
| 913 F(int, int8_t, inlining_depth) |
| 914 |
| 915 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 916 #define DECLARE(return_type, type, name) type name##_; |
| 917 |
| 918 JIT_FUNCTION_COUNTERS(DECLARE) |
| 919 |
| 920 #undef DECLARE |
| 921 #endif |
| 912 }; | 922 }; |
| 913 | 923 |
| 914 class RawClosureData : public RawObject { | 924 class RawClosureData : public RawObject { |
| 915 private: | 925 private: |
| 916 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); | 926 RAW_HEAP_OBJECT_IMPLEMENTATION(ClosureData); |
| 917 | 927 |
| 918 RawObject** from() { | 928 RawObject** from() { |
| 919 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); | 929 return reinterpret_cast<RawObject**>(&ptr()->context_scope_); |
| 920 } | 930 } |
| 921 RawContextScope* context_scope_; | 931 RawContextScope* context_scope_; |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == | 2449 COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid == |
| 2440 kTypedDataInt8ArrayViewCid + 15); | 2450 kTypedDataInt8ArrayViewCid + 15); |
| 2441 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); | 2451 COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14); |
| 2442 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); | 2452 COMPILE_ASSERT(kNullCid == kByteBufferCid + 1); |
| 2443 return (kNullCid - kTypedDataInt8ArrayCid); | 2453 return (kNullCid - kTypedDataInt8ArrayCid); |
| 2444 } | 2454 } |
| 2445 | 2455 |
| 2446 } // namespace dart | 2456 } // namespace dart |
| 2447 | 2457 |
| 2448 #endif // RUNTIME_VM_RAW_OBJECT_H_ | 2458 #endif // RUNTIME_VM_RAW_OBJECT_H_ |
| OLD | NEW |