| 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 3219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3230 } | 3230 } |
| 3231 | 3231 |
| 3232 static intptr_t function_offset() { | 3232 static intptr_t function_offset() { |
| 3233 return OFFSET_OF(RawICData, function_); | 3233 return OFFSET_OF(RawICData, function_); |
| 3234 } | 3234 } |
| 3235 | 3235 |
| 3236 static intptr_t is_closure_call_offset() { | 3236 static intptr_t is_closure_call_offset() { |
| 3237 return OFFSET_OF(RawICData, is_closure_call_); | 3237 return OFFSET_OF(RawICData, is_closure_call_); |
| 3238 } | 3238 } |
| 3239 | 3239 |
| 3240 // Used for unoptimized static calls when no class-ids are checked. |
| 3241 void AddTarget(const Function& target) const; |
| 3242 |
| 3240 // Adding checks. | 3243 // Adding checks. |
| 3241 | 3244 |
| 3242 // Adds one more class test to ICData. Length of 'classes' must be equal to | 3245 // Adds one more class test to ICData. Length of 'classes' must be equal to |
| 3243 // the number of arguments tested. Use only for num_args_tested > 1. | 3246 // the number of arguments tested. Use only for num_args_tested > 1. |
| 3244 void AddCheck(const GrowableArray<intptr_t>& class_ids, | 3247 void AddCheck(const GrowableArray<intptr_t>& class_ids, |
| 3245 const Function& target) const; | 3248 const Function& target) const; |
| 3246 // Adds sorted so that Smi is the first class-id. Use only for | 3249 // Adds sorted so that Smi is the first class-id. Use only for |
| 3247 // num_args_tested == 1. | 3250 // num_args_tested == 1. |
| 3248 void AddReceiverCheck(intptr_t receiver_class_id, | 3251 void AddReceiverCheck(intptr_t receiver_class_id, |
| 3249 const Function& target, | 3252 const Function& target, |
| (...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5931 | 5934 |
| 5932 | 5935 |
| 5933 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, | 5936 RawObject* MegamorphicCache::GetTargetFunction(const Array& array, |
| 5934 intptr_t index) { | 5937 intptr_t index) { |
| 5935 return array.At((index * kEntryLength) + kTargetFunctionIndex); | 5938 return array.At((index * kEntryLength) + kTargetFunctionIndex); |
| 5936 } | 5939 } |
| 5937 | 5940 |
| 5938 } // namespace dart | 5941 } // namespace dart |
| 5939 | 5942 |
| 5940 #endif // VM_OBJECT_H_ | 5943 #endif // VM_OBJECT_H_ |
| OLD | NEW |