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

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

Issue 154393003: Implement eager instantiation and canonicalization of type arguments at run (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_FLOW_GRAPH_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
11 #include "vm/ast.h" 11 #include "vm/ast.h"
12 #include "vm/growable_array.h" 12 #include "vm/growable_array.h"
13 #include "vm/intermediate_language.h" 13 #include "vm/intermediate_language.h"
14 #include "vm/raw_object.h" 14 #include "vm/raw_object.h"
15 15
16 namespace dart { 16 namespace dart {
17 17
18 class AbstractType; 18 class AbstractType;
19 class AbstractTypeArguments;
20 class Array; 19 class Array;
21 class Class; 20 class Class;
22 class Field; 21 class Field;
23 class FlowGraph; 22 class FlowGraph;
24 class LocalVariable; 23 class LocalVariable;
25 class ParsedFunction; 24 class ParsedFunction;
26 class String; 25 class String;
26 class TypeArguments;
27 27
28 class NestedStatement; 28 class NestedStatement;
29 class TestGraphVisitor; 29 class TestGraphVisitor;
30 30
31 // List of recognized list factories: 31 // List of recognized list factories:
32 // (factory-name-symbol, result-cid, fingerprint). 32 // (factory-name-symbol, result-cid, fingerprint).
33 // TODO(srdjan): Store the values in the snapshot instead. 33 // TODO(srdjan): Store the values in the snapshot instead.
34 #define RECOGNIZED_LIST_FACTORY_LIST(V) \ 34 #define RECOGNIZED_LIST_FACTORY_LIST(V) \
35 V(_ListFactory, kArrayCid, 176587978) \ 35 V(_ListFactory, kArrayCid, 176587978) \
36 V(_GrowableListWithData, kGrowableObjectArrayCid, 264792196) \ 36 V(_GrowableListWithData, kGrowableObjectArrayCid, 264792196) \
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 // Helpers for translating parts of the AST. 328 // Helpers for translating parts of the AST.
329 void BuildPushArguments(const ArgumentListNode& node, 329 void BuildPushArguments(const ArgumentListNode& node,
330 ZoneGrowableArray<PushArgumentInstr*>* values); 330 ZoneGrowableArray<PushArgumentInstr*>* values);
331 331
332 // Creates an instantiated type argument vector used in preparation of an 332 // Creates an instantiated type argument vector used in preparation of an
333 // allocation call. 333 // allocation call.
334 // May be called only if allocating an object of a parameterized class. 334 // May be called only if allocating an object of a parameterized class.
335 Value* BuildInstantiatedTypeArguments( 335 Value* BuildInstantiatedTypeArguments(
336 intptr_t token_pos, 336 intptr_t token_pos,
337 const AbstractTypeArguments& type_arguments); 337 const TypeArguments& type_arguments);
338 338
339 // Creates a possibly uninstantiated type argument vector and the type 339 // Creates a possibly uninstantiated type argument vector and the type
340 // argument vector of the instantiator used in 340 // argument vector of the instantiator used in
341 // preparation of a constructor call. 341 // preparation of a constructor call.
342 // May be called only if allocating an object of a parameterized class. 342 // May be called only if allocating an object of a parameterized class.
343 void BuildConstructorTypeArguments( 343 void BuildConstructorTypeArguments(
344 ConstructorCallNode* node, 344 ConstructorCallNode* node,
345 ZoneGrowableArray<PushArgumentInstr*>* call_arguments); 345 ZoneGrowableArray<PushArgumentInstr*>* call_arguments);
346 346
347 void BuildTypecheckPushArguments( 347 void BuildTypecheckPushArguments(
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 // Output parameters. 568 // Output parameters.
569 GrowableArray<TargetEntryInstr**> true_successor_addresses_; 569 GrowableArray<TargetEntryInstr**> true_successor_addresses_;
570 GrowableArray<TargetEntryInstr**> false_successor_addresses_; 570 GrowableArray<TargetEntryInstr**> false_successor_addresses_;
571 571
572 intptr_t condition_token_pos_; 572 intptr_t condition_token_pos_;
573 }; 573 };
574 574
575 } // namespace dart 575 } // namespace dart
576 576
577 #endif // VM_FLOW_GRAPH_BUILDER_H_ 577 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698