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

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

Issue 27192005: Add new style of string interpolation optimization: new nodes, working constant folding. (Closed) Base URL: http://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_builder.cc ('k') | 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 } 286 }
287 bool IsConstant(const Object& value) { 287 bool IsConstant(const Object& value) {
288 return !IsNonConstant(value) && !IsUnknown(value); 288 return !IsNonConstant(value) && !IsUnknown(value);
289 } 289 }
290 290
291 void HandleBinaryOp(Definition* instr, 291 void HandleBinaryOp(Definition* instr,
292 Token::Kind op_kind, 292 Token::Kind op_kind,
293 const Value& left, 293 const Value& left,
294 const Value& right); 294 const Value& right);
295 295
296 void RemoveInterpolationInputs(const StaticCallInstr& call);
297
298 virtual void VisitBlocks() { UNREACHABLE(); } 296 virtual void VisitBlocks() { UNREACHABLE(); }
299 297
300 #define DECLARE_VISIT(type) virtual void Visit##type(type##Instr* instr); 298 #define DECLARE_VISIT(type) virtual void Visit##type(type##Instr* instr);
301 FOR_EACH_INSTRUCTION(DECLARE_VISIT) 299 FOR_EACH_INSTRUCTION(DECLARE_VISIT)
302 #undef DECLARE_VISIT 300 #undef DECLARE_VISIT
303 301
304 FlowGraph* graph_; 302 FlowGraph* graph_;
305 303
306 // Sentinels for unknown constant and non-constant values. 304 // Sentinels for unknown constant and non-constant values.
307 const Object& unknown_; 305 const Object& unknown_;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // Optimize spill stores inside try-blocks by identifying values that always 382 // Optimize spill stores inside try-blocks by identifying values that always
385 // contain a single known constant at catch block entry. 383 // contain a single known constant at catch block entry.
386 class TryCatchAnalyzer : public AllStatic { 384 class TryCatchAnalyzer : public AllStatic {
387 public: 385 public:
388 static void Optimize(FlowGraph* flow_graph); 386 static void Optimize(FlowGraph* flow_graph);
389 }; 387 };
390 388
391 } // namespace dart 389 } // namespace dart
392 390
393 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 391 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698