| OLD | NEW |
| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 V(_TypedList, get:length, TypedDataLength, 26616328) \ | 47 V(_TypedList, get:length, TypedDataLength, 26616328) \ |
| 48 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ | 48 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ |
| 49 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ | 49 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ |
| 50 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ | 50 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ |
| 51 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ | 51 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ |
| 52 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ | 52 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ |
| 53 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ | 53 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ |
| 54 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ | 54 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ |
| 55 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ | 55 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ |
| 56 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ | 56 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ |
| 57 V(_TypedList, _getUint32x4, ByteArrayBaseGetUint32x4, 1499091330) \ | 57 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \ |
| 58 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1443265945) \ | 58 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1443265945) \ |
| 59 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \ | 59 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \ |
| 60 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \ | 60 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \ |
| 61 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \ | 61 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \ |
| 62 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \ | 62 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \ |
| 63 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \ | 63 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \ |
| 64 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \ | 64 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \ |
| 65 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \ | 65 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \ |
| 66 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \ | 66 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \ |
| 67 V(_TypedList, _setUint32x4, ByteArrayBaseSetUint32x4, 691480480) \ | 67 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 1871750680) \ |
| 68 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ | 68 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ |
| 69 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817090003) \ | 69 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817090003) \ |
| 70 V(_GrowableList, _setData, GrowableArraySetData, 1375509957) \ | 70 V(_GrowableList, _setData, GrowableArraySetData, 1375509957) \ |
| 71 V(_GrowableList, _setLength, GrowableArraySetLength, 1227678442) \ | 71 V(_GrowableList, _setLength, GrowableArraySetLength, 1227678442) \ |
| 72 V(_StringBase, get:length, StringBaseLength, 1483520063) \ | 72 V(_StringBase, get:length, StringBaseLength, 1483520063) \ |
| 73 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \ | 73 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \ |
| 74 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \ | 74 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \ |
| 75 V(_StringBase, [], StringBaseCharAt, 990046076) \ | 75 V(_StringBase, [], StringBaseCharAt, 990046076) \ |
| 76 V(_StringBase, _interpolate, StringBaseInterpolate, 1824308855) \ | 76 V(_StringBase, _interpolate, StringBaseInterpolate, 1824308855) \ |
| 77 V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \ | 77 V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \ |
| 78 V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \ | 78 V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \ |
| 79 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \ | 79 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \ |
| 80 2095943661) \ | 80 2095943661) \ |
| 81 V(_Double, toInt, DoubleToInteger, 1328149975) \ | 81 V(_Double, toInt, DoubleToInteger, 1328149975) \ |
| 82 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \ | 82 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \ |
| 83 V(_Double, roundToDouble, DoubleRound, 622146406) \ | 83 V(_Double, roundToDouble, DoubleRound, 622146406) \ |
| 84 V(_Double, floorToDouble, DoubleFloor, 1614014643) \ | 84 V(_Double, floorToDouble, DoubleFloor, 1614014643) \ |
| 85 V(_Double, ceilToDouble, DoubleCeil, 277859570) \ | 85 V(_Double, ceilToDouble, DoubleCeil, 277859570) \ |
| 86 V(_Double, _modulo, DoubleMod, 1443289156) \ | 86 V(_Double, _modulo, DoubleMod, 1443289156) \ |
| 87 V(::, sqrt, MathSqrt, 465520247) \ | 87 V(::, sqrt, MathSqrt, 465520247) \ |
| 88 V(::, sin, MathSin, 730107143) \ | 88 V(::, sin, MathSin, 730107143) \ |
| 89 V(::, cos, MathCos, 1282146521) \ | 89 V(::, cos, MathCos, 1282146521) \ |
| 90 V(::, min, MathMin, 1830216388) \ | 90 V(::, min, MathMin, 1830216388) \ |
| 91 V(::, max, MathMax, 234565686) \ | 91 V(::, max, MathMax, 234565686) \ |
| 92 V(::, _doublePow, MathDoublePow, 1728171041) \ | 92 V(::, _doublePow, MathDoublePow, 1728171041) \ |
| 93 V(Float32x4, Float32x4., Float32x4Constructor, 786169160) \ | 93 V(Float32x4, Float32x4., Float32x4Constructor, 786169160) \ |
| 94 V(Float32x4, Float32x4.zero, Float32x4Zero, 1589383280) \ | 94 V(Float32x4, Float32x4.zero, Float32x4Zero, 1589383280) \ |
| 95 V(Float32x4, Float32x4.splat, Float32x4Splat, 62513275) \ | 95 V(Float32x4, Float32x4.splat, Float32x4Splat, 62513275) \ |
| 96 V(Float32x4, Float32x4.fromUint32x4Bits, Float32x4FromUint32x4Bits, \ | 96 V(Float32x4, Float32x4.fromInt32x4Bits, Float32x4FromInt32x4Bits, \ |
| 97 770033146) \ | 97 1933861675) \ |
| 98 V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \ | 98 V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \ |
| 99 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 927956119) \ | 99 V(_Float32x4, shuffleMix, Float32x4ShuffleMix, 927956119) \ |
| 100 V(_Float32x4, get:x, Float32x4ShuffleX, 1351717838) \ | 100 V(_Float32x4, get:x, Float32x4ShuffleX, 1351717838) \ |
| 101 V(_Float32x4, get:y, Float32x4ShuffleY, 217386410) \ | 101 V(_Float32x4, get:y, Float32x4ShuffleY, 217386410) \ |
| 102 V(_Float32x4, get:z, Float32x4ShuffleZ, 2144923721) \ | 102 V(_Float32x4, get:z, Float32x4ShuffleZ, 2144923721) \ |
| 103 V(_Float32x4, get:w, Float32x4ShuffleW, 1447699119) \ | 103 V(_Float32x4, get:w, Float32x4ShuffleW, 1447699119) \ |
| 104 V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198849347) \ | 104 V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198849347) \ |
| 105 V(_Float32x4, _cmpequal, Float32x4Equal, 2141256163) \ | 105 V(_Float32x4, _cmpequal, Float32x4Equal, 1944929844) \ |
| 106 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 696292270) \ | 106 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 499965951) \ |
| 107 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1199333164) \ | 107 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1003006845) \ |
| 108 V(_Float32x4, _cmplt, Float32x4LessThan, 943396590) \ | 108 V(_Float32x4, _cmplt, Float32x4LessThan, 747070271) \ |
| 109 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 57211241) \ | 109 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 2008368570) \ |
| 110 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1234888884) \ | 110 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1038562565) \ |
| 111 V(_Float32x4, _min, Float32x4Min, 1166664658) \ | 111 V(_Float32x4, _min, Float32x4Min, 1166664658) \ |
| 112 V(_Float32x4, _max, Float32x4Max, 343968921) \ | 112 V(_Float32x4, _max, Float32x4Max, 343968921) \ |
| 113 V(_Float32x4, _scale, Float32x4Scale, 803505531) \ | 113 V(_Float32x4, _scale, Float32x4Scale, 803505531) \ |
| 114 V(_Float32x4, _sqrt, Float32x4Sqrt, 2092250151) \ | 114 V(_Float32x4, _sqrt, Float32x4Sqrt, 2092250151) \ |
| 115 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 965252704) \ | 115 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 965252704) \ |
| 116 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1262202915) \ | 116 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1262202915) \ |
| 117 V(_Float32x4, _negate, Float32x4Negate, 1203192635) \ | 117 V(_Float32x4, _negate, Float32x4Negate, 1203192635) \ |
| 118 V(_Float32x4, _abs, Float32x4Absolute, 386324188) \ | 118 V(_Float32x4, _abs, Float32x4Absolute, 386324188) \ |
| 119 V(_Float32x4, _clamp, Float32x4Clamp, 1454612345) \ | 119 V(_Float32x4, _clamp, Float32x4Clamp, 1454612345) \ |
| 120 V(_Float32x4, withX, Float32x4WithX, 795284225) \ | 120 V(_Float32x4, withX, Float32x4WithX, 795284225) \ |
| 121 V(_Float32x4, withY, Float32x4WithY, 1806065938) \ | 121 V(_Float32x4, withY, Float32x4WithY, 1806065938) \ |
| 122 V(_Float32x4, withZ, Float32x4WithZ, 320659034) \ | 122 V(_Float32x4, withZ, Float32x4WithZ, 320659034) \ |
| 123 V(_Float32x4, withW, Float32x4WithW, 1108437255) \ | 123 V(_Float32x4, withW, Float32x4WithW, 1108437255) \ |
| 124 V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 517444095) \ | 124 V(Int32x4, Int32x4.bool, Int32x4BoolConstructor, 1477593884) \ |
| 125 V(Uint32x4, Uint32x4.fromFloat32x4Bits, Uint32x4FromFloat32x4Bits, \ | 125 V(Int32x4, Int32x4.fromFloat32x4Bits, Int32x4FromFloat32x4Bits, \ |
| 126 1080034855) \ | 126 1955567428) \ |
| 127 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 1674696792) \ | 127 V(_Int32x4, get:flagX, Int32x4GetFlagX, 729235803) \ |
| 128 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013200152) \ | 128 V(_Int32x4, get:flagY, Int32x4GetFlagY, 430840849) \ |
| 129 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944733935) \ | 129 V(_Int32x4, get:flagZ, Int32x4GetFlagZ, 1981076496) \ |
| 130 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22746169) \ | 130 V(_Int32x4, get:flagW, Int32x4GetFlagW, 629356099) \ |
| 131 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858144083) \ | 131 V(_Int32x4, get:signMask, Int32x4GetSignMask, 1598787746) \ |
| 132 V(_Uint32x4, shuffle, Uint32x4Shuffle, 146209630) \ | 132 V(_Int32x4, shuffle, Int32x4Shuffle, 599391160) \ |
| 133 V(_Uint32x4, shuffleMix, Uint32x4ShuffleMix, 1251494596) \ | 133 V(_Int32x4, shuffleMix, Int32x4ShuffleMix, 1491641197) \ |
| 134 V(_Uint32x4, select, Uint32x4Select, 72244182) \ | 134 V(_Int32x4, select, Int32x4Select, 598942806) \ |
| 135 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \ | 135 V(_Int32x4, withFlagX, Int32x4WithFlagX, 63248661) \ |
| 136 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \ | 136 V(_Int32x4, withFlagY, Int32x4WithFlagY, 1498755850) \ |
| 137 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \ | 137 V(_Int32x4, withFlagZ, Int32x4WithFlagZ, 457856832) \ |
| 138 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \ | 138 V(_Int32x4, withFlagW, Int32x4WithFlagW, 690638779) \ |
| 139 V(_List, [], ObjectArrayGetIndexed, 1079829188) \ | 139 V(_List, [], ObjectArrayGetIndexed, 1079829188) \ |
| 140 V(_List, []=, ObjectArraySetIndexed, 748954698) \ | 140 V(_List, []=, ObjectArraySetIndexed, 748954698) \ |
| 141 V(_ImmutableList, [], ImmutableArrayGetIndexed, 25983597) \ | 141 V(_ImmutableList, [], ImmutableArrayGetIndexed, 25983597) \ |
| 142 V(_GrowableList, [], GrowableArrayGetIndexed, 1686777561) \ | 142 V(_GrowableList, [], GrowableArrayGetIndexed, 1686777561) \ |
| 143 V(_GrowableList, []=, GrowableArraySetIndexed, 327404102) \ | 143 V(_GrowableList, []=, GrowableArraySetIndexed, 327404102) \ |
| 144 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \ | 144 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \ |
| 145 V(_Float32Array, []=, Float32ArraySetIndexed, 1155155195) \ | 145 V(_Float32Array, []=, Float32ArraySetIndexed, 1155155195) \ |
| 146 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \ | 146 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \ |
| 147 V(_Float64Array, []=, Float64ArraySetIndexed, 214271306) \ | 147 V(_Float64Array, []=, Float64ArraySetIndexed, 214271306) \ |
| 148 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \ | 148 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 160 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \ | 160 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \ |
| 161 V(_Int16Array, []=, Int16ArraySetIndexed, 1182335435) \ | 161 V(_Int16Array, []=, Int16ArraySetIndexed, 1182335435) \ |
| 162 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \ | 162 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \ |
| 163 V(_Uint16Array, []=, Uint16ArraySetIndexed, 663508528) \ | 163 V(_Uint16Array, []=, Uint16ArraySetIndexed, 663508528) \ |
| 164 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \ | 164 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \ |
| 165 V(_Int32Array, []=, Int32ArraySetIndexed, 1515238594) \ | 165 V(_Int32Array, []=, Int32ArraySetIndexed, 1515238594) \ |
| 166 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \ | 166 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \ |
| 167 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1980947178) \ | 167 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1980947178) \ |
| 168 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \ | 168 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \ |
| 169 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1419416331) \ | 169 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1419416331) \ |
| 170 V(_Uint32x4Array, [], Uint32x4ArrayGetIndexed, 1340743913) \ | 170 V(_Int32x4Array, [], Int32x4ArrayGetIndexed, 1675579883) \ |
| 171 V(_Uint32x4Array, []=, Uint32x4ArraySetIndexed, 1326924628) \ | 171 V(_Int32x4Array, []=, Int32x4ArraySetIndexed, 809970636) \ |
| 172 | 172 |
| 173 | 173 |
| 174 // A list of core function that should always be inlined. | 174 // A list of core function that should always be inlined. |
| 175 #define INLINE_WHITE_LIST(V) \ | 175 #define INLINE_WHITE_LIST(V) \ |
| 176 V(_List, get:length, ObjectArrayLength, 215153395) \ | 176 V(_List, get:length, ObjectArrayLength, 215153395) \ |
| 177 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \ | 177 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \ |
| 178 V(_TypedList, get:length, TypedDataLength, 26616328) \ | 178 V(_TypedList, get:length, TypedDataLength, 26616328) \ |
| 179 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ | 179 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ |
| 180 V(_StringBase, get:length, StringBaseLength, 1483520063) \ | 180 V(_StringBase, get:length, StringBaseLength, 1483520063) \ |
| 181 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \ | 181 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \ |
| 182 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \ | 182 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \ |
| 183 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) \ | 183 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) \ |
| 184 | 184 |
| 185 // A list of core functions that internally dispatch based on received id. | 185 // A list of core functions that internally dispatch based on received id. |
| 186 #define POLYMORPHIC_TARGET_LIST(V) \ | 186 #define POLYMORPHIC_TARGET_LIST(V) \ |
| 187 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ | 187 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \ |
| 188 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ | 188 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \ |
| 189 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ | 189 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \ |
| 190 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ | 190 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \ |
| 191 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ | 191 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \ |
| 192 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ | 192 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \ |
| 193 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ | 193 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \ |
| 194 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ | 194 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \ |
| 195 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ | 195 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \ |
| 196 V(_TypedList, _getUint32x4, ByteArrayBaseGetUint32x4, 1499091330) \ | 196 V(_TypedList, _getInt32x4, ByteArrayBaseGetInt32x4, 163795162) \ |
| 197 | 197 |
| 198 // Class that recognizes the name and owner of a function and returns the | 198 // Class that recognizes the name and owner of a function and returns the |
| 199 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable | 199 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable |
| 200 // functions. | 200 // functions. |
| 201 class MethodRecognizer : public AllStatic { | 201 class MethodRecognizer : public AllStatic { |
| 202 public: | 202 public: |
| 203 enum Kind { | 203 enum Kind { |
| 204 kUnknown, | 204 kUnknown, |
| 205 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, | 205 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, |
| 206 RECOGNIZED_LIST(DEFINE_ENUM_LIST) | 206 RECOGNIZED_LIST(DEFINE_ENUM_LIST) |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 654 M(CheckSmi) \ | 654 M(CheckSmi) \ |
| 655 M(Constant) \ | 655 M(Constant) \ |
| 656 M(CheckEitherNonSmi) \ | 656 M(CheckEitherNonSmi) \ |
| 657 M(BinaryDoubleOp) \ | 657 M(BinaryDoubleOp) \ |
| 658 M(MathUnary) \ | 658 M(MathUnary) \ |
| 659 M(MathMinMax) \ | 659 M(MathMinMax) \ |
| 660 M(UnboxDouble) \ | 660 M(UnboxDouble) \ |
| 661 M(BoxDouble) \ | 661 M(BoxDouble) \ |
| 662 M(BoxFloat32x4) \ | 662 M(BoxFloat32x4) \ |
| 663 M(UnboxFloat32x4) \ | 663 M(UnboxFloat32x4) \ |
| 664 M(BoxUint32x4) \ | 664 M(BoxInt32x4) \ |
| 665 M(UnboxUint32x4) \ | 665 M(UnboxInt32x4) \ |
| 666 M(UnboxInteger) \ | 666 M(UnboxInteger) \ |
| 667 M(BoxInteger) \ | 667 M(BoxInteger) \ |
| 668 M(BinaryMintOp) \ | 668 M(BinaryMintOp) \ |
| 669 M(ShiftMintOp) \ | 669 M(ShiftMintOp) \ |
| 670 M(UnaryMintOp) \ | 670 M(UnaryMintOp) \ |
| 671 M(CheckArrayBound) \ | 671 M(CheckArrayBound) \ |
| 672 M(Constraint) \ | 672 M(Constraint) \ |
| 673 M(StringFromCharCode) \ | 673 M(StringFromCharCode) \ |
| 674 M(StringInterpolate) \ | 674 M(StringInterpolate) \ |
| 675 M(InvokeMathCFunction) \ | 675 M(InvokeMathCFunction) \ |
| 676 M(GuardField) \ | 676 M(GuardField) \ |
| 677 M(IfThenElse) \ | 677 M(IfThenElse) \ |
| 678 M(BinaryFloat32x4Op) \ | 678 M(BinaryFloat32x4Op) \ |
| 679 M(Simd32x4Shuffle) \ | 679 M(Simd32x4Shuffle) \ |
| 680 M(Simd32x4ShuffleMix) \ | 680 M(Simd32x4ShuffleMix) \ |
| 681 M(Simd32x4GetSignMask) \ | 681 M(Simd32x4GetSignMask) \ |
| 682 M(Float32x4Constructor) \ | 682 M(Float32x4Constructor) \ |
| 683 M(Float32x4Zero) \ | 683 M(Float32x4Zero) \ |
| 684 M(Float32x4Splat) \ | 684 M(Float32x4Splat) \ |
| 685 M(Float32x4Comparison) \ | 685 M(Float32x4Comparison) \ |
| 686 M(Float32x4MinMax) \ | 686 M(Float32x4MinMax) \ |
| 687 M(Float32x4Scale) \ | 687 M(Float32x4Scale) \ |
| 688 M(Float32x4Sqrt) \ | 688 M(Float32x4Sqrt) \ |
| 689 M(Float32x4ZeroArg) \ | 689 M(Float32x4ZeroArg) \ |
| 690 M(Float32x4Clamp) \ | 690 M(Float32x4Clamp) \ |
| 691 M(Float32x4With) \ | 691 M(Float32x4With) \ |
| 692 M(Float32x4ToUint32x4) \ | 692 M(Float32x4ToInt32x4) \ |
| 693 M(MaterializeObject) \ | 693 M(MaterializeObject) \ |
| 694 M(Uint32x4BoolConstructor) \ | 694 M(Int32x4BoolConstructor) \ |
| 695 M(Uint32x4GetFlag) \ | 695 M(Int32x4GetFlag) \ |
| 696 M(Uint32x4Select) \ | 696 M(Int32x4Select) \ |
| 697 M(Uint32x4SetFlag) \ | 697 M(Int32x4SetFlag) \ |
| 698 M(Uint32x4ToFloat32x4) \ | 698 M(Int32x4ToFloat32x4) \ |
| 699 M(BinaryUint32x4Op) \ | 699 M(BinaryInt32x4Op) \ |
| 700 | 700 |
| 701 | 701 |
| 702 #define FORWARD_DECLARATION(type) class type##Instr; | 702 #define FORWARD_DECLARATION(type) class type##Instr; |
| 703 FOR_EACH_INSTRUCTION(FORWARD_DECLARATION) | 703 FOR_EACH_INSTRUCTION(FORWARD_DECLARATION) |
| 704 #undef FORWARD_DECLARATION | 704 #undef FORWARD_DECLARATION |
| 705 | 705 |
| 706 | 706 |
| 707 // Functions required in all concrete instruction classes. | 707 // Functions required in all concrete instruction classes. |
| 708 #define DECLARE_INSTRUCTION(type) \ | 708 #define DECLARE_INSTRUCTION(type) \ |
| 709 virtual Tag tag() const { return k##type; } \ | 709 virtual Tag tag() const { return k##type; } \ |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 return deopt_id_; | 954 return deopt_id_; |
| 955 } | 955 } |
| 956 | 956 |
| 957 private: | 957 private: |
| 958 friend class Definition; // Needed for InsertBefore, InsertAfter. | 958 friend class Definition; // Needed for InsertBefore, InsertAfter. |
| 959 | 959 |
| 960 // Classes that set or read deopt_id_. | 960 // Classes that set or read deopt_id_. |
| 961 friend class UnboxIntegerInstr; | 961 friend class UnboxIntegerInstr; |
| 962 friend class UnboxDoubleInstr; | 962 friend class UnboxDoubleInstr; |
| 963 friend class UnboxFloat32x4Instr; | 963 friend class UnboxFloat32x4Instr; |
| 964 friend class UnboxUint32x4Instr; | 964 friend class UnboxInt32x4Instr; |
| 965 friend class BinaryDoubleOpInstr; | 965 friend class BinaryDoubleOpInstr; |
| 966 friend class BinaryFloat32x4OpInstr; | 966 friend class BinaryFloat32x4OpInstr; |
| 967 friend class Float32x4ZeroInstr; | 967 friend class Float32x4ZeroInstr; |
| 968 friend class Float32x4SplatInstr; | 968 friend class Float32x4SplatInstr; |
| 969 friend class Simd32x4ShuffleInstr; | 969 friend class Simd32x4ShuffleInstr; |
| 970 friend class Simd32x4ShuffleMixInstr; | 970 friend class Simd32x4ShuffleMixInstr; |
| 971 friend class Simd32x4GetSignMaskInstr; | 971 friend class Simd32x4GetSignMaskInstr; |
| 972 friend class Float32x4ConstructorInstr; | 972 friend class Float32x4ConstructorInstr; |
| 973 friend class Float32x4ComparisonInstr; | 973 friend class Float32x4ComparisonInstr; |
| 974 friend class Float32x4MinMaxInstr; | 974 friend class Float32x4MinMaxInstr; |
| 975 friend class Float32x4ScaleInstr; | 975 friend class Float32x4ScaleInstr; |
| 976 friend class Float32x4SqrtInstr; | 976 friend class Float32x4SqrtInstr; |
| 977 friend class Float32x4ZeroArgInstr; | 977 friend class Float32x4ZeroArgInstr; |
| 978 friend class Float32x4ClampInstr; | 978 friend class Float32x4ClampInstr; |
| 979 friend class Float32x4WithInstr; | 979 friend class Float32x4WithInstr; |
| 980 friend class Float32x4ToUint32x4Instr; | 980 friend class Float32x4ToInt32x4Instr; |
| 981 friend class Uint32x4BoolConstructorInstr; | 981 friend class Int32x4BoolConstructorInstr; |
| 982 friend class Uint32x4GetFlagInstr; | 982 friend class Int32x4GetFlagInstr; |
| 983 friend class Uint32x4SetFlagInstr; | 983 friend class Int32x4SetFlagInstr; |
| 984 friend class Uint32x4SelectInstr; | 984 friend class Int32x4SelectInstr; |
| 985 friend class Uint32x4ToFloat32x4Instr; | 985 friend class Int32x4ToFloat32x4Instr; |
| 986 friend class BinaryUint32x4OpInstr; | 986 friend class BinaryInt32x4OpInstr; |
| 987 friend class BinaryMintOpInstr; | 987 friend class BinaryMintOpInstr; |
| 988 friend class BinarySmiOpInstr; | 988 friend class BinarySmiOpInstr; |
| 989 friend class UnarySmiOpInstr; | 989 friend class UnarySmiOpInstr; |
| 990 friend class UnaryDoubleOpInstr; | 990 friend class UnaryDoubleOpInstr; |
| 991 friend class ShiftMintOpInstr; | 991 friend class ShiftMintOpInstr; |
| 992 friend class UnaryMintOpInstr; | 992 friend class UnaryMintOpInstr; |
| 993 friend class MathUnaryInstr; | 993 friend class MathUnaryInstr; |
| 994 friend class MathMinMaxInstr; | 994 friend class MathMinMaxInstr; |
| 995 friend class CheckClassInstr; | 995 friend class CheckClassInstr; |
| 996 friend class GuardFieldInstr; | 996 friend class GuardFieldInstr; |
| (...skipping 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4540 | 4540 |
| 4541 virtual bool MayThrow() const { return false; } | 4541 virtual bool MayThrow() const { return false; } |
| 4542 | 4542 |
| 4543 Definition* Canonicalize(FlowGraph* flow_graph); | 4543 Definition* Canonicalize(FlowGraph* flow_graph); |
| 4544 | 4544 |
| 4545 private: | 4545 private: |
| 4546 DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr); | 4546 DISALLOW_COPY_AND_ASSIGN(BoxFloat32x4Instr); |
| 4547 }; | 4547 }; |
| 4548 | 4548 |
| 4549 | 4549 |
| 4550 class BoxUint32x4Instr : public TemplateDefinition<1> { | 4550 class BoxInt32x4Instr : public TemplateDefinition<1> { |
| 4551 public: | 4551 public: |
| 4552 explicit BoxUint32x4Instr(Value* value) { | 4552 explicit BoxInt32x4Instr(Value* value) { |
| 4553 SetInputAt(0, value); | 4553 SetInputAt(0, value); |
| 4554 } | 4554 } |
| 4555 | 4555 |
| 4556 Value* value() const { return inputs_[0]; } | 4556 Value* value() const { return inputs_[0]; } |
| 4557 | 4557 |
| 4558 virtual bool CanDeoptimize() const { return false; } | 4558 virtual bool CanDeoptimize() const { return false; } |
| 4559 | 4559 |
| 4560 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 4560 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 4561 ASSERT(idx == 0); | 4561 ASSERT(idx == 0); |
| 4562 return kUnboxedUint32x4; | 4562 return kUnboxedInt32x4; |
| 4563 } | 4563 } |
| 4564 | 4564 |
| 4565 DECLARE_INSTRUCTION(BoxUint32x4) | 4565 DECLARE_INSTRUCTION(BoxInt32x4) |
| 4566 virtual CompileType ComputeType() const; | 4566 virtual CompileType ComputeType() const; |
| 4567 | 4567 |
| 4568 virtual bool AllowsCSE() const { return true; } | 4568 virtual bool AllowsCSE() const { return true; } |
| 4569 virtual EffectSet Effects() const { return EffectSet::None(); } | 4569 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4570 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 4570 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 4571 virtual bool AttributesEqual(Instruction* other) const { return true; } | 4571 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 4572 | 4572 |
| 4573 virtual bool MayThrow() const { return false; } | 4573 virtual bool MayThrow() const { return false; } |
| 4574 | 4574 |
| 4575 Definition* Canonicalize(FlowGraph* flow_graph); | 4575 Definition* Canonicalize(FlowGraph* flow_graph); |
| 4576 | 4576 |
| 4577 private: | 4577 private: |
| 4578 DISALLOW_COPY_AND_ASSIGN(BoxUint32x4Instr); | 4578 DISALLOW_COPY_AND_ASSIGN(BoxInt32x4Instr); |
| 4579 }; | 4579 }; |
| 4580 | 4580 |
| 4581 | 4581 |
| 4582 class BoxIntegerInstr : public TemplateDefinition<1> { | 4582 class BoxIntegerInstr : public TemplateDefinition<1> { |
| 4583 public: | 4583 public: |
| 4584 explicit BoxIntegerInstr(Value* value) { | 4584 explicit BoxIntegerInstr(Value* value) { |
| 4585 SetInputAt(0, value); | 4585 SetInputAt(0, value); |
| 4586 } | 4586 } |
| 4587 | 4587 |
| 4588 Value* value() const { return inputs_[0]; } | 4588 Value* value() const { return inputs_[0]; } |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4671 | 4671 |
| 4672 virtual bool MayThrow() const { return false; } | 4672 virtual bool MayThrow() const { return false; } |
| 4673 | 4673 |
| 4674 Definition* Canonicalize(FlowGraph* flow_graph); | 4674 Definition* Canonicalize(FlowGraph* flow_graph); |
| 4675 | 4675 |
| 4676 private: | 4676 private: |
| 4677 DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr); | 4677 DISALLOW_COPY_AND_ASSIGN(UnboxFloat32x4Instr); |
| 4678 }; | 4678 }; |
| 4679 | 4679 |
| 4680 | 4680 |
| 4681 class UnboxUint32x4Instr : public TemplateDefinition<1> { | 4681 class UnboxInt32x4Instr : public TemplateDefinition<1> { |
| 4682 public: | 4682 public: |
| 4683 UnboxUint32x4Instr(Value* value, intptr_t deopt_id) { | 4683 UnboxInt32x4Instr(Value* value, intptr_t deopt_id) { |
| 4684 SetInputAt(0, value); | 4684 SetInputAt(0, value); |
| 4685 deopt_id_ = deopt_id; | 4685 deopt_id_ = deopt_id; |
| 4686 } | 4686 } |
| 4687 | 4687 |
| 4688 Value* value() const { return inputs_[0]; } | 4688 Value* value() const { return inputs_[0]; } |
| 4689 | 4689 |
| 4690 virtual bool CanDeoptimize() const { | 4690 virtual bool CanDeoptimize() const { |
| 4691 return (value()->Type()->ToCid() != kUint32x4Cid); | 4691 return (value()->Type()->ToCid() != kInt32x4Cid); |
| 4692 } | 4692 } |
| 4693 | 4693 |
| 4694 virtual Representation representation() const { | 4694 virtual Representation representation() const { |
| 4695 return kUnboxedUint32x4; | 4695 return kUnboxedInt32x4; |
| 4696 } | 4696 } |
| 4697 | 4697 |
| 4698 virtual bool AllowsCSE() const { return true; } | 4698 virtual bool AllowsCSE() const { return true; } |
| 4699 virtual EffectSet Effects() const { return EffectSet::None(); } | 4699 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 4700 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 4700 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 4701 virtual bool AttributesEqual(Instruction* other) const { return true; } | 4701 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 4702 | 4702 |
| 4703 DECLARE_INSTRUCTION(UnboxUint32x4) | 4703 DECLARE_INSTRUCTION(UnboxInt32x4) |
| 4704 virtual CompileType ComputeType() const; | 4704 virtual CompileType ComputeType() const; |
| 4705 | 4705 |
| 4706 virtual bool MayThrow() const { return false; } | 4706 virtual bool MayThrow() const { return false; } |
| 4707 | 4707 |
| 4708 Definition* Canonicalize(FlowGraph* flow_graph); | 4708 Definition* Canonicalize(FlowGraph* flow_graph); |
| 4709 | 4709 |
| 4710 private: | 4710 private: |
| 4711 DISALLOW_COPY_AND_ASSIGN(UnboxUint32x4Instr); | 4711 DISALLOW_COPY_AND_ASSIGN(UnboxInt32x4Instr); |
| 4712 }; | 4712 }; |
| 4713 | 4713 |
| 4714 | 4714 |
| 4715 class UnboxIntegerInstr : public TemplateDefinition<1> { | 4715 class UnboxIntegerInstr : public TemplateDefinition<1> { |
| 4716 public: | 4716 public: |
| 4717 UnboxIntegerInstr(Value* value, intptr_t deopt_id) { | 4717 UnboxIntegerInstr(Value* value, intptr_t deopt_id) { |
| 4718 SetInputAt(0, value); | 4718 SetInputAt(0, value); |
| 4719 deopt_id_ = deopt_id; | 4719 deopt_id_ = deopt_id; |
| 4720 } | 4720 } |
| 4721 | 4721 |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4990 | 4990 |
| 4991 virtual bool CanDeoptimize() const { return false; } | 4991 virtual bool CanDeoptimize() const { return false; } |
| 4992 | 4992 |
| 4993 virtual Representation representation() const { | 4993 virtual Representation representation() const { |
| 4994 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || | 4994 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || |
| 4995 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || | 4995 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || |
| 4996 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || | 4996 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || |
| 4997 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW)) { | 4997 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW)) { |
| 4998 return kUnboxedDouble; | 4998 return kUnboxedDouble; |
| 4999 } | 4999 } |
| 5000 if ((op_kind_ == MethodRecognizer::kUint32x4Shuffle)) { | 5000 if ((op_kind_ == MethodRecognizer::kInt32x4Shuffle)) { |
| 5001 return kUnboxedUint32x4; | 5001 return kUnboxedInt32x4; |
| 5002 } | 5002 } |
| 5003 ASSERT((op_kind_ == MethodRecognizer::kFloat32x4Shuffle)); | 5003 ASSERT((op_kind_ == MethodRecognizer::kFloat32x4Shuffle)); |
| 5004 return kUnboxedFloat32x4; | 5004 return kUnboxedFloat32x4; |
| 5005 } | 5005 } |
| 5006 | 5006 |
| 5007 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5007 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5008 ASSERT(idx == 0); | 5008 ASSERT(idx == 0); |
| 5009 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || | 5009 if ((op_kind_ == MethodRecognizer::kFloat32x4ShuffleX) || |
| 5010 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || | 5010 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleY) || |
| 5011 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || | 5011 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleZ) || |
| 5012 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW) || | 5012 (op_kind_ == MethodRecognizer::kFloat32x4ShuffleW) || |
| 5013 (op_kind_ == MethodRecognizer::kFloat32x4Shuffle)) { | 5013 (op_kind_ == MethodRecognizer::kFloat32x4Shuffle)) { |
| 5014 return kUnboxedFloat32x4; | 5014 return kUnboxedFloat32x4; |
| 5015 } | 5015 } |
| 5016 ASSERT((op_kind_ == MethodRecognizer::kUint32x4Shuffle)); | 5016 ASSERT((op_kind_ == MethodRecognizer::kInt32x4Shuffle)); |
| 5017 return kUnboxedUint32x4; | 5017 return kUnboxedInt32x4; |
| 5018 } | 5018 } |
| 5019 | 5019 |
| 5020 virtual intptr_t DeoptimizationTarget() const { | 5020 virtual intptr_t DeoptimizationTarget() const { |
| 5021 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5021 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5022 // was inherited from another instruction that could deoptimize. | 5022 // was inherited from another instruction that could deoptimize. |
| 5023 return deopt_id_; | 5023 return deopt_id_; |
| 5024 } | 5024 } |
| 5025 | 5025 |
| 5026 DECLARE_INSTRUCTION(Simd32x4Shuffle) | 5026 DECLARE_INSTRUCTION(Simd32x4Shuffle) |
| 5027 virtual CompileType ComputeType() const; | 5027 virtual CompileType ComputeType() const; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5059 | 5059 |
| 5060 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5060 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5061 | 5061 |
| 5062 intptr_t mask() const { return mask_; } | 5062 intptr_t mask() const { return mask_; } |
| 5063 | 5063 |
| 5064 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5064 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5065 | 5065 |
| 5066 virtual bool CanDeoptimize() const { return false; } | 5066 virtual bool CanDeoptimize() const { return false; } |
| 5067 | 5067 |
| 5068 virtual Representation representation() const { | 5068 virtual Representation representation() const { |
| 5069 if (op_kind() == MethodRecognizer::kUint32x4ShuffleMix) { | 5069 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { |
| 5070 return kUnboxedUint32x4; | 5070 return kUnboxedInt32x4; |
| 5071 } | 5071 } |
| 5072 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); | 5072 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); |
| 5073 return kUnboxedFloat32x4; | 5073 return kUnboxedFloat32x4; |
| 5074 } | 5074 } |
| 5075 | 5075 |
| 5076 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5076 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5077 ASSERT((idx == 0) || (idx == 1)); | 5077 ASSERT((idx == 0) || (idx == 1)); |
| 5078 if (op_kind() == MethodRecognizer::kUint32x4ShuffleMix) { | 5078 if (op_kind() == MethodRecognizer::kInt32x4ShuffleMix) { |
| 5079 return kUnboxedUint32x4; | 5079 return kUnboxedInt32x4; |
| 5080 } | 5080 } |
| 5081 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); | 5081 ASSERT(op_kind() == MethodRecognizer::kFloat32x4ShuffleMix); |
| 5082 return kUnboxedFloat32x4; | 5082 return kUnboxedFloat32x4; |
| 5083 } | 5083 } |
| 5084 | 5084 |
| 5085 virtual intptr_t DeoptimizationTarget() const { | 5085 virtual intptr_t DeoptimizationTarget() const { |
| 5086 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5086 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5087 // was inherited from another instruction that could deoptimize. | 5087 // was inherited from another instruction that could deoptimize. |
| 5088 return deopt_id_; | 5088 return deopt_id_; |
| 5089 } | 5089 } |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5257 Value* left() const { return inputs_[0]; } | 5257 Value* left() const { return inputs_[0]; } |
| 5258 Value* right() const { return inputs_[1]; } | 5258 Value* right() const { return inputs_[1]; } |
| 5259 | 5259 |
| 5260 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5260 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5261 | 5261 |
| 5262 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5262 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5263 | 5263 |
| 5264 virtual bool CanDeoptimize() const { return false; } | 5264 virtual bool CanDeoptimize() const { return false; } |
| 5265 | 5265 |
| 5266 virtual Representation representation() const { | 5266 virtual Representation representation() const { |
| 5267 return kUnboxedUint32x4; | 5267 return kUnboxedInt32x4; |
| 5268 } | 5268 } |
| 5269 | 5269 |
| 5270 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5270 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5271 ASSERT((idx == 0) || (idx == 1)); | 5271 ASSERT((idx == 0) || (idx == 1)); |
| 5272 return kUnboxedFloat32x4; | 5272 return kUnboxedFloat32x4; |
| 5273 } | 5273 } |
| 5274 | 5274 |
| 5275 virtual intptr_t DeoptimizationTarget() const { | 5275 virtual intptr_t DeoptimizationTarget() const { |
| 5276 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5276 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5277 // was inherited from another instruction that could deoptimize. | 5277 // was inherited from another instruction that could deoptimize. |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5603 | 5603 |
| 5604 virtual bool MayThrow() const { return false; } | 5604 virtual bool MayThrow() const { return false; } |
| 5605 | 5605 |
| 5606 private: | 5606 private: |
| 5607 const MethodRecognizer::Kind op_kind_; | 5607 const MethodRecognizer::Kind op_kind_; |
| 5608 | 5608 |
| 5609 DISALLOW_COPY_AND_ASSIGN(Float32x4WithInstr); | 5609 DISALLOW_COPY_AND_ASSIGN(Float32x4WithInstr); |
| 5610 }; | 5610 }; |
| 5611 | 5611 |
| 5612 | 5612 |
| 5613 class Float32x4ToUint32x4Instr : public TemplateDefinition<1> { | 5613 class Float32x4ToInt32x4Instr : public TemplateDefinition<1> { |
| 5614 public: | 5614 public: |
| 5615 Float32x4ToUint32x4Instr(Value* left, intptr_t deopt_id) { | 5615 Float32x4ToInt32x4Instr(Value* left, intptr_t deopt_id) { |
| 5616 SetInputAt(0, left); | 5616 SetInputAt(0, left); |
| 5617 deopt_id_ = deopt_id; | 5617 deopt_id_ = deopt_id; |
| 5618 } | 5618 } |
| 5619 | 5619 |
| 5620 Value* left() const { return inputs_[0]; } | 5620 Value* left() const { return inputs_[0]; } |
| 5621 | 5621 |
| 5622 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5622 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5623 | 5623 |
| 5624 virtual bool CanDeoptimize() const { return false; } | 5624 virtual bool CanDeoptimize() const { return false; } |
| 5625 | 5625 |
| 5626 virtual Representation representation() const { | 5626 virtual Representation representation() const { |
| 5627 return kUnboxedUint32x4; | 5627 return kUnboxedInt32x4; |
| 5628 } | 5628 } |
| 5629 | 5629 |
| 5630 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5630 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5631 ASSERT(idx == 0); | 5631 ASSERT(idx == 0); |
| 5632 return kUnboxedFloat32x4; | 5632 return kUnboxedFloat32x4; |
| 5633 } | 5633 } |
| 5634 | 5634 |
| 5635 virtual intptr_t DeoptimizationTarget() const { | 5635 virtual intptr_t DeoptimizationTarget() const { |
| 5636 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5636 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5637 // was inherited from another instruction that could deoptimize. | 5637 // was inherited from another instruction that could deoptimize. |
| 5638 return deopt_id_; | 5638 return deopt_id_; |
| 5639 } | 5639 } |
| 5640 | 5640 |
| 5641 DECLARE_INSTRUCTION(Float32x4ToUint32x4) | 5641 DECLARE_INSTRUCTION(Float32x4ToInt32x4) |
| 5642 virtual CompileType ComputeType() const; | 5642 virtual CompileType ComputeType() const; |
| 5643 | 5643 |
| 5644 virtual bool AllowsCSE() const { return true; } | 5644 virtual bool AllowsCSE() const { return true; } |
| 5645 virtual EffectSet Effects() const { return EffectSet::None(); } | 5645 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5646 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5646 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5647 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5647 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5648 | 5648 |
| 5649 virtual bool MayThrow() const { return false; } | 5649 virtual bool MayThrow() const { return false; } |
| 5650 | 5650 |
| 5651 private: | 5651 private: |
| 5652 DISALLOW_COPY_AND_ASSIGN(Float32x4ToUint32x4Instr); | 5652 DISALLOW_COPY_AND_ASSIGN(Float32x4ToInt32x4Instr); |
| 5653 }; | 5653 }; |
| 5654 | 5654 |
| 5655 | 5655 |
| 5656 class Uint32x4BoolConstructorInstr : public TemplateDefinition<4> { | 5656 class Int32x4BoolConstructorInstr : public TemplateDefinition<4> { |
| 5657 public: | 5657 public: |
| 5658 Uint32x4BoolConstructorInstr(Value* value0, Value* value1, Value* value2, | 5658 Int32x4BoolConstructorInstr(Value* value0, Value* value1, Value* value2, |
| 5659 Value* value3, intptr_t deopt_id) { | 5659 Value* value3, intptr_t deopt_id) { |
| 5660 SetInputAt(0, value0); | 5660 SetInputAt(0, value0); |
| 5661 SetInputAt(1, value1); | 5661 SetInputAt(1, value1); |
| 5662 SetInputAt(2, value2); | 5662 SetInputAt(2, value2); |
| 5663 SetInputAt(3, value3); | 5663 SetInputAt(3, value3); |
| 5664 deopt_id_ = deopt_id; | 5664 deopt_id_ = deopt_id; |
| 5665 } | 5665 } |
| 5666 | 5666 |
| 5667 Value* value0() const { return inputs_[0]; } | 5667 Value* value0() const { return inputs_[0]; } |
| 5668 Value* value1() const { return inputs_[1]; } | 5668 Value* value1() const { return inputs_[1]; } |
| 5669 Value* value2() const { return inputs_[2]; } | 5669 Value* value2() const { return inputs_[2]; } |
| 5670 Value* value3() const { return inputs_[3]; } | 5670 Value* value3() const { return inputs_[3]; } |
| 5671 | 5671 |
| 5672 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5672 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5673 | 5673 |
| 5674 virtual bool CanDeoptimize() const { return false; } | 5674 virtual bool CanDeoptimize() const { return false; } |
| 5675 | 5675 |
| 5676 virtual Representation representation() const { | 5676 virtual Representation representation() const { |
| 5677 return kUnboxedUint32x4; | 5677 return kUnboxedInt32x4; |
| 5678 } | 5678 } |
| 5679 | 5679 |
| 5680 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5680 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5681 ASSERT(idx >= 0 && idx < 4); | 5681 ASSERT(idx >= 0 && idx < 4); |
| 5682 return kTagged; | 5682 return kTagged; |
| 5683 } | 5683 } |
| 5684 | 5684 |
| 5685 virtual intptr_t DeoptimizationTarget() const { | 5685 virtual intptr_t DeoptimizationTarget() const { |
| 5686 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5686 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5687 // was inherited from another instruction that could deoptimize. | 5687 // was inherited from another instruction that could deoptimize. |
| 5688 return deopt_id_; | 5688 return deopt_id_; |
| 5689 } | 5689 } |
| 5690 | 5690 |
| 5691 DECLARE_INSTRUCTION(Uint32x4BoolConstructor) | 5691 DECLARE_INSTRUCTION(Int32x4BoolConstructor) |
| 5692 virtual CompileType ComputeType() const; | 5692 virtual CompileType ComputeType() const; |
| 5693 | 5693 |
| 5694 virtual bool AllowsCSE() const { return true; } | 5694 virtual bool AllowsCSE() const { return true; } |
| 5695 virtual EffectSet Effects() const { return EffectSet::None(); } | 5695 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5696 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5696 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5697 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5697 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5698 | 5698 |
| 5699 virtual bool MayThrow() const { return false; } | 5699 virtual bool MayThrow() const { return false; } |
| 5700 | 5700 |
| 5701 private: | 5701 private: |
| 5702 DISALLOW_COPY_AND_ASSIGN(Uint32x4BoolConstructorInstr); | 5702 DISALLOW_COPY_AND_ASSIGN(Int32x4BoolConstructorInstr); |
| 5703 }; | 5703 }; |
| 5704 | 5704 |
| 5705 | 5705 |
| 5706 class Uint32x4GetFlagInstr : public TemplateDefinition<1> { | 5706 class Int32x4GetFlagInstr : public TemplateDefinition<1> { |
| 5707 public: | 5707 public: |
| 5708 Uint32x4GetFlagInstr(MethodRecognizer::Kind op_kind, Value* value, | 5708 Int32x4GetFlagInstr(MethodRecognizer::Kind op_kind, Value* value, |
| 5709 intptr_t deopt_id) | 5709 intptr_t deopt_id) |
| 5710 : op_kind_(op_kind) { | 5710 : op_kind_(op_kind) { |
| 5711 SetInputAt(0, value); | 5711 SetInputAt(0, value); |
| 5712 deopt_id_ = deopt_id; | 5712 deopt_id_ = deopt_id; |
| 5713 } | 5713 } |
| 5714 | 5714 |
| 5715 Value* value() const { return inputs_[0]; } | 5715 Value* value() const { return inputs_[0]; } |
| 5716 | 5716 |
| 5717 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5717 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5718 | 5718 |
| 5719 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5719 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5720 | 5720 |
| 5721 virtual bool CanDeoptimize() const { return false; } | 5721 virtual bool CanDeoptimize() const { return false; } |
| 5722 | 5722 |
| 5723 virtual Representation representation() const { | 5723 virtual Representation representation() const { |
| 5724 return kTagged; | 5724 return kTagged; |
| 5725 } | 5725 } |
| 5726 | 5726 |
| 5727 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5727 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5728 ASSERT(idx == 0); | 5728 ASSERT(idx == 0); |
| 5729 return kUnboxedUint32x4; | 5729 return kUnboxedInt32x4; |
| 5730 } | 5730 } |
| 5731 | 5731 |
| 5732 virtual intptr_t DeoptimizationTarget() const { | 5732 virtual intptr_t DeoptimizationTarget() const { |
| 5733 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5733 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5734 // was inherited from another instruction that could deoptimize. | 5734 // was inherited from another instruction that could deoptimize. |
| 5735 return deopt_id_; | 5735 return deopt_id_; |
| 5736 } | 5736 } |
| 5737 | 5737 |
| 5738 DECLARE_INSTRUCTION(Uint32x4GetFlag) | 5738 DECLARE_INSTRUCTION(Int32x4GetFlag) |
| 5739 virtual CompileType ComputeType() const; | 5739 virtual CompileType ComputeType() const; |
| 5740 | 5740 |
| 5741 virtual bool AllowsCSE() const { return true; } | 5741 virtual bool AllowsCSE() const { return true; } |
| 5742 virtual EffectSet Effects() const { return EffectSet::None(); } | 5742 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5743 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5743 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5744 virtual bool AttributesEqual(Instruction* other) const { | 5744 virtual bool AttributesEqual(Instruction* other) const { |
| 5745 return op_kind() == other->AsUint32x4GetFlag()->op_kind(); | 5745 return op_kind() == other->AsInt32x4GetFlag()->op_kind(); |
| 5746 } | 5746 } |
| 5747 | 5747 |
| 5748 virtual bool MayThrow() const { return false; } | 5748 virtual bool MayThrow() const { return false; } |
| 5749 | 5749 |
| 5750 private: | 5750 private: |
| 5751 const MethodRecognizer::Kind op_kind_; | 5751 const MethodRecognizer::Kind op_kind_; |
| 5752 | 5752 |
| 5753 DISALLOW_COPY_AND_ASSIGN(Uint32x4GetFlagInstr); | 5753 DISALLOW_COPY_AND_ASSIGN(Int32x4GetFlagInstr); |
| 5754 }; | 5754 }; |
| 5755 | 5755 |
| 5756 | 5756 |
| 5757 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1> { | 5757 class Simd32x4GetSignMaskInstr : public TemplateDefinition<1> { |
| 5758 public: | 5758 public: |
| 5759 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, Value* value, | 5759 Simd32x4GetSignMaskInstr(MethodRecognizer::Kind op_kind, Value* value, |
| 5760 intptr_t deopt_id) : op_kind_(op_kind) { | 5760 intptr_t deopt_id) : op_kind_(op_kind) { |
| 5761 SetInputAt(0, value); | 5761 SetInputAt(0, value); |
| 5762 deopt_id_ = deopt_id; | 5762 deopt_id_ = deopt_id; |
| 5763 } | 5763 } |
| 5764 | 5764 |
| 5765 Value* value() const { return inputs_[0]; } | 5765 Value* value() const { return inputs_[0]; } |
| 5766 | 5766 |
| 5767 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5767 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5768 | 5768 |
| 5769 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5769 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5770 | 5770 |
| 5771 virtual bool CanDeoptimize() const { return false; } | 5771 virtual bool CanDeoptimize() const { return false; } |
| 5772 | 5772 |
| 5773 virtual Representation representation() const { | 5773 virtual Representation representation() const { |
| 5774 return kTagged; | 5774 return kTagged; |
| 5775 } | 5775 } |
| 5776 | 5776 |
| 5777 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5777 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5778 ASSERT(idx == 0); | 5778 ASSERT(idx == 0); |
| 5779 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) { | 5779 if (op_kind_ == MethodRecognizer::kFloat32x4GetSignMask) { |
| 5780 return kUnboxedFloat32x4; | 5780 return kUnboxedFloat32x4; |
| 5781 } | 5781 } |
| 5782 ASSERT(op_kind_ == MethodRecognizer::kUint32x4GetSignMask); | 5782 ASSERT(op_kind_ == MethodRecognizer::kInt32x4GetSignMask); |
| 5783 return kUnboxedUint32x4; | 5783 return kUnboxedInt32x4; |
| 5784 } | 5784 } |
| 5785 | 5785 |
| 5786 virtual intptr_t DeoptimizationTarget() const { | 5786 virtual intptr_t DeoptimizationTarget() const { |
| 5787 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5787 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5788 // was inherited from another instruction that could deoptimize. | 5788 // was inherited from another instruction that could deoptimize. |
| 5789 return deopt_id_; | 5789 return deopt_id_; |
| 5790 } | 5790 } |
| 5791 | 5791 |
| 5792 DECLARE_INSTRUCTION(Simd32x4GetSignMask) | 5792 DECLARE_INSTRUCTION(Simd32x4GetSignMask) |
| 5793 virtual CompileType ComputeType() const; | 5793 virtual CompileType ComputeType() const; |
| 5794 | 5794 |
| 5795 virtual bool AllowsCSE() const { return true; } | 5795 virtual bool AllowsCSE() const { return true; } |
| 5796 virtual EffectSet Effects() const { return EffectSet::None(); } | 5796 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5797 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5797 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5798 virtual bool AttributesEqual(Instruction* other) const { | 5798 virtual bool AttributesEqual(Instruction* other) const { |
| 5799 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind(); | 5799 return other->AsSimd32x4GetSignMask()->op_kind() == op_kind(); |
| 5800 } | 5800 } |
| 5801 | 5801 |
| 5802 virtual bool MayThrow() const { return false; } | 5802 virtual bool MayThrow() const { return false; } |
| 5803 | 5803 |
| 5804 private: | 5804 private: |
| 5805 const MethodRecognizer::Kind op_kind_; | 5805 const MethodRecognizer::Kind op_kind_; |
| 5806 | 5806 |
| 5807 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr); | 5807 DISALLOW_COPY_AND_ASSIGN(Simd32x4GetSignMaskInstr); |
| 5808 }; | 5808 }; |
| 5809 | 5809 |
| 5810 | 5810 |
| 5811 class Uint32x4SelectInstr : public TemplateDefinition<3> { | 5811 class Int32x4SelectInstr : public TemplateDefinition<3> { |
| 5812 public: | 5812 public: |
| 5813 Uint32x4SelectInstr(Value* mask, Value* trueValue, Value* falseValue, | 5813 Int32x4SelectInstr(Value* mask, Value* trueValue, Value* falseValue, |
| 5814 intptr_t deopt_id) { | 5814 intptr_t deopt_id) { |
| 5815 SetInputAt(0, mask); | 5815 SetInputAt(0, mask); |
| 5816 SetInputAt(1, trueValue); | 5816 SetInputAt(1, trueValue); |
| 5817 SetInputAt(2, falseValue); | 5817 SetInputAt(2, falseValue); |
| 5818 deopt_id_ = deopt_id; | 5818 deopt_id_ = deopt_id; |
| 5819 } | 5819 } |
| 5820 | 5820 |
| 5821 Value* mask() const { return inputs_[0]; } | 5821 Value* mask() const { return inputs_[0]; } |
| 5822 Value* trueValue() const { return inputs_[1]; } | 5822 Value* trueValue() const { return inputs_[1]; } |
| 5823 Value* falseValue() const { return inputs_[2]; } | 5823 Value* falseValue() const { return inputs_[2]; } |
| 5824 | 5824 |
| 5825 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5825 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5826 | 5826 |
| 5827 virtual bool CanDeoptimize() const { return false; } | 5827 virtual bool CanDeoptimize() const { return false; } |
| 5828 | 5828 |
| 5829 virtual Representation representation() const { | 5829 virtual Representation representation() const { |
| 5830 return kUnboxedFloat32x4; | 5830 return kUnboxedFloat32x4; |
| 5831 } | 5831 } |
| 5832 | 5832 |
| 5833 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5833 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5834 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); | 5834 ASSERT((idx == 0) || (idx == 1) || (idx == 2)); |
| 5835 if (idx == 0) { | 5835 if (idx == 0) { |
| 5836 return kUnboxedUint32x4; | 5836 return kUnboxedInt32x4; |
| 5837 } | 5837 } |
| 5838 return kUnboxedFloat32x4; | 5838 return kUnboxedFloat32x4; |
| 5839 } | 5839 } |
| 5840 | 5840 |
| 5841 virtual intptr_t DeoptimizationTarget() const { | 5841 virtual intptr_t DeoptimizationTarget() const { |
| 5842 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5842 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5843 // was inherited from another instruction that could deoptimize. | 5843 // was inherited from another instruction that could deoptimize. |
| 5844 return deopt_id_; | 5844 return deopt_id_; |
| 5845 } | 5845 } |
| 5846 | 5846 |
| 5847 DECLARE_INSTRUCTION(Uint32x4Select) | 5847 DECLARE_INSTRUCTION(Int32x4Select) |
| 5848 virtual CompileType ComputeType() const; | 5848 virtual CompileType ComputeType() const; |
| 5849 | 5849 |
| 5850 virtual bool AllowsCSE() const { return true; } | 5850 virtual bool AllowsCSE() const { return true; } |
| 5851 virtual EffectSet Effects() const { return EffectSet::None(); } | 5851 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5852 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5852 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5853 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5853 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5854 | 5854 |
| 5855 virtual bool MayThrow() const { return false; } | 5855 virtual bool MayThrow() const { return false; } |
| 5856 | 5856 |
| 5857 private: | 5857 private: |
| 5858 DISALLOW_COPY_AND_ASSIGN(Uint32x4SelectInstr); | 5858 DISALLOW_COPY_AND_ASSIGN(Int32x4SelectInstr); |
| 5859 }; | 5859 }; |
| 5860 | 5860 |
| 5861 | 5861 |
| 5862 class Uint32x4SetFlagInstr : public TemplateDefinition<2> { | 5862 class Int32x4SetFlagInstr : public TemplateDefinition<2> { |
| 5863 public: | 5863 public: |
| 5864 Uint32x4SetFlagInstr(MethodRecognizer::Kind op_kind, Value* value, | 5864 Int32x4SetFlagInstr(MethodRecognizer::Kind op_kind, Value* value, |
| 5865 Value* flagValue, intptr_t deopt_id) | 5865 Value* flagValue, intptr_t deopt_id) |
| 5866 : op_kind_(op_kind) { | 5866 : op_kind_(op_kind) { |
| 5867 SetInputAt(0, value); | 5867 SetInputAt(0, value); |
| 5868 SetInputAt(1, flagValue); | 5868 SetInputAt(1, flagValue); |
| 5869 deopt_id_ = deopt_id; | 5869 deopt_id_ = deopt_id; |
| 5870 } | 5870 } |
| 5871 | 5871 |
| 5872 Value* value() const { return inputs_[0]; } | 5872 Value* value() const { return inputs_[0]; } |
| 5873 Value* flagValue() const { return inputs_[1]; } | 5873 Value* flagValue() const { return inputs_[1]; } |
| 5874 | 5874 |
| 5875 MethodRecognizer::Kind op_kind() const { return op_kind_; } | 5875 MethodRecognizer::Kind op_kind() const { return op_kind_; } |
| 5876 | 5876 |
| 5877 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5877 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5878 | 5878 |
| 5879 virtual bool CanDeoptimize() const { return false; } | 5879 virtual bool CanDeoptimize() const { return false; } |
| 5880 | 5880 |
| 5881 virtual Representation representation() const { | 5881 virtual Representation representation() const { |
| 5882 return kUnboxedUint32x4; | 5882 return kUnboxedInt32x4; |
| 5883 } | 5883 } |
| 5884 | 5884 |
| 5885 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5885 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5886 ASSERT((idx == 0) || (idx == 1)); | 5886 ASSERT((idx == 0) || (idx == 1)); |
| 5887 if (idx == 1) { | 5887 if (idx == 1) { |
| 5888 return kTagged; | 5888 return kTagged; |
| 5889 } | 5889 } |
| 5890 return kUnboxedUint32x4; | 5890 return kUnboxedInt32x4; |
| 5891 } | 5891 } |
| 5892 | 5892 |
| 5893 virtual intptr_t DeoptimizationTarget() const { | 5893 virtual intptr_t DeoptimizationTarget() const { |
| 5894 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5894 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5895 // was inherited from another instruction that could deoptimize. | 5895 // was inherited from another instruction that could deoptimize. |
| 5896 return deopt_id_; | 5896 return deopt_id_; |
| 5897 } | 5897 } |
| 5898 | 5898 |
| 5899 DECLARE_INSTRUCTION(Uint32x4SetFlag) | 5899 DECLARE_INSTRUCTION(Int32x4SetFlag) |
| 5900 virtual CompileType ComputeType() const; | 5900 virtual CompileType ComputeType() const; |
| 5901 | 5901 |
| 5902 virtual bool AllowsCSE() const { return true; } | 5902 virtual bool AllowsCSE() const { return true; } |
| 5903 virtual EffectSet Effects() const { return EffectSet::None(); } | 5903 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5904 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5904 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5905 virtual bool AttributesEqual(Instruction* other) const { | 5905 virtual bool AttributesEqual(Instruction* other) const { |
| 5906 return op_kind() == other->AsUint32x4SetFlag()->op_kind(); | 5906 return op_kind() == other->AsInt32x4SetFlag()->op_kind(); |
| 5907 } | 5907 } |
| 5908 | 5908 |
| 5909 virtual bool MayThrow() const { return false; } | 5909 virtual bool MayThrow() const { return false; } |
| 5910 | 5910 |
| 5911 private: | 5911 private: |
| 5912 const MethodRecognizer::Kind op_kind_; | 5912 const MethodRecognizer::Kind op_kind_; |
| 5913 | 5913 |
| 5914 DISALLOW_COPY_AND_ASSIGN(Uint32x4SetFlagInstr); | 5914 DISALLOW_COPY_AND_ASSIGN(Int32x4SetFlagInstr); |
| 5915 }; | 5915 }; |
| 5916 | 5916 |
| 5917 | 5917 |
| 5918 class Uint32x4ToFloat32x4Instr : public TemplateDefinition<1> { | 5918 class Int32x4ToFloat32x4Instr : public TemplateDefinition<1> { |
| 5919 public: | 5919 public: |
| 5920 Uint32x4ToFloat32x4Instr(Value* left, intptr_t deopt_id) { | 5920 Int32x4ToFloat32x4Instr(Value* left, intptr_t deopt_id) { |
| 5921 SetInputAt(0, left); | 5921 SetInputAt(0, left); |
| 5922 deopt_id_ = deopt_id; | 5922 deopt_id_ = deopt_id; |
| 5923 } | 5923 } |
| 5924 | 5924 |
| 5925 Value* left() const { return inputs_[0]; } | 5925 Value* left() const { return inputs_[0]; } |
| 5926 | 5926 |
| 5927 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5927 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5928 | 5928 |
| 5929 virtual bool CanDeoptimize() const { return false; } | 5929 virtual bool CanDeoptimize() const { return false; } |
| 5930 | 5930 |
| 5931 virtual Representation representation() const { | 5931 virtual Representation representation() const { |
| 5932 return kUnboxedFloat32x4; | 5932 return kUnboxedFloat32x4; |
| 5933 } | 5933 } |
| 5934 | 5934 |
| 5935 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5935 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5936 ASSERT(idx == 0); | 5936 ASSERT(idx == 0); |
| 5937 return kUnboxedUint32x4; | 5937 return kUnboxedInt32x4; |
| 5938 } | 5938 } |
| 5939 | 5939 |
| 5940 virtual intptr_t DeoptimizationTarget() const { | 5940 virtual intptr_t DeoptimizationTarget() const { |
| 5941 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5941 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5942 // was inherited from another instruction that could deoptimize. | 5942 // was inherited from another instruction that could deoptimize. |
| 5943 return deopt_id_; | 5943 return deopt_id_; |
| 5944 } | 5944 } |
| 5945 | 5945 |
| 5946 DECLARE_INSTRUCTION(Uint32x4ToFloat32x4) | 5946 DECLARE_INSTRUCTION(Int32x4ToFloat32x4) |
| 5947 virtual CompileType ComputeType() const; | 5947 virtual CompileType ComputeType() const; |
| 5948 | 5948 |
| 5949 virtual bool AllowsCSE() const { return true; } | 5949 virtual bool AllowsCSE() const { return true; } |
| 5950 virtual EffectSet Effects() const { return EffectSet::None(); } | 5950 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 5951 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 5951 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 5952 virtual bool AttributesEqual(Instruction* other) const { return true; } | 5952 virtual bool AttributesEqual(Instruction* other) const { return true; } |
| 5953 | 5953 |
| 5954 virtual bool MayThrow() const { return false; } | 5954 virtual bool MayThrow() const { return false; } |
| 5955 | 5955 |
| 5956 private: | 5956 private: |
| 5957 DISALLOW_COPY_AND_ASSIGN(Uint32x4ToFloat32x4Instr); | 5957 DISALLOW_COPY_AND_ASSIGN(Int32x4ToFloat32x4Instr); |
| 5958 }; | 5958 }; |
| 5959 | 5959 |
| 5960 | 5960 |
| 5961 class BinaryUint32x4OpInstr : public TemplateDefinition<2> { | 5961 class BinaryInt32x4OpInstr : public TemplateDefinition<2> { |
| 5962 public: | 5962 public: |
| 5963 BinaryUint32x4OpInstr(Token::Kind op_kind, | 5963 BinaryInt32x4OpInstr(Token::Kind op_kind, |
| 5964 Value* left, | 5964 Value* left, |
| 5965 Value* right, | 5965 Value* right, |
| 5966 intptr_t deopt_id) | 5966 intptr_t deopt_id) |
| 5967 : op_kind_(op_kind) { | 5967 : op_kind_(op_kind) { |
| 5968 SetInputAt(0, left); | 5968 SetInputAt(0, left); |
| 5969 SetInputAt(1, right); | 5969 SetInputAt(1, right); |
| 5970 deopt_id_ = deopt_id; | 5970 deopt_id_ = deopt_id; |
| 5971 } | 5971 } |
| 5972 | 5972 |
| 5973 Value* left() const { return inputs_[0]; } | 5973 Value* left() const { return inputs_[0]; } |
| 5974 Value* right() const { return inputs_[1]; } | 5974 Value* right() const { return inputs_[1]; } |
| 5975 | 5975 |
| 5976 Token::Kind op_kind() const { return op_kind_; } | 5976 Token::Kind op_kind() const { return op_kind_; } |
| 5977 | 5977 |
| 5978 virtual void PrintOperandsTo(BufferFormatter* f) const; | 5978 virtual void PrintOperandsTo(BufferFormatter* f) const; |
| 5979 | 5979 |
| 5980 virtual bool CanDeoptimize() const { return false; } | 5980 virtual bool CanDeoptimize() const { return false; } |
| 5981 | 5981 |
| 5982 virtual Representation representation() const { | 5982 virtual Representation representation() const { |
| 5983 return kUnboxedUint32x4; | 5983 return kUnboxedInt32x4; |
| 5984 } | 5984 } |
| 5985 | 5985 |
| 5986 virtual Representation RequiredInputRepresentation(intptr_t idx) const { | 5986 virtual Representation RequiredInputRepresentation(intptr_t idx) const { |
| 5987 ASSERT((idx == 0) || (idx == 1)); | 5987 ASSERT((idx == 0) || (idx == 1)); |
| 5988 return kUnboxedUint32x4; | 5988 return kUnboxedInt32x4; |
| 5989 } | 5989 } |
| 5990 | 5990 |
| 5991 virtual intptr_t DeoptimizationTarget() const { | 5991 virtual intptr_t DeoptimizationTarget() const { |
| 5992 // Direct access since this instruction cannot deoptimize, and the deopt-id | 5992 // Direct access since this instruction cannot deoptimize, and the deopt-id |
| 5993 // was inherited from another instruction that could deoptimize. | 5993 // was inherited from another instruction that could deoptimize. |
| 5994 return deopt_id_; | 5994 return deopt_id_; |
| 5995 } | 5995 } |
| 5996 | 5996 |
| 5997 DECLARE_INSTRUCTION(BinaryUint32x4Op) | 5997 DECLARE_INSTRUCTION(BinaryInt32x4Op) |
| 5998 virtual CompileType ComputeType() const; | 5998 virtual CompileType ComputeType() const; |
| 5999 | 5999 |
| 6000 virtual bool AllowsCSE() const { return true; } | 6000 virtual bool AllowsCSE() const { return true; } |
| 6001 virtual EffectSet Effects() const { return EffectSet::None(); } | 6001 virtual EffectSet Effects() const { return EffectSet::None(); } |
| 6002 virtual EffectSet Dependencies() const { return EffectSet::None(); } | 6002 virtual EffectSet Dependencies() const { return EffectSet::None(); } |
| 6003 virtual bool AttributesEqual(Instruction* other) const { | 6003 virtual bool AttributesEqual(Instruction* other) const { |
| 6004 return op_kind() == other->AsBinaryUint32x4Op()->op_kind(); | 6004 return op_kind() == other->AsBinaryInt32x4Op()->op_kind(); |
| 6005 } | 6005 } |
| 6006 | 6006 |
| 6007 virtual bool MayThrow() const { return false; } | 6007 virtual bool MayThrow() const { return false; } |
| 6008 | 6008 |
| 6009 private: | 6009 private: |
| 6010 const Token::Kind op_kind_; | 6010 const Token::Kind op_kind_; |
| 6011 | 6011 |
| 6012 DISALLOW_COPY_AND_ASSIGN(BinaryUint32x4OpInstr); | 6012 DISALLOW_COPY_AND_ASSIGN(BinaryInt32x4OpInstr); |
| 6013 }; | 6013 }; |
| 6014 | 6014 |
| 6015 class BinaryMintOpInstr : public TemplateDefinition<2> { | 6015 class BinaryMintOpInstr : public TemplateDefinition<2> { |
| 6016 public: | 6016 public: |
| 6017 BinaryMintOpInstr(Token::Kind op_kind, | 6017 BinaryMintOpInstr(Token::Kind op_kind, |
| 6018 Value* left, | 6018 Value* left, |
| 6019 Value* right, | 6019 Value* right, |
| 6020 intptr_t deopt_id) | 6020 intptr_t deopt_id) |
| 6021 : op_kind_(op_kind) { | 6021 : op_kind_(op_kind) { |
| 6022 SetInputAt(0, left); | 6022 SetInputAt(0, left); |
| (...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6904 ForwardInstructionIterator* current_iterator_; | 6904 ForwardInstructionIterator* current_iterator_; |
| 6905 | 6905 |
| 6906 private: | 6906 private: |
| 6907 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); | 6907 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); |
| 6908 }; | 6908 }; |
| 6909 | 6909 |
| 6910 | 6910 |
| 6911 } // namespace dart | 6911 } // namespace dart |
| 6912 | 6912 |
| 6913 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 6913 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
| OLD | NEW |