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

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

Issue 25411004: Polymorphic inlining for []= operators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed checked mode 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013200152) \ 128 V(_Uint32x4, get:flagY, Uint32x4GetFlagY, 2013200152) \
129 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944733935) \ 129 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 944733935) \
130 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22746169) \ 130 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 22746169) \
131 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858144083) \ 131 V(_Uint32x4, get:signMask, Uint32x4GetSignMask, 1858144083) \
132 V(_Uint32x4, select, Uint32x4Select, 72244182) \ 132 V(_Uint32x4, select, Uint32x4Select, 72244182) \
133 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \ 133 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1475542073) \
134 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \ 134 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 830610988) \
135 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \ 135 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1714792414) \
136 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \ 136 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1516924162) \
137 V(_ObjectArray, [], ObjectArrayGetIndexed, 544020319) \ 137 V(_ObjectArray, [], ObjectArrayGetIndexed, 544020319) \
138 V(_ObjectArray, []=, ObjectArraySetIndexed, 304306010) \
138 V(_ImmutableArray, [], ImmutableArrayGetIndexed, 1345387065) \ 139 V(_ImmutableArray, [], ImmutableArrayGetIndexed, 1345387065) \
139 V(_GrowableObjectArray, [], GrowableArrayGetIndexed, 951312767) \ 140 V(_GrowableObjectArray, [], GrowableArrayGetIndexed, 951312767) \
141 V(_GrowableObjectArray, []=, GrowableArraySetIndexed, 1366856519) \
140 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \ 142 V(_Float32Array, [], Float32ArrayGetIndexed, 1225286513) \
143 V(_Float32Array, []=, Float32ArraySetIndexed, 1155155195) \
141 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \ 144 V(_Float64Array, [], Float64ArrayGetIndexed, 871118335) \
145 V(_Float64Array, []=, Float64ArraySetIndexed, 214271306) \
142 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \ 146 V(_Int8Array, [], Int8ArrayGetIndexed, 199925538) \
147 V(_Int8Array, []=, Int8ArraySetIndexed, 25452746) \
143 V(_Uint8Array, [], Uint8ArrayGetIndexed, 502448555) \ 148 V(_Uint8Array, [], Uint8ArrayGetIndexed, 502448555) \
149 V(_Uint8Array, []=, Uint8ArraySetIndexed, 182237960) \
144 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1292893603) \ 150 V(_Uint8ClampedArray, [], Uint8ClampedArrayGetIndexed, 1292893603) \
151 V(_Uint8ClampedArray, []=, Uint8ClampedArraySetIndexed, 670971404) \
145 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1831383216) \ 152 V(_ExternalUint8Array, [], ExternalUint8ArrayGetIndexed, 1831383216) \
153 V(_ExternalUint8Array, []=, ExternalUint8ArraySetIndexed, 1660673499) \
146 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \ 154 V(_ExternalUint8ClampedArray, [], ExternalUint8ClampedArrayGetIndexed, \
147 1831906095) \ 155 1831906095) \
156 V(_ExternalUint8ClampedArray, []=, ExternalUint8ClampedArraySetIndexed, \
157 19235519) \
148 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \ 158 V(_Int16Array, [], Int16ArrayGetIndexed, 1191799443) \
159 V(_Int16Array, []=, Int16ArraySetIndexed, 1182335435) \
149 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \ 160 V(_Uint16Array, [], Uint16ArrayGetIndexed, 814177144) \
161 V(_Uint16Array, []=, Uint16ArraySetIndexed, 663508528) \
150 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \ 162 V(_Int32Array, [], Int32ArrayGetIndexed, 787321640) \
163 V(_Int32Array, []=, Int32ArraySetIndexed, 1515238594) \
151 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \ 164 V(_Uint32Array, [], Uint32ArrayGetIndexed, 1421922726) \
165 V(_Uint32Array, []=, Uint32ArraySetIndexed, 1980947178) \
152 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \ 166 V(_Float32x4Array, [], Float32x4ArrayGetIndexed, 1901126825) \
167 V(_Float32x4Array, []=, Float32x4ArraySetIndexed, 1419416331) \
153 168
154 169
155 // A list of core function that should always be inlined. 170 // A list of core function that should always be inlined.
156 #define INLINE_WHITE_LIST(V) \ 171 #define INLINE_WHITE_LIST(V) \
157 V(_ObjectArray, get:length, ObjectArrayLength, 259382695) \ 172 V(_ObjectArray, get:length, ObjectArrayLength, 259382695) \
158 V(_ImmutableArray, get:length, ImmutableArrayLength, 1342001998) \ 173 V(_ImmutableArray, get:length, ImmutableArrayLength, 1342001998) \
159 V(_TypedList, get:length, TypedDataLength, 26616328) \ 174 V(_TypedList, get:length, TypedDataLength, 26616328) \
160 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160417196) \ 175 V(_GrowableObjectArray, get:length, GrowableArrayLength, 1160417196) \
161 V(_StringBase, get:length, StringBaseLength, 1483520063) \ 176 V(_StringBase, get:length, StringBaseLength, 1483520063) \
162 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \ 177 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \
(...skipping 3904 matching lines...) Expand 10 before | Expand all | Expand 10 after
4067 LoadFieldInstr(Value* instance, 4082 LoadFieldInstr(Value* instance,
4068 intptr_t offset_in_bytes, 4083 intptr_t offset_in_bytes,
4069 const AbstractType& type, 4084 const AbstractType& type,
4070 bool immutable = false) 4085 bool immutable = false)
4071 : offset_in_bytes_(offset_in_bytes), 4086 : offset_in_bytes_(offset_in_bytes),
4072 type_(type), 4087 type_(type),
4073 result_cid_(kDynamicCid), 4088 result_cid_(kDynamicCid),
4074 immutable_(immutable), 4089 immutable_(immutable),
4075 recognized_kind_(MethodRecognizer::kUnknown), 4090 recognized_kind_(MethodRecognizer::kUnknown),
4076 field_(NULL) { 4091 field_(NULL) {
4092 ASSERT(offset_in_bytes >= 0);
4077 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance. 4093 ASSERT(type.IsZoneHandle()); // May be null if field is not an instance.
4078 SetInputAt(0, instance); 4094 SetInputAt(0, instance);
4079 } 4095 }
4080 4096
4081 Value* instance() const { return inputs_[0]; } 4097 Value* instance() const { return inputs_[0]; }
4082 intptr_t offset_in_bytes() const { return offset_in_bytes_; } 4098 intptr_t offset_in_bytes() const { return offset_in_bytes_; }
4083 const AbstractType& type() const { return type_; } 4099 const AbstractType& type() const { return type_; }
4084 void set_result_cid(intptr_t value) { result_cid_ = value; } 4100 void set_result_cid(intptr_t value) { result_cid_ = value; }
4085 intptr_t result_cid() const { return result_cid_; } 4101 intptr_t result_cid() const { return result_cid_; }
4086 4102
(...skipping 2716 matching lines...) Expand 10 before | Expand all | Expand 10 after
6803 ForwardInstructionIterator* current_iterator_; 6819 ForwardInstructionIterator* current_iterator_;
6804 6820
6805 private: 6821 private:
6806 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6822 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6807 }; 6823 };
6808 6824
6809 6825
6810 } // namespace dart 6826 } // namespace dart
6811 6827
6812 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6828 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« runtime/vm/flow_graph_optimizer.h ('K') | « runtime/vm/flow_graph_optimizer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698