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

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

Issue 22839003: Polymorphic inlining for some recognized methods in the optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 V(_Uint32x4, select, Uint32x4Select, 810336099) \ 125 V(_Uint32x4, select, Uint32x4Select, 810336099) \
126 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 25547408) \ 126 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 25547408) \
127 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 1176493005) \ 127 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 1176493005) \
128 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1237443319) \ 128 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1237443319) \
129 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 797585077) \ 129 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 797585077) \
130 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 912844231) \ 130 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 912844231) \
131 131
132 132
133 // A list of core function that should always be inlined. 133 // A list of core function that should always be inlined.
134 #define INLINE_WHITE_LIST(V) \ 134 #define INLINE_WHITE_LIST(V) \
135 V(_ObjectArray, get:length, ObjectArrayLength, 405297088) \
136 V(_ImmutableArray, get:length, ImmutableArrayLength, 433698233) \
137 V(_TypedList, get:length, TypedDataLength, 1004567191) \
138 V(_GrowableObjectArray, get:length, GrowableArrayLength, 725548050) \
139 V(_StringBase, get:length, StringBaseLength, 320803993) \
135 V(ListIterator, moveNext, ListIteratorMoveNext, 203118278) \ 140 V(ListIterator, moveNext, ListIteratorMoveNext, 203118278) \
136 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 810824939) \ 141 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 810824939) \
137 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 619038738) 142 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 619038738)
138 143
139 144
140 // Class that recognizes the name and owner of a function and returns the 145 // Class that recognizes the name and owner of a function and returns the
141 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 146 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
142 // functions. 147 // functions.
143 class MethodRecognizer : public AllStatic { 148 class MethodRecognizer : public AllStatic {
144 public: 149 public:
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 InstanceCallInstr* instance_call() const { return instance_call_; } 2693 InstanceCallInstr* instance_call() const { return instance_call_; }
2689 bool with_checks() const { return with_checks_; } 2694 bool with_checks() const { return with_checks_; }
2690 2695
2691 virtual intptr_t ArgumentCount() const { 2696 virtual intptr_t ArgumentCount() const {
2692 return instance_call()->ArgumentCount(); 2697 return instance_call()->ArgumentCount();
2693 } 2698 }
2694 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { 2699 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
2695 return instance_call()->PushArgumentAt(index); 2700 return instance_call()->PushArgumentAt(index);
2696 } 2701 }
2697 2702
2703 bool HasRecognizedTarget() const;
2704
2698 DECLARE_INSTRUCTION(PolymorphicInstanceCall) 2705 DECLARE_INSTRUCTION(PolymorphicInstanceCall)
2699 2706
2700 const ICData& ic_data() const { return ic_data_; } 2707 const ICData& ic_data() const { return ic_data_; }
2701 2708
2702 virtual bool CanDeoptimize() const { return true; } 2709 virtual bool CanDeoptimize() const { return true; }
2703 2710
2704 virtual EffectSet Effects() const { return EffectSet::All(); } 2711 virtual EffectSet Effects() const { return EffectSet::All(); }
2705 2712
2706 virtual void PrintOperandsTo(BufferFormatter* f) const; 2713 virtual void PrintOperandsTo(BufferFormatter* f) const;
2707 2714
(...skipping 3909 matching lines...) Expand 10 before | Expand all | Expand 10 after
6617 ForwardInstructionIterator* current_iterator_; 6624 ForwardInstructionIterator* current_iterator_;
6618 6625
6619 private: 6626 private:
6620 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6627 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6621 }; 6628 };
6622 6629
6623 6630
6624 } // namespace dart 6631 } // namespace dart
6625 6632
6626 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6633 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698