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

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

Issue 14969019: A load static of an initialized static final field can be converted to its value, as long as it is … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « no previous file | runtime/vm/flow_graph_optimizer.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_OPTIMIZER_H_ 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_
6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ 6 #define VM_FLOW_GRAPH_OPTIMIZER_H_
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 ConstantPropagator(FlowGraph* graph, 229 ConstantPropagator(FlowGraph* graph,
230 const GrowableArray<BlockEntryInstr*>& ignored); 230 const GrowableArray<BlockEntryInstr*>& ignored);
231 231
232 static void Optimize(FlowGraph* graph); 232 static void Optimize(FlowGraph* graph);
233 233
234 // Only visit branches to optimize away unreachable blocks discovered 234 // Only visit branches to optimize away unreachable blocks discovered
235 // by range analysis. 235 // by range analysis.
236 static void OptimizeBranches(FlowGraph* graph); 236 static void OptimizeBranches(FlowGraph* graph);
237 237
238 // Used to initialize the abstract value of definitions. 238 // Used to initialize the abstract value of definitions.
239 static RawObject* Unknown() { return Object::transition_sentinel().raw(); } 239 static RawObject* Unknown() { return Object::unknown_constant().raw(); }
240 240
241 private: 241 private:
242 void Analyze(); 242 void Analyze();
243 void VisitBranches(); 243 void VisitBranches();
244 void Transform(); 244 void Transform();
245 245
246 void SetReachable(BlockEntryInstr* block); 246 void SetReachable(BlockEntryInstr* block);
247 void SetValue(Definition* definition, const Object& value); 247 void SetValue(Definition* definition, const Object& value);
248 248
249 // Assign the join (least upper bound) of a pair of abstract values to the 249 // Assign the join (least upper bound) of a pair of abstract values to the
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 const ZoneGrowableArray<const Field*>& fields); 341 const ZoneGrowableArray<const Field*>& fields);
342 342
343 FlowGraph* flow_graph_; 343 FlowGraph* flow_graph_;
344 344
345 GrowableArray<MaterializeObjectInstr*> materializations_; 345 GrowableArray<MaterializeObjectInstr*> materializations_;
346 }; 346 };
347 347
348 } // namespace dart 348 } // namespace dart
349 349
350 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 350 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698