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

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

Issue 509373003: Manually inline fixed-size list's forEach, to make it possible for the VM to optimize. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up iterator and force inline. Created 6 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
« no previous file with comments | « runtime/lib/array.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_METHOD_RECOGNIZER_H_ 5 #ifndef VM_METHOD_RECOGNIZER_H_
6 #define VM_METHOD_RECOGNIZER_H_ 6 #define VM_METHOD_RECOGNIZER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 PROFILER_LIB_INTRINSIC_LIST(V) 283 PROFILER_LIB_INTRINSIC_LIST(V)
284 284
285 #define RECOGNIZED_LIST(V) \ 285 #define RECOGNIZED_LIST(V) \
286 OTHER_RECOGNIZED_LIST(V) \ 286 OTHER_RECOGNIZED_LIST(V) \
287 ALL_INTRINSICS_LIST(V) 287 ALL_INTRINSICS_LIST(V)
288 288
289 // A list of core function that should always be inlined. 289 // A list of core function that should always be inlined.
290 #define INLINE_WHITE_LIST(V) \ 290 #define INLINE_WHITE_LIST(V) \
291 V(Object, ==, ObjectEquals, 1068471689) \ 291 V(Object, ==, ObjectEquals, 1068471689) \
292 V(_List, get:length, ObjectArrayLength, 1181352729) \ 292 V(_List, get:length, ObjectArrayLength, 1181352729) \
293 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \ 293 V(_ImmutableList, get:length, ImmutableArrayLength, 274917727) \
Vyacheslav Egorov (Google) 2014/08/28 14:35:23 Which iterator is used for _ImmutableList? Maybe
Anders Johnsen 2014/08/28 14:45:57 Same iterator (_FixedSizeArrayIterator). Added _Im
294 V(_TypedList, get:length, TypedDataLength, 522565357) \ 294 V(_TypedList, get:length, TypedDataLength, 522565357) \
295 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \ 295 V(_GrowableList, get:length, GrowableArrayLength, 778505107) \
296 V(_StringBase, get:length, StringBaseLength, 784399628) \ 296 V(_StringBase, get:length, StringBaseLength, 784399628) \
297 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \ 297 V(ListIterator, moveNext, ListIteratorMoveNext, 210829138) \
298 V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 1147271335) \
298 V(_GrowableList, get:iterator, GrowableArrayIterator, 1812933946) \ 299 V(_GrowableList, get:iterator, GrowableArrayIterator, 1812933946) \
299 V(_GrowableList, forEach, GrowableArrayForEach, 2085943947) \ 300 V(_GrowableList, forEach, GrowableArrayForEach, 2085943947) \
300 V(_List, ., ObjectArrayAllocate, 1595327584) \ 301 V(_List, ., ObjectArrayAllocate, 1595327584) \
301 V(_List, [], ObjectArrayGetIndexed, 795612476) \ 302 V(_List, [], ObjectArrayGetIndexed, 795612476) \
302 V(_List, []=, ObjectArraySetIndexed, 1288827575) \ 303 V(_List, []=, ObjectArraySetIndexed, 1288827575) \
303 V(_List, get:isEmpty, ObjectArrayIsEmpty, 2130247737) \ 304 V(_List, get:isEmpty, ObjectArrayIsEmpty, 2130247737) \
305 V(_List, get:iterator, ObjectArrayIterator, 458612415) \
306 V(_List, forEach, ObjectArrayForEach, 592525445) \
304 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1990177341) \ 307 V(_ImmutableList, [], ImmutableArrayGetIndexed, 1990177341) \
305 V(_GrowableList, [], GrowableArrayGetIndexed, 919108233) \ 308 V(_GrowableList, [], GrowableArrayGetIndexed, 919108233) \
306 V(_GrowableList, []=, GrowableArraySetIndexed, 1218649853) \ 309 V(_GrowableList, []=, GrowableArraySetIndexed, 1218649853) \
307 V(_Float32Array, [], Float32ArrayGetIndexed, 856653338) \ 310 V(_Float32Array, [], Float32ArrayGetIndexed, 856653338) \
308 V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464) \ 311 V(_Float32Array, []=, Float32ArraySetIndexed, 2086166464) \
309 V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297) \ 312 V(_Float64Array, [], Float64ArrayGetIndexed, 1779054297) \
310 V(_Float64Array, []=, Float64ArraySetIndexed, 243929230) \ 313 V(_Float64Array, []=, Float64ArraySetIndexed, 243929230) \
311 V(_Int8Array, [], Int8ArrayGetIndexed, 321230586) \ 314 V(_Int8Array, [], Int8ArrayGetIndexed, 321230586) \
312 V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685) \ 315 V(_Int8Array, []=, Int8ArraySetIndexed, 2050598685) \
313 V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140) \ 316 V(_Uint8Array, [], Uint8ArrayGetIndexed, 16125140) \
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 static Kind RecognizeKind(const Function& function); 387 static Kind RecognizeKind(const Function& function);
385 static bool AlwaysInline(const Function& function); 388 static bool AlwaysInline(const Function& function);
386 static bool PolymorphicTarget(const Function& function); 389 static bool PolymorphicTarget(const Function& function);
387 static const char* KindToCString(Kind kind); 390 static const char* KindToCString(Kind kind);
388 static void InitializeState(); 391 static void InitializeState();
389 }; 392 };
390 393
391 } // namespace dart 394 } // namespace dart
392 395
393 #endif // VM_METHOD_RECOGNIZER_H_ 396 #endif // VM_METHOD_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « runtime/lib/array.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698