Skip to content

Commit 829b46f

Browse files
committed
---
yaml --- r: 12864 b: refs/heads/master c: 3f283bb h: refs/heads/master v: v3
1 parent 8bda0cc commit 829b46f

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: afca68b82089db479594c1d012375c7791cb5bd5
2+
refs/heads/master: 3f283bb168564b365cd361d8afff7d3809f02f02
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/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)