| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 V(_Int64Array, _new, Int64Array_new, 60605075) \ | 105 V(_Int64Array, _new, Int64Array_new, 60605075) \ |
| 106 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \ | 106 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \ |
| 107 V(_Uint64Array, _new, Uint64Array_new, 624354107) \ | 107 V(_Uint64Array, _new, Uint64Array_new, 624354107) \ |
| 108 V(_Float32Array, [], Float32Array_getIndexed, 147582932) \ | 108 V(_Float32Array, [], Float32Array_getIndexed, 147582932) \ |
| 109 V(_Float32Array, []=, Float32Array_setIndexed, 664454270) \ | 109 V(_Float32Array, []=, Float32Array_setIndexed, 664454270) \ |
| 110 V(_Float32Array, _new, Float32Array_new, 109944959) \ | 110 V(_Float32Array, _new, Float32Array_new, 109944959) \ |
| 111 V(_Float64Array, [], Float64Array_getIndexed, 638830526) \ | 111 V(_Float64Array, [], Float64Array_getIndexed, 638830526) \ |
| 112 V(_Float64Array, []=, Float64Array_setIndexed, 1948811847) \ | 112 V(_Float64Array, []=, Float64Array_setIndexed, 1948811847) \ |
| 113 V(_Float64Array, _new, Float64Array_new, 147668392) \ | 113 V(_Float64Array, _new, Float64Array_new, 147668392) \ |
| 114 V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed, 753790851) \ | 114 V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed, 753790851) \ |
| 115 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArray_getIndexed, \ |
| 116 823759763) \ |
| 117 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArray_setIndexed, \ |
| 118 654373808) \ |
| 115 | 119 |
| 116 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and | 120 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and |
| 117 // _FixedSizeArrayIterator, moveNext. | 121 // _FixedSizeArrayIterator, moveNext. |
| 118 | 122 |
| 119 // Forward declarations. | 123 // Forward declarations. |
| 120 class Assembler; | 124 class Assembler; |
| 121 class Function; | 125 class Function; |
| 122 | 126 |
| 123 class Intrinsifier : public AllStatic { | 127 class Intrinsifier : public AllStatic { |
| 124 public: | 128 public: |
| 125 // Try to intrinsify 'function'. Returns true if the function intrinsified | 129 // Try to intrinsify 'function'. Returns true if the function intrinsified |
| 126 // completely and the code does not need to be generated (i.e., no slow | 130 // completely and the code does not need to be generated (i.e., no slow |
| 127 // path possible). | 131 // path possible). |
| 128 static bool Intrinsify(const Function& function, Assembler* assembler); | 132 static bool Intrinsify(const Function& function, Assembler* assembler); |
| 129 static bool CanIntrinsify(const Function& function); | 133 static bool CanIntrinsify(const Function& function); |
| 130 | 134 |
| 131 private: | 135 private: |
| 132 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ | 136 #define DECLARE_FUNCTION(test_class_name, test_function_name, destination, fp) \ |
| 133 static bool destination(Assembler* assembler); | 137 static bool destination(Assembler* assembler); |
| 134 | 138 |
| 135 INTRINSIC_LIST(DECLARE_FUNCTION) | 139 INTRINSIC_LIST(DECLARE_FUNCTION) |
| 136 #undef DECLARE_FUNCTION | 140 #undef DECLARE_FUNCTION |
| 137 }; | 141 }; |
| 138 | 142 |
| 139 } // namespace dart | 143 } // namespace dart |
| 140 | 144 |
| 141 #endif // VM_INTRINSIFIER_H_ | 145 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |