OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 | 4 |
5 #ifndef VM_METHOD_RECOGNIZER_H_ | 5 #ifndef VM_METHOD_RECOGNIZER_H_ |
6 #define VM_METHOD_RECOGNIZER_H_ | 6 #define VM_METHOD_RECOGNIZER_H_ |
7 | 7 |
8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 818792056) \ | 143 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 818792056) \ |
144 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 1021474038) \ | 144 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 1021474038) \ |
145 V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 288114492) \ | 145 V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 288114492) \ |
146 V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 941746736) \ | 146 V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 941746736) \ |
147 | 147 |
148 // List of intrinsics: | 148 // List of intrinsics: |
149 // (class-name, function-name, intrinsification method, fingerprint). | 149 // (class-name, function-name, intrinsification method, fingerprint). |
150 #define CORE_LIB_INTRINSIC_LIST(V) \ | 150 #define CORE_LIB_INTRINSIC_LIST(V) \ |
151 V(_Smi, ~, Smi_bitNegate, 105519892) \ | 151 V(_Smi, ~, Smi_bitNegate, 105519892) \ |
152 V(_Smi, get:bitLength, Smi_bitLength, 869956497) \ | 152 V(_Smi, get:bitLength, Smi_bitLength, 869956497) \ |
| 153 V(_Bigint, get:_neg, Bigint_getNeg, 1151514099) \ |
| 154 V(_Bigint, set:_neg, Bigint_setNeg, 920204960) \ |
| 155 V(_Bigint, get:_used, Bigint_getUsed, 1308529543) \ |
| 156 V(_Bigint, set:_used, Bigint_setUsed, 1857576743) \ |
| 157 V(_Bigint, get:_digits, Bigint_getDigits, 1408062672) \ |
| 158 V(_Bigint, set:_digits, Bigint_setDigits, 1633805112) \ |
153 V(_Double, >, Double_greaterThan, 381325711) \ | 159 V(_Double, >, Double_greaterThan, 381325711) \ |
154 V(_Double, >=, Double_greaterEqualThan, 1409267140) \ | 160 V(_Double, >=, Double_greaterEqualThan, 1409267140) \ |
155 V(_Double, <, Double_lessThan, 2080387973) \ | 161 V(_Double, <, Double_lessThan, 2080387973) \ |
156 V(_Double, <=, Double_lessEqualThan, 106225572) \ | 162 V(_Double, <=, Double_lessEqualThan, 106225572) \ |
157 V(_Double, ==, Double_equal, 2093918133) \ | 163 V(_Double, ==, Double_equal, 2093918133) \ |
158 V(_Double, +, Double_add, 1646350451) \ | 164 V(_Double, +, Double_add, 1646350451) \ |
159 V(_Double, -, Double_sub, 1477459276) \ | 165 V(_Double, -, Double_sub, 1477459276) \ |
160 V(_Double, *, Double_mul, 1334580777) \ | 166 V(_Double, *, Double_mul, 1334580777) \ |
161 V(_Double, /, Double_div, 1938037155) \ | 167 V(_Double, /, Double_div, 1938037155) \ |
162 V(_Double, get:isNaN, Double_getIsNaN, 843050033) \ | 168 V(_Double, get:isNaN, Double_getIsNaN, 843050033) \ |
(...skipping 24 matching lines...) Expand all Loading... |
187 OneByteString_substringUnchecked, 1527498975) \ | 193 OneByteString_substringUnchecked, 1527498975) \ |
188 V(_OneByteString, _setAt, OneByteStringSetAt, 468605749) \ | 194 V(_OneByteString, _setAt, OneByteStringSetAt, 468605749) \ |
189 V(_OneByteString, _allocate, OneByteString_allocate, 2035417022) \ | 195 V(_OneByteString, _allocate, OneByteString_allocate, 2035417022) \ |
190 V(_OneByteString, ==, OneByteString_equality, 1727047023) \ | 196 V(_OneByteString, ==, OneByteString_equality, 1727047023) \ |
191 V(_TwoByteString, ==, TwoByteString_equality, 951149689) \ | 197 V(_TwoByteString, ==, TwoByteString_equality, 951149689) \ |
192 | 198 |
193 | 199 |
194 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ | 200 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ |
195 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ | 201 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \ |
196 438687793) \ | 202 438687793) \ |
197 V(_IntegerImplementation, +, Integer_add, 837070328) \ | 203 V(_IntegerImplementation, +, Integer_add, 501253666) \ |
198 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \ | 204 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \ |
199 562800077) \ | 205 562800077) \ |
200 V(_IntegerImplementation, -, Integer_sub, 1904782019) \ | 206 V(_IntegerImplementation, -, Integer_sub, 1819430179) \ |
201 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ | 207 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \ |
202 67891834) \ | 208 67891834) \ |
203 V(_IntegerImplementation, *, Integer_mul, 1012952097) \ | 209 V(_IntegerImplementation, *, Integer_mul, 1787870724) \ |
204 V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \ | 210 V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \ |
205 93478264) \ | 211 93478264) \ |
206 V(_IntegerImplementation, ~/, Integer_truncDivide, 724644222) \ | 212 V(_IntegerImplementation, ~/, Integer_truncDivide, 1309867000) \ |
207 V(_IntegerImplementation, unary-, Integer_negate, 2095203689) \ | 213 V(_IntegerImplementation, unary-, Integer_negate, 2095203689) \ |
208 V(_IntegerImplementation, _bitAndFromInteger, \ | 214 V(_IntegerImplementation, _bitAndFromInteger, \ |
209 Integer_bitAndFromInteger, 504496713) \ | 215 Integer_bitAndFromInteger, 504496713) \ |
210 V(_IntegerImplementation, &, Integer_bitAnd, 347192674) \ | 216 V(_IntegerImplementation, &, Integer_bitAnd, 648886925) \ |
211 V(_IntegerImplementation, _bitOrFromInteger, \ | 217 V(_IntegerImplementation, _bitOrFromInteger, \ |
212 Integer_bitOrFromInteger, 1763728073) \ | 218 Integer_bitOrFromInteger, 1763728073) \ |
213 V(_IntegerImplementation, |, Integer_bitOr, 1293445202) \ | 219 V(_IntegerImplementation, |, Integer_bitOr, 1473764427) \ |
214 V(_IntegerImplementation, _bitXorFromInteger, \ | 220 V(_IntegerImplementation, _bitXorFromInteger, \ |
215 Integer_bitXorFromInteger, 281425907) \ | 221 Integer_bitXorFromInteger, 281425907) \ |
216 V(_IntegerImplementation, ^, Integer_bitXor, 2139935734) \ | 222 V(_IntegerImplementation, ^, Integer_bitXor, 99980524) \ |
217 V(_IntegerImplementation, \ | 223 V(_IntegerImplementation, \ |
218 _greaterThanFromInteger, \ | 224 _greaterThanFromInteger, \ |
219 Integer_greaterThanFromInt, 787426822) \ | 225 Integer_greaterThanFromInt, 787426822) \ |
220 V(_IntegerImplementation, >, Integer_greaterThan, 123961041) \ | 226 V(_IntegerImplementation, >, Integer_greaterThan, 123961041) \ |
221 V(_IntegerImplementation, ==, Integer_equal, 1423724294) \ | 227 V(_IntegerImplementation, ==, Integer_equal, 1423724294) \ |
222 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \ | 228 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \ |
223 1790821042) \ | 229 1790821042) \ |
224 V(_IntegerImplementation, <, Integer_lessThan, 425560117) \ | 230 V(_IntegerImplementation, <, Integer_lessThan, 425560117) \ |
225 V(_IntegerImplementation, <=, Integer_lessEqualThan, 1512735828) \ | 231 V(_IntegerImplementation, <=, Integer_lessEqualThan, 1512735828) \ |
226 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 668293748) \ | 232 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 668293748) \ |
227 V(_IntegerImplementation, <<, Integer_shl, 34265041) \ | 233 V(_IntegerImplementation, <<, Integer_shl, 656407087) \ |
228 V(_IntegerImplementation, >>, Integer_sar, 1797129864) \ | 234 V(_IntegerImplementation, >>, Integer_sar, 487746736) \ |
229 V(_Double, toInt, DoubleToInteger, 1547535151) | 235 V(_Double, toInt, DoubleToInteger, 1547535151) |
230 | 236 |
231 | 237 |
232 #define MATH_LIB_INTRINSIC_LIST(V) \ | 238 #define MATH_LIB_INTRINSIC_LIST(V) \ |
233 V(::, sqrt, MathSqrt, 101545548) \ | 239 V(::, sqrt, MathSqrt, 101545548) \ |
234 V(_Random, _nextState, Random_nextState, 55890711) \ | 240 V(_Random, _nextState, Random_nextState, 55890711) \ |
235 | 241 |
236 | 242 |
237 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ | 243 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ |
238 V(_TypedList, get:length, TypedDataLength, 522565357) \ | 244 V(_TypedList, get:length, TypedDataLength, 522565357) \ |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 static Kind RecognizeKind(const Function& function); | 396 static Kind RecognizeKind(const Function& function); |
391 static bool AlwaysInline(const Function& function); | 397 static bool AlwaysInline(const Function& function); |
392 static bool PolymorphicTarget(const Function& function); | 398 static bool PolymorphicTarget(const Function& function); |
393 static const char* KindToCString(Kind kind); | 399 static const char* KindToCString(Kind kind); |
394 static void InitializeState(); | 400 static void InitializeState(); |
395 }; | 401 }; |
396 | 402 |
397 } // namespace dart | 403 } // namespace dart |
398 | 404 |
399 #endif // VM_METHOD_RECOGNIZER_H_ | 405 #endif // VM_METHOD_RECOGNIZER_H_ |
OLD | NEW |