| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 V(_Int32Array, [], Int32Array_getIndexed, 589442411) \ | 92 V(_Int32Array, [], Int32Array_getIndexed, 589442411) \ |
| 93 V(_Uint32Array, [], Uint32Array_getIndexed, 1474116947) \ | 93 V(_Uint32Array, [], Uint32Array_getIndexed, 1474116947) \ |
| 94 V(_Int64Array, [], Int64Array_getIndexed, 1506836119) \ | 94 V(_Int64Array, [], Int64Array_getIndexed, 1506836119) \ |
| 95 V(_Uint64Array, [], Uint64Array_getIndexed, 1856952148) \ | 95 V(_Uint64Array, [], Uint64Array_getIndexed, 1856952148) \ |
| 96 V(_Float32Array, [], Float32Array_getIndexed, 1167607283) \ | 96 V(_Float32Array, [], Float32Array_getIndexed, 1167607283) \ |
| 97 V(_Float32Array, []=, Float32Array_setIndexed, 1270729544) \ | 97 V(_Float32Array, []=, Float32Array_setIndexed, 1270729544) \ |
| 98 V(_Float64Array, [], Float64Array_getIndexed, 1363897161) \ | 98 V(_Float64Array, [], Float64Array_getIndexed, 1363897161) \ |
| 99 V(_Float64Array, []=, Float64Array_setIndexed, 283625119) \ | 99 V(_Float64Array, []=, Float64Array_setIndexed, 283625119) \ |
| 100 V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed, 632699940) \ | 100 V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed, 632699940) \ |
| 101 | 101 |
| 102 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and |
| 103 // _FixedSizeArrayIterator, moveNext. |
| 104 |
| 102 // Forward declarations. | 105 // Forward declarations. |
| 103 class Assembler; | 106 class Assembler; |
| 104 class Function; | 107 class Function; |
| 105 | 108 |
| 106 class Intrinsifier : public AllStatic { | 109 class Intrinsifier : public AllStatic { |
| 107 public: | 110 public: |
| 108 // Try to intrinsify 'function'. Returns true if the function intrinsified | 111 // Try to intrinsify 'function'. Returns true if the function intrinsified |
| 109 // completely and the code does not need to be generated (i.e., no slow | 112 // completely and the code does not need to be generated (i.e., no slow |
| 110 // path possible). | 113 // path possible). |
| 111 static bool Intrinsify(const Function& function, Assembler* assembler); | 114 static bool Intrinsify(const Function& function, Assembler* assembler); |
| 112 static bool CanIntrinsify(const Function& function); | 115 static bool CanIntrinsify(const Function& function); |
| 113 | 116 |
| 114 private: | 117 private: |
| 115 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ | 118 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ |
| 116 static bool destination(Assembler* assembler); | 119 static bool destination(Assembler* assembler); |
| 117 | 120 |
| 118 INTRINSIC_LIST(DECLARE_FUNCTION) | 121 INTRINSIC_LIST(DECLARE_FUNCTION) |
| 119 #undef DECLARE_FUNCTION | 122 #undef DECLARE_FUNCTION |
| 120 }; | 123 }; |
| 121 | 124 |
| 122 } // namespace dart | 125 } // namespace dart |
| 123 | 126 |
| 124 #endif // VM_INTRINSIFIER_H_ | 127 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |