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

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

Issue 14740005: Initial support for polymorphic inlining. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated review comments. Created 7 years, 7 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_allocator.cc ('k') | runtime/vm/flow_graph_builder.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) 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 "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 28 matching lines...) Expand all
39 39
40 // An class to collect the exits from an inlined function during graph 40 // An class to collect the exits from an inlined function during graph
41 // construction so they can be plugged into the caller's flow graph. 41 // construction so they can be plugged into the caller's flow graph.
42 class InlineExitCollector: public ZoneAllocated { 42 class InlineExitCollector: public ZoneAllocated {
43 public: 43 public:
44 InlineExitCollector(FlowGraph* caller_graph, Definition* call) 44 InlineExitCollector(FlowGraph* caller_graph, Definition* call)
45 : caller_graph_(caller_graph), call_(call), exits_(4) { } 45 : caller_graph_(caller_graph), call_(call), exits_(4) { }
46 46
47 void AddExit(ReturnInstr* exit); 47 void AddExit(ReturnInstr* exit);
48 48
49 void Union(const InlineExitCollector* other);
50
49 // Before replacing a call with a graph, the outer environment needs to be 51 // Before replacing a call with a graph, the outer environment needs to be
50 // attached to each instruction in the callee graph and the caller graph 52 // attached to each instruction in the callee graph and the caller graph
51 // needs to have its block and instruction ID state updated. 53 // needs to have its block and instruction ID state updated.
52 void PrepareGraphs(FlowGraph* callee_graph); 54 void PrepareGraphs(FlowGraph* callee_graph);
53 55
54 // Inline a graph at a call site. 56 // Inline a graph at a call site.
55 // 57 //
56 // Assumes the callee is in SSA with a correct dominator tree and use 58 // Assumes the callee is in SSA with a correct dominator tree and use
57 // lists. 59 // lists.
58 // 60 //
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 // Output parameters. 481 // Output parameters.
480 GrowableArray<TargetEntryInstr**> true_successor_addresses_; 482 GrowableArray<TargetEntryInstr**> true_successor_addresses_;
481 GrowableArray<TargetEntryInstr**> false_successor_addresses_; 483 GrowableArray<TargetEntryInstr**> false_successor_addresses_;
482 484
483 intptr_t condition_token_pos_; 485 intptr_t condition_token_pos_;
484 }; 486 };
485 487
486 } // namespace dart 488 } // namespace dart
487 489
488 #endif // VM_FLOW_GRAPH_BUILDER_H_ 490 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698