| 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 2788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2799 intptr_t deopt_id() const { | 2799 intptr_t deopt_id() const { |
| 2800 return raw_ptr()->deopt_id_; | 2800 return raw_ptr()->deopt_id_; |
| 2801 } | 2801 } |
| 2802 | 2802 |
| 2803 intptr_t deopt_reason() const { | 2803 intptr_t deopt_reason() const { |
| 2804 return raw_ptr()->deopt_reason_; | 2804 return raw_ptr()->deopt_reason_; |
| 2805 } | 2805 } |
| 2806 | 2806 |
| 2807 void set_deopt_reason(intptr_t reason) const; | 2807 void set_deopt_reason(intptr_t reason) const; |
| 2808 | 2808 |
| 2809 bool is_closure_call() const { |
| 2810 return raw_ptr()->is_closure_call_ == 1; |
| 2811 } |
| 2812 |
| 2813 void set_is_closure_call(bool value) const; |
| 2814 |
| 2809 intptr_t NumberOfChecks() const; | 2815 intptr_t NumberOfChecks() const; |
| 2810 | 2816 |
| 2811 static intptr_t InstanceSize() { | 2817 static intptr_t InstanceSize() { |
| 2812 return RoundedAllocationSize(sizeof(RawICData)); | 2818 return RoundedAllocationSize(sizeof(RawICData)); |
| 2813 } | 2819 } |
| 2814 | 2820 |
| 2815 static intptr_t target_name_offset() { | 2821 static intptr_t target_name_offset() { |
| 2816 return OFFSET_OF(RawICData, target_name_); | 2822 return OFFSET_OF(RawICData, target_name_); |
| 2817 } | 2823 } |
| 2818 | 2824 |
| 2819 static intptr_t num_args_tested_offset() { | 2825 static intptr_t num_args_tested_offset() { |
| 2820 return OFFSET_OF(RawICData, num_args_tested_); | 2826 return OFFSET_OF(RawICData, num_args_tested_); |
| 2821 } | 2827 } |
| 2822 | 2828 |
| 2823 static intptr_t ic_data_offset() { | 2829 static intptr_t ic_data_offset() { |
| 2824 return OFFSET_OF(RawICData, ic_data_); | 2830 return OFFSET_OF(RawICData, ic_data_); |
| 2825 } | 2831 } |
| 2826 | 2832 |
| 2827 static intptr_t function_offset() { | 2833 static intptr_t function_offset() { |
| 2828 return OFFSET_OF(RawICData, function_); | 2834 return OFFSET_OF(RawICData, function_); |
| 2829 } | 2835 } |
| 2830 | 2836 |
| 2837 static intptr_t is_closure_call_offset() { |
| 2838 return OFFSET_OF(RawICData, is_closure_call_); |
| 2839 } |
| 2840 |
| 2831 // Adding checks. | 2841 // Adding checks. |
| 2832 | 2842 |
| 2833 // Adds one more class test to ICData. Length of 'classes' must be equal to | 2843 // Adds one more class test to ICData. Length of 'classes' must be equal to |
| 2834 // the number of arguments tested. Use only for num_args_tested > 1. | 2844 // the number of arguments tested. Use only for num_args_tested > 1. |
| 2835 void AddCheck(const GrowableArray<intptr_t>& class_ids, | 2845 void AddCheck(const GrowableArray<intptr_t>& class_ids, |
| 2836 const Function& target) const; | 2846 const Function& target) const; |
| 2837 // Adds sorted so that Smi is the first class-id. Use only for | 2847 // Adds sorted so that Smi is the first class-id. Use only for |
| 2838 // num_args_tested == 1. | 2848 // num_args_tested == 1. |
| 2839 void AddReceiverCheck(intptr_t receiver_class_id, | 2849 void AddReceiverCheck(intptr_t receiver_class_id, |
| 2840 const Function& target) const; | 2850 const Function& target) const; |
| (...skipping 3044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5885 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5895 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5886 return false; | 5896 return false; |
| 5887 } | 5897 } |
| 5888 } | 5898 } |
| 5889 return true; | 5899 return true; |
| 5890 } | 5900 } |
| 5891 | 5901 |
| 5892 } // namespace dart | 5902 } // namespace dart |
| 5893 | 5903 |
| 5894 #endif // VM_OBJECT_H_ | 5904 #endif // VM_OBJECT_H_ |
| OLD | NEW |