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: runtime/vm/intermediate_language.h

Issue 23452043: Introduce newline tokens into the token stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 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 21 matching lines...) Expand all
32 class LocalVariable; 32 class LocalVariable;
33 class ParsedFunction; 33 class ParsedFunction;
34 class Range; 34 class Range;
35 35
36 36
37 // TODO(srdjan): Unify with INTRINSIC_LIST. 37 // TODO(srdjan): Unify with INTRINSIC_LIST.
38 // (class-name, function-name, recognized enum, fingerprint). 38 // (class-name, function-name, recognized enum, fingerprint).
39 // See intrinsifier for fingerprint computation. 39 // See intrinsifier for fingerprint computation.
40 #define RECOGNIZED_LIST(V) \ 40 #define RECOGNIZED_LIST(V) \
41 V(::, identical, ObjectIdentical, 496869842) \ 41 V(::, identical, ObjectIdentical, 496869842) \
42 V(Object, Object., ObjectConstructor, 1058525712) \ 42 V(Object, Object., ObjectConstructor, 1058555503) \
43 V(Object, get:_cid, ObjectCid, 1498661928) \ 43 V(Object, get:_cid, ObjectCid, 1498691719) \
44 V(_ObjectArray, get:length, ObjectArrayLength, 259323113) \ 44 V(_ObjectArray, get:length, ObjectArrayLength, 259352904) \
45 V(_ImmutableArray, get:length, ImmutableArrayLength, 1341942416) \ 45 V(_ImmutableArray, get:length, ImmutableArrayLength, 1341972207) \
46 V(_TypedList, get:length, TypedDataLength, 26556746) \ 46 V(_TypedList, get:length, TypedDataLength, 26586537) \
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, _setInt8, ByteArrayBaseSetInt8, 742201367) \ 56 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1092733656) \
57 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1163140155) \ 57 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1513672444) \
58 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1106354531) \ 58 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1456886820) \
59 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 545390027) \ 59 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 895922316) \
60 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 1963924310) \ 60 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 166972951) \
61 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 724748139) \ 61 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1075280428) \
62 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 756330666) \ 62 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1106862955) \
63 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 1495546688) \ 63 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 1846078977) \
64 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 560495357) \ 64 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 911027646) \
65 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160357614) \ 65 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160387405) \
66 V(_GrowableObjectArray, get:_capacity, GrowableArrayCapacity, 1509781988) \ 66 V(_GrowableObjectArray, get:_capacity, GrowableArrayCapacity, 1509811779) \
67 V(_GrowableObjectArray, _setData, GrowableArraySetData, 236295352) \ 67 V(_GrowableObjectArray, _setData, GrowableArraySetData, 1979105687) \
68 V(_GrowableObjectArray, _setLength, GrowableArraySetLength, 1922121178) \ 68 V(_GrowableObjectArray, _setLength, GrowableArraySetLength, 1517447865) \
69 V(_StringBase, get:length, StringBaseLength, 1483460481) \ 69 V(_StringBase, get:length, StringBaseLength, 1483490272) \
70 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 1588094430) \ 70 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 160230109) \
71 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \ 71 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \
72 V(_StringBase, [], StringBaseCharAt, 1799392702) \ 72 V(_StringBase, [], StringBaseCharAt, 1394719389) \
73 V(_OneByteString, _setAt, OneByteStringSetAt, 1754827784) \ 73 V(_OneByteString, _setAt, OneByteStringSetAt, 2105360073) \
74 V(_IntegerImplementation, toDouble, IntegerToDouble, 2141284842) \ 74 V(_IntegerImplementation, toDouble, IntegerToDouble, 2076641675) \
75 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \ 75 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \
76 2095943661) \ 76 2095943661) \
77 V(_Double, toInt, DoubleToInteger, 1328149975) \ 77 V(_Double, toInt, DoubleToInteger, 1328149975) \
78 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \ 78 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \
79 V(_Double, roundToDouble, DoubleRound, 622146406) \ 79 V(_Double, roundToDouble, DoubleRound, 622146406) \
80 V(_Double, floorToDouble, DoubleFloor, 1614014643) \ 80 V(_Double, floorToDouble, DoubleFloor, 1614014643) \
81 V(_Double, ceilToDouble, DoubleCeil, 277859570) \ 81 V(_Double, ceilToDouble, DoubleCeil, 277859570) \
82 V(_Double, _modulo, DoubleMod, 1443289156) \ 82 V(_Double, _modulo, DoubleMod, 1443289156) \
83 V(::, sqrt, MathSqrt, 465520247) \ 83 V(::, sqrt, MathSqrt, 465520247) \
84 V(::, sin, MathSin, 730107143) \ 84 V(::, sin, MathSin, 730107143) \
85 V(::, cos, MathCos, 1282146521) \ 85 V(::, cos, MathCos, 1282146521) \
86 V(::, min, MathMin, 1584022354) \ 86 V(::, min, MathMin, 519411058) \
87 V(::, max, MathMax, 328632232) \ 87 V(::, max, MathMax, 1736941288) \
88 V(::, _doublePow, MathDoublePow, 2002448359) \ 88 V(::, _doublePow, MathDoublePow, 1865309700) \
89 V(Float32x4, Float32x4., Float32x4Constructor, 1876089990) \ 89 V(Float32x4, Float32x4., Float32x4Constructor, 257387751) \
90 V(Float32x4, Float32x4.zero, Float32x4Zero, 1903586222) \ 90 V(Float32x4, Float32x4.zero, Float32x4Zero, 1746484751) \
91 V(Float32x4, Float32x4.splat, Float32x4Splat, 38462589) \ 91 V(Float32x4, Float32x4.splat, Float32x4Splat, 1124229756) \
92 V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \ 92 V(_Float32x4, shuffle, Float32x4Shuffle, 1178727105) \
93 V(_Float32x4, get:x, Float32x4ShuffleX, 1351658256) \ 93 V(_Float32x4, get:x, Float32x4ShuffleX, 1351688047) \
94 V(_Float32x4, get:y, Float32x4ShuffleY, 217326828) \ 94 V(_Float32x4, get:y, Float32x4ShuffleY, 217356619) \
95 V(_Float32x4, get:z, Float32x4ShuffleZ, 2144864139) \ 95 V(_Float32x4, get:z, Float32x4ShuffleZ, 2144893930) \
96 V(_Float32x4, get:w, Float32x4ShuffleW, 1447639537) \ 96 V(_Float32x4, get:w, Float32x4ShuffleW, 1447669328) \
97 V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198789765) \ 97 V(_Float32x4, get:signMask, Float32x4GetSignMask, 1198819556) \
98 V(_Float32x4, _cmpequal, Float32x4Equal, 2141256163) \ 98 V(_Float32x4, _cmpequal, Float32x4Equal, 2141256163) \
99 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 696292270) \ 99 V(_Float32x4, _cmpgt, Float32x4GreaterThan, 696292270) \
100 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1199333164) \ 100 V(_Float32x4, _cmpgte, Float32x4GreaterThanOrEqual, 1199333164) \
101 V(_Float32x4, _cmplt, Float32x4LessThan, 943396590) \ 101 V(_Float32x4, _cmplt, Float32x4LessThan, 943396590) \
102 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 57211241) \ 102 V(_Float32x4, _cmplte, Float32x4LessThanOrEqual, 57211241) \
103 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1234888884) \ 103 V(_Float32x4, _cmpnequal, Float32x4NotEqual, 1234888884) \
104 V(_Float32x4, _min, Float32x4Min, 1166664658) \ 104 V(_Float32x4, _min, Float32x4Min, 1166664658) \
105 V(_Float32x4, _max, Float32x4Max, 343968921) \ 105 V(_Float32x4, _max, Float32x4Max, 343968921) \
106 V(_Float32x4, _scale, Float32x4Scale, 803505531) \ 106 V(_Float32x4, _scale, Float32x4Scale, 803505531) \
107 V(_Float32x4, _sqrt, Float32x4Sqrt, 2092250151) \ 107 V(_Float32x4, _sqrt, Float32x4Sqrt, 2092250151) \
108 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 965252704) \ 108 V(_Float32x4, _reciprocalSqrt, Float32x4ReciprocalSqrt, 965252704) \
109 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1262202915) \ 109 V(_Float32x4, _reciprocal, Float32x4Reciprocal, 1262202915) \
110 V(_Float32x4, _negate, Float32x4Negate, 1203192635) \ 110 V(_Float32x4, _negate, Float32x4Negate, 1203192635) \
111 V(_Float32x4, _abs, Float32x4Absolute, 386324188) \ 111 V(_Float32x4, _abs, Float32x4Absolute, 386324188) \
112 V(_Float32x4, _clamp, Float32x4Clamp, 1454612345) \ 112 V(_Float32x4, _clamp, Float32x4Clamp, 1454612345) \
113 V(_Float32x4, withX, Float32x4WithX, 795284225) \ 113 V(_Float32x4, withX, Float32x4WithX, 795284225) \
114 V(_Float32x4, withY, Float32x4WithY, 1806065938) \ 114 V(_Float32x4, withY, Float32x4WithY, 1806065938) \
115 V(_Float32x4, withZ, Float32x4WithZ, 320659034) \ 115 V(_Float32x4, withZ, Float32x4WithZ, 320659034) \
116 V(_Float32x4, withW, Float32x4WithW, 1108437255) \ 116 V(_Float32x4, withW, Float32x4WithW, 1108437255) \
117 V(_Float32x4, _toUint32x4, Float32x4ToUint32x4, 754564339) \ 117 V(_Float32x4, _toUint32x4, Float32x4ToUint32x4, 754564339) \
118 V(_Float32x4, withZWInXY, Float32x4WithZWInXY, 1198101679) \ 118 V(_Float32x4, withZWInXY, Float32x4WithZWInXY, 1198101679) \
119 V(_Float32x4, interleaveXY, Float32x4InterleaveXY, 2001324072) \ 119 V(_Float32x4, interleaveXY, Float32x4InterleaveXY, 2001324072) \
120 V(_Float32x4, interleaveZW, Float32x4InterleaveZW, 928280031) \ 120 V(_Float32x4, interleaveZW, Float32x4InterleaveZW, 928280031) \
121 V(_Float32x4, interleaveXYPairs, Float32x4InterleaveXYPairs, 1046078993) \ 121 V(_Float32x4, interleaveXYPairs, Float32x4InterleaveXYPairs, 1046078993) \
122 V(_Float32x4, interleaveZWPairs, Float32x4InterleaveZWPairs, 1001751955) \ 122 V(_Float32x4, interleaveZWPairs, Float32x4InterleaveZWPairs, 1001751955) \
123 V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 733327933) \ 123 V(Uint32x4, Uint32x4.bool, Uint32x4BoolConstructor, 1699127838) \
124 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 1674637210) \ 124 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 1674667001) \
125 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013140570) \ 125 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013170361) \
126 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944674353) \ 126 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944704144) \
127 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22686587) \ 127 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22716378) \
128 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858084501) \ 128 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858114292) \
129 V(_Uint32x4, select, Uint32x4Select, 881590808) \ 129 V(_Uint32x4, select, Uint32x4Select, 476917495) \
130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \ 130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \
131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \ 131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \
132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \ 132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \
133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \ 133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \
134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 2054503505) \ 134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 2054503505) \
135 V(_ObjectArray, [], ObjectArrayGetIndexed, 1353366945) \ 135 V(_ObjectArray, [], ObjectArrayGetIndexed, 1353366945) \
136 V(_ImmutableArray, [], ImmutableArrayGetIndexed, 7250043) \ 136 V(_ImmutableArray, [], ImmutableArrayGetIndexed, 7250043) \
137 V(_GrowableObjectArray, [], GrowableArrayGetIndexed, 1760659393) \ 137 V(_GrowableObjectArray, [], GrowableArrayGetIndexed, 1760659393) \
138 V(_Float32Array, [], Float32ArrayGetIndexed, 752719987) \ 138 V(_Float32Array, [], Float32ArrayGetIndexed, 752719987) \
139 V(_Float64Array, [], Float64ArrayGetIndexed, 398551809) \ 139 V(_Float64Array, [], Float64ArrayGetIndexed, 398551809) \
140 V(_Int8Array, [], Int8ArrayGetIndexed, 1874842660) \ 140 V(_Int8Array, [], Int8ArrayGetIndexed, 1874842660) \
141 V(_Uint8Array, [], Uint8ArrayGetIndexed, 29882029) \ 141 V(_Uint8Array, [], Uint8ArrayGetIndexed, 29882029) \
142 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 820327077) \ 142 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 820327077) \
143 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1358816690) \ 143 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1358816690) \
144 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ 144 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
145 1359339569) \ 145 1359339569) \
146 V(_Int16Array, [], Int16ArrayGetIndexed, 719232917) \ 146 V(_Int16Array, [], Int16ArrayGetIndexed, 719232917) \
147 V(_Uint16Array, [], Uint16ArrayGetIndexed, 341610618) \ 147 V(_Uint16Array, [], Uint16ArrayGetIndexed, 341610618) \
148 V(_Int32Array, [], Int32ArrayGetIndexed, 314755114) \ 148 V(_Int32Array, [], Int32ArrayGetIndexed, 314755114) \
149 V(_Uint32Array, [], Uint32ArrayGetIndexed, 949356200) \ 149 V(_Uint32Array, [], Uint32ArrayGetIndexed, 949356200) \
150 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1428560299) \ 150 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1428560299) \
151 151
152 152
153 // A list of core function that should always be inlined. 153 // A list of core function that should always be inlined.
154 #define INLINE_WHITE_LIST(V) \ 154 #define INLINE_WHITE_LIST(V) \
155 V(_ObjectArray, get:length, ObjectArrayLength, 259323113) \ 155 V(_ObjectArray, get:length, ObjectArrayLength, 259352904) \
156 V(_ImmutableArray, get:length, ImmutableArrayLength, 1341942416) \ 156 V(_ImmutableArray, get:length, ImmutableArrayLength, 1341972207) \
157 V(_TypedList, get:length, TypedDataLength, 26556746) \ 157 V(_TypedList, get:length, TypedDataLength, 26586537) \
158 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160357614) \ 158 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160387405) \
159 V(_StringBase, get:length, StringBaseLength, 1483460481) \ 159 V(_StringBase, get:length, StringBaseLength, 1483490272) \
160 V(ListIterator, moveNext, ListIteratorMoveNext, 657540761) \ 160 V(ListIterator, moveNext, ListIteratorMoveNext, 657540761) \
161 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 281980741) \ 161 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 281980741) \
162 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 334448248) 162 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 334448248)
163 163
164 164
165 // Class that recognizes the name and owner of a function and returns the 165 // Class that recognizes the name and owner of a function and returns the
166 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 166 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
167 // functions. 167 // functions.
168 class MethodRecognizer : public AllStatic { 168 class MethodRecognizer : public AllStatic {
169 public: 169 public:
(...skipping 6630 matching lines...) Expand 10 before | Expand all | Expand 10 after
6800 ForwardInstructionIterator* current_iterator_; 6800 ForwardInstructionIterator* current_iterator_;
6801 6801
6802 private: 6802 private:
6803 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6803 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6804 }; 6804 };
6805 6805
6806 6806
6807 } // namespace dart 6807 } // namespace dart
6808 6808
6809 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6809 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698