| 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(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, 726019207)\ | 19 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, 726019207)\ |
| 20 V(_IntegerImplementation, +, Integer_add, 1768648592) \ | 20 V(_IntegerImplementation, +, Integer_add, 1768648592) \ |
| 21 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, 726019207)\ | 21 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, 726019207)\ |
| 22 V(_IntegerImplementation, -, Integer_sub, 1292467582) \ | 22 V(_IntegerImplementation, -, Integer_sub, 1292467582) \ |
| 23 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, 726019207)\ | 23 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, 726019207)\ |
| 24 V(_IntegerImplementation, *, Integer_mul, 1853182047) \ | 24 V(_IntegerImplementation, *, Integer_mul, 1853182047) \ |
| 25 V(_IntegerImplementation, %, Integer_modulo, 1211518976) \ | 25 V(_IntegerImplementation, %, Integer_modulo, 1211518976) \ |
| 26 V(_IntegerImplementation, remainder, Integer_remainder, 1131753683) \ |
| 26 V(_IntegerImplementation, ~/, Integer_truncDivide, 142750059) \ | 27 V(_IntegerImplementation, ~/, Integer_truncDivide, 142750059) \ |
| 27 V(_IntegerImplementation, unary-, Integer_negate, 676633254) \ | 28 V(_IntegerImplementation, unary-, Integer_negate, 676633254) \ |
| 28 V(_IntegerImplementation, _bitAndFromInteger, \ | 29 V(_IntegerImplementation, _bitAndFromInteger, \ |
| 29 Integer_bitAndFromInteger, 726019207) \ | 30 Integer_bitAndFromInteger, 726019207) \ |
| 30 V(_IntegerImplementation, &, Integer_bitAnd, 354347153) \ | 31 V(_IntegerImplementation, &, Integer_bitAnd, 354347153) \ |
| 31 V(_IntegerImplementation, _bitOrFromInteger, \ | 32 V(_IntegerImplementation, _bitOrFromInteger, \ |
| 32 Integer_bitOrFromInteger, 726019207) \ | 33 Integer_bitOrFromInteger, 726019207) \ |
| 33 V(_IntegerImplementation, |, Integer_bitOr, 875694946) \ | 34 V(_IntegerImplementation, |, Integer_bitOr, 875694946) \ |
| 34 V(_IntegerImplementation, _bitXorFromInteger, \ | 35 V(_IntegerImplementation, _bitXorFromInteger, \ |
| 35 Integer_bitXorFromInteger, 726019207) \ | 36 Integer_bitXorFromInteger, 726019207) \ |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 141 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 141 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 142 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 142 TYPEDDATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 143 TYPEDDATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 143 | 144 |
| 144 #undef DECLARE_FUNCTION | 145 #undef DECLARE_FUNCTION |
| 145 }; | 146 }; |
| 146 | 147 |
| 147 } // namespace dart | 148 } // namespace dart |
| 148 | 149 |
| 149 #endif // VM_INTRINSIFIER_H_ | 150 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |