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

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

Issue 19023005: Implement forwarding constructors for mixins (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
OLDNEW
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
11 namespace dart { 11 namespace dart {
12 12
13 // List of intrinsics: 13 // List of intrinsics:
14 // (class-name, function-name, intrinsification method, fingerprint). 14 // (class-name, function-name, intrinsification method, fingerprint).
15 // 15 //
16 // When adding a new function for intrinsification add a 0 as fingerprint, 16 // When adding a new function for intrinsification add a 0 as fingerprint,
17 // build and run to get the correct fingerprint from the mismatch error. 17 // build and run to get the correct fingerprint from the mismatch error.
18 #define CORE_LIB_INTRINSIC_LIST(V) \ 18 #define CORE_LIB_INTRINSIC_LIST(V) \
19 V(_Smi, ~, Smi_bitNegate, 882629793) \ 19 V(_Smi, ~, Smi_bitNegate, 2098673794) \
20 V(_Double, >, Double_greaterThan, 498448864) \ 20 V(_Double, >, Double_greaterThan, 498448864) \
21 V(_Double, >=, Double_greaterEqualThan, 1322959863) \ 21 V(_Double, >=, Double_greaterEqualThan, 1322959863) \
22 V(_Double, <, Double_lessThan, 1595326820) \ 22 V(_Double, <, Double_lessThan, 1595326820) \
23 V(_Double, <=, Double_lessEqualThan, 1322930072) \ 23 V(_Double, <=, Double_lessEqualThan, 1322930072) \
24 V(_Double, ==, Double_equal, 1012968674) \ 24 V(_Double, ==, Double_equal, 1012968674) \
25 V(_Double, +, Double_add, 407090160) \ 25 V(_Double, +, Double_add, 407090160) \
26 V(_Double, -, Double_sub, 1801868246) \ 26 V(_Double, -, Double_sub, 1801868246) \
27 V(_Double, *, Double_mul, 984784342) \ 27 V(_Double, *, Double_mul, 984784342) \
28 V(_Double, /, Double_div, 1399344917) \ 28 V(_Double, /, Double_div, 1399344917) \
29 V(_Double, get:isNaN, Double_getIsNaN, 54462366) \ 29 V(_Double, get:isNaN, Double_getIsNaN, 54462366) \
30 V(_Double, get:isNegative, Double_getIsNegative, 54462366) \ 30 V(_Double, get:isNegative, Double_getIsNegative, 54462366) \
31 V(_Double, _mulFromInteger, Double_mulFromInteger, 550294258) \ 31 V(_Double, _mulFromInteger, Double_mulFromInteger, 550294258) \
32 V(_Double, .fromInteger, Double_fromInteger, 842078193) \ 32 V(_Double, .fromInteger, Double_fromInteger, 881555713) \
33 V(_ObjectArray, ., ObjectArray_Allocate, 97987288) \ 33 V(_ObjectArray, ., ObjectArray_Allocate, 1149848530) \
34 V(_ObjectArray, get:length, Array_getLength, 405297088) \ 34 V(_ObjectArray, get:length, Array_getLength, 405297088) \
35 V(_ObjectArray, [], Array_getIndexed, 71937385) \ 35 V(_ObjectArray, [], Array_getIndexed, 1573881683) \
36 V(_ObjectArray, []=, Array_setIndexed, 255863719) \ 36 V(_ObjectArray, []=, Array_setIndexed, 1644545484) \
37 V(_GrowableObjectArray, .withData, GrowableArray_Allocate, 816132033) \ 37 V(_GrowableObjectArray, .withData, GrowableArray_Allocate, 569069682) \
38 V(_GrowableObjectArray, get:length, GrowableArray_getLength, 725548050) \ 38 V(_GrowableObjectArray, get:length, GrowableArray_getLength, 725548050) \
39 V(_GrowableObjectArray, get:_capacity, GrowableArray_getCapacity, 725548050) \ 39 V(_GrowableObjectArray, get:_capacity, GrowableArray_getCapacity, 725548050) \
40 V(_GrowableObjectArray, [], GrowableArray_getIndexed, 581838973) \ 40 V(_GrowableObjectArray, [], GrowableArray_getIndexed, 1889032295) \
41 V(_GrowableObjectArray, []=, GrowableArray_setIndexed, 1048007636) \ 41 V(_GrowableObjectArray, []=, GrowableArray_setIndexed, 934874427) \
42 V(_GrowableObjectArray, _setLength, GrowableArray_setLength, 796709584) \ 42 V(_GrowableObjectArray, _setLength, GrowableArray_setLength, 279007375) \
43 V(_GrowableObjectArray, _setData, GrowableArray_setData, 629110947) \ 43 V(_GrowableObjectArray, _setData, GrowableArray_setData, 588108129) \
44 V(_GrowableObjectArray, add, GrowableArray_add, 112207566) \ 44 V(_GrowableObjectArray, add, GrowableArray_add, 112207566) \
45 V(_ImmutableArray, [], ImmutableArray_getIndexed, 486821199) \ 45 V(_ImmutableArray, [], ImmutableArray_getIndexed, 1456194617) \
46 V(_ImmutableArray, get:length, ImmutableArray_getLength, 433698233) \ 46 V(_ImmutableArray, get:length, ImmutableArray_getLength, 433698233) \
47 V(Object, ==, Object_equal, 2126867222) \ 47 V(Object, ==, Object_equal, 2126867222) \
48 V(_StringBase, get:hashCode, String_getHashCode, 320803993) \ 48 V(_StringBase, get:hashCode, String_getHashCode, 320803993) \
49 V(_StringBase, get:isEmpty, String_getIsEmpty, 110631520) \ 49 V(_StringBase, get:isEmpty, String_getIsEmpty, 110631520) \
50 V(_StringBase, get:length, String_getLength, 320803993) \ 50 V(_StringBase, get:length, String_getLength, 320803993) \
51 V(_StringBase, codeUnitAt, String_codeUnitAt, 984449525) \ 51 V(_StringBase, codeUnitAt, String_codeUnitAt, 1574843871) \
52 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413) \ 52 V(_OneByteString, get:hashCode, OneByteString_getHashCode, 682660413) \
53 V(_OneByteString, _substringUncheckedNative, \ 53 V(_OneByteString, _substringUncheckedNative, \
54 OneByteString_substringUnchecked, 713121438) \ 54 OneByteString_substringUnchecked, 756784624) \
55 V(_OneByteString, _setAt, OneByteString_setAt, 342452817) \ 55 V(_OneByteString, _setAt, OneByteString_setAt, 1038132016) \
56 V(_OneByteString, _allocate, OneByteString_allocate, 510754908) \ 56 V(_OneByteString, _allocate, OneByteString_allocate, 716379334) \
57
57 58
58 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \ 59 #define CORE_INTEGER_LIB_INTRINSIC_LIST(V) \
59 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, 726019207)\ 60 V(_IntegerImplementation, _addFromInteger, Integer_addFromInteger, \
61 1074291215) \
60 V(_IntegerImplementation, +, Integer_add, 25837296) \ 62 V(_IntegerImplementation, +, Integer_add, 25837296) \
61 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, 726019207)\ 63 V(_IntegerImplementation, _subFromInteger, Integer_subFromInteger, \
64 1074291215) \
62 V(_IntegerImplementation, -, Integer_sub, 1697139934) \ 65 V(_IntegerImplementation, -, Integer_sub, 1697139934) \
63 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, 726019207)\ 66 V(_IntegerImplementation, _mulFromInteger, Integer_mulFromInteger, \
67 1074291215) \
64 V(_IntegerImplementation, *, Integer_mul, 110370751) \ 68 V(_IntegerImplementation, *, Integer_mul, 110370751) \
65 V(_IntegerImplementation, %, Integer_modulo, 980686435) \ 69 V(_IntegerImplementation, %, Integer_modulo, 980686435) \
66 V(_IntegerImplementation, remainder, Integer_remainder, 1536426035) \ 70 V(_IntegerImplementation, remainder, Integer_remainder, 1536426035) \
67 V(_IntegerImplementation, ~/, Integer_truncDivide, 2059401166) \ 71 V(_IntegerImplementation, ~/, Integer_truncDivide, 2059401166) \
68 V(_IntegerImplementation, unary-, Integer_negate, 675709702) \ 72 V(_IntegerImplementation, unary-, Integer_negate, 675709702) \
69 V(_IntegerImplementation, _bitAndFromInteger, \ 73 V(_IntegerImplementation, _bitAndFromInteger, \
70 Integer_bitAndFromInteger, 726019207) \ 74 Integer_bitAndFromInteger, 1074291215) \
71 V(_IntegerImplementation, &, Integer_bitAnd, 759019505) \ 75 V(_IntegerImplementation, &, Integer_bitAnd, 759019505) \
72 V(_IntegerImplementation, _bitOrFromInteger, \ 76 V(_IntegerImplementation, _bitOrFromInteger, \
73 Integer_bitOrFromInteger, 726019207) \ 77 Integer_bitOrFromInteger, 1074291215) \
74 V(_IntegerImplementation, |, Integer_bitOr, 1280367298) \ 78 V(_IntegerImplementation, |, Integer_bitOr, 1280367298) \
75 V(_IntegerImplementation, _bitXorFromInteger, \ 79 V(_IntegerImplementation, _bitXorFromInteger, \
76 Integer_bitXorFromInteger, 726019207) \ 80 Integer_bitXorFromInteger, 1074291215) \
77 V(_IntegerImplementation, ^, Integer_bitXor, 686827811) \ 81 V(_IntegerImplementation, ^, Integer_bitXor, 686827811) \
78 V(_IntegerImplementation, \ 82 V(_IntegerImplementation, \
79 _greaterThanFromInteger, \ 83 _greaterThanFromInteger, \
80 Integer_greaterThanFromInt, 79222670) \ 84 Integer_greaterThanFromInt, 2056270230) \
81 V(_IntegerImplementation, >, Integer_greaterThan, 866987265) \ 85 V(_IntegerImplementation, >, Integer_greaterThan, 866987265) \
82 V(_IntegerImplementation, ==, Integer_equal, 1763184121) \ 86 V(_IntegerImplementation, ==, Integer_equal, 1763184121) \
83 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, 79222670) \ 87 V(_IntegerImplementation, _equalToInteger, Integer_equalToInteger, \
88 2056270230) \
84 V(_IntegerImplementation, <, Integer_lessThan, 1423913958) \ 89 V(_IntegerImplementation, <, Integer_lessThan, 1423913958) \
85 V(_IntegerImplementation, <=, Integer_lessEqualThan, 1087447066) \ 90 V(_IntegerImplementation, <=, Integer_lessEqualThan, 1087447066) \
86 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1087476857) \ 91 V(_IntegerImplementation, >=, Integer_greaterEqualThan, 1087476857) \
87 V(_IntegerImplementation, <<, Integer_shl, 1600590181) \ 92 V(_IntegerImplementation, <<, Integer_shl, 1600590181) \
88 V(_IntegerImplementation, >>, Integer_sar, 237416447) \ 93 V(_IntegerImplementation, >>, Integer_sar, 237416447) \
89 V(_Double, toInt, Double_toInt, 362666636) 94 V(_Double, toInt, Double_toInt, 630286253)
90 95
91 96
92 #define MATH_LIB_INTRINSIC_LIST(V) \ 97 #define MATH_LIB_INTRINSIC_LIST(V) \
93 V(::, sqrt, Math_sqrt, 1662640002) \ 98 V(::, sqrt, Math_sqrt, 1662640002) \
94 V(::, sin, Math_sin, 1273932041) \ 99 V(::, sin, Math_sin, 1273932041) \
95 V(::, cos, Math_cos, 1749547468) \ 100 V(::, cos, Math_cos, 1749547468) \
96 V(_Random, _nextState, Random_nextState, 287494804) \ 101 V(_Random, _nextState, Random_nextState, 287494804) \
97 102
98 103
99 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \ 104 #define TYPED_DATA_LIB_INTRINSIC_LIST(V) \
100 V(_TypedList, get:length, TypedData_getLength, 1004567191) \ 105 V(_TypedList, get:length, TypedData_getLength, 1004567191) \
101 V(_Int8Array, _new, TypedData_Int8Array_new, 48970297) \ 106 V(_Int8Array, _new, TypedData_Int8Array_new, 1708300323) \
102 V(_Uint8Array, _new, TypedData_Uint8Array_new, 389788863) \ 107 V(_Uint8Array, _new, TypedData_Uint8Array_new, 280387497) \
103 V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 59021935) \ 108 V(_Uint8ClampedArray, _new, TypedData_Uint8ClampedArray_new, 1035267417) \
104 V(_Int16Array, _new, TypedData_Int16Array_new, 465688649) \ 109 V(_Int16Array, _new, TypedData_Int16Array_new, 1460383283) \
105 V(_Uint16Array, _new, TypedData_Uint16Array_new, 169304657) \ 110 V(_Uint16Array, _new, TypedData_Uint16Array_new, 737997883) \
106 V(_Int32Array, _new, TypedData_Int32Array_new, 947562951) \ 111 V(_Int32Array, _new, TypedData_Int32Array_new, 1608749233) \
107 V(_Uint32Array, _new, TypedData_Uint32Array_new, 85066537) \ 112 V(_Uint32Array, _new, TypedData_Uint32Array_new, 1955293459) \
108 V(_Int64Array, _new, TypedData_Int64Array_new, 775415132) \ 113 V(_Int64Array, _new, TypedData_Int64Array_new, 1992227270) \
109 V(_Uint64Array, _new, TypedData_Uint64Array_new, 536384146) \ 114 V(_Uint64Array, _new, TypedData_Uint64Array_new, 291118076) \
110 V(_Float32Array, _new, TypedData_Float32Array_new, 723829075) \ 115 V(_Float32Array, _new, TypedData_Float32Array_new, 962527805) \
111 V(_Float64Array, _new, TypedData_Float64Array_new, 111654177) \ 116 V(_Float64Array, _new, TypedData_Float64Array_new, 1871142667) \
112 V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 984763738) \ 117 V(_Float32x4Array, _new, TypedData_Float32x4Array_new, 1873359556) \
113 V(_Int8Array, ., TypedData_Int8Array_factory, 1139775342) \ 118 V(_Int8Array, ., TypedData_Int8Array_factory, 1139775342) \
114 V(_Uint8Array, ., TypedData_Uint8Array_factory, 2065936658) \ 119 V(_Uint8Array, ., TypedData_Uint8Array_factory, 2065936658) \
115 V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 1420655937) \ 120 V(_Uint8ClampedArray, ., TypedData_Uint8ClampedArray_factory, 1420655937) \
116 V(_Int16Array, ., TypedData_Int16Array_factory, 1401847016) \ 121 V(_Int16Array, ., TypedData_Int16Array_factory, 1401847016) \
117 V(_Uint16Array, ., TypedData_Uint16Array_factory, 967612741) \ 122 V(_Uint16Array, ., TypedData_Uint16Array_factory, 967612741) \
118 V(_Int32Array, ., TypedData_Int32Array_factory, 332168564) \ 123 V(_Int32Array, ., TypedData_Int32Array_factory, 332168564) \
119 V(_Uint32Array, ., TypedData_Uint32Array_factory, 966424258) \ 124 V(_Uint32Array, ., TypedData_Uint32Array_factory, 966424258) \
120 V(_Int64Array, ., TypedData_Int64Array_factory, 541618991) \ 125 V(_Int64Array, ., TypedData_Int64Array_factory, 541618991) \
121 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1085703705) \ 126 V(_Uint64Array, ., TypedData_Uint64Array_factory, 1085703705) \
122 V(_Float32Array, ., TypedData_Float32Array_factory, 1691006880) \ 127 V(_Float32Array, ., TypedData_Float32Array_factory, 1691006880) \
(...skipping 24 matching lines...) Expand all
147 CORE_INTEGER_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 152 CORE_INTEGER_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
148 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 153 MATH_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
149 TYPED_DATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION) 154 TYPED_DATA_LIB_INTRINSIC_LIST(DECLARE_FUNCTION)
150 155
151 #undef DECLARE_FUNCTION 156 #undef DECLARE_FUNCTION
152 }; 157 };
153 158
154 } // namespace dart 159 } // namespace dart
155 160
156 #endif // VM_INTRINSIFIER_H_ 161 #endif // VM_INTRINSIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698