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 #include "vm/method_recognizer.h" | 10 #include "vm/method_recognizer.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 static intptr_t ParameterSlotFromSp(); | 33 static intptr_t ParameterSlotFromSp(); |
34 | 34 |
35 private: | 35 private: |
36 static bool CanIntrinsify(const Function& function); | 36 static bool CanIntrinsify(const Function& function); |
37 | 37 |
38 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ | 38 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ |
39 static void enum_name(Assembler* assembler); | 39 static void enum_name(Assembler* assembler); |
40 | 40 |
41 ALL_INTRINSICS_LIST(DECLARE_FUNCTION) | 41 ALL_INTRINSICS_LIST(DECLARE_FUNCTION) |
| 42 #if defined(TARGET_ARCH_DBC) |
| 43 // On DBC graph intrinsics are handled in the same way as non-graph ones. |
| 44 GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION) |
| 45 #endif |
42 | 46 |
43 #undef DECLARE_FUNCTION | 47 #undef DECLARE_FUNCTION |
44 | 48 |
| 49 #if !defined(TARGET_ARCH_DBC) |
45 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ | 50 #define DECLARE_FUNCTION(test_class_name, test_function_name, enum_name, fp) \ |
46 static bool Build_##enum_name(FlowGraph* flow_graph); | 51 static bool Build_##enum_name(FlowGraph* flow_graph); |
47 | 52 |
48 GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION) | 53 GRAPH_INTRINSICS_LIST(DECLARE_FUNCTION) |
49 | 54 |
50 #undef DECLARE_FUNCTION | 55 #undef DECLARE_FUNCTION |
| 56 #endif |
51 }; | 57 }; |
52 | 58 |
53 } // namespace dart | 59 } // namespace dart |
54 | 60 |
55 #endif // VM_INTRINSIFIER_H_ | 61 #endif // VM_INTRINSIFIER_H_ |
OLD | NEW |