| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 V(_Double, /, Double_div, 809804402) \ | 57 V(_Double, /, Double_div, 809804402) \ |
| 58 V(_Double, get:isNaN, Double_getIsNaN, 54462366) \ | 58 V(_Double, get:isNaN, Double_getIsNaN, 54462366) \ |
| 59 V(_Double, get:isNegative, Double_getIsNegative, 54462366) \ | 59 V(_Double, get:isNegative, Double_getIsNegative, 54462366) \ |
| 60 V(_Double, _mulFromInteger, Double_mulFromInteger, 815838159) \ | 60 V(_Double, _mulFromInteger, Double_mulFromInteger, 815838159) \ |
| 61 V(_Double, .fromInteger, Double_fromInteger, 842078193) \ | 61 V(_Double, .fromInteger, Double_fromInteger, 842078193) \ |
| 62 V(_Double, toInt, Double_toInt, 362666636) \ | 62 V(_Double, toInt, Double_toInt, 362666636) \ |
| 63 V(_ObjectArray, ., ObjectArray_Allocate, 577949617) \ | 63 V(_ObjectArray, ., ObjectArray_Allocate, 577949617) \ |
| 64 V(_ObjectArray, get:length, Array_getLength, 405297088) \ | 64 V(_ObjectArray, get:length, Array_getLength, 405297088) \ |
| 65 V(_ObjectArray, [], Array_getIndexed, 71937385) \ | 65 V(_ObjectArray, [], Array_getIndexed, 71937385) \ |
| 66 V(_ObjectArray, []=, Array_setIndexed, 255863719) \ | 66 V(_ObjectArray, []=, Array_setIndexed, 255863719) \ |
| 67 V(_GrowableObjectArray, .withData, GArray_Allocate, 816132033) \ | 67 V(_GrowableObjectArray, .withData, GrowableArray_Allocate, 816132033) \ |
| 68 V(_GrowableObjectArray, get:length, GrowableArray_getLength, 725548050) \ | 68 V(_GrowableObjectArray, get:length, GrowableArray_getLength, 725548050) \ |
| 69 V(_GrowableObjectArray, get:_capacity, GrowableArray_getCapacity, 725548050) \ | 69 V(_GrowableObjectArray, get:_capacity, GrowableArray_getCapacity, 725548050) \ |
| 70 V(_GrowableObjectArray, [], GrowableArray_getIndexed, 581838973) \ | 70 V(_GrowableObjectArray, [], GrowableArray_getIndexed, 581838973) \ |
| 71 V(_GrowableObjectArray, []=, GrowableArray_setIndexed, 1048007636) \ | 71 V(_GrowableObjectArray, []=, GrowableArray_setIndexed, 1048007636) \ |
| 72 V(_GrowableObjectArray, _setLength, GrowableArray_setLength, 796709584) \ | 72 V(_GrowableObjectArray, _setLength, GrowableArray_setLength, 796709584) \ |
| 73 V(_GrowableObjectArray, _setData, GrowableArray_setData, 629110947) \ | 73 V(_GrowableObjectArray, _setData, GrowableArray_setData, 629110947) \ |
| 74 V(_GrowableObjectArray, add, GrowableArray_add, 1367698386) \ | 74 V(_GrowableObjectArray, add, GrowableArray_add, 1367698386) \ |
| 75 V(_ImmutableArray, [], ImmutableArray_getIndexed, 486821199) \ | 75 V(_ImmutableArray, [], ImmutableArray_getIndexed, 486821199) \ |
| 76 V(_ImmutableArray, get:length, ImmutableArray_getLength, 433698233) \ | 76 V(_ImmutableArray, get:length, ImmutableArray_getLength, 433698233) \ |
| 77 V(Object, ==, Object_equal, 2126956595) \ | 77 V(Object, ==, Object_equal, 2126956595) \ |
| 78 V(_StringBase, get:hashCode, String_getHashCode, 320803993) \ | 78 V(_StringBase, get:hashCode, String_getHashCode, 320803993) \ |
| 79 V(_StringBase, get:isEmpty, String_getIsEmpty, 711547329) \ | 79 V(_StringBase, get:isEmpty, String_getIsEmpty, 711547329) \ |
| 80 V(_StringBase, get:length, String_getLength, 320803993) \ | 80 V(_StringBase, get:length, String_getLength, 320803993) \ |
| 81 V(_StringBase, charCodeAt, String_charCodeAt, 984449525) \ | 81 V(_StringBase, charCodeAt, String_charCodeAt, 984449525) \ |
| 82 | 82 |
| 83 | 83 |
| 84 #define MATH_LIB_INTRINSIC_LIST(V) \ | 84 #define MATH_LIB_INTRINSIC_LIST(V) \ |
| 85 V(::, sqrt, Math_sqrt, 1662640002) \ | 85 V(::, sqrt, Math_sqrt, 1662640002) \ |
| 86 V(::, sin, Math_sin, 1273932041) \ | 86 V(::, sin, Math_sin, 1273932041) \ |
| 87 V(::, cos, Math_cos, 1749547468) \ | 87 V(::, cos, Math_cos, 1749547468) \ |
| 88 | 88 |
| 89 | 89 |
| 90 #define SCALARLIST_LIB_INTRINSIC_LIST(V) \ | 90 #define SCALARLIST_LIB_INTRINSIC_LIST(V) \ |
| 91 V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \ | 91 V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \ |
| 92 V(_Int8Array, [], Int8Array_getIndexed, 1295306322) \ | |
| 93 V(_Int8Array, []=, Int8Array_setIndexed, 1709956322) \ | |
| 94 V(_Int8Array, _new, Int8Array_new, 535958453) \ | 92 V(_Int8Array, _new, Int8Array_new, 535958453) \ |
| 95 V(_Uint8Array, [], Uint8Array_getIndexed, 578331916) \ | |
| 96 V(_Uint8Array, []=, Uint8Array_setIndexed, 121509844) \ | |
| 97 V(_Uint8Array, _new, Uint8Array_new, 604355565) \ | 93 V(_Uint8Array, _new, Uint8Array_new, 604355565) \ |
| 98 V(_Uint8ClampedArray, [], UintClamped8Array_getIndexed, 327062422) \ | |
| 99 V(_Uint8ClampedArray, []=, Uint8ClampedArray_setIndexed, 2054663547) \ | |
| 100 V(_Uint8ClampedArray, _new, Uint8ClampedArray_new, 1070949952) \ | 94 V(_Uint8ClampedArray, _new, Uint8ClampedArray_new, 1070949952) \ |
| 101 V(_Int16Array, [], Int16Array_getIndexed, 870098766) \ | |
| 102 V(_Int16Array, _new, Int16Array_new, 903723993) \ | 95 V(_Int16Array, _new, Int16Array_new, 903723993) \ |
| 103 V(_Uint16Array, [], Uint16Array_getIndexed, 1019828411) \ | |
| 104 V(_Uint16Array, []=, Uint16Array_setIndexed, 1457955615) \ | |
| 105 V(_Uint16Array, _new, Uint16Array_new, 133542762) \ | 96 V(_Uint16Array, _new, Uint16Array_new, 133542762) \ |
| 106 V(_Int32Array, [], Int32Array_getIndexed, 1999321436) \ | |
| 107 V(_Int32Array, _new, Int32Array_new, 8218286) \ | 97 V(_Int32Array, _new, Int32Array_new, 8218286) \ |
| 108 V(_Uint32Array, [], Uint32Array_getIndexed, 1750764660) \ | |
| 109 V(_Uint32Array, _new, Uint32Array_new, 469402161) \ | 98 V(_Uint32Array, _new, Uint32Array_new, 469402161) \ |
| 110 V(_Int64Array, [], Int64Array_getIndexed, 504894128) \ | 99 V(_Int64Array, [], Int64Array_getIndexed, 504894128) \ |
| 111 V(_Int64Array, _new, Int64Array_new, 60605075) \ | 100 V(_Int64Array, _new, Int64Array_new, 60605075) \ |
| 112 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \ | 101 V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \ |
| 113 V(_Uint64Array, _new, Uint64Array_new, 624354107) \ | 102 V(_Uint64Array, _new, Uint64Array_new, 624354107) \ |
| 114 V(_Float32Array, [], Float32Array_getIndexed, 147582932) \ | |
| 115 V(_Float32Array, []=, Float32Array_setIndexed, 664454270) \ | |
| 116 V(_Float32Array, _new, Float32Array_new, 109944959) \ | 103 V(_Float32Array, _new, Float32Array_new, 109944959) \ |
| 117 V(_Float64Array, [], Float64Array_getIndexed, 638830526) \ | |
| 118 V(_Float64Array, []=, Float64Array_setIndexed, 1948811847) \ | |
| 119 V(_Float64Array, _new, Float64Array_new, 147668392) \ | 104 V(_Float64Array, _new, Float64Array_new, 147668392) \ |
| 120 V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed, 753790851) \ | |
| 121 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArray_getIndexed, \ | |
| 122 823759763) \ | |
| 123 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArray_setIndexed, \ | |
| 124 654373808) \ | |
| 125 | 105 |
| 126 | 106 |
| 127 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and | 107 // TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and |
| 128 // _FixedSizeArrayIterator, moveNext. | 108 // _FixedSizeArrayIterator, moveNext. |
| 129 | 109 |
| 130 // Forward declarations. | 110 // Forward declarations. |
| 131 class Assembler; | 111 class Assembler; |
| 132 class Function; | 112 class Function; |
| 133 | 113 |
| 134 class Intrinsifier : public AllStatic { | 114 class Intrinsifier : public AllStatic { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 147 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 127 CORE_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 148 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 128 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 149 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) | 129 SCALARLIST_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) |
| 150 | 130 |
| 151 #undef DECLARE_FUNCTION | 131 #undef DECLARE_FUNCTION |
| 152 }; | 132 }; |
| 153 | 133 |
| 154 } // namespace dart | 134 } // namespace dart |
| 155 | 135 |
| 156 #endif // VM_INTRINSIFIER_H_ | 136 #endif // VM_INTRINSIFIER_H_ |
| OLD | NEW |