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

Side by Side Diff: lib/compiler/implementation/ssa/nodes.dart

Issue 10855004: Fix dominatedUsers for phis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | tests/language/type_propagation_phi_test.dart » ('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 interface HVisitor<R> { 5 interface HVisitor<R> {
6 R visitAdd(HAdd node); 6 R visitAdd(HAdd node);
7 R visitBailoutTarget(HBailoutTarget node); 7 R visitBailoutTarget(HBailoutTarget node);
8 R visitBitAnd(HBitAnd node); 8 R visitBitAnd(HBitAnd node);
9 R visitBitNot(HBitNot node); 9 R visitBitNot(HBitNot node);
10 R visitBitOr(HBitOr node); 10 R visitBitOr(HBitOr node);
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after
968 if (usersInCurrentBlock > 0) { 968 if (usersInCurrentBlock > 0) {
969 HInstruction current = otherBlock.first; 969 HInstruction current = otherBlock.first;
970 while (current !== other) { 970 while (current !== other) {
971 if (users.contains(current)) { 971 if (users.contains(current)) {
972 users.remove(current); 972 users.remove(current);
973 if (--usersInCurrentBlock == 0) break; 973 if (--usersInCurrentBlock == 0) break;
974 } 974 }
975 current = current.next; 975 current = current.next;
976 } 976 }
977 } 977 }
978 // Phis are before [other] too.
kasperl 2012/08/06 10:31:03 Newline before this (to match the rest of the meth
floitsch 2012/08/06 14:05:27 Done.
979 for (HPhi phi = otherBlock.phis.first; phi != null; phi = phi.next) {
kasperl 2012/08/06 10:31:03 !== null
floitsch 2012/08/06 14:05:27 Done.
980 users.remove(phi);
981 }
978 982
979 return users; 983 return users;
980 } 984 }
981 985
982 bool isConstant() => false; 986 bool isConstant() => false;
983 bool isConstantBoolean() => false; 987 bool isConstantBoolean() => false;
984 bool isConstantNull() => false; 988 bool isConstantNull() => false;
985 bool isConstantNumber() => false; 989 bool isConstantNumber() => false;
986 bool isConstantInteger() => false; 990 bool isConstantInteger() => false;
987 bool isConstantString() => false; 991 bool isConstantString() => false;
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 HBasicBlock get start() => expression.start; 2687 HBasicBlock get start() => expression.start;
2684 HBasicBlock get end() { 2688 HBasicBlock get end() {
2685 // We don't create a switch block if there are no cases. 2689 // We don't create a switch block if there are no cases.
2686 assert(!statements.isEmpty()); 2690 assert(!statements.isEmpty());
2687 return statements.last().end; 2691 return statements.last().end;
2688 } 2692 }
2689 2693
2690 bool accept(HStatementInformationVisitor visitor) => 2694 bool accept(HStatementInformationVisitor visitor) =>
2691 visitor.visitSwitchInfo(this); 2695 visitor.visitSwitchInfo(this);
2692 } 2696 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/type_propagation_phi_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698