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

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

Issue 25813002: - Rename arrays to lists: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 23 matching lines...) Expand all
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, 1058585294) \ 42 V(Object, Object., ObjectConstructor, 1058585294) \
43 V(Object, get:_cid, ObjectCid, 1498721510) \ 43 V(Object, get:_cid, ObjectCid, 1498721510) \
44 V(_ObjectArray, get:length, ObjectArrayLength, 259382695) \ 44 V(_List, get:length, ObjectArrayLength, 215153395) \
45 V(_ImmutableArray, get:length, ImmutableArrayLength, 1342001998) \ 45 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \
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, _setInt8, ByteArrayBaseSetInt8, 1443265945) \ 56 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 1443265945) \
57 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \ 57 V(_TypedList, _setUint8, ByteArrayBaseSetUint8, 1864204733) \
58 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \ 58 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 1807419109) \
59 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \ 59 V(_TypedList, _setUint16, ByteArrayBaseSetUint16, 1246454605) \
60 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \ 60 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 517505240) \
61 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \ 61 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 1425812717) \
62 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \ 62 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 1457395244) \
63 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \ 63 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 49127618) \
64 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \ 64 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 1261559935) \
65 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160417196) \ 65 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
66 V(_GrowableObjectArray, get:_capacity, GrowableArrayCapacity, 1509841570) \ 66 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 817090003) \
67 V(_GrowableObjectArray, _setData, GrowableArraySetData, 1574432374) \ 67 V(_GrowableList, _setData, GrowableArraySetData, 1375509957) \
68 V(_GrowableObjectArray, _setLength, GrowableArraySetLength, 1112774552) \ 68 V(_GrowableList, _setLength, GrowableArraySetLength, 1227678442) \
69 V(_StringBase, get:length, StringBaseLength, 1483520063) \ 69 V(_StringBase, get:length, StringBaseLength, 1483520063) \
70 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \ 70 V(_StringBase, get:isEmpty, StringBaseIsEmpty, 879849436) \
71 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \ 71 V(_StringBase, codeUnitAt, StringBaseCodeUnitAt, 1958436584) \
72 V(_StringBase, [], StringBaseCharAt, 990046076) \ 72 V(_StringBase, [], StringBaseCharAt, 990046076) \
73 V(_StringBase, _interpolate, StringBaseInterpolate, 2060542382) \ 73 V(_StringBase, _interpolate, StringBaseInterpolate, 908021574) \
74 V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \ 74 V(_OneByteString, _setAt, OneByteStringSetAt, 308408714) \
75 V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \ 75 V(_IntegerImplementation, toDouble, IntegerToDouble, 2011998508) \
76 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \ 76 V(_IntegerImplementation, _leftShiftWithMask32, IntegerLeftShiftWithMask32, \
77 2095943661) \ 77 2095943661) \
78 V(_Double, toInt, DoubleToInteger, 1328149975) \ 78 V(_Double, toInt, DoubleToInteger, 1328149975) \
79 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \ 79 V(_Double, truncateToDouble, DoubleTruncate, 615732263) \
80 V(_Double, roundToDouble, DoubleRound, 622146406) \ 80 V(_Double, roundToDouble, DoubleRound, 622146406) \
81 V(_Double, floorToDouble, DoubleFloor, 1614014643) \ 81 V(_Double, floorToDouble, DoubleFloor, 1614014643) \
82 V(_Double, ceilToDouble, DoubleCeil, 277859570) \ 82 V(_Double, ceilToDouble, DoubleCeil, 277859570) \
83 V(_Double, _modulo, DoubleMod, 1443289156) \ 83 V(_Double, _modulo, DoubleMod, 1443289156) \
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 1674696792) \ 128 V(_Uint32x4, get:flagX, Uint32x4GetFlagX, 1674696792) \
129 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013200152) \ 129 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013200152) \
130 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944733935) \ 130 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944733935) \
131 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22746169) \ 131 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22746169) \
132 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858144083) \ 132 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858144083) \
133 V(_Uint32x4, select, Uint32x4Select, 72244182) \ 133 V(_Uint32x4, select, Uint32x4Select, 72244182) \
134 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \ 134 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \
135 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \ 135 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \
136 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \ 136 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \
137 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \ 137 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \
138 V(_ObjectArray, [], ObjectArrayGetIndexed, 544020319) \ 138 V(_List, [], ObjectArrayGetIndexed, 1079829188) \
139 V(_ImmutableArray, [], ImmutableArrayGetIndexed, 1345387065) \ 139 V(_ImmutableList, [], ImmutableArrayGetIndexed, 25983597) \
140 V(_GrowableObjectArray, [], GrowableArrayGetIndexed, 951312767) \ 140 V(_GrowableList, [], GrowableArrayGetIndexed, 1686777561) \
141 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \ 141 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \
142 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \ 142 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \
143 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \ 143 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \
144 V(_Uint8Array, [], Uint8ArrayGetIndexed, 502448555) \ 144 V(_Uint8Array, [], Uint8ArrayGetIndexed, 502448555) \
145 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1292893603) \ 145 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1292893603) \
146 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1831383216) \ 146 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1831383216) \
147 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ 147 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
148 1831906095) \ 148 1831906095) \
149 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \ 149 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \
150 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \ 150 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \
151 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \ 151 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \
152 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \ 152 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \
153 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \ 153 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \
154 154
155 155
156 // A list of core function that should always be inlined. 156 // A list of core function that should always be inlined.
157 #define INLINE_WHITE_LIST(V) \ 157 #define INLINE_WHITE_LIST(V) \
158 V(_ObjectArray, get:length, ObjectArrayLength, 259382695) \ 158 V(_List, get:length, ObjectArrayLength, 215153395) \
159 V(_ImmutableArray, get:length, ImmutableArrayLength, 1342001998) \ 159 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \
160 V(_TypedList, get:length, TypedDataLength, 26616328) \ 160 V(_TypedList, get:length, TypedDataLength, 26616328) \
161 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160417196) \ 161 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
162 V(_StringBase, get:length, StringBaseLength, 1483520063) \ 162 V(_StringBase, get:length, StringBaseLength, 1483520063) \
163 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \ 163 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \
164 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 2129691657) \ 164 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \
165 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 1669274418) 165 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533)
166 166
167 167
168 // Class that recognizes the name and owner of a function and returns the 168 // Class that recognizes the name and owner of a function and returns the
169 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 169 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
170 // functions. 170 // functions.
171 class MethodRecognizer : public AllStatic { 171 class MethodRecognizer : public AllStatic {
172 public: 172 public:
173 enum Kind { 173 enum Kind {
174 kUnknown, 174 kUnknown,
175 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, 175 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
(...skipping 6628 matching lines...) Expand 10 before | Expand all | Expand 10 after
6804 ForwardInstructionIterator* current_iterator_; 6804 ForwardInstructionIterator* current_iterator_;
6805 6805
6806 private: 6806 private:
6807 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6807 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6808 }; 6808 };
6809 6809
6810 6810
6811 } // namespace dart 6811 } // namespace dart
6812 6812
6813 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6813 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.h ('k') | runtime/vm/intrinsifier.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698