Skip to content

Commit 588d5a7

Browse files
committed
---
yaml --- r: 12869 b: refs/heads/master c: e546c48 h: refs/heads/master i: 12867: 2bbc457 v: v3
1 parent 5e430ef commit 588d5a7

File tree

3 files changed

+8009
-6
lines changed

3 files changed

+8009
-6
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: 09b9447eb66662d7dd249605f031f101a6618c96
2+
refs/heads/master: e546c4820b081dc5dc30634b0b2eb3feed2041aa
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: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,13 @@ fn seq_preconds(fcx: fn_ctxt, pps: [pre_and_post]) -> precond {
8080
let sz: uint = vec::len(pps);
8181
let num_vars: uint = num_constraints(fcx.enclosing);
8282

83-
fn seq_preconds_go(fcx: fn_ctxt, pps: [pre_and_post], first: pre_and_post)
83+
fn seq_preconds_go(fcx: fn_ctxt, pps: [pre_and_post],
84+
idx: uint, first: pre_and_post)
8485
-> precond {
85-
let mut pps = pps;
86+
let mut idx = idx;
8687
let mut first = first;
8788
loop {
88-
let sz: uint = vec::len(pps);
89+
let sz: uint = vec::len(pps) - idx;
8990
if sz >= 1u {
9091
let second = pps[0];
9192
assert (pps_len(second) == num_constraints(fcx.enclosing));
@@ -95,7 +96,7 @@ fn seq_preconds(fcx: fn_ctxt, pps: [pre_and_post]) -> precond {
9596
union(next_first, second_pre);
9697
let next_first_post = clone(first.postcondition);
9798
seq_tritv(next_first_post, second.postcondition);
98-
pps = vec::slice(pps, 1u, sz);
99+
idx += 1u;
99100
first = @{precondition: next_first,
100101
postcondition: next_first_post};
101102
} else { ret first.precondition; }
@@ -105,7 +106,7 @@ fn seq_preconds(fcx: fn_ctxt, pps: [pre_and_post]) -> precond {
105106
if sz >= 1u {
106107
let first = pps[0];
107108
assert (pps_len(first) == num_vars);
108-
ret seq_preconds_go(fcx, vec::slice(pps, 1u, sz), first);
109+
ret seq_preconds_go(fcx, pps, 1u, first);
109110
} else { ret true_precond(num_vars); }
110111
}
111112

0 commit comments

Comments
 (0)