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 // Class for intrinsifying functions. | 4 // Class for intrinsifying functions. |
5 | 5 |
6 #ifndef VM_INTRINSIFIER_H_ | 6 #ifndef VM_INTRINSIFIER_H_ |
7 #define VM_INTRINSIFIER_H_ | 7 #define VM_INTRINSIFIER_H_ |
8 | 8 |
9 #include "vm/allocation.h" | 9 #include "vm/allocation.h" |
10 | 10 |
11 namespace dart { | 11 namespace dart { |
12 | 12 |
13 // List of intrinsics: | 13 // List of intrinsics: |
14 // (class-name, function-name, intrinsification method, fingerprint). | 14 // (class-name, function-name, intrinsification method, fingerprint). |
15 // | 15 // |
16 // When adding a new function for intrinsification add a 0 as fingerprint, | 16 // When adding a new function for intrinsification add a 0 as fingerprint, |
17 // build and run to get the correct fingerprint from the mismatch error. | 17 // build and run to get the correct fingerprint from the mismatch error. |
18 #define CORE_LIB_INTRINSIC_LIST(V) \ | 18 #define CORE_LIB_INTRINSIC_LIST(V) \ |
19 V(_Smi, ~, Smi_bitNegate, 635678453) \ | 19 V(_Smi, ~, Smi_bitNegate, 635678453) \ |
| 20 V(_Smi, get:bitLength, Smi_bitLength, 383357874) \ |
20 V(_Double, >, Double_greaterThan, 1021232334) \ | 21 V(_Double, >, Double_greaterThan, 1021232334) \ |
21 V(_Double, >=, Double_greaterEqualThan, 324955595) \ | 22 V(_Double, >=, Double_greaterEqualThan, 324955595) \ |
22 V(_Double, <, Double_lessThan, 978151157) \ | 23 V(_Double, <, Double_lessThan, 978151157) \ |
23 V(_Double, <=, Double_lessEqualThan, 1169397675) \ | 24 V(_Double, <=, Double_lessEqualThan, 1169397675) \ |
24 V(_Double, ==, Double_equal, 223604237) \ | 25 V(_Double, ==, Double_equal, 223604237) \ |
25 V(_Double, +, Double_add, 295873577) \ | 26 V(_Double, +, Double_add, 295873577) \ |
26 V(_Double, -, Double_sub, 1180117486) \ | 27 V(_Double, -, Double_sub, 1180117486) \ |
27 V(_Double, *, Double_mul, 1999983053) \ | 28 V(_Double, *, Double_mul, 1999983053) \ |
28 V(_Double, /, Double_div, 1904009451) \ | 29 V(_Double, /, Double_div, 1904009451) \ |
29 V(_Double, get:isNaN, Double_getIsNaN, 916506740) \ | 30 V(_Double, get:isNaN, Double_getIsNaN, 916506740) \ |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 CORE_INTEGER_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 154 CORE_INTEGER_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
154 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 155 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
155 TYPED_DATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 156 TYPED_DATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
156 | 157 |
157 #undef DECLARE_FUNCTION | 158 #undef DECLARE_FUNCTION |
158 }; | 159 }; |
159 | 160 |
160 } // namespace dart | 161 } // namespace dart |
161 | 162 |
162 #endif // VM_INTRINSIFIER_H_ | 163 #endif // VM_INTRINSIFIER_H_ |
OLD | NEW |