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

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

Issue 2379733002: Recognize and optimize a.runtimeType == b.runtimeType pattern. (Closed)
Patch Set: fix lint Created 4 years, 1 month 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/jit_optimizer.cc ('k') | runtime/vm/object.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 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 V(_Double, get:isNegative, Double_getIsNegative, Bool, 0x3a58ff36) \ 160 V(_Double, get:isNegative, Double_getIsNegative, Bool, 0x3a58ff36) \
161 V(_Double, _mulFromInteger, Double_mulFromInteger, Double, 0x330e9a36) \ 161 V(_Double, _mulFromInteger, Double_mulFromInteger, Double, 0x330e9a36) \
162 V(_Double, .fromInteger, DoubleFromInteger, Double, 0x7ef45843) \ 162 V(_Double, .fromInteger, DoubleFromInteger, Double, 0x7ef45843) \
163 V(_List, []=, ObjectArraySetIndexed, Dynamic, 0x34d2c72c) \ 163 V(_List, []=, ObjectArraySetIndexed, Dynamic, 0x34d2c72c) \
164 V(_GrowableList, .withData, GrowableArray_Allocate, GrowableObjectArray, \ 164 V(_GrowableList, .withData, GrowableArray_Allocate, GrowableObjectArray, \
165 0x25a786de) \ 165 0x25a786de) \
166 V(_GrowableList, add, GrowableArray_add, Dynamic, 0x0d1358ed) \ 166 V(_GrowableList, add, GrowableArray_add, Dynamic, 0x0d1358ed) \
167 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, Dynamic, 0x6036d7fa) \ 167 V(_RegExp, _ExecuteMatch, RegExp_ExecuteMatch, Dynamic, 0x6036d7fa) \
168 V(Object, ==, ObjectEquals, Bool, 0x11662ed8) \ 168 V(Object, ==, ObjectEquals, Bool, 0x11662ed8) \
169 V(Object, get:runtimeType, ObjectRuntimeType, Type, 0x00e7c26b) \ 169 V(Object, get:runtimeType, ObjectRuntimeType, Type, 0x00e7c26b) \
170 V(Object, _haveSameRuntimeType, ObjectHaveSameRuntimeType, Bool, 0x72aad7e2) \
170 V(_StringBase, get:hashCode, String_getHashCode, Smi, 0x78c2eb88) \ 171 V(_StringBase, get:hashCode, String_getHashCode, Smi, 0x78c2eb88) \
171 V(_StringBase, get:isEmpty, StringBaseIsEmpty, Bool, 0x74c21fca) \ 172 V(_StringBase, get:isEmpty, StringBaseIsEmpty, Bool, 0x74c21fca) \
172 V(_StringBase, _substringMatches, StringBaseSubstringMatches, Bool, \ 173 V(_StringBase, _substringMatches, StringBaseSubstringMatches, Bool, \
173 0x2f851deb) \ 174 0x2f851deb) \
174 V(_StringBase, [], StringBaseCharAt, Dynamic, 0x2cf92c45) \ 175 V(_StringBase, [], StringBaseCharAt, Dynamic, 0x2cf92c45) \
175 V(_OneByteString, get:hashCode, OneByteString_getHashCode, Smi, 0x78c2eb88) \ 176 V(_OneByteString, get:hashCode, OneByteString_getHashCode, Smi, 0x78c2eb88) \
176 V(_OneByteString, _substringUncheckedNative, \ 177 V(_OneByteString, _substringUncheckedNative, \
177 OneByteString_substringUnchecked, OneByteString, 0x638c3722) \ 178 OneByteString_substringUnchecked, OneByteString, 0x638c3722) \
178 V(_OneByteString, _setAt, OneByteStringSetAt, Dynamic, 0x452533ef) \ 179 V(_OneByteString, _setAt, OneByteStringSetAt, Dynamic, 0x452533ef) \
179 V(_OneByteString, _allocate, OneByteString_allocate, OneByteString, \ 180 V(_OneByteString, _allocate, OneByteString_allocate, OneByteString, \
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0x4e82d1e9) \ 483 V(_TypedList, _setInt8, ByteArrayBaseSetInt8, 0x4e82d1e9) \
483 V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0x4f3587fc) \ 484 V(_TypedList, _setUint8, ByteArrayBaseSetInt8, 0x4f3587fc) \
484 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0x6cef30ee) \ 485 V(_TypedList, _setInt16, ByteArrayBaseSetInt16, 0x6cef30ee) \
485 V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0x64f938ac) \ 486 V(_TypedList, _setUint16, ByteArrayBaseSetInt16, 0x64f938ac) \
486 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0x3693c029) \ 487 V(_TypedList, _setInt32, ByteArrayBaseSetInt32, 0x3693c029) \
487 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0x74bbf260) \ 488 V(_TypedList, _setUint32, ByteArrayBaseSetUint32, 0x74bbf260) \
488 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0x6e72f2a4) \ 489 V(_TypedList, _setFloat32, ByteArrayBaseSetFloat32, 0x6e72f2a4) \
489 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0x4765edda) \ 490 V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0x4765edda) \
490 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x7cca4533) \ 491 V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x7cca4533) \
491 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0x7631bdbc) \ 492 V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0x7631bdbc) \
493 V(Object, get:runtimeType, ObjectRuntimeType, 0x00e7c26b) \
492 494
493 // Forward declarations. 495 // Forward declarations.
494 class Function; 496 class Function;
495 497
496 // Class that recognizes the name and owner of a function and returns the 498 // Class that recognizes the name and owner of a function and returns the
497 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 499 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
498 // functions. 500 // functions.
499 class MethodRecognizer : public AllStatic { 501 class MethodRecognizer : public AllStatic {
500 public: 502 public:
501 enum Kind { 503 enum Kind {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 // Class that recognizes factories and returns corresponding result cid. 553 // Class that recognizes factories and returns corresponding result cid.
552 class FactoryRecognizer : public AllStatic { 554 class FactoryRecognizer : public AllStatic {
553 public: 555 public:
554 // Return kDynamicCid if factory is not recognized. 556 // Return kDynamicCid if factory is not recognized.
555 static intptr_t ResultCid(const Function& factory); 557 static intptr_t ResultCid(const Function& factory);
556 }; 558 };
557 559
558 } // namespace dart 560 } // namespace dart
559 561
560 #endif // VM_METHOD_RECOGNIZER_H_ 562 #endif // VM_METHOD_RECOGNIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698