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

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

Issue 13464021: Fix issue 9608: When replacing call with assert assignable, transfer call's deopt_id to the new nod… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/intermediate_language.h » ('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) 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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 } 1863 }
1864 const String& dst_name = String::ZoneHandle( 1864 const String& dst_name = String::ZoneHandle(
1865 Symbols::New(Exceptions::kCastErrorDstName)); 1865 Symbols::New(Exceptions::kCastErrorDstName));
1866 AssertAssignableInstr* assert_as = 1866 AssertAssignableInstr* assert_as =
1867 new AssertAssignableInstr(call->token_pos(), 1867 new AssertAssignableInstr(call->token_pos(),
1868 new Value(left), 1868 new Value(left),
1869 new Value(instantiator), 1869 new Value(instantiator),
1870 new Value(type_args), 1870 new Value(type_args),
1871 type, 1871 type,
1872 dst_name); 1872 dst_name);
1873 assert_as->deopt_id_ = call->deopt_id();
1873 ReplaceCall(call, assert_as); 1874 ReplaceCall(call, assert_as);
1874 } 1875 }
1875 1876
1876 1877
1877 // Tries to optimize instance call by replacing it with a faster instruction 1878 // Tries to optimize instance call by replacing it with a faster instruction
1878 // (e.g, binary op, field load, ..). 1879 // (e.g, binary op, field load, ..).
1879 void FlowGraphOptimizer::VisitInstanceCall(InstanceCallInstr* instr) { 1880 void FlowGraphOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
1880 if (!instr->HasICData() || (instr->ic_data()->NumberOfChecks() == 0)) { 1881 if (!instr->HasICData() || (instr->ic_data()->NumberOfChecks() == 0)) {
1881 return; 1882 return;
1882 } 1883 }
(...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after
4669 if (changed) { 4670 if (changed) {
4670 // We may have changed the block order and the dominator tree. 4671 // We may have changed the block order and the dominator tree.
4671 flow_graph->DiscoverBlocks(); 4672 flow_graph->DiscoverBlocks();
4672 GrowableArray<BitVector*> dominance_frontier; 4673 GrowableArray<BitVector*> dominance_frontier;
4673 flow_graph->ComputeDominators(&dominance_frontier); 4674 flow_graph->ComputeDominators(&dominance_frontier);
4674 } 4675 }
4675 } 4676 }
4676 4677
4677 4678
4678 } // namespace dart 4679 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698