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

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

Issue 3010673002: [vm] Implement gradual refinement of types (Closed)
Patch Set: Address review comments Created 3 years, 3 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_type_propagator.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) 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/aot_optimizer.h" 5 #include "vm/aot_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 CallTargets* targets = CallTargets::Create(Z, unary_checks); 1722 CallTargets* targets = CallTargets::Create(Z, unary_checks);
1723 ASSERT(targets->HasSingleTarget()); 1723 ASSERT(targets->HasSingleTarget());
1724 const Function& target = targets->FirstTarget(); 1724 const Function& target = targets->FirstTarget();
1725 StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target); 1725 StaticCallInstr* call = StaticCallInstr::FromCall(Z, instr, target);
1726 instr->ReplaceWith(call, current_iterator()); 1726 instr->ReplaceWith(call, current_iterator());
1727 return; 1727 return;
1728 } 1728 }
1729 } 1729 }
1730 switch (instr->token_kind()) { 1730 switch (instr->token_kind()) {
1731 case Token::kEQ: 1731 case Token::kEQ:
1732 case Token::kNE:
1732 case Token::kLT: 1733 case Token::kLT:
1733 case Token::kLTE: 1734 case Token::kLTE:
1734 case Token::kGT: 1735 case Token::kGT:
1735 case Token::kGTE: { 1736 case Token::kGTE: {
1736 if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid) || 1737 if (HasOnlyTwoOf(*instr->ic_data(), kSmiCid) ||
1737 HasLikelySmiOperand(instr)) { 1738 HasLikelySmiOperand(instr)) {
1738 ASSERT(receiver_idx == 0); 1739 ASSERT(receiver_idx == 0);
1739 Definition* left = instr->ArgumentAt(0); 1740 Definition* left = instr->ArgumentAt(0);
1740 Definition* right = instr->ArgumentAt(1); 1741 Definition* right = instr->ArgumentAt(1);
1741 CheckedSmiComparisonInstr* smi_op = new (Z) 1742 CheckedSmiComparisonInstr* smi_op = new (Z)
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 FlowGraph::kEffect); 2099 FlowGraph::kEffect);
2099 current_iterator()->RemoveCurrentFromGraph(); 2100 current_iterator()->RemoveCurrentFromGraph();
2100 } 2101 }
2101 } 2102 }
2102 } 2103 }
2103 } 2104 }
2104 2105
2105 #endif // DART_PRECOMPILER 2106 #endif // DART_PRECOMPILER
2106 2107
2107 } // namespace dart 2108 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698