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

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

Issue 19223002: Always try to inline certain core library functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_inliner.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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 782547529) \ 114 V(_Uint32x4, get:flagZ, Uint32x4GetFlagZ, 782547529) \
115 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 782547529) \ 115 V(_Uint32x4, get:flagW, Uint32x4GetFlagW, 782547529) \
116 V(_Uint32x4, select, Uint32x4Select, 810336099) \ 116 V(_Uint32x4, select, Uint32x4Select, 810336099) \
117 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 25547408) \ 117 V(_Uint32x4, withFlagX, Uint32x4WithFlagX, 25547408) \
118 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 1176493005) \ 118 V(_Uint32x4, withFlagY, Uint32x4WithFlagY, 1176493005) \
119 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1237443319) \ 119 V(_Uint32x4, withFlagZ, Uint32x4WithFlagZ, 1237443319) \
120 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 797585077) \ 120 V(_Uint32x4, withFlagW, Uint32x4WithFlagW, 797585077) \
121 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 912844231) \ 121 V(_Uint32x4, _toFloat32x4, Uint32x4ToUint32x4, 912844231) \
122 122
123 123
124 // A list of core function that should always be inlined.
125 #define INLINE_WHITE_LIST(V) \
126 V(ListIterator, moveNext, ListIteratorMoveNext, 203118278) \
127 V(_GrowableObjectArray, get:iterator, GrowableArrayIterator, 810824939)
128
124 // Class that recognizes the name and owner of a function and returns the 129 // Class that recognizes the name and owner of a function and returns the
125 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 130 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
126 // functions. 131 // functions.
127 class MethodRecognizer : public AllStatic { 132 class MethodRecognizer : public AllStatic {
128 public: 133 public:
129 enum Kind { 134 enum Kind {
130 kUnknown, 135 kUnknown,
131 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, 136 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
132 RECOGNIZED_LIST(DEFINE_ENUM_LIST) 137 RECOGNIZED_LIST(DEFINE_ENUM_LIST)
133 #undef DEFINE_ENUM_LIST 138 #undef DEFINE_ENUM_LIST
134 }; 139 };
135 140
136 static Kind RecognizeKind(const Function& function); 141 static Kind RecognizeKind(const Function& function);
142 static bool AlwaysInline(const Function& function);
137 static const char* KindToCString(Kind kind); 143 static const char* KindToCString(Kind kind);
138 }; 144 };
139 145
140 146
141 // CompileType describes type of the value produced by the definition. 147 // CompileType describes type of the value produced by the definition.
142 // 148 //
143 // It captures the following properties: 149 // It captures the following properties:
144 // - whether value can potentially be null or it is definitely not null; 150 // - whether value can potentially be null or it is definitely not null;
145 // - concrete class id of the value or kDynamicCid if unknown statically; 151 // - concrete class id of the value or kDynamicCid if unknown statically;
146 // - abstract super type of the value, concrete type of the value in runtime 152 // - abstract super type of the value, concrete type of the value in runtime
(...skipping 6366 matching lines...) Expand 10 before | Expand all | Expand 10 after
6513 ForwardInstructionIterator* current_iterator_; 6519 ForwardInstructionIterator* current_iterator_;
6514 6520
6515 private: 6521 private:
6516 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6522 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6517 }; 6523 };
6518 6524
6519 6525
6520 } // namespace dart 6526 } // namespace dart
6521 6527
6522 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6528 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698