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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Forward declarations. | 87 // Forward declarations. |
88 class Assembler; | 88 class Assembler; |
89 class Function; | 89 class Function; |
90 | 90 |
91 class Intrinsifier : public AllStatic { | 91 class Intrinsifier : public AllStatic { |
92 public: | 92 public: |
93 // Try to intrinsify 'function'. Returns true if the function intrinsified | 93 // Try to intrinsify 'function'. Returns true if the function intrinsified |
94 // completely and the code does not need to be generated (i.e., no slow | 94 // completely and the code does not need to be generated (i.e., no slow |
95 // path possible). | 95 // path possible). |
96 static bool Intrinsify(const Function& function, Assembler* assembler); | 96 static bool Intrinsify(const Function& function, Assembler* assembler); |
| 97 static bool CanIntrinsify(const Function& function); |
97 | 98 |
98 private: | 99 private: |
99 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination) \ | 100 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination) \ |
100 static bool destination(Assembler* assembler); | 101 static bool destination(Assembler* assembler); |
101 | 102 |
102 INTRINSIC_LIST(DECLARE_FUNCTION) | 103 INTRINSIC_LIST(DECLARE_FUNCTION) |
103 #undef DECLARE_FUNCTION | 104 #undef DECLARE_FUNCTION |
104 }; | 105 }; |
105 | 106 |
106 } // namespace dart | 107 } // namespace dart |
107 | 108 |
108 #endif // VM_INTRINSIFIER_H_ | 109 #endif // VM_INTRINSIFIER_H_ |
OLD | NEW |