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