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

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

Issue 851273002: Tweaks in the VM's typed_data implementations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181942074) \ 113 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 181942074) \
114 V(_Int32x4, get:flagW, Int32x4GetFlagW, 977705325) \ 114 V(_Int32x4, get:flagW, Int32x4GetFlagW, 977705325) \
115 V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929301705) \ 115 V(_Int32x4, get:signMask, Int32x4GetSignMask, 1929301705) \
116 V(_Int32x4, shuffle, Int32x4Shuffle, 1870018702) \ 116 V(_Int32x4, shuffle, Int32x4Shuffle, 1870018702) \
117 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870) \ 117 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 967644870) \
118 V(_Int32x4, select, Int32x4Select, 1291364368) \ 118 V(_Int32x4, select, Int32x4Select, 1291364368) \
119 V(_Int32x4, withFlagX, Int32x4WithFlagX, 467852789) \ 119 V(_Int32x4, withFlagX, Int32x4WithFlagX, 467852789) \
120 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1903359978) \ 120 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1903359978) \
121 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 862460960) \ 121 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 862460960) \
122 V(_Int32x4, withFlagW, Int32x4WithFlagW, 1095242907) \ 122 V(_Int32x4, withFlagW, Int32x4WithFlagW, 1095242907) \
123 V(_Float32Array, [], Float32ArrayGetIndexed, 1092936601) \ 123 V(_Float32Array, [], Float32ArrayGetIndexed, 1535169225) \
124 V(_Float32Array, []=, Float32ArraySetIndexed, 102284991) \ 124 V(_Float32Array, []=, Float32ArraySetIndexed, 626578817) \
125 V(_Int8Array, [], Int8ArrayGetIndexed, 557513849) \ 125 V(_Int8Array, [], Int8ArrayGetIndexed, 138473967) \
126 V(_Int8Array, []=, Int8ArraySetIndexed, 1135113150) \ 126 V(_Int8Array, []=, Int8ArraySetIndexed, 1974948008) \
127 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 666955326) \ 127 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 900572864) \
128 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 2053292453) \ 128 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1618616151) \
129 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ 129 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
130 1582819566) \ 130 1375076880) \
131 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \ 131 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
132 879363679) \ 132 1734046173) \
133 V(_Int16Array, [], Int16ArrayGetIndexed, 310411118) \ 133 V(_Int16Array, [], Int16ArrayGetIndexed, 2007660358) \
134 V(_Int16Array, []=, Int16ArraySetIndexed, 694766810) \ 134 V(_Int16Array, []=, Int16ArraySetIndexed, 1816201356) \
135 V(_Uint16Array, [], Uint16ArrayGetIndexed, 706695216) \ 135 V(_Uint16Array, [], Uint16ArrayGetIndexed, 1089984866) \
136 V(_Uint16Array, []=, Uint16ArraySetIndexed, 733443505) \ 136 V(_Uint16Array, []=, Uint16ArraySetIndexed, 1478733345) \
137 V(_Int32Array, [], Int32ArrayGetIndexed, 439384633) \ 137 V(_Int32Array, [], Int32ArrayGetIndexed, 1705827339) \
138 V(_Int32Array, []=, Int32ArraySetIndexed, 1570966684) \ 138 V(_Int32Array, []=, Int32ArraySetIndexed, 42548988) \
139 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1876956115) \ 139 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1251606959) \
140 V(_Uint32Array, []=, Uint32ArraySetIndexed, 557491182) \ 140 V(_Uint32Array, []=, Uint32ArraySetIndexed, 35369746) \
141 V(_Int64Array, [], Int64ArrayGetIndexed, 443139045) \ 141 V(_Int64Array, [], Int64ArrayGetIndexed, 123397249) \
142 V(_Int64Array, []=, Int64ArraySetIndexed, 342796642) \ 142 V(_Int64Array, []=, Int64ArraySetIndexed, 1286315154) \
143 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1702910322) \ 143 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1291435540) \
144 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 157778603) \ 144 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 993794277) \
145 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1055075319) \ 145 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1120121805) \
146 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 1185076213) \ 146 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 900060207) \
147 V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 524397755) \ 147 V(_Float64x2Array, [], Float64x2ArrayGetIndexed, 408038297) \
148 V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 1105348911) \ 148 V(_Float64x2Array, []=, Float64x2ArraySetIndexed, 1277140175) \
149 V(_Bigint, get:_neg, Bigint_getNeg, 1151543890) \ 149 V(_Bigint, get:_neg, Bigint_getNeg, 1151543890) \
150 V(_Bigint, get:_used, Bigint_getUsed, 1308559334) \ 150 V(_Bigint, get:_used, Bigint_getUsed, 1308559334) \
151 V(_Bigint, get:_digits, Bigint_getDigits, 1408092463) \ 151 V(_Bigint, get:_digits, Bigint_getDigits, 1408092463) \
152 152
153 // List of intrinsics: 153 // List of intrinsics:
154 // (class-name, function-name, intrinsification method, fingerprint). 154 // (class-name, function-name, intrinsification method, fingerprint).
155 #define CORE_LIB_INTRINSIC_LIST(V) \ 155 #define CORE_LIB_INTRINSIC_LIST(V) \
156 V(_Smi, ~, Smi_bitNegate, 134149043) \ 156 V(_Smi, ~, Smi_bitNegate, 134149043) \
157 V(_Smi, get:bitLength, Smi_bitLength, 869986288) \ 157 V(_Smi, get:bitLength, Smi_bitLength, 869986288) \
158 V(_Bigint, set:_neg, Bigint_setNeg, 1924982939) \ 158 V(_Bigint, set:_neg, Bigint_setNeg, 1924982939) \
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 V(_Uint32Array, ., TypedData_Uint32Array_factory, 32690110) \ 266 V(_Uint32Array, ., TypedData_Uint32Array_factory, 32690110) \
267 V(_Int64Array, ., TypedData_Int64Array_factory, 1987760123) \ 267 V(_Int64Array, ., TypedData_Int64Array_factory, 1987760123) \
268 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1205087814) \ 268 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1205087814) \
269 V(_Float32Array, ., TypedData_Float32Array_factory, 1988570712) \ 269 V(_Float32Array, ., TypedData_Float32Array_factory, 1988570712) \
270 V(_Float64Array, ., TypedData_Float64Array_factory, 77468920) \ 270 V(_Float64Array, ., TypedData_Float64Array_factory, 77468920) \
271 V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 953075137) \ 271 V(_Float32x4Array, ., TypedData_Float32x4Array_factory, 953075137) \
272 V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 1983535209) \ 272 V(_Int32x4Array, ., TypedData_Int32x4Array_factory, 1983535209) \
273 V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 346534719) \ 273 V(_Float64x2Array, ., TypedData_Float64x2Array_factory, 346534719) \
274 274
275 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ 275 #define GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
276 V(_Uint8Array, [], Uint8ArrayGetIndexed, 252408403) \ 276 V(_Uint8Array, [], Uint8ArrayGetIndexed, 934520139) \
277 V(_Uint8Array, []=, Uint8ArraySetIndexed, 1102579018) \ 277 V(_Uint8Array, []=, Uint8ArraySetIndexed, 1193298978) \
278 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1915061214) \ 278 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1915061214) \
279 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 2992978) \ 279 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 2992978) \
280 V(_Float64Array, []=, Float64ArraySetIndexed, 407531405) \ 280 V(_Float64Array, []=, Float64ArraySetIndexed, 1400622753) \
281 V(_Float64Array, [], Float64ArrayGetIndexed, 2015337560) \ 281 V(_Float64Array, [], Float64ArrayGetIndexed, 1330768796) \
282 V(_TypedList, get:length, TypedDataLength, 522595148) \ 282 V(_TypedList, get:length, TypedDataLength, 522595148) \
283 283
284 #define GRAPH_CORE_INTRINSICS_LIST(V) \ 284 #define GRAPH_CORE_INTRINSICS_LIST(V) \
285 V(_List, get:length, ObjectArrayLength, 1181382520) \ 285 V(_List, get:length, ObjectArrayLength, 1181382520) \
286 V(_List, [], ObjectArrayGetIndexed, 390939163) \ 286 V(_List, [], ObjectArrayGetIndexed, 390939163) \
287 V(_ImmutableList, get:length, ImmutableArrayLength, 274947518) \ 287 V(_ImmutableList, get:length, ImmutableArrayLength, 274947518) \
288 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1585504028) \ 288 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1585504028) \
289 V(_GrowableList, get:length, GrowableArrayLength, 778534898) \ 289 V(_GrowableList, get:length, GrowableArrayLength, 778534898) \
290 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 555169866) \ 290 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 555169866) \
291 V(_StringBase, get:length, StringBaseLength, 784429419) \ 291 V(_StringBase, get:length, StringBaseLength, 784429419) \
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 V(_List, []=, ObjectArraySetIndexed, 1768442583) \ 333 V(_List, []=, ObjectArraySetIndexed, 1768442583) \
334 V(ListMixin, get:isEmpty, ListMixinIsEmpty, 2102252776) \ 334 V(ListMixin, get:isEmpty, ListMixinIsEmpty, 2102252776) \
335 V(_List, get:iterator, ObjectArrayIterator, 308726049) \ 335 V(_List, get:iterator, ObjectArrayIterator, 308726049) \
336 V(_List, forEach, ObjectArrayForEach, 1720909126) \ 336 V(_List, forEach, ObjectArrayForEach, 1720909126) \
337 V(_List, _slice, ObjectArraySlice, 1738717516) \ 337 V(_List, _slice, ObjectArraySlice, 1738717516) \
338 V(_ImmutableList, get:iterator, ImmutableArrayIterator, 212198431) \ 338 V(_ImmutableList, get:iterator, ImmutableArrayIterator, 212198431) \
339 V(_ImmutableList, forEach, ImmutableArrayForEach, 1192041734) \ 339 V(_ImmutableList, forEach, ImmutableArrayForEach, 1192041734) \
340 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1585504028) \ 340 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1585504028) \
341 V(_GrowableList, [], GrowableArrayGetIndexed, 514434920) \ 341 V(_GrowableList, [], GrowableArrayGetIndexed, 514434920) \
342 V(_GrowableList, []=, GrowableArraySetIndexed, 1698264861) \ 342 V(_GrowableList, []=, GrowableArraySetIndexed, 1698264861) \
343 V(_Float32Array, [], Float32ArrayGetIndexed, 1092936601) \ 343 V(_Float32Array, [], Float32ArrayGetIndexed, 1535169225) \
344 V(_Float32Array, []=, Float32ArraySetIndexed, 102284991) \ 344 V(_Float32Array, []=, Float32ArraySetIndexed, 626578817) \
345 V(_Float64Array, [], Float64ArrayGetIndexed, 2015337560) \ 345 V(_Float64Array, [], Float64ArrayGetIndexed, 1330768796) \
346 V(_Float64Array, []=, Float64ArraySetIndexed, 407531405) \ 346 V(_Float64Array, []=, Float64ArraySetIndexed, 1400622753) \
347 V(_Int8Array, [], Int8ArrayGetIndexed, 557513849) \ 347 V(_Int8Array, [], Int8ArrayGetIndexed, 138473967) \
348 V(_Int8Array, []=, Int8ArraySetIndexed, 1135113150) \ 348 V(_Int8Array, []=, Int8ArraySetIndexed, 1974948008) \
349 V(_Uint8Array, [], Uint8ArrayGetIndexed, 252408403) \ 349 V(_Uint8Array, [], Uint8ArrayGetIndexed, 934520139) \
350 V(_Uint8Array, []=, Uint8ArraySetIndexed, 1102579018) \ 350 V(_Uint8Array, []=, Uint8ArraySetIndexed, 1193298978) \
351 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 666955326) \ 351 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 900572864) \
352 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 2053292453) \ 352 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 1618616151) \
353 V(_Uint16Array, [], Uint16ArrayGetIndexed, 706695216) \ 353 V(_Uint16Array, [], Uint16ArrayGetIndexed, 1089984866) \
354 V(_Uint16Array, []=, Uint16ArraySetIndexed, 733443505) \ 354 V(_Uint16Array, []=, Uint16ArraySetIndexed, 1478733345) \
355 V(_Int16Array, [], Int16ArrayGetIndexed, 310411118) \ 355 V(_Int16Array, [], Int16ArrayGetIndexed, 2007660358) \
356 V(_Int16Array, []=, Int16ArraySetIndexed, 694766810) \ 356 V(_Int16Array, []=, Int16ArraySetIndexed, 1816201356) \
357 V(_Int32Array, [], Int32ArrayGetIndexed, 439384633) \ 357 V(_Int32Array, [], Int32ArrayGetIndexed, 1705827339) \
358 V(_Int32Array, []=, Int32ArraySetIndexed, 1570966684) \ 358 V(_Int32Array, []=, Int32ArraySetIndexed, 42548988) \
359 V(_Int64Array, [], Int64ArrayGetIndexed, 443139045) \ 359 V(_Int64Array, [], Int64ArrayGetIndexed, 123397249) \
360 V(_Int64Array, []=, Int64ArraySetIndexed, 342796642) \ 360 V(_Int64Array, []=, Int64ArraySetIndexed, 1286315154) \
361 V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 735017274) \ 361 V(_Uint8ArrayView, [], Uint8ArrayViewGetIndexed, 2146871134) \
362 V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 1913230218) \ 362 V(_Uint8ArrayView, []=, Uint8ArrayViewSetIndexed, 1262816136) \
363 V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 1089555253) \ 363 V(_Int8ArrayView, [], Int8ArrayViewGetIndexed, 231994143) \
364 V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 1088185083) \ 364 V(_Int8ArrayView, []=, Int8ArrayViewSetIndexed, 919877023) \
365 V(::, asin, MathASin, 1651042633) \ 365 V(::, asin, MathASin, 1651042633) \
366 V(::, acos, MathACos, 1139647090) \ 366 V(::, acos, MathACos, 1139647090) \
367 V(::, atan, MathATan, 1668754384) \ 367 V(::, atan, MathATan, 1668754384) \
368 V(::, atan2, MathATan2, 1845649456) \ 368 V(::, atan2, MathATan2, 1845649456) \
369 V(::, cos, MathCos, 1951197905) \ 369 V(::, cos, MathCos, 1951197905) \
370 V(::, exp, MathExp, 1809210829) \ 370 V(::, exp, MathExp, 1809210829) \
371 V(::, log, MathLog, 1620336448) \ 371 V(::, log, MathLog, 1620336448) \
372 V(::, max, MathMax, 989552054) \ 372 V(::, max, MathMax, 989552054) \
373 V(::, min, MathMin, 214919172) \ 373 V(::, min, MathMin, 214919172) \
374 V(::, pow, MathPow, 1381728863) \ 374 V(::, pow, MathPow, 1381728863) \
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 static Kind RecognizeKind(const Function& function); 436 static Kind RecognizeKind(const Function& function);
437 static bool AlwaysInline(const Function& function); 437 static bool AlwaysInline(const Function& function);
438 static bool PolymorphicTarget(const Function& function); 438 static bool PolymorphicTarget(const Function& function);
439 static const char* KindToCString(Kind kind); 439 static const char* KindToCString(Kind kind);
440 static void InitializeState(); 440 static void InitializeState();
441 }; 441 };
442 442
443 } // namespace dart 443 } // namespace dart
444 444
445 #endif // VM_METHOD_RECOGNIZER_H_ 445 #endif // VM_METHOD_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698