Chromium Code Reviews| 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 2781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2792 intptr_t deopt_id() const { | 2792 intptr_t deopt_id() const { |
| 2793 return raw_ptr()->deopt_id_; | 2793 return raw_ptr()->deopt_id_; |
| 2794 } | 2794 } |
| 2795 | 2795 |
| 2796 intptr_t deopt_reason() const { | 2796 intptr_t deopt_reason() const { |
| 2797 return raw_ptr()->deopt_reason_; | 2797 return raw_ptr()->deopt_reason_; |
| 2798 } | 2798 } |
| 2799 | 2799 |
| 2800 void set_deopt_reason(intptr_t reason) const; | 2800 void set_deopt_reason(intptr_t reason) const; |
| 2801 | 2801 |
| 2802 bool is_closure_call() const { | |
| 2803 return raw_ptr()->is_closure_call_ == 1; | |
|
Kevin Millikin (Google)
2012/11/13 17:56:53
There's an extra space before ==.
srdjan
2012/11/13 18:21:39
Done.
| |
| 2804 } | |
| 2805 | |
| 2806 void set_is_closure_call(bool value) const; | |
| 2807 | |
| 2802 intptr_t NumberOfChecks() const; | 2808 intptr_t NumberOfChecks() const; |
| 2803 | 2809 |
| 2804 static intptr_t InstanceSize() { | 2810 static intptr_t InstanceSize() { |
| 2805 return RoundedAllocationSize(sizeof(RawICData)); | 2811 return RoundedAllocationSize(sizeof(RawICData)); |
| 2806 } | 2812 } |
| 2807 | 2813 |
| 2808 static intptr_t target_name_offset() { | 2814 static intptr_t target_name_offset() { |
| 2809 return OFFSET_OF(RawICData, target_name_); | 2815 return OFFSET_OF(RawICData, target_name_); |
| 2810 } | 2816 } |
| 2811 | 2817 |
| 2812 static intptr_t num_args_tested_offset() { | 2818 static intptr_t num_args_tested_offset() { |
| 2813 return OFFSET_OF(RawICData, num_args_tested_); | 2819 return OFFSET_OF(RawICData, num_args_tested_); |
| 2814 } | 2820 } |
| 2815 | 2821 |
| 2816 static intptr_t ic_data_offset() { | 2822 static intptr_t ic_data_offset() { |
| 2817 return OFFSET_OF(RawICData, ic_data_); | 2823 return OFFSET_OF(RawICData, ic_data_); |
| 2818 } | 2824 } |
| 2819 | 2825 |
| 2820 static intptr_t function_offset() { | 2826 static intptr_t function_offset() { |
| 2821 return OFFSET_OF(RawICData, function_); | 2827 return OFFSET_OF(RawICData, function_); |
| 2822 } | 2828 } |
| 2823 | 2829 |
| 2830 static intptr_t is_closure_call_offset() { | |
| 2831 return OFFSET_OF(RawICData, is_closure_call_); | |
| 2832 } | |
| 2833 | |
| 2824 // Adding checks. | 2834 // Adding checks. |
| 2825 | 2835 |
| 2826 // Adds one more class test to ICData. Length of 'classes' must be equal to | 2836 // Adds one more class test to ICData. Length of 'classes' must be equal to |
| 2827 // the number of arguments tested. Use only for num_args_tested > 1. | 2837 // the number of arguments tested. Use only for num_args_tested > 1. |
| 2828 void AddCheck(const GrowableArray<intptr_t>& class_ids, | 2838 void AddCheck(const GrowableArray<intptr_t>& class_ids, |
| 2829 const Function& target) const; | 2839 const Function& target) const; |
| 2830 // Adds sorted so that Smi is the first class-id. Use only for | 2840 // Adds sorted so that Smi is the first class-id. Use only for |
| 2831 // num_args_tested == 1. | 2841 // num_args_tested == 1. |
| 2832 void AddReceiverCheck(intptr_t receiver_class_id, | 2842 void AddReceiverCheck(intptr_t receiver_class_id, |
| 2833 const Function& target) const; | 2843 const Function& target) const; |
| (...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5874 if (this->CharAt(i) != str.CharAt(begin_index + i)) { | 5884 if (this->CharAt(i) != str.CharAt(begin_index + i)) { |
| 5875 return false; | 5885 return false; |
| 5876 } | 5886 } |
| 5877 } | 5887 } |
| 5878 return true; | 5888 return true; |
| 5879 } | 5889 } |
| 5880 | 5890 |
| 5881 } // namespace dart | 5891 } // namespace dart |
| 5882 | 5892 |
| 5883 #endif // VM_OBJECT_H_ | 5893 #endif // VM_OBJECT_H_ |
| OLD | NEW |