| 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 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 134 |
| 135 // Forward declarations. | 135 // Forward declarations. |
| 136 class Assembler; | 136 class Assembler; |
| 137 class Function; | 137 class Function; |
| 138 | 138 |
| 139 class Intrinsifier : public AllStatic { | 139 class Intrinsifier : public AllStatic { |
| 140 public: | 140 public: |
| 141 // Try to intrinsify 'function'. Returns true if the function intrinsified | 141 // Try to intrinsify 'function'. Returns true if the function intrinsified |
| 142 // completely and the code does not need to be generated (i.e., no slow | 142 // completely and the code does not need to be generated (i.e., no slow |
| 143 // path possible). | 143 // path possible). |
| 144 static bool Intrinsify(const Function& function, Assembler* assembler); | 144 static void Intrinsify(const Function& function, Assembler* assembler); |
| 145 static bool CanIntrinsify(const Function& function); | 145 static bool CanIntrinsify(const Function& function); |
| 146 static void InitializeState(); | 146 static void InitializeState(); |
| 147 | 147 |
| 148 private: | 148 private: |
| 149 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ | 149 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ |
| 150 static bool destination(Assembler* assembler); | 150 static void destination(Assembler* assembler); |
| 151 | 151 |
| 152 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 152 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 153 CORE_INTEGER_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 153 CORE_INTEGER_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 154 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 154 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 155 TYPED_DATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 155 TYPED_DATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 156 | 156 |
| 157 #undef DECLARE_FUNCTION | 157 #undef DECLARE_FUNCTION |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace dart | 160 } // namespace dart |
| 161 | 161 |
| 162 #endif // VM_INTRINSIFIER_H_ | 162 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |