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

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

Issue 2968003004: Revert "The current growth strategy for growable arrays allocates a backing array of size 2 at (emp… (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/mirrors_api_impl.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) 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 RUNTIME_VM_METHOD_RECOGNIZER_H_ 5 #ifndef RUNTIME_VM_METHOD_RECOGNIZER_H_
6 #define RUNTIME_VM_METHOD_RECOGNIZER_H_ 6 #define RUNTIME_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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 V(_Double, *, Double_mul, Double, 0x66c66e3d) \ 161 V(_Double, *, Double_mul, Double, 0x66c66e3d) \
162 V(_Double, /, Double_div, Double, 0x034b9f08) \ 162 V(_Double, /, Double_div, Double, 0x034b9f08) \
163 V(_Double, get:isNaN, Double_getIsNaN, Bool, 0x0af9604a) \ 163 V(_Double, get:isNaN, Double_getIsNaN, Bool, 0x0af9604a) \
164 V(_Double, get:isInfinite, Double_getIsInfinite, Bool, 0x0f7a56e8) \ 164 V(_Double, get:isInfinite, Double_getIsInfinite, Bool, 0x0f7a56e8) \
165 V(_Double, get:isNegative, Double_getIsNegative, Bool, 0x3a597395) \ 165 V(_Double, get:isNegative, Double_getIsNegative, Bool, 0x3a597395) \
166 V(_Double, _mulFromInteger, Double_mulFromInteger, Double, 0x4fb72915) \ 166 V(_Double, _mulFromInteger, Double_mulFromInteger, Double, 0x4fb72915) \
167 V(_Double, .fromInteger, DoubleFromInteger, Double, 0x78d9de2c) \ 167 V(_Double, .fromInteger, DoubleFromInteger, Double, 0x78d9de2c) \
168 V(_List, []=, ObjectArraySetIndexed, Dynamic, 0x51691f4c) \ 168 V(_List, []=, ObjectArraySetIndexed, Dynamic, 0x51691f4c) \
169 V(_GrowableList, .withData, GrowableArray_Allocate, GrowableObjectArray, \ 169 V(_GrowableList, .withData, GrowableArray_Allocate, GrowableObjectArray, \
170 0x3468a26f) \ 170 0x3468a26f) \
171 V(_GrowableList, add, GrowableArray_add, Dynamic, 0x1ce3b4f8) \ 171 V(_GrowableList, add, GrowableArray_add, Dynamic, 0x19eaa9aa) \
172 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, Dynamic, 0x380184b1) \ 172 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, Dynamic, 0x380184b1) \
173 V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, Dynamic, \ 173 V(_RegExp, _ExecuteMatchSticky, RegExp_ExecuteMatchSticky, Dynamic, \
174 0x79b8f955) \ 174 0x79b8f955) \
175 V(Object, ==, ObjectEquals, Bool, 0x464c6a19) \ 175 V(Object, ==, ObjectEquals, Bool, 0x464c6a19) \
176 V(Object, get:runtimeType, ObjectRuntimeType, Type, 0x00e836ca) \ 176 V(Object, get:runtimeType, ObjectRuntimeType, Type, 0x00e836ca) \
177 V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, Bool, 0x597b967a) \ 177 V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, Bool, 0x597b967a) \
178 V(_StringBase, get:hashCode, String_getHashCode, Smi, 0x78c35fe7) \ 178 V(_StringBase, get:hashCode, String_getHashCode, Smi, 0x78c35fe7) \
179 V(_StringBase, get:isEmpty, StringBaseIsEmpty, Bool, 0x1fa6a4c9) \ 179 V(_StringBase, get:isEmpty, StringBaseIsEmpty, Bool, 0x1fa6a4c9) \
180 V(_StringBase, _substringMatches, StringBaseSubstringMatches, Bool, \ 180 V(_StringBase, _substringMatches, StringBaseSubstringMatches, Bool, \
181 0x649cbeef) \ 181 0x649cbeef) \
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 GRAPH_INTRINSICS_LIST(V) 373 GRAPH_INTRINSICS_LIST(V)
374 374
375 // A list of core function that should always be inlined. 375 // A list of core function that should always be inlined.
376 #define INLINE_WHITE_LIST(V) \ 376 #define INLINE_WHITE_LIST(V) \
377 V(Object, ==, ObjectEquals, 0x464c6a19) \ 377 V(Object, ==, ObjectEquals, 0x464c6a19) \
378 V(_List, get:length, ObjectArrayLength, 0x2594af31) \ 378 V(_List, get:length, ObjectArrayLength, 0x2594af31) \
379 V(_ImmutableList, get:length, ImmutableArrayLength, 0x2594af31) \ 379 V(_ImmutableList, get:length, ImmutableArrayLength, 0x2594af31) \
380 V(_TypedList, get:length, TypedDataLength, 0x20915079) \ 380 V(_TypedList, get:length, TypedDataLength, 0x20915079) \
381 V(_GrowableList, get:length, GrowableArrayLength, 0x18dd1255) \ 381 V(_GrowableList, get:length, GrowableArrayLength, 0x18dd1255) \
382 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x2e044a01) \ 382 V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x2e044a01) \
383 V(_GrowableList, add, GrowableListAdd, 0x1ce3b4f8) \ 383 V(_GrowableList, add, GrowableListAdd, 0x19eaa9aa) \
384 V(_GrowableList, removeLast, GrowableListRemoveLast, 0x3daaaca4) \ 384 V(_GrowableList, removeLast, GrowableListRemoveLast, 0x3daaaca4) \
385 V(_StringBase, get:length, StringBaseLength, 0x2a2c8f72) \ 385 V(_StringBase, get:length, StringBaseLength, 0x2a2c8f72) \
386 V(ListIterator, moveNext, ListIteratorMoveNext, 0x7ead154d) \ 386 V(ListIterator, moveNext, ListIteratorMoveNext, 0x7ead154d) \
387 V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 0x4197892b) \ 387 V(_FixedSizeArrayIterator, moveNext, FixedListIteratorMoveNext, 0x4197892b) \
388 V(_GrowableList, get:iterator, GrowableArrayIterator, 0x64c204d5) \ 388 V(_GrowableList, get:iterator, GrowableArrayIterator, 0x64c204d5) \
389 V(_GrowableList, forEach, GrowableArrayForEach, 0x4cc8215b) \ 389 V(_GrowableList, forEach, GrowableArrayForEach, 0x4cc8215b) \
390 V(_List, ., ObjectArrayAllocate, 0x6c3b54ee) \ 390 V(_List, ., ObjectArrayAllocate, 0x6c3b54ee) \
391 V(ListMixin, get:isEmpty, ListMixinIsEmpty, 0x7a327465) \ 391 V(ListMixin, get:isEmpty, ListMixinIsEmpty, 0x7a327465) \
392 V(_List, get:iterator, ObjectArrayIterator, 0x757431f3) \ 392 V(_List, get:iterator, ObjectArrayIterator, 0x757431f3) \
393 V(_List, forEach, ObjectArrayForEach, 0x4dfea652) \ 393 V(_List, forEach, ObjectArrayForEach, 0x4dfea652) \
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 553
554 // clang-format off 554 // clang-format off
555 // List of recognized list factories: 555 // List of recognized list factories:
556 // (factory-name-symbol, class-name-string, constructor-name-string, 556 // (factory-name-symbol, class-name-string, constructor-name-string,
557 // result-cid, fingerprint). 557 // result-cid, fingerprint).
558 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ 558 #define RECOGNIZED_LIST_FACTORY_LIST(V) \
559 V(_ListFactory, _List, ., kArrayCid, 0x6c3b54ee) \ 559 V(_ListFactory, _List, ., kArrayCid, 0x6c3b54ee) \
560 V(_GrowableListWithData, _GrowableList, .withData, kGrowableObjectArrayCid, \ 560 V(_GrowableListWithData, _GrowableList, .withData, kGrowableObjectArrayCid, \
561 0x3468a26f) \ 561 0x3468a26f) \
562 V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid, \ 562 V(_GrowableListFactory, _GrowableList, ., kGrowableObjectArrayCid, \
563 0x7c4346ab) \ 563 0x3bd724aa) \
564 V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x165876c2) \ 564 V(_Int8ArrayFactory, Int8List, ., kTypedDataInt8ArrayCid, 0x165876c2) \
565 V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x52988118) \ 565 V(_Uint8ArrayFactory, Uint8List, ., kTypedDataUint8ArrayCid, 0x52988118) \
566 V(_Uint8ClampedArrayFactory, Uint8ClampedList, ., \ 566 V(_Uint8ClampedArrayFactory, Uint8ClampedList, ., \
567 kTypedDataUint8ClampedArrayCid, 0x001256b6) \ 567 kTypedDataUint8ClampedArrayCid, 0x001256b6) \
568 V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x7c9690c9) \ 568 V(_Int16ArrayFactory, Int16List, ., kTypedDataInt16ArrayCid, 0x7c9690c9) \
569 V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x6f2698c3) \ 569 V(_Uint16ArrayFactory, Uint16List, ., kTypedDataUint16ArrayCid, 0x6f2698c3) \
570 V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x43b5bf2f) \ 570 V(_Int32ArrayFactory, Int32List, ., kTypedDataInt32ArrayCid, 0x43b5bf2f) \
571 V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0x243ae083) \ 571 V(_Uint32ArrayFactory, Uint32List, ., kTypedDataUint32ArrayCid, 0x243ae083) \
572 V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x3fb987a6) \ 572 V(_Int64ArrayFactory, Int64List, ., kTypedDataInt64ArrayCid, 0x3fb987a6) \
573 V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x13ea5ce3) \ 573 V(_Uint64ArrayFactory, Uint64List, ., kTypedDataUint64ArrayCid, 0x13ea5ce3) \
574 V(_Float64ArrayFactory, Float64List, ., kTypedDataFloat64ArrayCid, \ 574 V(_Float64ArrayFactory, Float64List, ., kTypedDataFloat64ArrayCid, \
575 0x37fd11d0) \ 575 0x37fd11d0) \
576 V(_Float32ArrayFactory, Float32List, ., kTypedDataFloat32ArrayCid, \ 576 V(_Float32ArrayFactory, Float32List, ., kTypedDataFloat32ArrayCid, \
577 0x5b6f3f2a) \ 577 0x5b6f3f2a) \
578 V(_Float32x4ArrayFactory, Float32x4List, ., kTypedDataFloat32x4ArrayCid, \ 578 V(_Float32x4ArrayFactory, Float32x4List, ., kTypedDataFloat32x4ArrayCid, \
579 0x625f03f7) 579 0x625f03f7)
580 580
581 // clang-format on 581 // clang-format on
582 582
583 // Class that recognizes factories and returns corresponding result cid. 583 // Class that recognizes factories and returns corresponding result cid.
584 class FactoryRecognizer : public AllStatic { 584 class FactoryRecognizer : public AllStatic {
585 public: 585 public:
586 // Return kDynamicCid if factory is not recognized. 586 // Return kDynamicCid if factory is not recognized.
587 static intptr_t ResultCid(const Function& factory); 587 static intptr_t ResultCid(const Function& factory);
588 }; 588 };
589 589
590 } // namespace dart 590 } // namespace dart
591 591
592 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_ 592 #endif // RUNTIME_VM_METHOD_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/gc_sweeper.cc ('k') | runtime/vm/mirrors_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698