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

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: fixed modulo performance regression 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
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 V(_Uint32x4, select, Uint32x4Select, 881590808) \ 129 V(_Uint32x4, select, Uint32x4Select, 881590808) \
130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1987921054) \ 130 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 1987921054) \
131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 831632614) \ 131 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 831632614) \
132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 465765612) \ 132 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 465765612) \
133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1545009993) \ 133 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 1545009993) \
134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 1545735523) \ 134 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 1545735523) \
135 135
136 136
137 // A list of core function that should always be inlined. 137 // A list of core function that should always be inlined.
138 #define INLINE_WHITE_LIST(V) \ 138 #define INLINE_WHITE_LIST(V) \
139 V(_ObjectArray, get:length, ObjectArrayLength, 1441000484) \
140 V(_ImmutableArray, get:length, ImmutableArrayLength, 1430953867) \
141 V(_TypedList, get:length, TypedDataLength, 117589485) \
142 V(_GrowableObjectArray, get:length, GrowableArrayLength, 767561362) \
143 V(_StringBase, get:length, StringBaseLength, 1158042795) \
139 V(ListIterator, moveNext, ListIteratorMoveNext, 657540761) \ 144 V(ListIterator, moveNext, ListIteratorMoveNext, 657540761) \
140 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 281980741) \ 145 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 281980741) \
141 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 334448248) 146 V(_GrowableObjectArray, forEach, GrowableArrayForEach, 334448248)
142 147
143 148
144 // Class that recognizes the name and owner of a function and returns the 149 // Class that recognizes the name and owner of a function and returns the
145 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 150 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
146 // functions. 151 // functions.
147 class MethodRecognizer : public AllStatic { 152 class MethodRecognizer : public AllStatic {
148 public: 153 public:
(...skipping 2547 matching lines...) Expand 10 before | Expand all | Expand 10 after
2696 InstanceCallInstr* instance_call() const { return instance_call_; } 2701 InstanceCallInstr* instance_call() const { return instance_call_; }
2697 bool with_checks() const { return with_checks_; } 2702 bool with_checks() const { return with_checks_; }
2698 2703
2699 virtual intptr_t ArgumentCount() const { 2704 virtual intptr_t ArgumentCount() const {
2700 return instance_call()->ArgumentCount(); 2705 return instance_call()->ArgumentCount();
2701 } 2706 }
2702 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const { 2707 virtual PushArgumentInstr* PushArgumentAt(intptr_t index) const {
2703 return instance_call()->PushArgumentAt(index); 2708 return instance_call()->PushArgumentAt(index);
2704 } 2709 }
2705 2710
2711 bool HasRecognizedTarget() const;
2712
2706 DECLARE_INSTRUCTION(PolymorphicInstanceCall) 2713 DECLARE_INSTRUCTION(PolymorphicInstanceCall)
2707 2714
2708 const ICData& ic_data() const { return ic_data_; } 2715 const ICData& ic_data() const { return ic_data_; }
2709 2716
2710 virtual bool CanDeoptimize() const { return true; } 2717 virtual bool CanDeoptimize() const { return true; }
2711 2718
2712 virtual EffectSet Effects() const { return EffectSet::All(); } 2719 virtual EffectSet Effects() const { return EffectSet::All(); }
2713 2720
2714 virtual void PrintOperandsTo(BufferFormatter* f) const; 2721 virtual void PrintOperandsTo(BufferFormatter* f) const;
2715 2722
(...skipping 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after
6733 ForwardInstructionIterator* current_iterator_; 6740 ForwardInstructionIterator* current_iterator_;
6734 6741
6735 private: 6742 private:
6736 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6743 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6737 }; 6744 };
6738 6745
6739 6746
6740 } // namespace dart 6747 } // namespace dart
6741 6748
6742 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6749 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698