Skip to content

Commit 06de5ba

Browse files
committed
---
yaml --- r: 15870 b: refs/heads/try c: 3f283bb h: refs/heads/master v: v3
1 parent 8be640a commit 06de5ba

File tree

3 files changed

+2021
-16
lines changed

3 files changed

+2021
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: afca68b82089db479594c1d012375c7791cb5bd5
5+
refs/heads/try: 3f283bb168564b365cd361d8afff7d3809f02f02
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rustc/middle/tstate/bitvectors.rs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,23 +82,26 @@ fn seq_preconds(fcx: fn_ctxt, pps: [pre_and_post]) -> precond {
8282

8383
fn seq_preconds_go(fcx: fn_ctxt, pps: [pre_and_post], first: pre_and_post)
8484
-> precond {
85-
let sz: uint = vec::len(pps);
86-
if sz >= 1u {
87-
let second = pps[0];
88-
assert (pps_len(second) == num_constraints(fcx.enclosing));
89-
let second_pre = clone(second.precondition);
90-
difference(second_pre, first.postcondition);
91-
let next_first = clone(first.precondition);
92-
union(next_first, second_pre);
93-
let next_first_post = clone(first.postcondition);
94-
seq_tritv(next_first_post, second.postcondition);
95-
ret seq_preconds_go(fcx, vec::slice(pps, 1u, sz),
96-
@{precondition: next_first,
97-
postcondition: next_first_post});
98-
} else { ret first.precondition; }
85+
let mut pps = pps;
86+
let mut first = first;
87+
loop {
88+
let sz: uint = vec::len(pps);
89+
if sz >= 1u {
90+
let second = pps[0];
91+
assert (pps_len(second) == num_constraints(fcx.enclosing));
92+
let second_pre = clone(second.precondition);
93+
difference(second_pre, first.postcondition);
94+
let next_first = clone(first.precondition);
95+
union(next_first, second_pre);
96+
let next_first_post = clone(first.postcondition);
97+
seq_tritv(next_first_post, second.postcondition);
98+
pps = vec::slice(pps, 1u, sz);
99+
first = @{precondition: next_first,
100+
postcondition: next_first_post};
101+
} else { ret first.precondition; }
102+
}
99103
}
100104

101-
102105
if sz >= 1u {
103106
let first = pps[0];
104107
assert (pps_len(first) == num_vars);

0 commit comments

Comments
 (0)