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

Side by Side Diff: runtime/vm/constant_propagator.cc

Issue 2894953002: Support inlining of calls where type arguments are passed to generic functions. (Closed)
Patch Set: work in progress Created 3 years, 6 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 #include "vm/constant_propagator.h" 5 #include "vm/constant_propagator.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/flow_graph_compiler.h" 9 #include "vm/flow_graph_compiler.h"
10 #include "vm/flow_graph_range_analysis.h" 10 #include "vm/flow_graph_range_analysis.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 } else if (IsConstant(value)) { 366 } else if (IsConstant(value)) {
367 if (value.IsBool()) { 367 if (value.IsBool()) {
368 SetValue(instr, value); 368 SetValue(instr, value);
369 } else { 369 } else {
370 SetValue(instr, non_constant_); 370 SetValue(instr, non_constant_);
371 } 371 }
372 } 372 }
373 } 373 }
374 374
375 375
376 void ConstantPropagator::VisitCurrentContext(CurrentContextInstr* instr) { 376 void ConstantPropagator::VisitSpecialParameter(SpecialParameterInstr* instr) {
377 SetValue(instr, non_constant_); 377 SetValue(instr, non_constant_);
378 } 378 }
379 379
380 380
381 void ConstantPropagator::VisitClosureCall(ClosureCallInstr* instr) { 381 void ConstantPropagator::VisitClosureCall(ClosureCallInstr* instr) {
382 SetValue(instr, non_constant_); 382 SetValue(instr, non_constant_);
383 } 383 }
384 384
385 385
386 void ConstantPropagator::VisitInstanceCall(InstanceCallInstr* instr) { 386 void ConstantPropagator::VisitInstanceCall(InstanceCallInstr* instr) {
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 GrowableArray<BitVector*> dominance_frontier; 1735 GrowableArray<BitVector*> dominance_frontier;
1736 graph_->ComputeDominators(&dominance_frontier); 1736 graph_->ComputeDominators(&dominance_frontier);
1737 1737
1738 if (FLAG_trace_constant_propagation && 1738 if (FLAG_trace_constant_propagation &&
1739 FlowGraphPrinter::ShouldPrint(graph_->function())) { 1739 FlowGraphPrinter::ShouldPrint(graph_->function())) {
1740 FlowGraphPrinter::PrintGraph("After CP", graph_); 1740 FlowGraphPrinter::PrintGraph("After CP", graph_);
1741 } 1741 }
1742 } 1742 }
1743 1743
1744 } // namespace dart 1744 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698