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

Side by Side Diff: dart/runtime/vm/intermediate_language.h

Issue 59073003: Version 0.8.10.4 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month 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 | « dart/runtime/vm/il_printer.cc ('k') | dart/runtime/vm/intermediate_language.cc » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 V(_TypedList, get:length, TypedDataLength, 26616328) \ 46 V(_TypedList, get:length, TypedDataLength, 26616328) \
47 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ 47 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \
48 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ 48 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \
49 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ 49 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \
50 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ 50 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \
51 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ 51 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \
52 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ 52 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \
53 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ 53 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \
54 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ 54 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \
55 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ 55 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \
56 V(_TypedList, _getUint32x4, ByteArrayBaseGetUint32x4, 1499091330) \ 56 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \
57 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1443265945) \ 57 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1443265945) \
58 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \ 58 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \
59 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \ 59 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \
60 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \ 60 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \
61 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \ 61 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \
62 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \ 62 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \
63 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \ 63 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \
64 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \ 64 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \
65 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \ 65 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \
66 V(_TypedList, _setUint32x4, ByteArrayBaseSetUint32x4, 691480480) \ 66 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1871750680) \
67 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ 67 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
68 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817090003) \ 68 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817090003) \
69 V(_GrowableList, _setData, GrowableArraySetData, 1375509957) \ 69 V(_GrowableList, _setData, GrowableArraySetData, 1375509957) \
70 V(_GrowableList, _setLength, GrowableArraySetLength, 1227678442) \ 70 V(_GrowableList, _setLength, GrowableArraySetLength, 1227678442) \
71 V(_StringBase, get:length, StringBaseLength, 1483520063) \ 71 V(_StringBase, get:length, StringBaseLength, 1483520063) \
72 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \ 72 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \
73 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \ 73 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \
74 V(_StringBase, [], StringBaseCharAt, 990046076) \ 74 V(_StringBase, [], StringBaseCharAt, 990046076) \
75 V(_StringBase, _interpolate, StringBaseInterpolate, 1824308855) \ 75 V(_StringBase, _interpolate, StringBaseInterpolate, 1824308855) \
76 V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \ 76 V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \
77 V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \ 77 V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \
78 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \ 78 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \
79 2095943661) \ 79 2095943661) \
80 V(_Double, toInt, DoubleToInteger, 1328149975) \ 80 V(_Double, toInt, DoubleToInteger, 1328149975) \
81 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \ 81 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \
82 V(_Double, roundToDouble, DoubleRound, 622146406) \ 82 V(_Double, roundToDouble, DoubleRound, 622146406) \
83 V(_Double, floorToDouble, DoubleFloor, 1614014643) \ 83 V(_Double, floorToDouble, DoubleFloor, 1614014643) \
84 V(_Double, ceilToDouble, DoubleCeil, 277859570) \ 84 V(_Double, ceilToDouble, DoubleCeil, 277859570) \
85 V(_Double, _modulo, DoubleMod, 1443289156) \ 85 V(_Double, _modulo, DoubleMod, 1443289156) \
86 V(::, sqrt, MathSqrt, 465520247) \ 86 V(::, sqrt, MathSqrt, 465520247) \
87 V(::, sin, MathSin, 730107143) \ 87 V(::, sin, MathSin, 730107143) \
88 V(::, cos, MathCos, 1282146521) \ 88 V(::, cos, MathCos, 1282146521) \
89 V(::, min, MathMin, 1830216388) \ 89 V(::, min, MathMin, 1830216388) \
90 V(::, max, MathMax, 234565686) \ 90 V(::, max, MathMax, 234565686) \
91 V(::, _doublePow, MathDoublePow, 1728171041) \ 91 V(::, _doublePow, MathDoublePow, 1728171041) \
92 V(Float32x4, Float32x4., Float32x4Constructor, 786169160) \ 92 V(Float32x4, Float32x4., Float32x4Constructor, 786169160) \
93 V(Float32x4, Float32x4.zero, Float32x4Zero, 1589383280) \ 93 V(Float32x4, Float32x4.zero, Float32x4Zero, 1589383280) \
94 V(Float32x4, Float32x4.splat, Float32x4Splat, 62513275) \ 94 V(Float32x4, Float32x4.splat, Float32x4Splat, 62513275) \
95 V(Float32x4, Float32x4.fromUint32x4Bits, Float32x4FromUint32x4Bits, \ 95 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, \
96 770033146) \ 96 1933861675) \
97 V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \ 97 V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \
98 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 927956119) \ 98 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 927956119) \
99 V(_Float32x4, get:x, Float32x4ShuffleX, 1351717838) \ 99 V(_Float32x4, get:x, Float32x4ShuffleX, 1351717838) \
100 V(_Float32x4, get:y, Float32x4ShuffleY, 217386410) \ 100 V(_Float32x4, get:y, Float32x4ShuffleY, 217386410) \
101 V(_Float32x4, get:z, Float32x4ShuffleZ, 2144923721) \ 101 V(_Float32x4, get:z, Float32x4ShuffleZ, 2144923721) \
102 V(_Float32x4, get:w, Float32x4ShuffleW, 1447699119) \ 102 V(_Float32x4, get:w, Float32x4ShuffleW, 1447699119) \
103 V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198849347) \ 103 V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198849347) \
104 V(_Float32x4, _cmpequal, Float32x4Equal, 2141256163) \ 104 V(_Float32x4, _cmpequal, Float32x4Equal, 1944929844) \
105 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 696292270) \ 105 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 499965951) \
106 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1199333164) \ 106 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1003006845) \
107 V(_Float32x4, _cmplt, Float32x4LessThan, 943396590) \ 107 V(_Float32x4, _cmplt, Float32x4LessThan, 747070271) \
108 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 57211241) \ 108 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 2008368570) \
109 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1234888884) \ 109 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1038562565) \
110 V(_Float32x4, _min, Float32x4Min, 1166664658) \ 110 V(_Float32x4, _min, Float32x4Min, 1166664658) \
111 V(_Float32x4, _max, Float32x4Max, 343968921) \ 111 V(_Float32x4, _max, Float32x4Max, 343968921) \
112 V(_Float32x4, _scale, Float32x4Scale, 803505531) \ 112 V(_Float32x4, _scale, Float32x4Scale, 803505531) \
113 V(_Float32x4, _sqrt, Float32x4Sqrt, 2092250151) \ 113 V(_Float32x4, _sqrt, Float32x4Sqrt, 2092250151) \
114 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 965252704) \ 114 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 965252704) \
115 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1262202915) \ 115 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1262202915) \
116 V(_Float32x4, _negate, Float32x4Negate, 1203192635) \ 116 V(_Float32x4, _negate, Float32x4Negate, 1203192635) \
117 V(_Float32x4, _abs, Float32x4Absolute, 386324188) \ 117 V(_Float32x4, _abs, Float32x4Absolute, 386324188) \
118 V(_Float32x4, _clamp, Float32x4Clamp, 1454612345) \ 118 V(_Float32x4, _clamp, Float32x4Clamp, 1454612345) \
119 V(_Float32x4, withX, Float32x4WithX, 795284225) \ 119 V(_Float32x4, withX, Float32x4WithX, 795284225) \
120 V(_Float32x4, withY, Float32x4WithY, 1806065938) \ 120 V(_Float32x4, withY, Float32x4WithY, 1806065938) \
121 V(_Float32x4, withZ, Float32x4WithZ, 320659034) \ 121 V(_Float32x4, withZ, Float32x4WithZ, 320659034) \
122 V(_Float32x4, withW, Float32x4WithW, 1108437255) \ 122 V(_Float32x4, withW, Float32x4WithW, 1108437255) \
123 V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 517444095) \ 123 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 1477593884) \
124 V(Uint32x4, Uint32x4.fromFloat32x4Bits, Uint32x4FromFloat32x4Bits, \ 124 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, \
125 1080034855) \ 125 1955567428) \
126 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 1674696792) \ 126 V(_Int32x4, get:flagX, Int32x4GetFlagX, 729235803) \
127 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013200152) \ 127 V(_Int32x4, get:flagY, Int32x4GetFlagY, 430840849) \
128 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944733935) \ 128 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 1981076496) \
129 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22746169) \ 129 V(_Int32x4, get:flagW, Int32x4GetFlagW, 629356099) \
130 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858144083) \ 130 V(_Int32x4, get:signMask, Int32x4GetSignMask, 1598787746) \
131 V(_Uint32x4, shuffle, Uint32x4Shuffle, 146209630) \ 131 V(_Int32x4, shuffle, Int32x4Shuffle, 599391160) \
132 V(_Uint32x4, shuffleMix, Uint32x4ShuffleMix, 1251494596) \ 132 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 1491641197) \
133 V(_Uint32x4, select, Uint32x4Select, 72244182) \ 133 V(_Int32x4, select, Int32x4Select, 598942806) \
134 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \ 134 V(_Int32x4, withFlagX, Int32x4WithFlagX, 63248661) \
135 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \ 135 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1498755850) \
136 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \ 136 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 457856832) \
137 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \ 137 V(_Int32x4, withFlagW, Int32x4WithFlagW, 690638779) \
138 V(_List, [], ObjectArrayGetIndexed, 1079829188) \ 138 V(_List, [], ObjectArrayGetIndexed, 1079829188) \
139 V(_List, []=, ObjectArraySetIndexed, 748954698) \ 139 V(_List, []=, ObjectArraySetIndexed, 748954698) \
140 V(_ImmutableList, [], ImmutableArrayGetIndexed, 25983597) \ 140 V(_ImmutableList, [], ImmutableArrayGetIndexed, 25983597) \
141 V(_GrowableList, [], GrowableArrayGetIndexed, 1686777561) \ 141 V(_GrowableList, [], GrowableArrayGetIndexed, 1686777561) \
142 V(_GrowableList, []=, GrowableArraySetIndexed, 327404102) \ 142 V(_GrowableList, []=, GrowableArraySetIndexed, 327404102) \
143 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \ 143 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \
144 V(_Float32Array, []=, Float32ArraySetIndexed, 1155155195) \ 144 V(_Float32Array, []=, Float32ArraySetIndexed, 1155155195) \
145 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \ 145 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \
146 V(_Float64Array, []=, Float64ArraySetIndexed, 214271306) \ 146 V(_Float64Array, []=, Float64ArraySetIndexed, 214271306) \
147 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \ 147 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \
(...skipping 11 matching lines...) Expand all
159 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \ 159 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \
160 V(_Int16Array, []=, Int16ArraySetIndexed, 1182335435) \ 160 V(_Int16Array, []=, Int16ArraySetIndexed, 1182335435) \
161 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \ 161 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \
162 V(_Uint16Array, []=, Uint16ArraySetIndexed, 663508528) \ 162 V(_Uint16Array, []=, Uint16ArraySetIndexed, 663508528) \
163 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \ 163 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \
164 V(_Int32Array, []=, Int32ArraySetIndexed, 1515238594) \ 164 V(_Int32Array, []=, Int32ArraySetIndexed, 1515238594) \
165 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \ 165 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \
166 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1980947178) \ 166 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1980947178) \
167 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \ 167 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \
168 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1419416331) \ 168 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1419416331) \
169 V(_Uint32x4Array, [], Uint32x4ArrayGetIndexed, 1340743913) \ 169 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1675579883) \
170 V(_Uint32x4Array, []=, Uint32x4ArraySetIndexed, 1326924628) \ 170 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 809970636) \
171 171
172 172
173 // A list of core function that should always be inlined. 173 // A list of core function that should always be inlined.
174 #define INLINE_WHITE_LIST(V) \ 174 #define INLINE_WHITE_LIST(V) \
175 V(_List, get:length, ObjectArrayLength, 215153395) \ 175 V(_List, get:length, ObjectArrayLength, 215153395) \
176 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \ 176 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \
177 V(_TypedList, get:length, TypedDataLength, 26616328) \ 177 V(_TypedList, get:length, TypedDataLength, 26616328) \
178 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ 178 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
179 V(_StringBase, get:length, StringBaseLength, 1483520063) \ 179 V(_StringBase, get:length, StringBaseLength, 1483520063) \
180 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \ 180 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \
181 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \ 181 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \
182 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) \ 182 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) \
183 183
184 // A list of core functions that internally dispatch based on received id. 184 // A list of core functions that internally dispatch based on received id.
185 #define POLYMORPHIC_TARGET_LIST(V) \ 185 #define POLYMORPHIC_TARGET_LIST(V) \
186 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ 186 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \
187 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ 187 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \
188 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ 188 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \
189 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ 189 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \
190 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ 190 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \
191 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ 191 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \
192 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ 192 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \
193 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ 193 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \
194 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ 194 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \
195 V(_TypedList, _getUint32x4, ByteArrayBaseGetUint32x4, 1499091330) \ 195 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \
196 196
197 // Class that recognizes the name and owner of a function and returns the 197 // Class that recognizes the name and owner of a function and returns the
198 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 198 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
199 // functions. 199 // functions.
200 class MethodRecognizer : public AllStatic { 200 class MethodRecognizer : public AllStatic {
201 public: 201 public:
202 enum Kind { 202 enum Kind {
203 kUnknown, 203 kUnknown,
204 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, 204 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
205 RECOGNIZED_LIST(DEFINE_ENUM_LIST) 205 RECOGNIZED_LIST(DEFINE_ENUM_LIST)
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 M(CheckSmi) \ 653 M(CheckSmi) \
654 M(Constant) \ 654 M(Constant) \
655 M(CheckEitherNonSmi) \ 655 M(CheckEitherNonSmi) \
656 M(BinaryDoubleOp) \ 656 M(BinaryDoubleOp) \
657 M(MathUnary) \ 657 M(MathUnary) \
658 M(MathMinMax) \ 658 M(MathMinMax) \
659 M(UnboxDouble) \ 659 M(UnboxDouble) \
660 M(BoxDouble) \ 660 M(BoxDouble) \
661 M(BoxFloat32x4) \ 661 M(BoxFloat32x4) \
662 M(UnboxFloat32x4) \ 662 M(UnboxFloat32x4) \
663 M(BoxUint32x4) \ 663 M(BoxInt32x4) \
664 M(UnboxUint32x4) \ 664 M(UnboxInt32x4) \
665 M(UnboxInteger) \ 665 M(UnboxInteger) \
666 M(BoxInteger) \ 666 M(BoxInteger) \
667 M(BinaryMintOp) \ 667 M(BinaryMintOp) \
668 M(ShiftMintOp) \ 668 M(ShiftMintOp) \
669 M(UnaryMintOp) \ 669 M(UnaryMintOp) \
670 M(CheckArrayBound) \ 670 M(CheckArrayBound) \
671 M(Constraint) \ 671 M(Constraint) \
672 M(StringFromCharCode) \ 672 M(StringFromCharCode) \
673 M(StringInterpolate) \ 673 M(StringInterpolate) \
674 M(InvokeMathCFunction) \ 674 M(InvokeMathCFunction) \
675 M(GuardField) \ 675 M(GuardField) \
676 M(IfThenElse) \ 676 M(IfThenElse) \
677 M(BinaryFloat32x4Op) \ 677 M(BinaryFloat32x4Op) \
678 M(Simd32x4Shuffle) \ 678 M(Simd32x4Shuffle) \
679 M(Simd32x4ShuffleMix) \ 679 M(Simd32x4ShuffleMix) \
680 M(Simd32x4GetSignMask) \ 680 M(Simd32x4GetSignMask) \
681 M(Float32x4Constructor) \ 681 M(Float32x4Constructor) \
682 M(Float32x4Zero) \ 682 M(Float32x4Zero) \
683 M(Float32x4Splat) \ 683 M(Float32x4Splat) \
684 M(Float32x4Comparison) \ 684 M(Float32x4Comparison) \
685 M(Float32x4MinMax) \ 685 M(Float32x4MinMax) \
686 M(Float32x4Scale) \ 686 M(Float32x4Scale) \
687 M(Float32x4Sqrt) \ 687 M(Float32x4Sqrt) \
688 M(Float32x4ZeroArg) \ 688 M(Float32x4ZeroArg) \
689 M(Float32x4Clamp) \ 689 M(Float32x4Clamp) \
690 M(Float32x4With) \ 690 M(Float32x4With) \
691 M(Float32x4ToUint32x4) \ 691 M(Float32x4ToInt32x4) \
692 M(MaterializeObject) \ 692 M(MaterializeObject) \
693 M(Uint32x4BoolConstructor) \ 693 M(Int32x4BoolConstructor) \
694 M(Uint32x4GetFlag) \ 694 M(Int32x4GetFlag) \
695 M(Uint32x4Select) \ 695 M(Int32x4Select) \
696 M(Uint32x4SetFlag) \ 696 M(Int32x4SetFlag) \
697 M(Uint32x4ToFloat32x4) \ 697 M(Int32x4ToFloat32x4) \
698 M(BinaryUint32x4Op) \ 698 M(BinaryInt32x4Op) \
699 699
700 700
701 #define FORWARD_DECLARATION(type) class type##Instr; 701 #define FORWARD_DECLARATION(type) class type##Instr;
702 FOR_EACH_INSTRUCTION(FORWARD_DECLARATION) 702 FOR_EACH_INSTRUCTION(FORWARD_DECLARATION)
703 #undef FORWARD_DECLARATION 703 #undef FORWARD_DECLARATION
704 704
705 705
706 // Functions required in all concrete instruction classes. 706 // Functions required in all concrete instruction classes.
707 #define DECLARE_INSTRUCTION(type) \ 707 #define DECLARE_INSTRUCTION(type) \
708 virtual Tag tag() const { return k##type; } \ 708 virtual Tag tag() const { return k##type; } \
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 return deopt_id_; 953 return deopt_id_;
954 } 954 }
955 955
956 private: 956 private:
957 friend class Definition; // Needed for InsertBefore, InsertAfter. 957 friend class Definition; // Needed for InsertBefore, InsertAfter.
958 958
959 // Classes that set or read deopt_id_. 959 // Classes that set or read deopt_id_.
960 friend class UnboxIntegerInstr; 960 friend class UnboxIntegerInstr;
961 friend class UnboxDoubleInstr; 961 friend class UnboxDoubleInstr;
962 friend class UnboxFloat32x4Instr; 962 friend class UnboxFloat32x4Instr;
963 friend class UnboxUint32x4Instr; 963 friend class UnboxInt32x4Instr;
964 friend class BinaryDoubleOpInstr; 964 friend class BinaryDoubleOpInstr;
965 friend class BinaryFloat32x4OpInstr; 965 friend class BinaryFloat32x4OpInstr;
966 friend class Float32x4ZeroInstr; 966 friend class Float32x4ZeroInstr;
967 friend class Float32x4SplatInstr; 967 friend class Float32x4SplatInstr;
968 friend class Simd32x4ShuffleInstr; 968 friend class Simd32x4ShuffleInstr;
969 friend class Simd32x4ShuffleMixInstr; 969 friend class Simd32x4ShuffleMixInstr;
970 friend class Simd32x4GetSignMaskInstr; 970 friend class Simd32x4GetSignMaskInstr;
971 friend class Float32x4ConstructorInstr; 971 friend class Float32x4ConstructorInstr;
972 friend class Float32x4ComparisonInstr; 972 friend class Float32x4ComparisonInstr;
973 friend class Float32x4MinMaxInstr; 973 friend class Float32x4MinMaxInstr;
974 friend class Float32x4ScaleInstr; 974 friend class Float32x4ScaleInstr;
975 friend class Float32x4SqrtInstr; 975 friend class Float32x4SqrtInstr;
976 friend class Float32x4ZeroArgInstr; 976 friend class Float32x4ZeroArgInstr;
977 friend class Float32x4ClampInstr; 977 friend class Float32x4ClampInstr;
978 friend class Float32x4WithInstr; 978 friend class Float32x4WithInstr;
979 friend class Float32x4ToUint32x4Instr; 979 friend class Float32x4ToInt32x4Instr;
980 friend class Uint32x4BoolConstructorInstr; 980 friend class Int32x4BoolConstructorInstr;
981 friend class Uint32x4GetFlagInstr; 981 friend class Int32x4GetFlagInstr;
982 friend class Uint32x4SetFlagInstr; 982 friend class Int32x4SetFlagInstr;
983 friend class Uint32x4SelectInstr; 983 friend class Int32x4SelectInstr;
984 friend class Uint32x4ToFloat32x4Instr; 984 friend class Int32x4ToFloat32x4Instr;
985 friend class BinaryUint32x4OpInstr; 985 friend class BinaryInt32x4OpInstr;
986 friend class BinaryMintOpInstr; 986 friend class BinaryMintOpInstr;
987 friend class BinarySmiOpInstr; 987 friend class BinarySmiOpInstr;
988 friend class UnarySmiOpInstr; 988 friend class UnarySmiOpInstr;
989 friend class UnaryDoubleOpInstr; 989 friend class UnaryDoubleOpInstr;
990 friend class ShiftMintOpInstr; 990 friend class ShiftMintOpInstr;
991 friend class UnaryMintOpInstr; 991 friend class UnaryMintOpInstr;
992 friend class MathUnaryInstr; 992 friend class MathUnaryInstr;
993 friend class MathMinMaxInstr; 993 friend class MathMinMaxInstr;
994 friend class CheckClassInstr; 994 friend class CheckClassInstr;
995 friend class GuardFieldInstr; 995 friend class GuardFieldInstr;
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
4564 4564
4565 virtual bool MayThrow() const { return false; } 4565 virtual bool MayThrow() const { return false; }
4566 4566
4567 Definition* Canonicalize(FlowGraph* flow_graph); 4567 Definition* Canonicalize(FlowGraph* flow_graph);
4568 4568
4569 private: 4569 private:
4570 DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr); 4570 DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr);
4571 }; 4571 };
4572 4572
4573 4573
4574 class BoxUint32x4Instr : public TemplateDefinition<1> { 4574 class BoxInt32x4Instr : public TemplateDefinition<1> {
4575 public: 4575 public:
4576 explicit BoxUint32x4Instr(Value* value) { 4576 explicit BoxInt32x4Instr(Value* value) {
4577 SetInputAt(0, value); 4577 SetInputAt(0, value);
4578 } 4578 }
4579 4579
4580 Value* value() const { return inputs_[0]; } 4580 Value* value() const { return inputs_[0]; }
4581 4581
4582 virtual bool CanDeoptimize() const { return false; } 4582 virtual bool CanDeoptimize() const { return false; }
4583 4583
4584 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 4584 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
4585 ASSERT(idx == 0); 4585 ASSERT(idx == 0);
4586 return kUnboxedUint32x4; 4586 return kUnboxedInt32x4;
4587 } 4587 }
4588 4588
4589 DECLARE_INSTRUCTION(BoxUint32x4) 4589 DECLARE_INSTRUCTION(BoxInt32x4)
4590 virtual CompileType ComputeType() const; 4590 virtual CompileType ComputeType() const;
4591 4591
4592 virtual bool AllowsCSE() const { return true; } 4592 virtual bool AllowsCSE() const { return true; }
4593 virtual EffectSet Effects() const { return EffectSet::None(); } 4593 virtual EffectSet Effects() const { return EffectSet::None(); }
4594 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4594 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4595 virtual bool AttributesEqual(Instruction* other) const { return true; } 4595 virtual bool AttributesEqual(Instruction* other) const { return true; }
4596 4596
4597 virtual bool MayThrow() const { return false; } 4597 virtual bool MayThrow() const { return false; }
4598 4598
4599 Definition* Canonicalize(FlowGraph* flow_graph); 4599 Definition* Canonicalize(FlowGraph* flow_graph);
4600 4600
4601 private: 4601 private:
4602 DISALLOW_COPY_AND_ASSIGN(BoxUint32x4Instr); 4602 DISALLOW_COPY_AND_ASSIGN(BoxInt32x4Instr);
4603 }; 4603 };
4604 4604
4605 4605
4606 class BoxIntegerInstr : public TemplateDefinition<1> { 4606 class BoxIntegerInstr : public TemplateDefinition<1> {
4607 public: 4607 public:
4608 explicit BoxIntegerInstr(Value* value) { 4608 explicit BoxIntegerInstr(Value* value) {
4609 SetInputAt(0, value); 4609 SetInputAt(0, value);
4610 } 4610 }
4611 4611
4612 Value* value() const { return inputs_[0]; } 4612 Value* value() const { return inputs_[0]; }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
4695 4695
4696 virtual bool MayThrow() const { return false; } 4696 virtual bool MayThrow() const { return false; }
4697 4697
4698 Definition* Canonicalize(FlowGraph* flow_graph); 4698 Definition* Canonicalize(FlowGraph* flow_graph);
4699 4699
4700 private: 4700 private:
4701 DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr); 4701 DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr);
4702 }; 4702 };
4703 4703
4704 4704
4705 class UnboxUint32x4Instr : public TemplateDefinition<1> { 4705 class UnboxInt32x4Instr : public TemplateDefinition<1> {
4706 public: 4706 public:
4707 UnboxUint32x4Instr(Value* value, intptr_t deopt_id) { 4707 UnboxInt32x4Instr(Value* value, intptr_t deopt_id) {
4708 SetInputAt(0, value); 4708 SetInputAt(0, value);
4709 deopt_id_ = deopt_id; 4709 deopt_id_ = deopt_id;
4710 } 4710 }
4711 4711
4712 Value* value() const { return inputs_[0]; } 4712 Value* value() const { return inputs_[0]; }
4713 4713
4714 virtual bool CanDeoptimize() const { 4714 virtual bool CanDeoptimize() const {
4715 return (value()->Type()->ToCid() != kUint32x4Cid); 4715 return (value()->Type()->ToCid() != kInt32x4Cid);
4716 } 4716 }
4717 4717
4718 virtual Representation representation() const { 4718 virtual Representation representation() const {
4719 return kUnboxedUint32x4; 4719 return kUnboxedInt32x4;
4720 } 4720 }
4721 4721
4722 virtual bool AllowsCSE() const { return true; } 4722 virtual bool AllowsCSE() const { return true; }
4723 virtual EffectSet Effects() const { return EffectSet::None(); } 4723 virtual EffectSet Effects() const { return EffectSet::None(); }
4724 virtual EffectSet Dependencies() const { return EffectSet::None(); } 4724 virtual EffectSet Dependencies() const { return EffectSet::None(); }
4725 virtual bool AttributesEqual(Instruction* other) const { return true; } 4725 virtual bool AttributesEqual(Instruction* other) const { return true; }
4726 4726
4727 DECLARE_INSTRUCTION(UnboxUint32x4) 4727 DECLARE_INSTRUCTION(UnboxInt32x4)
4728 virtual CompileType ComputeType() const; 4728 virtual CompileType ComputeType() const;
4729 4729
4730 virtual bool MayThrow() const { return false; } 4730 virtual bool MayThrow() const { return false; }
4731 4731
4732 Definition* Canonicalize(FlowGraph* flow_graph); 4732 Definition* Canonicalize(FlowGraph* flow_graph);
4733 4733
4734 private: 4734 private:
4735 DISALLOW_COPY_AND_ASSIGN(UnboxUint32x4Instr); 4735 DISALLOW_COPY_AND_ASSIGN(UnboxInt32x4Instr);
4736 }; 4736 };
4737 4737
4738 4738
4739 class UnboxIntegerInstr : public TemplateDefinition<1> { 4739 class UnboxIntegerInstr : public TemplateDefinition<1> {
4740 public: 4740 public:
4741 UnboxIntegerInstr(Value* value, intptr_t deopt_id) { 4741 UnboxIntegerInstr(Value* value, intptr_t deopt_id) {
4742 SetInputAt(0, value); 4742 SetInputAt(0, value);
4743 deopt_id_ = deopt_id; 4743 deopt_id_ = deopt_id;
4744 } 4744 }
4745 4745
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
5014 5014
5015 virtual bool CanDeoptimize() const { return false; } 5015 virtual bool CanDeoptimize() const { return false; }
5016 5016
5017 virtual Representation representation() const { 5017 virtual Representation representation() const {
5018 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || 5018 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) ||
5019 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || 5019 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) ||
5020 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || 5020 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) ||
5021 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW)) { 5021 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW)) {
5022 return kUnboxedDouble; 5022 return kUnboxedDouble;
5023 } 5023 }
5024 if ((op_kind_ == MethodRecognizer::kUint32x4Shuffle)) { 5024 if ((op_kind_ == MethodRecognizer::kInt32x4Shuffle)) {
5025 return kUnboxedUint32x4; 5025 return kUnboxedInt32x4;
5026 } 5026 }
5027 ASSERT((op_kind_ == MethodRecognizer::kFloat32x4Shuffle)); 5027 ASSERT((op_kind_ == MethodRecognizer::kFloat32x4Shuffle));
5028 return kUnboxedFloat32x4; 5028 return kUnboxedFloat32x4;
5029 } 5029 }
5030 5030
5031 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5031 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5032 ASSERT(idx == 0); 5032 ASSERT(idx == 0);
5033 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || 5033 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) ||
5034 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || 5034 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) ||
5035 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || 5035 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) ||
5036 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW) || 5036 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW) ||
5037 (op_kind_ == MethodRecognizer::kFloat32x4Shuffle)) { 5037 (op_kind_ == MethodRecognizer::kFloat32x4Shuffle)) {
5038 return kUnboxedFloat32x4; 5038 return kUnboxedFloat32x4;
5039 } 5039 }
5040 ASSERT((op_kind_ == MethodRecognizer::kUint32x4Shuffle)); 5040 ASSERT((op_kind_ == MethodRecognizer::kInt32x4Shuffle));
5041 return kUnboxedUint32x4; 5041 return kUnboxedInt32x4;
5042 } 5042 }
5043 5043
5044 virtual intptr_t DeoptimizationTarget() const { 5044 virtual intptr_t DeoptimizationTarget() const {
5045 // Direct access since this instruction cannot deoptimize, and the deopt-id 5045 // Direct access since this instruction cannot deoptimize, and the deopt-id
5046 // was inherited from another instruction that could deoptimize. 5046 // was inherited from another instruction that could deoptimize.
5047 return deopt_id_; 5047 return deopt_id_;
5048 } 5048 }
5049 5049
5050 DECLARE_INSTRUCTION(Simd32x4Shuffle) 5050 DECLARE_INSTRUCTION(Simd32x4Shuffle)
5051 virtual CompileType ComputeType() const; 5051 virtual CompileType ComputeType() const;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
5083 5083
5084 MethodRecognizer::Kind op_kind() const { return op_kind_; } 5084 MethodRecognizer::Kind op_kind() const { return op_kind_; }
5085 5085
5086 intptr_t mask() const { return mask_; } 5086 intptr_t mask() const { return mask_; }
5087 5087
5088 virtual void PrintOperandsTo(BufferFormatter* f) const; 5088 virtual void PrintOperandsTo(BufferFormatter* f) const;
5089 5089
5090 virtual bool CanDeoptimize() const { return false; } 5090 virtual bool CanDeoptimize() const { return false; }
5091 5091
5092 virtual Representation representation() const { 5092 virtual Representation representation() const {
5093 if (op_kind() == MethodRecognizer::kUint32x4ShuffleMix) { 5093 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) {
5094 return kUnboxedUint32x4; 5094 return kUnboxedInt32x4;
5095 } 5095 }
5096 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); 5096 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix);
5097 return kUnboxedFloat32x4; 5097 return kUnboxedFloat32x4;
5098 } 5098 }
5099 5099
5100 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5100 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5101 ASSERT((idx == 0) || (idx == 1)); 5101 ASSERT((idx == 0) || (idx == 1));
5102 if (op_kind() == MethodRecognizer::kUint32x4ShuffleMix) { 5102 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) {
5103 return kUnboxedUint32x4; 5103 return kUnboxedInt32x4;
5104 } 5104 }
5105 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); 5105 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix);
5106 return kUnboxedFloat32x4; 5106 return kUnboxedFloat32x4;
5107 } 5107 }
5108 5108
5109 virtual intptr_t DeoptimizationTarget() const { 5109 virtual intptr_t DeoptimizationTarget() const {
5110 // Direct access since this instruction cannot deoptimize, and the deopt-id 5110 // Direct access since this instruction cannot deoptimize, and the deopt-id
5111 // was inherited from another instruction that could deoptimize. 5111 // was inherited from another instruction that could deoptimize.
5112 return deopt_id_; 5112 return deopt_id_;
5113 } 5113 }
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
5281 Value* left() const { return inputs_[0]; } 5281 Value* left() const { return inputs_[0]; }
5282 Value* right() const { return inputs_[1]; } 5282 Value* right() const { return inputs_[1]; }
5283 5283
5284 MethodRecognizer::Kind op_kind() const { return op_kind_; } 5284 MethodRecognizer::Kind op_kind() const { return op_kind_; }
5285 5285
5286 virtual void PrintOperandsTo(BufferFormatter* f) const; 5286 virtual void PrintOperandsTo(BufferFormatter* f) const;
5287 5287
5288 virtual bool CanDeoptimize() const { return false; } 5288 virtual bool CanDeoptimize() const { return false; }
5289 5289
5290 virtual Representation representation() const { 5290 virtual Representation representation() const {
5291 return kUnboxedUint32x4; 5291 return kUnboxedInt32x4;
5292 } 5292 }
5293 5293
5294 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5294 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5295 ASSERT((idx == 0) || (idx == 1)); 5295 ASSERT((idx == 0) || (idx == 1));
5296 return kUnboxedFloat32x4; 5296 return kUnboxedFloat32x4;
5297 } 5297 }
5298 5298
5299 virtual intptr_t DeoptimizationTarget() const { 5299 virtual intptr_t DeoptimizationTarget() const {
5300 // Direct access since this instruction cannot deoptimize, and the deopt-id 5300 // Direct access since this instruction cannot deoptimize, and the deopt-id
5301 // was inherited from another instruction that could deoptimize. 5301 // was inherited from another instruction that could deoptimize.
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
5627 5627
5628 virtual bool MayThrow() const { return false; } 5628 virtual bool MayThrow() const { return false; }
5629 5629
5630 private: 5630 private:
5631 const MethodRecognizer::Kind op_kind_; 5631 const MethodRecognizer::Kind op_kind_;
5632 5632
5633 DISALLOW_COPY_AND_ASSIGN(Float32x4WithInstr); 5633 DISALLOW_COPY_AND_ASSIGN(Float32x4WithInstr);
5634 }; 5634 };
5635 5635
5636 5636
5637 class Float32x4ToUint32x4Instr : public TemplateDefinition<1> { 5637 class Float32x4ToInt32x4Instr : public TemplateDefinition<1> {
5638 public: 5638 public:
5639 Float32x4ToUint32x4Instr(Value* left, intptr_t deopt_id) { 5639 Float32x4ToInt32x4Instr(Value* left, intptr_t deopt_id) {
5640 SetInputAt(0, left); 5640 SetInputAt(0, left);
5641 deopt_id_ = deopt_id; 5641 deopt_id_ = deopt_id;
5642 } 5642 }
5643 5643
5644 Value* left() const { return inputs_[0]; } 5644 Value* left() const { return inputs_[0]; }
5645 5645
5646 virtual void PrintOperandsTo(BufferFormatter* f) const; 5646 virtual void PrintOperandsTo(BufferFormatter* f) const;
5647 5647
5648 virtual bool CanDeoptimize() const { return false; } 5648 virtual bool CanDeoptimize() const { return false; }
5649 5649
5650 virtual Representation representation() const { 5650 virtual Representation representation() const {
5651 return kUnboxedUint32x4; 5651 return kUnboxedInt32x4;
5652 } 5652 }
5653 5653
5654 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5654 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5655 ASSERT(idx == 0); 5655 ASSERT(idx == 0);
5656 return kUnboxedFloat32x4; 5656 return kUnboxedFloat32x4;
5657 } 5657 }
5658 5658
5659 virtual intptr_t DeoptimizationTarget() const { 5659 virtual intptr_t DeoptimizationTarget() const {
5660 // Direct access since this instruction cannot deoptimize, and the deopt-id 5660 // Direct access since this instruction cannot deoptimize, and the deopt-id
5661 // was inherited from another instruction that could deoptimize. 5661 // was inherited from another instruction that could deoptimize.
5662 return deopt_id_; 5662 return deopt_id_;
5663 } 5663 }
5664 5664
5665 DECLARE_INSTRUCTION(Float32x4ToUint32x4) 5665 DECLARE_INSTRUCTION(Float32x4ToInt32x4)
5666 virtual CompileType ComputeType() const; 5666 virtual CompileType ComputeType() const;
5667 5667
5668 virtual bool AllowsCSE() const { return true; } 5668 virtual bool AllowsCSE() const { return true; }
5669 virtual EffectSet Effects() const { return EffectSet::None(); } 5669 virtual EffectSet Effects() const { return EffectSet::None(); }
5670 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5670 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5671 virtual bool AttributesEqual(Instruction* other) const { return true; } 5671 virtual bool AttributesEqual(Instruction* other) const { return true; }
5672 5672
5673 virtual bool MayThrow() const { return false; } 5673 virtual bool MayThrow() const { return false; }
5674 5674
5675 private: 5675 private:
5676 DISALLOW_COPY_AND_ASSIGN(Float32x4ToUint32x4Instr); 5676 DISALLOW_COPY_AND_ASSIGN(Float32x4ToInt32x4Instr);
5677 }; 5677 };
5678 5678
5679 5679
5680 class Uint32x4BoolConstructorInstr : public TemplateDefinition<4> { 5680 class Int32x4BoolConstructorInstr : public TemplateDefinition<4> {
5681 public: 5681 public:
5682 Uint32x4BoolConstructorInstr(Value* value0, Value* value1, Value* value2, 5682 Int32x4BoolConstructorInstr(Value* value0, Value* value1, Value* value2,
5683 Value* value3, intptr_t deopt_id) { 5683 Value* value3, intptr_t deopt_id) {
5684 SetInputAt(0, value0); 5684 SetInputAt(0, value0);
5685 SetInputAt(1, value1); 5685 SetInputAt(1, value1);
5686 SetInputAt(2, value2); 5686 SetInputAt(2, value2);
5687 SetInputAt(3, value3); 5687 SetInputAt(3, value3);
5688 deopt_id_ = deopt_id; 5688 deopt_id_ = deopt_id;
5689 } 5689 }
5690 5690
5691 Value* value0() const { return inputs_[0]; } 5691 Value* value0() const { return inputs_[0]; }
5692 Value* value1() const { return inputs_[1]; } 5692 Value* value1() const { return inputs_[1]; }
5693 Value* value2() const { return inputs_[2]; } 5693 Value* value2() const { return inputs_[2]; }
5694 Value* value3() const { return inputs_[3]; } 5694 Value* value3() const { return inputs_[3]; }
5695 5695
5696 virtual void PrintOperandsTo(BufferFormatter* f) const; 5696 virtual void PrintOperandsTo(BufferFormatter* f) const;
5697 5697
5698 virtual bool CanDeoptimize() const { return false; } 5698 virtual bool CanDeoptimize() const { return false; }
5699 5699
5700 virtual Representation representation() const { 5700 virtual Representation representation() const {
5701 return kUnboxedUint32x4; 5701 return kUnboxedInt32x4;
5702 } 5702 }
5703 5703
5704 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5704 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5705 ASSERT(idx >= 0 && idx < 4); 5705 ASSERT(idx >= 0 && idx < 4);
5706 return kTagged; 5706 return kTagged;
5707 } 5707 }
5708 5708
5709 virtual intptr_t DeoptimizationTarget() const { 5709 virtual intptr_t DeoptimizationTarget() const {
5710 // Direct access since this instruction cannot deoptimize, and the deopt-id 5710 // Direct access since this instruction cannot deoptimize, and the deopt-id
5711 // was inherited from another instruction that could deoptimize. 5711 // was inherited from another instruction that could deoptimize.
5712 return deopt_id_; 5712 return deopt_id_;
5713 } 5713 }
5714 5714
5715 DECLARE_INSTRUCTION(Uint32x4BoolConstructor) 5715 DECLARE_INSTRUCTION(Int32x4BoolConstructor)
5716 virtual CompileType ComputeType() const; 5716 virtual CompileType ComputeType() const;
5717 5717
5718 virtual bool AllowsCSE() const { return true; } 5718 virtual bool AllowsCSE() const { return true; }
5719 virtual EffectSet Effects() const { return EffectSet::None(); } 5719 virtual EffectSet Effects() const { return EffectSet::None(); }
5720 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5720 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5721 virtual bool AttributesEqual(Instruction* other) const { return true; } 5721 virtual bool AttributesEqual(Instruction* other) const { return true; }
5722 5722
5723 virtual bool MayThrow() const { return false; } 5723 virtual bool MayThrow() const { return false; }
5724 5724
5725 private: 5725 private:
5726 DISALLOW_COPY_AND_ASSIGN(Uint32x4BoolConstructorInstr); 5726 DISALLOW_COPY_AND_ASSIGN(Int32x4BoolConstructorInstr);
5727 }; 5727 };
5728 5728
5729 5729
5730 class Uint32x4GetFlagInstr : public TemplateDefinition<1> { 5730 class Int32x4GetFlagInstr : public TemplateDefinition<1> {
5731 public: 5731 public:
5732 Uint32x4GetFlagInstr(MethodRecognizer::Kind op_kind, Value* value, 5732 Int32x4GetFlagInstr(MethodRecognizer::Kind op_kind, Value* value,
5733 intptr_t deopt_id) 5733 intptr_t deopt_id)
5734 : op_kind_(op_kind) { 5734 : op_kind_(op_kind) {
5735 SetInputAt(0, value); 5735 SetInputAt(0, value);
5736 deopt_id_ = deopt_id; 5736 deopt_id_ = deopt_id;
5737 } 5737 }
5738 5738
5739 Value* value() const { return inputs_[0]; } 5739 Value* value() const { return inputs_[0]; }
5740 5740
5741 MethodRecognizer::Kind op_kind() const { return op_kind_; } 5741 MethodRecognizer::Kind op_kind() const { return op_kind_; }
5742 5742
5743 virtual void PrintOperandsTo(BufferFormatter* f) const; 5743 virtual void PrintOperandsTo(BufferFormatter* f) const;
5744 5744
5745 virtual bool CanDeoptimize() const { return false; } 5745 virtual bool CanDeoptimize() const { return false; }
5746 5746
5747 virtual Representation representation() const { 5747 virtual Representation representation() const {
5748 return kTagged; 5748 return kTagged;
5749 } 5749 }
5750 5750
5751 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5751 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5752 ASSERT(idx == 0); 5752 ASSERT(idx == 0);
5753 return kUnboxedUint32x4; 5753 return kUnboxedInt32x4;
5754 } 5754 }
5755 5755
5756 virtual intptr_t DeoptimizationTarget() const { 5756 virtual intptr_t DeoptimizationTarget() const {
5757 // Direct access since this instruction cannot deoptimize, and the deopt-id 5757 // Direct access since this instruction cannot deoptimize, and the deopt-id
5758 // was inherited from another instruction that could deoptimize. 5758 // was inherited from another instruction that could deoptimize.
5759 return deopt_id_; 5759 return deopt_id_;
5760 } 5760 }
5761 5761
5762 DECLARE_INSTRUCTION(Uint32x4GetFlag) 5762 DECLARE_INSTRUCTION(Int32x4GetFlag)
5763 virtual CompileType ComputeType() const; 5763 virtual CompileType ComputeType() const;
5764 5764
5765 virtual bool AllowsCSE() const { return true; } 5765 virtual bool AllowsCSE() const { return true; }
5766 virtual EffectSet Effects() const { return EffectSet::None(); } 5766 virtual EffectSet Effects() const { return EffectSet::None(); }
5767 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5767 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5768 virtual bool AttributesEqual(Instruction* other) const { 5768 virtual bool AttributesEqual(Instruction* other) const {
5769 return op_kind() == other->AsUint32x4GetFlag()->op_kind(); 5769 return op_kind() == other->AsInt32x4GetFlag()->op_kind();
5770 } 5770 }
5771 5771
5772 virtual bool MayThrow() const { return false; } 5772 virtual bool MayThrow() const { return false; }
5773 5773
5774 private: 5774 private:
5775 const MethodRecognizer::Kind op_kind_; 5775 const MethodRecognizer::Kind op_kind_;
5776 5776
5777 DISALLOW_COPY_AND_ASSIGN(Uint32x4GetFlagInstr); 5777 DISALLOW_COPY_AND_ASSIGN(Int32x4GetFlagInstr);
5778 }; 5778 };
5779 5779
5780 5780
5781 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1> { 5781 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1> {
5782 public: 5782 public:
5783 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, Value* value, 5783 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, Value* value,
5784 intptr_t deopt_id) : op_kind_(op_kind) { 5784 intptr_t deopt_id) : op_kind_(op_kind) {
5785 SetInputAt(0, value); 5785 SetInputAt(0, value);
5786 deopt_id_ = deopt_id; 5786 deopt_id_ = deopt_id;
5787 } 5787 }
5788 5788
5789 Value* value() const { return inputs_[0]; } 5789 Value* value() const { return inputs_[0]; }
5790 5790
5791 MethodRecognizer::Kind op_kind() const { return op_kind_; } 5791 MethodRecognizer::Kind op_kind() const { return op_kind_; }
5792 5792
5793 virtual void PrintOperandsTo(BufferFormatter* f) const; 5793 virtual void PrintOperandsTo(BufferFormatter* f) const;
5794 5794
5795 virtual bool CanDeoptimize() const { return false; } 5795 virtual bool CanDeoptimize() const { return false; }
5796 5796
5797 virtual Representation representation() const { 5797 virtual Representation representation() const {
5798 return kTagged; 5798 return kTagged;
5799 } 5799 }
5800 5800
5801 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5801 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5802 ASSERT(idx == 0); 5802 ASSERT(idx == 0);
5803 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) { 5803 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) {
5804 return kUnboxedFloat32x4; 5804 return kUnboxedFloat32x4;
5805 } 5805 }
5806 ASSERT(op_kind_ == MethodRecognizer::kUint32x4GetSignMask); 5806 ASSERT(op_kind_ == MethodRecognizer::kInt32x4GetSignMask);
5807 return kUnboxedUint32x4; 5807 return kUnboxedInt32x4;
5808 } 5808 }
5809 5809
5810 virtual intptr_t DeoptimizationTarget() const { 5810 virtual intptr_t DeoptimizationTarget() const {
5811 // Direct access since this instruction cannot deoptimize, and the deopt-id 5811 // Direct access since this instruction cannot deoptimize, and the deopt-id
5812 // was inherited from another instruction that could deoptimize. 5812 // was inherited from another instruction that could deoptimize.
5813 return deopt_id_; 5813 return deopt_id_;
5814 } 5814 }
5815 5815
5816 DECLARE_INSTRUCTION(Simd32x4GetSignMask) 5816 DECLARE_INSTRUCTION(Simd32x4GetSignMask)
5817 virtual CompileType ComputeType() const; 5817 virtual CompileType ComputeType() const;
5818 5818
5819 virtual bool AllowsCSE() const { return true; } 5819 virtual bool AllowsCSE() const { return true; }
5820 virtual EffectSet Effects() const { return EffectSet::None(); } 5820 virtual EffectSet Effects() const { return EffectSet::None(); }
5821 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5821 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5822 virtual bool AttributesEqual(Instruction* other) const { 5822 virtual bool AttributesEqual(Instruction* other) const {
5823 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind(); 5823 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind();
5824 } 5824 }
5825 5825
5826 virtual bool MayThrow() const { return false; } 5826 virtual bool MayThrow() const { return false; }
5827 5827
5828 private: 5828 private:
5829 const MethodRecognizer::Kind op_kind_; 5829 const MethodRecognizer::Kind op_kind_;
5830 5830
5831 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr); 5831 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr);
5832 }; 5832 };
5833 5833
5834 5834
5835 class Uint32x4SelectInstr : public TemplateDefinition<3> { 5835 class Int32x4SelectInstr : public TemplateDefinition<3> {
5836 public: 5836 public:
5837 Uint32x4SelectInstr(Value* mask, Value* trueValue, Value* falseValue, 5837 Int32x4SelectInstr(Value* mask, Value* trueValue, Value* falseValue,
5838 intptr_t deopt_id) { 5838 intptr_t deopt_id) {
5839 SetInputAt(0, mask); 5839 SetInputAt(0, mask);
5840 SetInputAt(1, trueValue); 5840 SetInputAt(1, trueValue);
5841 SetInputAt(2, falseValue); 5841 SetInputAt(2, falseValue);
5842 deopt_id_ = deopt_id; 5842 deopt_id_ = deopt_id;
5843 } 5843 }
5844 5844
5845 Value* mask() const { return inputs_[0]; } 5845 Value* mask() const { return inputs_[0]; }
5846 Value* trueValue() const { return inputs_[1]; } 5846 Value* trueValue() const { return inputs_[1]; }
5847 Value* falseValue() const { return inputs_[2]; } 5847 Value* falseValue() const { return inputs_[2]; }
5848 5848
5849 virtual void PrintOperandsTo(BufferFormatter* f) const; 5849 virtual void PrintOperandsTo(BufferFormatter* f) const;
5850 5850
5851 virtual bool CanDeoptimize() const { return false; } 5851 virtual bool CanDeoptimize() const { return false; }
5852 5852
5853 virtual Representation representation() const { 5853 virtual Representation representation() const {
5854 return kUnboxedFloat32x4; 5854 return kUnboxedFloat32x4;
5855 } 5855 }
5856 5856
5857 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5857 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5858 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); 5858 ASSERT((idx == 0) || (idx == 1) || (idx == 2));
5859 if (idx == 0) { 5859 if (idx == 0) {
5860 return kUnboxedUint32x4; 5860 return kUnboxedInt32x4;
5861 } 5861 }
5862 return kUnboxedFloat32x4; 5862 return kUnboxedFloat32x4;
5863 } 5863 }
5864 5864
5865 virtual intptr_t DeoptimizationTarget() const { 5865 virtual intptr_t DeoptimizationTarget() const {
5866 // Direct access since this instruction cannot deoptimize, and the deopt-id 5866 // Direct access since this instruction cannot deoptimize, and the deopt-id
5867 // was inherited from another instruction that could deoptimize. 5867 // was inherited from another instruction that could deoptimize.
5868 return deopt_id_; 5868 return deopt_id_;
5869 } 5869 }
5870 5870
5871 DECLARE_INSTRUCTION(Uint32x4Select) 5871 DECLARE_INSTRUCTION(Int32x4Select)
5872 virtual CompileType ComputeType() const; 5872 virtual CompileType ComputeType() const;
5873 5873
5874 virtual bool AllowsCSE() const { return true; } 5874 virtual bool AllowsCSE() const { return true; }
5875 virtual EffectSet Effects() const { return EffectSet::None(); } 5875 virtual EffectSet Effects() const { return EffectSet::None(); }
5876 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5876 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5877 virtual bool AttributesEqual(Instruction* other) const { return true; } 5877 virtual bool AttributesEqual(Instruction* other) const { return true; }
5878 5878
5879 virtual bool MayThrow() const { return false; } 5879 virtual bool MayThrow() const { return false; }
5880 5880
5881 private: 5881 private:
5882 DISALLOW_COPY_AND_ASSIGN(Uint32x4SelectInstr); 5882 DISALLOW_COPY_AND_ASSIGN(Int32x4SelectInstr);
5883 }; 5883 };
5884 5884
5885 5885
5886 class Uint32x4SetFlagInstr : public TemplateDefinition<2> { 5886 class Int32x4SetFlagInstr : public TemplateDefinition<2> {
5887 public: 5887 public:
5888 Uint32x4SetFlagInstr(MethodRecognizer::Kind op_kind, Value* value, 5888 Int32x4SetFlagInstr(MethodRecognizer::Kind op_kind, Value* value,
5889 Value* flagValue, intptr_t deopt_id) 5889 Value* flagValue, intptr_t deopt_id)
5890 : op_kind_(op_kind) { 5890 : op_kind_(op_kind) {
5891 SetInputAt(0, value); 5891 SetInputAt(0, value);
5892 SetInputAt(1, flagValue); 5892 SetInputAt(1, flagValue);
5893 deopt_id_ = deopt_id; 5893 deopt_id_ = deopt_id;
5894 } 5894 }
5895 5895
5896 Value* value() const { return inputs_[0]; } 5896 Value* value() const { return inputs_[0]; }
5897 Value* flagValue() const { return inputs_[1]; } 5897 Value* flagValue() const { return inputs_[1]; }
5898 5898
5899 MethodRecognizer::Kind op_kind() const { return op_kind_; } 5899 MethodRecognizer::Kind op_kind() const { return op_kind_; }
5900 5900
5901 virtual void PrintOperandsTo(BufferFormatter* f) const; 5901 virtual void PrintOperandsTo(BufferFormatter* f) const;
5902 5902
5903 virtual bool CanDeoptimize() const { return false; } 5903 virtual bool CanDeoptimize() const { return false; }
5904 5904
5905 virtual Representation representation() const { 5905 virtual Representation representation() const {
5906 return kUnboxedUint32x4; 5906 return kUnboxedInt32x4;
5907 } 5907 }
5908 5908
5909 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5909 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5910 ASSERT((idx == 0) || (idx == 1)); 5910 ASSERT((idx == 0) || (idx == 1));
5911 if (idx == 1) { 5911 if (idx == 1) {
5912 return kTagged; 5912 return kTagged;
5913 } 5913 }
5914 return kUnboxedUint32x4; 5914 return kUnboxedInt32x4;
5915 } 5915 }
5916 5916
5917 virtual intptr_t DeoptimizationTarget() const { 5917 virtual intptr_t DeoptimizationTarget() const {
5918 // Direct access since this instruction cannot deoptimize, and the deopt-id 5918 // Direct access since this instruction cannot deoptimize, and the deopt-id
5919 // was inherited from another instruction that could deoptimize. 5919 // was inherited from another instruction that could deoptimize.
5920 return deopt_id_; 5920 return deopt_id_;
5921 } 5921 }
5922 5922
5923 DECLARE_INSTRUCTION(Uint32x4SetFlag) 5923 DECLARE_INSTRUCTION(Int32x4SetFlag)
5924 virtual CompileType ComputeType() const; 5924 virtual CompileType ComputeType() const;
5925 5925
5926 virtual bool AllowsCSE() const { return true; } 5926 virtual bool AllowsCSE() const { return true; }
5927 virtual EffectSet Effects() const { return EffectSet::None(); } 5927 virtual EffectSet Effects() const { return EffectSet::None(); }
5928 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5928 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5929 virtual bool AttributesEqual(Instruction* other) const { 5929 virtual bool AttributesEqual(Instruction* other) const {
5930 return op_kind() == other->AsUint32x4SetFlag()->op_kind(); 5930 return op_kind() == other->AsInt32x4SetFlag()->op_kind();
5931 } 5931 }
5932 5932
5933 virtual bool MayThrow() const { return false; } 5933 virtual bool MayThrow() const { return false; }
5934 5934
5935 private: 5935 private:
5936 const MethodRecognizer::Kind op_kind_; 5936 const MethodRecognizer::Kind op_kind_;
5937 5937
5938 DISALLOW_COPY_AND_ASSIGN(Uint32x4SetFlagInstr); 5938 DISALLOW_COPY_AND_ASSIGN(Int32x4SetFlagInstr);
5939 }; 5939 };
5940 5940
5941 5941
5942 class Uint32x4ToFloat32x4Instr : public TemplateDefinition<1> { 5942 class Int32x4ToFloat32x4Instr : public TemplateDefinition<1> {
5943 public: 5943 public:
5944 Uint32x4ToFloat32x4Instr(Value* left, intptr_t deopt_id) { 5944 Int32x4ToFloat32x4Instr(Value* left, intptr_t deopt_id) {
5945 SetInputAt(0, left); 5945 SetInputAt(0, left);
5946 deopt_id_ = deopt_id; 5946 deopt_id_ = deopt_id;
5947 } 5947 }
5948 5948
5949 Value* left() const { return inputs_[0]; } 5949 Value* left() const { return inputs_[0]; }
5950 5950
5951 virtual void PrintOperandsTo(BufferFormatter* f) const; 5951 virtual void PrintOperandsTo(BufferFormatter* f) const;
5952 5952
5953 virtual bool CanDeoptimize() const { return false; } 5953 virtual bool CanDeoptimize() const { return false; }
5954 5954
5955 virtual Representation representation() const { 5955 virtual Representation representation() const {
5956 return kUnboxedFloat32x4; 5956 return kUnboxedFloat32x4;
5957 } 5957 }
5958 5958
5959 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 5959 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
5960 ASSERT(idx == 0); 5960 ASSERT(idx == 0);
5961 return kUnboxedUint32x4; 5961 return kUnboxedInt32x4;
5962 } 5962 }
5963 5963
5964 virtual intptr_t DeoptimizationTarget() const { 5964 virtual intptr_t DeoptimizationTarget() const {
5965 // Direct access since this instruction cannot deoptimize, and the deopt-id 5965 // Direct access since this instruction cannot deoptimize, and the deopt-id
5966 // was inherited from another instruction that could deoptimize. 5966 // was inherited from another instruction that could deoptimize.
5967 return deopt_id_; 5967 return deopt_id_;
5968 } 5968 }
5969 5969
5970 DECLARE_INSTRUCTION(Uint32x4ToFloat32x4) 5970 DECLARE_INSTRUCTION(Int32x4ToFloat32x4)
5971 virtual CompileType ComputeType() const; 5971 virtual CompileType ComputeType() const;
5972 5972
5973 virtual bool AllowsCSE() const { return true; } 5973 virtual bool AllowsCSE() const { return true; }
5974 virtual EffectSet Effects() const { return EffectSet::None(); } 5974 virtual EffectSet Effects() const { return EffectSet::None(); }
5975 virtual EffectSet Dependencies() const { return EffectSet::None(); } 5975 virtual EffectSet Dependencies() const { return EffectSet::None(); }
5976 virtual bool AttributesEqual(Instruction* other) const { return true; } 5976 virtual bool AttributesEqual(Instruction* other) const { return true; }
5977 5977
5978 virtual bool MayThrow() const { return false; } 5978 virtual bool MayThrow() const { return false; }
5979 5979
5980 private: 5980 private:
5981 DISALLOW_COPY_AND_ASSIGN(Uint32x4ToFloat32x4Instr); 5981 DISALLOW_COPY_AND_ASSIGN(Int32x4ToFloat32x4Instr);
5982 }; 5982 };
5983 5983
5984 5984
5985 class BinaryUint32x4OpInstr : public TemplateDefinition<2> { 5985 class BinaryInt32x4OpInstr : public TemplateDefinition<2> {
5986 public: 5986 public:
5987 BinaryUint32x4OpInstr(Token::Kind op_kind, 5987 BinaryInt32x4OpInstr(Token::Kind op_kind,
5988 Value* left, 5988 Value* left,
5989 Value* right, 5989 Value* right,
5990 intptr_t deopt_id) 5990 intptr_t deopt_id)
5991 : op_kind_(op_kind) { 5991 : op_kind_(op_kind) {
5992 SetInputAt(0, left); 5992 SetInputAt(0, left);
5993 SetInputAt(1, right); 5993 SetInputAt(1, right);
5994 deopt_id_ = deopt_id; 5994 deopt_id_ = deopt_id;
5995 } 5995 }
5996 5996
5997 Value* left() const { return inputs_[0]; } 5997 Value* left() const { return inputs_[0]; }
5998 Value* right() const { return inputs_[1]; } 5998 Value* right() const { return inputs_[1]; }
5999 5999
6000 Token::Kind op_kind() const { return op_kind_; } 6000 Token::Kind op_kind() const { return op_kind_; }
6001 6001
6002 virtual void PrintOperandsTo(BufferFormatter* f) const; 6002 virtual void PrintOperandsTo(BufferFormatter* f) const;
6003 6003
6004 virtual bool CanDeoptimize() const { return false; } 6004 virtual bool CanDeoptimize() const { return false; }
6005 6005
6006 virtual Representation representation() const { 6006 virtual Representation representation() const {
6007 return kUnboxedUint32x4; 6007 return kUnboxedInt32x4;
6008 } 6008 }
6009 6009
6010 virtual Representation RequiredInputRepresentation(intptr_t idx) const { 6010 virtual Representation RequiredInputRepresentation(intptr_t idx) const {
6011 ASSERT((idx == 0) || (idx == 1)); 6011 ASSERT((idx == 0) || (idx == 1));
6012 return kUnboxedUint32x4; 6012 return kUnboxedInt32x4;
6013 } 6013 }
6014 6014
6015 virtual intptr_t DeoptimizationTarget() const { 6015 virtual intptr_t DeoptimizationTarget() const {
6016 // Direct access since this instruction cannot deoptimize, and the deopt-id 6016 // Direct access since this instruction cannot deoptimize, and the deopt-id
6017 // was inherited from another instruction that could deoptimize. 6017 // was inherited from another instruction that could deoptimize.
6018 return deopt_id_; 6018 return deopt_id_;
6019 } 6019 }
6020 6020
6021 DECLARE_INSTRUCTION(BinaryUint32x4Op) 6021 DECLARE_INSTRUCTION(BinaryInt32x4Op)
6022 virtual CompileType ComputeType() const; 6022 virtual CompileType ComputeType() const;
6023 6023
6024 virtual bool AllowsCSE() const { return true; } 6024 virtual bool AllowsCSE() const { return true; }
6025 virtual EffectSet Effects() const { return EffectSet::None(); } 6025 virtual EffectSet Effects() const { return EffectSet::None(); }
6026 virtual EffectSet Dependencies() const { return EffectSet::None(); } 6026 virtual EffectSet Dependencies() const { return EffectSet::None(); }
6027 virtual bool AttributesEqual(Instruction* other) const { 6027 virtual bool AttributesEqual(Instruction* other) const {
6028 return op_kind() == other->AsBinaryUint32x4Op()->op_kind(); 6028 return op_kind() == other->AsBinaryInt32x4Op()->op_kind();
6029 } 6029 }
6030 6030
6031 virtual bool MayThrow() const { return false; } 6031 virtual bool MayThrow() const { return false; }
6032 6032
6033 private: 6033 private:
6034 const Token::Kind op_kind_; 6034 const Token::Kind op_kind_;
6035 6035
6036 DISALLOW_COPY_AND_ASSIGN(BinaryUint32x4OpInstr); 6036 DISALLOW_COPY_AND_ASSIGN(BinaryInt32x4OpInstr);
6037 }; 6037 };
6038 6038
6039 class BinaryMintOpInstr : public TemplateDefinition<2> { 6039 class BinaryMintOpInstr : public TemplateDefinition<2> {
6040 public: 6040 public:
6041 BinaryMintOpInstr(Token::Kind op_kind, 6041 BinaryMintOpInstr(Token::Kind op_kind,
6042 Value* left, 6042 Value* left,
6043 Value* right, 6043 Value* right,
6044 intptr_t deopt_id) 6044 intptr_t deopt_id)
6045 : op_kind_(op_kind) { 6045 : op_kind_(op_kind) {
6046 SetInputAt(0, left); 6046 SetInputAt(0, left);
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
6928 ForwardInstructionIterator* current_iterator_; 6928 ForwardInstructionIterator* current_iterator_;
6929 6929
6930 private: 6930 private:
6931 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6931 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6932 }; 6932 };
6933 6933
6934 6934
6935 } // namespace dart 6935 } // namespace dart
6936 6936
6937 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6937 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « dart/runtime/vm/il_printer.cc ('k') | dart/runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698