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

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

Issue 2451893002: Revert "Recognize and optimize a.runtimeType == b.runtimeType pattern." (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_inliner.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_INLINER_H_ 5 #ifndef VM_FLOW_GRAPH_INLINER_H_
6 #define VM_FLOW_GRAPH_INLINER_H_ 6 #define VM_FLOW_GRAPH_INLINER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 class Definition; 13 class Definition;
14 class Field; 14 class Field;
15 class FlowGraph; 15 class FlowGraph;
16 class ForwardInstructionIterator; 16 class ForwardInstructionIterator;
17 class Function; 17 class Function;
18 class InstanceCallInstr; 18 class InstanceCallInstr;
19 class Instruction; 19 class Instruction;
20 class StaticCallInstr; 20 class StaticCallInstr;
21 class TargetEntryInstr; 21 class TargetEntryInstr;
22 class Precompiler;
23 22
24 class FlowGraphInliner : ValueObject { 23 class FlowGraphInliner : ValueObject {
25 public: 24 public:
26 FlowGraphInliner(FlowGraph* flow_graph, 25 FlowGraphInliner(FlowGraph* flow_graph,
27 GrowableArray<const Function*>* inline_id_to_function, 26 GrowableArray<const Function*>* inline_id_to_function,
28 GrowableArray<TokenPosition>* inline_id_to_token_pos, 27 GrowableArray<TokenPosition>* inline_id_to_token_pos,
29 GrowableArray<intptr_t>* caller_inline_id, 28 GrowableArray<intptr_t>* caller_inline_id,
30 bool use_speculative_inlining, 29 bool use_speculative_inlining,
31 GrowableArray<intptr_t>* inlining_black_list, 30 GrowableArray<intptr_t>* inlining_black_list);
32 Precompiler* precompiler);
33 31
34 // The flow graph is destructively updated upon inlining. 32 // The flow graph is destructively updated upon inlining.
35 void Inline(); 33 void Inline();
36 34
37 // Compute graph info if it was not already computed or if 'force' is true. 35 // Compute graph info if it was not already computed or if 'force' is true.
38 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false); 36 static void CollectGraphInfo(FlowGraph* flow_graph, bool force = false);
39 static void SetInliningId(FlowGraph* flow_graph, intptr_t inlining_id); 37 static void SetInliningId(FlowGraph* flow_graph, intptr_t inlining_id);
40 38
41 bool AlwaysInline(const Function& function); 39 bool AlwaysInline(const Function& function);
42 40
(...skipping 29 matching lines...) Expand all
72 private: 70 private:
73 friend class CallSiteInliner; 71 friend class CallSiteInliner;
74 72
75 FlowGraph* flow_graph_; 73 FlowGraph* flow_graph_;
76 GrowableArray<const Function*>* inline_id_to_function_; 74 GrowableArray<const Function*>* inline_id_to_function_;
77 GrowableArray<TokenPosition>* inline_id_to_token_pos_; 75 GrowableArray<TokenPosition>* inline_id_to_token_pos_;
78 GrowableArray<intptr_t>* caller_inline_id_; 76 GrowableArray<intptr_t>* caller_inline_id_;
79 const bool trace_inlining_; 77 const bool trace_inlining_;
80 const bool use_speculative_inlining_; 78 const bool use_speculative_inlining_;
81 GrowableArray<intptr_t>* inlining_black_list_; 79 GrowableArray<intptr_t>* inlining_black_list_;
82 Precompiler* precompiler_;
83 80
84 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner); 81 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner);
85 }; 82 };
86 83
87 } // namespace dart 84 } // namespace dart
88 85
89 #endif // VM_FLOW_GRAPH_INLINER_H_ 86 #endif // VM_FLOW_GRAPH_INLINER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698