Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: runtime/vm/method_recognizer.h

Issue 468793004: VM: Improve performance of method recognizer and unify the it with the intrinsifier. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/method_recognizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef VM_METHOD_RECOGNIZER_H_
6 #define VM_METHOD_RECOGNIZER_H_
7
8 #include "vm/allocation.h"
9
10 namespace dart {
11
12 // (class-name, function-name, recognized enum, fingerprint).
13 // When adding a new function add a 0 as fingerprint, build and run to get the
14 // correct fingerprint from the mismatch error.
15 #define OTHER_RECOGNIZED_LIST(V) \
16 V(::, identical, ObjectIdentical, 496869842) \
17 V(ClassID, getID, ClassIDgetID, 1322490980) \
18 V(Object, Object., ObjectConstructor, 1066669787) \
19 V(_List, _List., ObjectArrayConstructor, 1595327584) \
20 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1541411498) \
21 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 1032404349) \
22 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 381073990) \
23 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1142676276) \
24 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 330269934) \
25 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 59490554) \
26 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 393003933) \
27 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1792407200) \
28 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1338379857) \
29 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 1469917805) \
30 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 433348464) \
31 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 149406583) \
32 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 805477162) \
33 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 888580944) \
34 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 1708248181) \
35 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1863152792) \
36 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1148703855) \
37 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 972883980) \
38 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 950522310) \
39 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1301138078) \
40 V(_StringBase, [], StringBaseCharAt, 1512210677) \
41 V(_StringBase, _interpolate, StringBaseInterpolate, 1758627989) \
42 V(_IntegerImplementation, toDouble, IntegerToDouble, 1084977108) \
43 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \
44 597111055) \
45 V(_Double, truncateToDouble, DoubleTruncate, 2117801967) \
46 V(_Double, roundToDouble, DoubleRound, 2124216110) \
47 V(_Double, floorToDouble, DoubleFloor, 968600699) \
48 V(_Double, ceilToDouble, DoubleCeil, 1779929274) \
49 V(_Double, _modulo, DoubleMod, 1473971007) \
50 V(::, sin, MathSin, 1741396147) \
51 V(::, cos, MathCos, 1951197905) \
52 V(::, min, MathMin, 1022567780) \
53 V(::, max, MathMax, 612058870) \
54 V(::, _doublePow, MathDoublePow, 823139975) \
55 V(Float32x4, Float32x4., Float32x4Constructor, 1755873079) \
56 V(Float32x4, Float32x4.zero, Float32x4Zero, 1494069379) \
57 V(Float32x4, Float32x4.splat, Float32x4Splat, 916211464) \
58 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, \
59 640076216) \
60 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1279591344) \
61 V(_Float32x4, shuffle, Float32x4Shuffle, 1636488139) \
62 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 597555927) \
63 V(_Float32x4, get:x, Float32x4ShuffleX, 384850558) \
64 V(_Float32x4, get:y, Float32x4ShuffleY, 1398002778) \
65 V(_Float32x4, get:z, Float32x4ShuffleZ, 1178056441) \
66 V(_Float32x4, get:w, Float32x4ShuffleW, 480831839) \
67 V(_Float32x4, get:signMask, Float32x4GetSignMask, 630761511) \
68 V(_Float32x4, _cmpequal, Float32x4Equal, 571062952) \
69 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 1613543295) \
70 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 589402909) \
71 V(_Float32x4, _cmplt, Float32x4LessThan, 1502332656) \
72 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 1069848031) \
73 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1334574472) \
74 V(_Float32x4, _min, Float32x4Min, 2036349551) \
75 V(_Float32x4, _max, Float32x4Max, 571688115) \
76 V(_Float32x4, _scale, Float32x4Scale, 1311297761) \
77 V(_Float32x4, _sqrt, Float32x4Sqrt, 1709659395) \
78 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 2043980962) \
79 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 739405237) \
80 V(_Float32x4, _negate, Float32x4Negate, 445839777) \
81 V(_Float32x4, _abs, Float32x4Absolute, 1152777608) \
82 V(_Float32x4, _clamp, Float32x4Clamp, 353415442) \
83 V(_Float32x4, withX, Float32x4WithX, 1446546696) \
84 V(_Float32x4, withY, Float32x4WithY, 309844761) \
85 V(_Float32x4, withZ, Float32x4WithZ, 971921505) \
86 V(_Float32x4, withW, Float32x4WithW, 1759699726) \
87 V(Float64x2, Float64x2., Float64x2Constructor, 1399581872) \
88 V(Float64x2, Float64x2.zero, Float64x2Zero, 1836770587) \
89 V(Float64x2, Float64x2.splat, Float64x2Splat, 939291159) \
90 V(Float64x2, Float64x2.fromFloat32x4, Float64x2FromFloat32x4, 1499726406) \
91 V(_Float64x2, get:x, Float64x2GetX, 261044094) \
92 V(_Float64x2, get:y, Float64x2GetY, 1942257886) \
93 V(_Float64x2, _negate, Float64x2Negate, 2133212774) \
94 V(_Float64x2, abs, Float64x2Abs, 1224776282) \
95 V(_Float64x2, sqrt, Float64x2Sqrt, 1037569520) \
96 V(_Float64x2, get:signMask, Float64x2GetSignMask, 252936800) \
97 V(_Float64x2, scale, Float64x2Scale, 1199438744) \
98 V(_Float64x2, withX, Float64x2WithX, 1042725932) \
99 V(_Float64x2, withY, Float64x2WithY, 1496958947) \
100 V(_Float64x2, min, Float64x2Min, 485240583) \
101 V(_Float64x2, max, Float64x2Max, 2146148204) \
102 V(Int32x4, Int32x4., Int32x4Constructor, 665986284) \
103 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 87082660) \
104 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, \
105 372517418) \
106 V(_Int32x4, get:flagX, Int32x4GetFlagX, 1077555238) \
107 V(_Int32x4, get:flagY, Int32x4GetFlagY, 779160284) \
108 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181912283) \
109 V(_Int32x4, get:flagW, Int32x4GetFlagW, 977675534) \
110 V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929271914) \
111 V(_Int32x4, shuffle, Int32x4Shuffle, 1870018702) \
112 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870) \
113 V(_Int32x4, select, Int32x4Select, 1696037681) \
114 V(_Int32x4, withFlagX, Int32x4WithFlagX, 467852789) \
115 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1903359978) \
116 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 862460960) \
117 V(_Int32x4, withFlagW, Int32x4WithFlagW, 1095242907) \
118 V(_Float32Array, [], Float32ArrayGetIndexed, 856653338) \
119 V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464) \
120 V(_Int8Array, [], Int8ArrayGetIndexed, 321230586) \
121 V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685) \
122 V(_Uint8Array, []=, Uint8ArraySetIndexed, 2018064553) \
123 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 430672063) \
124 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 821294340) \
125 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 918478513) \
126 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
127 1346536303) \
128 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
129 1794849214) \
130 V(_Int16Array, [], Int16ArrayGetIndexed, 74127855) \
131 V(_Int16Array, []=, Int16ArraySetIndexed, 1610252345) \
132 V(_Uint16Array, [], Uint16ArrayGetIndexed, 470411953) \
133 V(_Uint16Array, []=, Uint16ArraySetIndexed, 1648929040) \
134 V(_Int32Array, [], Int32ArrayGetIndexed, 203101370) \
135 V(_Int32Array, []=, Int32ArraySetIndexed, 338968571) \
136 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1640672852) \
137 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1472976717) \
138 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1466627059) \
139 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 2141660076) \
140 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 818792056) \
141 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 1021474038) \
142 V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 288114492) \
143 V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 941746736) \
144
145 // List of intrinsics:
146 // (class-name, function-name, intrinsification method, fingerprint).
147 #define CORE_LIB_INTRINSIC_LIST(V) \
148 V(_Smi, ~, Smi_bitNegate, 105519892) \
149 V(_Smi, get:bitLength, Smi_bitLength, 869956497) \
150 V(_Double, >, Double_greaterThan, 381325711) \
151 V(_Double, >=, Double_greaterEqualThan, 1409267140) \
152 V(_Double, <, Double_lessThan, 2080387973) \
153 V(_Double, <=, Double_lessEqualThan, 106225572) \
154 V(_Double, ==, Double_equal, 2093918133) \
155 V(_Double, +, Double_add, 1646350451) \
156 V(_Double, -, Double_sub, 1477459276) \
157 V(_Double, *, Double_mul, 1334580777) \
158 V(_Double, /, Double_div, 1938037155) \
159 V(_Double, get:isNaN, Double_getIsNaN, 843050033) \
160 V(_Double, get:isNegative, Double_getIsNegative, 1637875580) \
161 V(_Double, _mulFromInteger, Double_mulFromInteger, 1594796483) \
162 V(_Double, .fromInteger, Double_fromInteger, 999771940) \
163 V(_List, get:length, ObjectArrayLength, 1181352729) \
164 V(_List, [], ObjectArrayGetIndexed, 795612476) \
165 V(_List, []=, ObjectArraySetIndexed, 1288827575) \
166 V(_GrowableList, .withData, GrowableArray_Allocate, 732923072) \
167 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \
168 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 555140075) \
169 V(_GrowableList, [], GrowableArrayGetIndexed, 919108233) \
170 V(_GrowableList, []=, GrowableArraySetIndexed, 1218649853) \
171 V(_GrowableList, _setLength, GrowableArraySetLength, 89389299) \
172 V(_GrowableList, _setData, GrowableArraySetData, 2126927509) \
173 V(_GrowableList, add, GrowableArray_add, 1899133961) \
174 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1990177341) \
175 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \
176 V(Object, ==, ObjectEquals, 1068471689) \
177 V(_StringBase, get:hashCode, String_getHashCode, 2102906241) \
178 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 49873871) \
179 V(_StringBase, get:length, StringBaseLength, 784399628) \
180 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 397735324) \
181 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 1111837929) \
182 V(_OneByteString, _substringUncheckedNative, \
183 OneByteString_substringUnchecked, 1527498975) \
184 V(_OneByteString, _setAt, OneByteStringSetAt, 468605749) \
185 V(_OneByteString, _allocate, OneByteString_allocate, 2035417022) \
186 V(_OneByteString, ==, OneByteString_equality, 1727047023) \
187 V(_TwoByteString, ==, TwoByteString_equality, 951149689) \
188
189
190 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \
191 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \
192 438687793) \
193 V(_IntegerImplementation, +, Integer_add, 837070328) \
194 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \
195 562800077) \
196 V(_IntegerImplementation, -, Integer_sub, 1904782019) \
197 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \
198 67891834) \
199 V(_IntegerImplementation, *, Integer_mul, 1012952097) \
200 V(_IntegerImplementation, _moduloFromInteger, Integer_moduloFromInteger, \
201 93478264) \
202 V(_IntegerImplementation, ~/, Integer_truncDivide, 724644222) \
203 V(_IntegerImplementation, unary-, Integer_negate, 2095203689) \
204 V(_IntegerImplementation, _bitAndFromInteger, \
205 Integer_bitAndFromInteger, 504496713) \
206 V(_IntegerImplementation, &, Integer_bitAnd, 347192674) \
207 V(_IntegerImplementation, _bitOrFromInteger, \
208 Integer_bitOrFromInteger, 1763728073) \
209 V(_IntegerImplementation, |, Integer_bitOr, 1293445202) \
210 V(_IntegerImplementation, _bitXorFromInteger, \
211 Integer_bitXorFromInteger, 281425907) \
212 V(_IntegerImplementation, ^, Integer_bitXor, 2139935734) \
213 V(_IntegerImplementation, \
214 _greaterThanFromInteger, \
215 Integer_greaterThanFromInt, 787426822) \
216 V(_IntegerImplementation, >, Integer_greaterThan, 123961041) \
217 V(_IntegerImplementation, ==, Integer_equal, 1423724294) \
218 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \
219 1790821042) \
220 V(_IntegerImplementation, <, Integer_lessThan, 425560117) \
221 V(_IntegerImplementation, <=, Integer_lessEqualThan, 1512735828) \
222 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 668293748) \
223 V(_IntegerImplementation, <<, Integer_shl, 34265041) \
224 V(_IntegerImplementation, >>, Integer_sar, 1797129864) \
225 V(_Double, toInt, DoubleToInteger, 1547535151)
226
227
228 #define MATH_LIB_INTRINSIC_LIST(V) \
229 V(::, sqrt, MathSqrt, 101545548) \
230 V(_Random, _nextState, Random_nextState, 55890711) \
231
232
233 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \
234 V(_TypedList, get:length, TypedDataLength, 522565357) \
235 V(_Int8Array, _new, TypedData_Int8Array_new, 1150131819) \
236 V(_Uint8Array, _new, TypedData_Uint8Array_new, 2019665760) \
237 V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 726412668) \
238 V(_Int16Array, _new, TypedData_Int16Array_new, 1879541015) \
239 V(_Uint16Array, _new, TypedData_Uint16Array_new, 189496401) \
240 V(_Int32Array, _new, TypedData_Int32Array_new, 1725327048) \
241 V(_Uint32Array, _new, TypedData_Uint32Array_new, 10306485) \
242 V(_Int64Array, _new, TypedData_Int64Array_new, 1299501918) \
243 V(_Uint64Array, _new, TypedData_Uint64Array_new, 1635318703) \
244 V(_Float32Array, _new, TypedData_Float32Array_new, 577737480) \
245 V(_Float64Array, _new, TypedData_Float64Array_new, 645355686) \
246 V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 596639418) \
247 V(_Int32x4Array, _new, TypedData_Int32x4Array_new, 496358233) \
248 V(_Float64x2Array, _new, TypedData_Float64x2Array_new, 1506975080) \
249 V(_Int8Array, ., TypedData_Int8Array_factory, 1499010120) \
250 V(_Uint8Array, ., TypedData_Uint8Array_factory, 354210806) \
251 V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 231626935) \
252 V(_Int16Array, ., TypedData_Int16Array_factory, 1044203454) \
253 V(_Uint16Array, ., TypedData_Uint16Array_factory, 616427808) \
254 V(_Int32Array, ., TypedData_Int32Array_factory, 26656923) \
255 V(_Uint32Array, ., TypedData_Uint32Array_factory, 297463966) \
256 V(_Int64Array, ., TypedData_Int64Array_factory, 105050331) \
257 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1469861670) \
258 V(_Float32Array, ., TypedData_Float32Array_factory, 105860920) \
259 V(_Float64Array, ., TypedData_Float64Array_factory, 342242776) \
260 V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 1217848993) \
261 V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 100825417) \
262 V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 611308575) \
263 V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140) \
264 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1678777951) \
265 V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297) \
266 V(_Float64Array, []=, Float64ArraySetIndexed, 243929230) \
267
268
269 #define PROFILER_LIB_INTRINSIC_LIST(V) \
270 V(_UserTag, makeCurrent, UserTag_makeCurrent, 370414636) \
271 V(::, _getDefaultTag, UserTag_defaultTag, 1159885970) \
272 V(::, _getCurrentTag, Profiler_getCurrentTag, 1182126114) \
273
274 #define ALL_INTRINSICS_LIST(V) \
275 CORE_LIB_INTRINSIC_LIST(V) \
276 CORE_INTEGER_LIB_INTRINSIC_LIST(V) \
277 MATH_LIB_INTRINSIC_LIST(V) \
278 TYPED_DATA_LIB_INTRINSIC_LIST(V) \
279 PROFILER_LIB_INTRINSIC_LIST(V)
280
281 #define RECOGNIZED_LIST(V) \
282 OTHER_RECOGNIZED_LIST(V) \
283 ALL_INTRINSICS_LIST(V)
284
285 // A list of core function that should always be inlined.
286 #define INLINE_WHITE_LIST(V) \
287 V(Object, ==, ObjectEquals, 1068471689) \
288 V(_List, get:length, ObjectArrayLength, 1181352729) \
289 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \
290 V(_TypedList, get:length, TypedDataLength, 522565357) \
291 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \
292 V(_StringBase, get:length, StringBaseLength, 784399628) \
293 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \
294 V(_GrowableList, get:iterator, GrowableArrayIterator, 1812933946) \
295 V(_GrowableList, forEach, GrowableArrayForEach, 2085943947) \
296 V(_List, [], ObjectArrayGetIndexed, 795612476) \
297 V(_List, []=, ObjectArraySetIndexed, 1288827575) \
298 V(_List, get:isEmpty, ObjectArrayIsEmpty, 2130247737) \
299 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1990177341) \
300 V(_GrowableList, [], GrowableArrayGetIndexed, 919108233) \
301 V(_GrowableList, []=, GrowableArraySetIndexed, 1218649853) \
302 V(_Float32Array, [], Float32ArrayGetIndexed, 856653338) \
303 V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464) \
304 V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297) \
305 V(_Float64Array, []=, Float64ArraySetIndexed, 243929230) \
306 V(_Int8Array, [], Int8ArrayGetIndexed, 321230586) \
307 V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685) \
308 V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140) \
309 V(_Uint8Array, []=, Uint8ArraySetIndexed, 2018064553) \
310 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 430672063) \
311 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 821294340) \
312 V(_Uint16Array, [], Uint16ArrayGetIndexed, 470411953) \
313 V(_Uint16Array, []=, Uint16ArraySetIndexed, 1648929040) \
314 V(_Int16Array, [], Int16ArrayGetIndexed, 74127855) \
315 V(_Int16Array, []=, Int16ArraySetIndexed, 1610252345) \
316 V(_Int32Array, [], Int32ArrayGetIndexed, 203101370) \
317 V(_Int32Array, []=, Int32ArraySetIndexed, 338968571) \
318 V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 1543480955) \
319 V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 936729641) \
320 V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1898018934) \
321 V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 111684506) \
322 V(::, asin, MathASin, 1651042633) \
323 V(::, acos, MathACos, 1139647090) \
324 V(::, atan, MathATan, 1668754384) \
325 V(::, atan2, MathATan2, 1845649456) \
326 V(::, cos, MathCos, 1951197905) \
327 V(::, exp, MathExp, 1809210829) \
328 V(::, log, MathLog, 1620336448) \
329 V(::, max, MathMax, 612058870) \
330 V(::, min, MathMin, 1022567780) \
331 V(::, pow, MathPow, 930962530) \
332 V(::, sin, MathSin, 1741396147) \
333 V(::, sqrt, MathSqrt, 101545548) \
334 V(::, tan, MathTan, 982072809) \
335
336
337 // A list of core functions that internally dispatch based on received id.
338 #define POLYMORPHIC_TARGET_LIST(V) \
339 V(_StringBase, [], StringBaseCharAt, 1512210677) \
340 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 397735324) \
341 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 1541411498) \
342 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 1032404349) \
343 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 381073990) \
344 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1142676276) \
345 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 330269934) \
346 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 59490554) \
347 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 393003933) \
348 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1792407200) \
349 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1338379857) \
350 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 1469917805) \
351 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 433348464) \
352 V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 149406583) \
353 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 805477162) \
354 V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 888580944) \
355 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 1708248181) \
356 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1863152792) \
357 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1148703855) \
358 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 972883980) \
359 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 950522310) \
360 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1301138078) \
361
362 // Forward declarations.
363 class Function;
364
365 // Class that recognizes the name and owner of a function and returns the
366 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
367 // functions.
368 class MethodRecognizer : public AllStatic {
369 public:
370 enum Kind {
371 kUnknown,
372 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
373 RECOGNIZED_LIST(DEFINE_ENUM_LIST)
374 #undef DEFINE_ENUM_LIST
375 kNumRecognizedMethods
376 };
377
378 static Kind RecognizeKind(const Function& function);
379 static bool AlwaysInline(const Function& function);
380 static bool PolymorphicTarget(const Function& function);
381 static const char* KindToCString(Kind kind);
382 static void InitializeState();
383 };
384
385 } // namespace dart
386
387 #endif // VM_METHOD_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_x64.cc ('k') | runtime/vm/method_recognizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698