| 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_OBJECT_H_ | 5 #ifndef VM_OBJECT_H_ |
| 6 #define VM_OBJECT_H_ | 6 #define VM_OBJECT_H_ |
| 7 | 7 |
| 8 #include "include/dart_api.h" | 8 #include "include/dart_api.h" |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 #include "platform/utils.h" | 10 #include "platform/utils.h" |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 } | 1136 } |
| 1137 void set_num_native_fields(uint16_t value) const { | 1137 void set_num_native_fields(uint16_t value) const { |
| 1138 raw_ptr()->num_native_fields_ = value; | 1138 raw_ptr()->num_native_fields_ = value; |
| 1139 } | 1139 } |
| 1140 | 1140 |
| 1141 RawCode* allocation_stub() const { | 1141 RawCode* allocation_stub() const { |
| 1142 return raw_ptr()->allocation_stub_; | 1142 return raw_ptr()->allocation_stub_; |
| 1143 } | 1143 } |
| 1144 void set_allocation_stub(const Code& value) const; | 1144 void set_allocation_stub(const Code& value) const; |
| 1145 | 1145 |
| 1146 void DisableAllocationStub() const; | 1146 void SwitchAllocationStub() const; |
| 1147 | 1147 |
| 1148 RawArray* constants() const; | 1148 RawArray* constants() const; |
| 1149 | 1149 |
| 1150 intptr_t FindInvocationDispatcherFunctionIndex(const Function& needle) const; | 1150 intptr_t FindInvocationDispatcherFunctionIndex(const Function& needle) const; |
| 1151 RawFunction* InvocationDispatcherFunctionFromIndex(intptr_t idx) const; | 1151 RawFunction* InvocationDispatcherFunctionFromIndex(intptr_t idx) const; |
| 1152 | 1152 |
| 1153 RawFunction* GetInvocationDispatcher(const String& target_name, | 1153 RawFunction* GetInvocationDispatcher(const String& target_name, |
| 1154 const Array& args_desc, | 1154 const Array& args_desc, |
| 1155 RawFunction::Kind kind) const; | 1155 RawFunction::Kind kind) const; |
| 1156 | 1156 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1269 RawString* GenerateUserVisibleName() const; | 1269 RawString* GenerateUserVisibleName() const; |
| 1270 void set_signature_function(const Function& value) const; | 1270 void set_signature_function(const Function& value) const; |
| 1271 void set_signature_type(const AbstractType& value) const; | 1271 void set_signature_type(const AbstractType& value) const; |
| 1272 void set_state_bits(intptr_t bits) const; | 1272 void set_state_bits(intptr_t bits) const; |
| 1273 | 1273 |
| 1274 void set_constants(const Array& value) const; | 1274 void set_constants(const Array& value) const; |
| 1275 | 1275 |
| 1276 void set_canonical_types(const Object& value) const; | 1276 void set_canonical_types(const Object& value) const; |
| 1277 RawObject* canonical_types() const; | 1277 RawObject* canonical_types() const; |
| 1278 | 1278 |
| 1279 RawCode* spare_allocation_stub() const { |
| 1280 return raw_ptr()->spare_allocation_stub_; |
| 1281 } |
| 1282 |
| 1279 RawArray* invocation_dispatcher_cache() const; | 1283 RawArray* invocation_dispatcher_cache() const; |
| 1280 void set_invocation_dispatcher_cache(const Array& cache) const; | 1284 void set_invocation_dispatcher_cache(const Array& cache) const; |
| 1281 RawFunction* CreateInvocationDispatcher(const String& target_name, | 1285 RawFunction* CreateInvocationDispatcher(const String& target_name, |
| 1282 const Array& args_desc, | 1286 const Array& args_desc, |
| 1283 RawFunction::Kind kind) const; | 1287 RawFunction::Kind kind) const; |
| 1284 | 1288 |
| 1285 void CalculateFieldOffsets() const; | 1289 void CalculateFieldOffsets() const; |
| 1286 | 1290 |
| 1287 // functions_hash_table is in use iff there are at least this many functions. | 1291 // functions_hash_table is in use iff there are at least this many functions. |
| 1288 static const intptr_t kFunctionLookupHashTreshold = 16; | 1292 static const intptr_t kFunctionLookupHashTreshold = 16; |
| (...skipping 6170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7459 | 7463 |
| 7460 | 7464 |
| 7461 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 7465 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 7462 intptr_t index) { | 7466 intptr_t index) { |
| 7463 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 7467 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 7464 } | 7468 } |
| 7465 | 7469 |
| 7466 } // namespace dart | 7470 } // namespace dart |
| 7467 | 7471 |
| 7468 #endif // VM_OBJECT_H_ | 7472 #endif // VM_OBJECT_H_ |
| OLD | NEW |