| 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: (class-name, function-name, intrinsification method). | 13 // List of intrinsics: (class-name, function-name, intrinsification method). |
| 14 #define INTRINSIC_LIST(V) \ | 14 #define INTRINSIC_LIST(V) \ |
| 15 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger) \ | 15 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger) \ |
| 16 V(_IntegerImplementation, +, Integer_add) \ | 16 V(_IntegerImplementation, +, Integer_add) \ |
| 17 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger) \ | 17 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger) \ |
| 18 V(_IntegerImplementation, -, Integer_sub) \ | 18 V(_IntegerImplementation, -, Integer_sub) \ |
| 19 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger) \ | 19 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger) \ |
| 20 V(_IntegerImplementation, *, Integer_mul) \ | 20 V(_IntegerImplementation, *, Integer_mul) \ |
| 21 V(_IntegerImplementation, %, Integer_modulo) \ | 21 V(_IntegerImplementation, %, Integer_modulo) \ |
| 22 V(_IntegerImplementation, ~/, Integer_truncDivide) \ | 22 V(_IntegerImplementation, ~/, Integer_truncDivide) \ |
| 23 V(_IntegerImplementation, unary-, Integer_negate) \ |
| 23 V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger) \ | 24 V(_IntegerImplementation, _bitAndFromInteger, Integer_bitAndFromInteger) \ |
| 24 V(_IntegerImplementation, &, Integer_bitAnd) \ | 25 V(_IntegerImplementation, &, Integer_bitAnd) \ |
| 25 V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger) \ | 26 V(_IntegerImplementation, _bitOrFromInteger, Integer_bitOrFromInteger) \ |
| 26 V(_IntegerImplementation, |, Integer_bitOr) \ | 27 V(_IntegerImplementation, |, Integer_bitOr) \ |
| 27 V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger) \ | 28 V(_IntegerImplementation, _bitXorFromInteger, Integer_bitXorFromInteger) \ |
| 28 V(_IntegerImplementation, ^, Integer_bitXor) \ | 29 V(_IntegerImplementation, ^, Integer_bitXor) \ |
| 29 V(_IntegerImplementation, \ | 30 V(_IntegerImplementation, \ |
| 30 _greaterThanFromInteger, \ | 31 _greaterThanFromInteger, \ |
| 31 Integer_greaterThanFromInt) \ | 32 Integer_greaterThanFromInt) \ |
| 32 V(_IntegerImplementation, >, Integer_greaterThan) \ | 33 V(_IntegerImplementation, >, Integer_greaterThan) \ |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination) \ | 106 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination) \ |
| 106 static bool destination(Assembler* assembler); | 107 static bool destination(Assembler* assembler); |
| 107 | 108 |
| 108 INTRINSIC_LIST(DECLARE_FUNCTION) | 109 INTRINSIC_LIST(DECLARE_FUNCTION) |
| 109 #undef DECLARE_FUNCTION | 110 #undef DECLARE_FUNCTION |
| 110 }; | 111 }; |
| 111 | 112 |
| 112 } // namespace dart | 113 } // namespace dart |
| 113 | 114 |
| 114 #endif // VM_INTRINSIFIER_H_ | 115 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |