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

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

Issue 1808503003: Add graph intrinsics for math library functions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « runtime/vm/intrinsifier.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 IntegerLeftShiftWithMask32, 1634465017) \ 45 IntegerLeftShiftWithMask32, 1634465017) \
46 V(_Double, truncateToDouble, DoubleTruncate, 791143891) \ 46 V(_Double, truncateToDouble, DoubleTruncate, 791143891) \
47 V(_Double, roundToDouble, DoubleRound, 797558034) \ 47 V(_Double, roundToDouble, DoubleRound, 797558034) \
48 V(_Double, floorToDouble, DoubleFloor, 1789426271) \ 48 V(_Double, floorToDouble, DoubleFloor, 1789426271) \
49 V(_Double, ceilToDouble, DoubleCeil, 453271198) \ 49 V(_Double, ceilToDouble, DoubleCeil, 453271198) \
50 V(_Double, _modulo, DoubleMod, 1093862165) \ 50 V(_Double, _modulo, DoubleMod, 1093862165) \
51 V(_Double, _add, DoubleAdd, 1190606283) \ 51 V(_Double, _add, DoubleAdd, 1190606283) \
52 V(_Double, _sub, DoubleSub, 1086286468) \ 52 V(_Double, _sub, DoubleSub, 1086286468) \
53 V(_Double, _mul, DoubleMul, 166332351) \ 53 V(_Double, _mul, DoubleMul, 166332351) \
54 V(_Double, _div, DoubleDiv, 821396195) \ 54 V(_Double, _div, DoubleDiv, 821396195) \
55 V(::, sin, MathSin, 939048573) \
56 V(::, cos, MathCos, 1148850331) \
57 V(::, tan, MathTan, 179725235) \
58 V(::, asin, MathAsin, 848695059) \
59 V(::, acos, MathAcos, 337299516) \
60 V(::, atan, MathAtan, 866406810) \
61 V(::, atan2, MathAtan2, 1901969510) \
62 V(::, min, MathMin, 1115051548) \ 55 V(::, min, MathMin, 1115051548) \
63 V(::, max, MathMax, 1410473322) \ 56 V(::, max, MathMax, 1410473322) \
64 V(::, _doublePow, MathDoublePow, 562154128) \ 57 V(::, _doublePow, MathDoublePow, 562154128) \
65 V(Float32x4, Float32x4., Float32x4Constructor, 93751705) \ 58 V(Float32x4, Float32x4., Float32x4Constructor, 93751705) \
66 V(Float32x4, Float32x4.zero, Float32x4Zero, 1193954374) \ 59 V(Float32x4, Float32x4.zero, Float32x4Zero, 1193954374) \
67 V(Float32x4, Float32x4.splat, Float32x4Splat, 12296613) \ 60 V(Float32x4, Float32x4.splat, Float32x4Splat, 12296613) \
68 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1188039061)\ 61 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, 1188039061)\
69 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1750763218) \ 62 V(Float32x4, Float32x4.fromFloat64x2, Float32x4FromFloat64x2, 1750763218) \
70 V(Float32x4, shuffle, Float32x4Shuffle, 2015957023) \ 63 V(Float32x4, shuffle, Float32x4Shuffle, 2015957023) \
71 V(Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979) \ 64 V(Float32x4, shuffleMix, Float32x4ShuffleMix, 1099087979) \
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1815180096) \ 229 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1815180096) \
237 V(_IntegerImplementation, <<, Integer_shl, 293751452) \ 230 V(_IntegerImplementation, <<, Integer_shl, 293751452) \
238 V(_IntegerImplementation, >>, Integer_sar, 125091101) \ 231 V(_IntegerImplementation, >>, Integer_sar, 125091101) \
239 V(_Double, toInt, DoubleToInteger, 653210699) 232 V(_Double, toInt, DoubleToInteger, 653210699)
240 233
241 234
242 #define MATH_LIB_INTRINSIC_LIST(V) \ 235 #define MATH_LIB_INTRINSIC_LIST(V) \
243 V(::, sqrt, MathSqrt, 1446681622) \ 236 V(::, sqrt, MathSqrt, 1446681622) \
244 V(_Random, _nextState, Random_nextState, 1241583299) \ 237 V(_Random, _nextState, Random_nextState, 1241583299) \
245 238
239 #define GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
240 V(::, sin, MathSin, 939048573) \
241 V(::, cos, MathCos, 1148850331) \
242 V(::, tan, MathTan, 179725235) \
243 V(::, asin, MathAsin, 848695059) \
244 V(::, acos, MathAcos, 337299516) \
245 V(::, atan, MathAtan, 866406810) \
246 V(::, atan2, MathAtan2, 1901969510) \
246 247
247 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ 248 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \
248 V(Int8List, ., TypedData_Int8Array_factory, 779569635) \ 249 V(Int8List, ., TypedData_Int8Array_factory, 779569635) \
249 V(Uint8List, ., TypedData_Uint8Array_factory, 1790399545) \ 250 V(Uint8List, ., TypedData_Uint8Array_factory, 1790399545) \
250 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 405875159) \ 251 V(Uint8ClampedList, ., TypedData_Uint8ClampedArray_factory, 405875159) \
251 V(Int16List, ., TypedData_Int16Array_factory, 347431914) \ 252 V(Int16List, ., TypedData_Int16Array_factory, 347431914) \
252 V(Uint16List, ., TypedData_Uint16Array_factory, 121990116) \ 253 V(Uint16List, ., TypedData_Uint16Array_factory, 121990116) \
253 V(Int32List, ., TypedData_Int32Array_factory, 1540657744) \ 254 V(Int32List, ., TypedData_Int32Array_factory, 1540657744) \
254 V(Uint32List, ., TypedData_Uint32Array_factory, 1012511652) \ 255 V(Uint32List, ., TypedData_Uint32Array_factory, 1012511652) \
255 V(Int64List, ., TypedData_Int64Array_factory, 1473796807) \ 256 V(Int64List, ., TypedData_Int64Array_factory, 1473796807) \
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 V(_GrowableList, _setData, GrowableArraySetData, 1496536873) \ 289 V(_GrowableList, _setData, GrowableArraySetData, 1496536873) \
289 V(_GrowableList, _setLength, GrowableArraySetLength, 32203572) \ 290 V(_GrowableList, _setLength, GrowableArraySetLength, 32203572) \
290 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \ 291 V(_GrowableList, [], GrowableArrayGetIndexed, 1957529650) \
291 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \ 292 V(_GrowableList, []=, GrowableArraySetIndexed, 225246870) \
292 V(_StringBase, get:length, StringBaseLength, 707533587) \ 293 V(_StringBase, get:length, StringBaseLength, 707533587) \
293 V(_Double, unary-, DoubleFlipSignBit, 1783281169) 294 V(_Double, unary-, DoubleFlipSignBit, 1783281169)
294 295
295 #define GRAPH_INTRINSICS_LIST(V) \ 296 #define GRAPH_INTRINSICS_LIST(V) \
296 GRAPH_CORE_INTRINSICS_LIST(V) \ 297 GRAPH_CORE_INTRINSICS_LIST(V) \
297 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \ 298 GRAPH_TYPED_DATA_INTRINSICS_LIST(V) \
299 GRAPH_MATH_LIB_INTRINSIC_LIST(V) \
298 300
299 #define DEVELOPER_LIB_INTRINSIC_LIST(V) \ 301 #define DEVELOPER_LIB_INTRINSIC_LIST(V) \
300 V(_UserTag, makeCurrent, UserTag_makeCurrent, 187721469) \ 302 V(_UserTag, makeCurrent, UserTag_makeCurrent, 187721469) \
301 V(::, _getDefaultTag, UserTag_defaultTag, 1872263331) \ 303 V(::, _getDefaultTag, UserTag_defaultTag, 1872263331) \
302 V(::, _getCurrentTag, Profiler_getCurrentTag, 692104531) \ 304 V(::, _getCurrentTag, Profiler_getCurrentTag, 692104531) \
303 305
304 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \ 306 #define ALL_INTRINSICS_NO_INTEGER_LIB_LIST(V) \
305 CORE_LIB_INTRINSIC_LIST(V) \ 307 CORE_LIB_INTRINSIC_LIST(V) \
306 DEVELOPER_LIB_INTRINSIC_LIST(V) \ 308 DEVELOPER_LIB_INTRINSIC_LIST(V) \
307 MATH_LIB_INTRINSIC_LIST(V) \ 309 MATH_LIB_INTRINSIC_LIST(V) \
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 // Class that recognizes factories and returns corresponding result cid. 509 // Class that recognizes factories and returns corresponding result cid.
508 class FactoryRecognizer : public AllStatic { 510 class FactoryRecognizer : public AllStatic {
509 public: 511 public:
510 // Return kDynamicCid if factory is not recognized. 512 // Return kDynamicCid if factory is not recognized.
511 static intptr_t ResultCid(const Function& factory); 513 static intptr_t ResultCid(const Function& factory);
512 }; 514 };
513 515
514 } // namespace dart 516 } // namespace dart
515 517
516 #endif // VM_METHOD_RECOGNIZER_H_ 518 #endif // VM_METHOD_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698