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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 V(_Int16Array, [], Int16Array_getIndexed) \ | 85 V(_Int16Array, [], Int16Array_getIndexed) \ |
86 V(_Uint16Array, [], Uint16Array_getIndexed) \ | 86 V(_Uint16Array, [], Uint16Array_getIndexed) \ |
87 V(_Int32Array, [], Int32Array_getIndexed) \ | 87 V(_Int32Array, [], Int32Array_getIndexed) \ |
88 V(_Uint32Array, [], Uint32Array_getIndexed) \ | 88 V(_Uint32Array, [], Uint32Array_getIndexed) \ |
89 V(_Int64Array, [], Int64Array_getIndexed) \ | 89 V(_Int64Array, [], Int64Array_getIndexed) \ |
90 V(_Uint64Array, [], Uint64Array_getIndexed) \ | 90 V(_Uint64Array, [], Uint64Array_getIndexed) \ |
91 V(_Float32Array, [], Float32Array_getIndexed) \ | 91 V(_Float32Array, [], Float32Array_getIndexed) \ |
92 V(_Float32Array, []=, Float32Array_setIndexed) \ | 92 V(_Float32Array, []=, Float32Array_setIndexed) \ |
93 V(_Float64Array, [], Float64Array_getIndexed) \ | 93 V(_Float64Array, [], Float64Array_getIndexed) \ |
94 V(_Float64Array, []=, Float64Array_setIndexed) \ | 94 V(_Float64Array, []=, Float64Array_setIndexed) \ |
| 95 V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed) \ |
95 | 96 |
96 // Forward declarations. | 97 // Forward declarations. |
97 class Assembler; | 98 class Assembler; |
98 class Function; | 99 class Function; |
99 | 100 |
100 class Intrinsifier : public AllStatic { | 101 class Intrinsifier : public AllStatic { |
101 public: | 102 public: |
102 // Try to intrinsify 'function'. Returns true if the function intrinsified | 103 // Try to intrinsify 'function'. Returns true if the function intrinsified |
103 // completely and the code does not need to be generated (i.e., no slow | 104 // completely and the code does not need to be generated (i.e., no slow |
104 // path possible). | 105 // path possible). |
105 static bool Intrinsify(const Function& function, Assembler* assembler); | 106 static bool Intrinsify(const Function& function, Assembler* assembler); |
106 static bool CanIntrinsify(const Function& function); | 107 static bool CanIntrinsify(const Function& function); |
107 | 108 |
108 private: | 109 private: |
109 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination) \ | 110 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination) \ |
110 static bool destination(Assembler* assembler); | 111 static bool destination(Assembler* assembler); |
111 | 112 |
112 INTRINSIC_LIST(DECLARE_FUNCTION) | 113 INTRINSIC_LIST(DECLARE_FUNCTION) |
113 #undef DECLARE_FUNCTION | 114 #undef DECLARE_FUNCTION |
114 }; | 115 }; |
115 | 116 |
116 } // namespace dart | 117 } // namespace dart |
117 | 118 |
118 #endif // VM_INTRINSIFIER_H_ | 119 #endif // VM_INTRINSIFIER_H_ |
OLD | NEW |