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

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

Issue 282073006: Inline Array allocation for constant lengths (except ARM64). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 V(_List, get:length, ObjectArrayLength, 215183186) \ 195 V(_List, get:length, ObjectArrayLength, 215183186) \
196 V(_ImmutableList, get:length, ImmutableArrayLength, 578762861) \ 196 V(_ImmutableList, get:length, ImmutableArrayLength, 578762861) \
197 V(_TypedList, get:length, TypedDataLength, 26646119) \ 197 V(_TypedList, get:length, TypedDataLength, 26646119) \
198 V(_GrowableList, get:length, GrowableArrayLength, 1654255033) \ 198 V(_GrowableList, get:length, GrowableArrayLength, 1654255033) \
199 V(_StringBase, get:length, StringBaseLength, 1483549854) \ 199 V(_StringBase, get:length, StringBaseLength, 1483549854) \
200 V(ListIterator, moveNext, ListIteratorMoveNext, 2062984847) \ 200 V(ListIterator, moveNext, ListIteratorMoveNext, 2062984847) \
201 V(_GrowableList, get:iterator, GrowableArrayIterator, 1155241039) \ 201 V(_GrowableList, get:iterator, GrowableArrayIterator, 1155241039) \
202 V(_GrowableList, forEach, GrowableArrayForEach, 195359970) \ 202 V(_GrowableList, forEach, GrowableArrayForEach, 195359970) \
203 V(_List, [], ObjectArrayGetIndexed, 675155875) \ 203 V(_List, [], ObjectArrayGetIndexed, 675155875) \
204 V(_List, []=, ObjectArraySetIndexed, 1228569706) \ 204 V(_List, []=, ObjectArraySetIndexed, 1228569706) \
205 V(_List, get:isEmpty, ObjectArrayIsEmpty, 1082804442) \
205 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1768793932) \ 206 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1768793932) \
206 V(_GrowableList, [], GrowableArrayGetIndexed, 1282104248) \ 207 V(_GrowableList, [], GrowableArrayGetIndexed, 1282104248) \
207 V(_GrowableList, []=, GrowableArraySetIndexed, 807019110) \ 208 V(_GrowableList, []=, GrowableArraySetIndexed, 807019110) \
208 V(_Float32Array, [], Float32ArrayGetIndexed, 1461569776) \ 209 V(_Float32Array, [], Float32ArrayGetIndexed, 1461569776) \
209 V(_Float32Array, []=, Float32ArraySetIndexed, 1318757370) \ 210 V(_Float32Array, []=, Float32ArraySetIndexed, 1318757370) \
210 V(_Float64Array, [], Float64ArrayGetIndexed, 1107401598) \ 211 V(_Float64Array, [], Float64ArrayGetIndexed, 1107401598) \
211 V(_Float64Array, []=, Float64ArraySetIndexed, 377873481) \ 212 V(_Float64Array, []=, Float64ArraySetIndexed, 377873481) \
212 V(_Int8Array, [], Int8ArrayGetIndexed, 436208801) \ 213 V(_Int8Array, [], Int8ArrayGetIndexed, 436208801) \
213 V(_Int8Array, []=, Int8ArraySetIndexed, 1257450859) \ 214 V(_Int8Array, []=, Int8ArraySetIndexed, 1257450859) \
214 V(_Uint8Array, [], Uint8ArrayGetIndexed, 738731818) \ 215 V(_Uint8Array, [], Uint8ArrayGetIndexed, 738731818) \
(...skipping 4160 matching lines...) Expand 10 before | Expand all | Expand 10 after
4375 Value* num_elements() const { return inputs_[kLengthPos]; } 4376 Value* num_elements() const { return inputs_[kLengthPos]; }
4376 4377
4377 virtual void PrintOperandsTo(BufferFormatter* f) const; 4378 virtual void PrintOperandsTo(BufferFormatter* f) const;
4378 4379
4379 // Throw needs environment, which is created only if instruction can 4380 // Throw needs environment, which is created only if instruction can
4380 // deoptimize. 4381 // deoptimize.
4381 virtual bool CanDeoptimize() const { return MayThrow(); } 4382 virtual bool CanDeoptimize() const { return MayThrow(); }
4382 4383
4383 virtual EffectSet Effects() const { return EffectSet::None(); } 4384 virtual EffectSet Effects() const { return EffectSet::None(); }
4384 4385
4385 // TODO(srdjan): return false if length is a positive Smi. 4386 // OutOfMemoryError can be called.
4386 virtual bool MayThrow() const { return true; } 4387 virtual bool MayThrow() const { return true; }
4387 4388
4388 virtual AliasIdentity Identity() const { return identity_; } 4389 virtual AliasIdentity Identity() const { return identity_; }
4389 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; } 4390 virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; }
4390 4391
4391 private: 4392 private:
4392 const intptr_t token_pos_; 4393 const intptr_t token_pos_;
4393 AliasIdentity identity_; 4394 AliasIdentity identity_;
4394 4395
4395 DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr); 4396 DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr);
(...skipping 3568 matching lines...) Expand 10 before | Expand all | Expand 10 after
7964 ForwardInstructionIterator* current_iterator_; 7965 ForwardInstructionIterator* current_iterator_;
7965 7966
7966 private: 7967 private:
7967 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 7968 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
7968 }; 7969 };
7969 7970
7970 7971
7971 } // namespace dart 7972 } // namespace dart
7972 7973
7973 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 7974 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698