Chromium Code Reviews| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 81 V(_StringBase, codeUnitAt, String_codeUnitAt, 984449525) \ | 81 V(_StringBase, codeUnitAt, String_codeUnitAt, 984449525) \ |
| 82 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413) \ | 82 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413) \ |
| 83 | 83 |
| 84 | 84 |
| 85 #define MATH_LIB_INTRINSIC_LIST(V) \ | 85 #define MATH_LIB_INTRINSIC_LIST(V) \ |
| 86 V(::, sqrt, Math_sqrt, 1662640002) \ | 86 V(::, sqrt, Math_sqrt, 1662640002) \ |
| 87 V(::, sin, Math_sin, 1273932041) \ | 87 V(::, sin, Math_sin, 1273932041) \ |
| 88 V(::, cos, Math_cos, 1749547468) \ | 88 V(::, cos, Math_cos, 1749547468) \ |
| 89 | 89 |
| 90 | 90 |
| 91 // Note that any intrinsified function is not inlined. Some optimizations | |
| 92 // rely on seeing the factories below instead of their inlined code. | |
| 91 #define SCALARLIST_LIB_INTRINSIC_LIST(V) \ | 93 #define SCALARLIST_LIB_INTRINSIC_LIST(V) \ |
| 92 V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \ | 94 V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \ |
| 93 V(_Int8Array, _new, Int8Array_new, 535958453) \ | 95 V(Int8List, ., Int8Array_new, 817410959) \ |
| 94 V(_Uint8Array, _new, Uint8Array_new, 604355565) \ | 96 V(Uint8List, ., Uint8Array_new, 220896178) \ |
| 95 V(_Uint8ClampedArray, _new, Uint8ClampedArray_new, 1070949952) \ | 97 V(Uint8ClampedList, ., Uint8ClampedArray_new, 422034060) \ |
| 96 V(_Int16Array, _new, Int16Array_new, 903723993) \ | 98 V(Int16List, ., Int16Array_new, 214246025) \ |
| 97 V(_Uint16Array, _new, Uint16Array_new, 133542762) \ | 99 V(Uint16List, ., Uint16Array_new, 137929963) \ |
| 98 V(_Int32Array, _new, Int32Array_new, 8218286) \ | 100 V(Int32List, ., Int32Array_new, 1977571010) \ |
| 99 V(_Uint32Array, _new, Uint32Array_new, 469402161) \ | 101 V(Uint32List, ., Uint32Array_new, 407638944) \ |
| 100 V(_Int64Array, [], Int64Array_getIndexed, 504894128) \ | 102 V(_Int64Array, [], Int64Array_getIndexed, 504894128) \ |
| 101 V(_Int64Array, _new, Int64Array_new, 60605075) \ | 103 V(Int64List, ., Int64Array_new, 885130273) \ |
| 102 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \ | 104 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \ |
| 103 V(_Uint64Array, _new, Uint64Array_new, 624354107) \ | 105 V(Uint64List, ., Uint64Array_new, 1471017221) \ |
| 104 V(_Float32Array, _new, Float32Array_new, 109944959) \ | 106 V(Float32List, ., Float32Array_new, 2035252095) \ |
|
Vyacheslav Egorov (Google)
2013/03/04 19:39:28
I wonder if we can kill _new?
srdjan
2013/03/04 21:37:07
As discussed, added _new for all byte array classe
| |
| 105 V(_Float64Array, _new, Float64Array_new, 147668392) \ | 107 V(Float64List, ., Float64Array_new, 1037441059) \ |
| 106 | 108 |
| 107 | 109 |
| 108 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and | 110 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and |
| 109 // _FixedSizeArrayIterator, moveNext. | 111 // _FixedSizeArrayIterator, moveNext. |
| 110 | 112 |
| 111 // Forward declarations. | 113 // Forward declarations. |
| 112 class Assembler; | 114 class Assembler; |
| 113 class Function; | 115 class Function; |
| 114 | 116 |
| 115 class Intrinsifier : public AllStatic { | 117 class Intrinsifier : public AllStatic { |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 128 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 130 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 129 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 131 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 130 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 132 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 131 | 133 |
| 132 #undef DECLARE_FUNCTION | 134 #undef DECLARE_FUNCTION |
| 133 }; | 135 }; |
| 134 | 136 |
| 135 } // namespace dart | 137 } // namespace dart |
| 136 | 138 |
| 137 #endif // VM_INTRINSIFIER_H_ | 139 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |