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

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

Issue 26191002: Hook ByteArrayViewLoad operations into polymorphic inliner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 // A list of core function that should always be inlined. 171 // A list of core function that should always be inlined.
172 #define INLINE_WHITE_LIST(V) \ 172 #define INLINE_WHITE_LIST(V) \
173 V(_List, get:length, ObjectArrayLength, 215153395) \ 173 V(_List, get:length, ObjectArrayLength, 215153395) \
174 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \ 174 V(_ImmutableList, get:length, ImmutableArrayLength, 578733070) \
175 V(_TypedList, get:length, TypedDataLength, 26616328) \ 175 V(_TypedList, get:length, TypedDataLength, 26616328) \
176 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \ 176 V(_GrowableList, get:length, GrowableArrayLength, 1654225242) \
177 V(_StringBase, get:length, StringBaseLength, 1483520063) \ 177 V(_StringBase, get:length, StringBaseLength, 1483520063) \
178 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \ 178 V(ListIterator, moveNext, ListIteratorMoveNext, 90930587) \
179 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \ 179 V(_GrowableList, get:iterator, GrowableArrayIterator, 1305127405) \
180 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) 180 V(_GrowableList, forEach, GrowableArrayForEach, 1675430533) \
181 181
182 // A list of core functions that internally dispatch based on received id.
183 #define POLYMORPHC_TARGET_LIST(V) \
184 V(_TypedList, _getInt8, ByteArrayBaseGetInt8, 272598802) \
185 V(_TypedList, _getUint8, ByteArrayBaseGetUint8, 831354841) \
186 V(_TypedList, _getInt16, ByteArrayBaseGetInt16, 1832126257) \
187 V(_TypedList, _getUint16, ByteArrayBaseGetUint16, 1762714698) \
188 V(_TypedList, _getInt32, ByteArrayBaseGetInt32, 48785449) \
189 V(_TypedList, _getUint32, ByteArrayBaseGetUint32, 1392579206) \
190 V(_TypedList, _getFloat32, ByteArrayBaseGetFloat32, 185163470) \
191 V(_TypedList, _getFloat64, ByteArrayBaseGetFloat64, 1356392173) \
192 V(_TypedList, _getFloat32x4, ByteArrayBaseGetFloat32x4, 1239681356) \
182 193
183 // Class that recognizes the name and owner of a function and returns the 194 // Class that recognizes the name and owner of a function and returns the
184 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable 195 // corresponding enum. See RECOGNIZED_LIST above for list of recognizable
185 // functions. 196 // functions.
186 class MethodRecognizer : public AllStatic { 197 class MethodRecognizer : public AllStatic {
187 public: 198 public:
188 enum Kind { 199 enum Kind {
189 kUnknown, 200 kUnknown,
190 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name, 201 #define DEFINE_ENUM_LIST(class_name, function_name, enum_name, fp) k##enum_name,
191 RECOGNIZED_LIST(DEFINE_ENUM_LIST) 202 RECOGNIZED_LIST(DEFINE_ENUM_LIST)
192 #undef DEFINE_ENUM_LIST 203 #undef DEFINE_ENUM_LIST
193 }; 204 };
194 205
195 static Kind RecognizeKind(const Function& function); 206 static Kind RecognizeKind(const Function& function);
196 static bool AlwaysInline(const Function& function); 207 static bool AlwaysInline(const Function& function);
208 static bool PolymorphicTarget(const Function& function);
197 static const char* KindToCString(Kind kind); 209 static const char* KindToCString(Kind kind);
198 static void InitializeState(); 210 static void InitializeState();
199 }; 211 };
200 212
201 213
202 // CompileType describes type of the value produced by the definition. 214 // CompileType describes type of the value produced by the definition.
203 // 215 //
204 // It captures the following properties: 216 // It captures the following properties:
205 // - whether value can potentially be null or it is definitely not null; 217 // - whether value can potentially be null or it is definitely not null;
206 // - concrete class id of the value or kDynamicCid if unknown statically; 218 // - concrete class id of the value or kDynamicCid if unknown statically;
(...skipping 6652 matching lines...) Expand 10 before | Expand all | Expand 10 after
6859 ForwardInstructionIterator* current_iterator_; 6871 ForwardInstructionIterator* current_iterator_;
6860 6872
6861 private: 6873 private:
6862 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 6874 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
6863 }; 6875 };
6864 6876
6865 6877
6866 } // namespace dart 6878 } // namespace dart
6867 6879
6868 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 6880 #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