Skip to content

Commit f61e77e

Browse files
catamorphismgraydon
authored andcommitted
Reindented things and removed superfluous comments, nothing to see here
1 parent 844fe20 commit f61e77e

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

src/comp/middle/typestate_check.rs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,6 @@ fn mk_fn_info_item_obj(&fn_info_map fi, &span sp, ident i, &ast._obj o,
367367
auto all_methods = _vec.clone[@method](o.methods);
368368
plus_option[@method](all_methods, o.dtor);
369369
for (@method m in all_methods) {
370-
/* FIXME: also need to pass in fields so we can say
371-
they're initialized? */
372370
fi.insert(m.node.id, mk_fn_info(m.node.meth));
373371
log(m.node.ident + " has " +
374372
uistr(num_locals(mk_fn_info(m.node.meth))) + " local vars");
@@ -1938,7 +1936,7 @@ fn find_pre_post_state_stmt(&fn_info_map fm, &fn_info enclosing,
19381936
|| changed;
19391937
changed = extend_poststate(stmt_ann.states.poststate,
19401938
expr_poststate(*e)) || changed;
1941-
1939+
/*
19421940
log("Summary: stmt = ");
19431941
log_stmt(*s);
19441942
log("prestate = ");
@@ -1949,7 +1947,7 @@ fn find_pre_post_state_stmt(&fn_info_map fm, &fn_info enclosing,
19491947
log_bitv(enclosing, stmt_ann.states.poststate);
19501948
log("changed =");
19511949
log(changed);
1952-
1950+
*/
19531951
ret changed;
19541952
}
19551953
case (_) { ret false; }
@@ -2105,12 +2103,12 @@ fn check_states_against_conditions(fn_info enclosing, &ast._fn f) -> () {
21052103
fn check_fn_states(&fn_info_map f_info_map, &fn_info f_info, &ast._fn f)
21062104
-> () {
21072105
/* Compute the pre- and post-states for this function */
2108-
auto g = find_pre_post_state_fn;
2109-
fixed_point_states(f_info_map, f_info, g, f);
2110-
2106+
auto g = find_pre_post_state_fn;
2107+
fixed_point_states(f_info_map, f_info, g, f);
2108+
21112109
/* Now compare each expr's pre-state to its precondition
21122110
and post-state to its postcondition */
2113-
check_states_against_conditions(f_info, f);
2111+
check_states_against_conditions(f_info, f);
21142112
}
21152113

21162114
fn check_item_fn_state(&fn_info_map f_info_map, &span sp, ident i,
@@ -2598,13 +2596,8 @@ fn check_crate(@ast.crate crate) -> @ast.crate {
25982596
auto fm = mk_f_to_fn_info(crate);
25992597

26002598
/* Add a blank ts_ann to every statement (and expression) */
2601-
/*
2602-
auto fld0 = fold.new_identity_fold[fn_info_map]();
2603-
fld0 = @rec(fold_item_fn = bind item_fn_anns(_,_,_,_,_,_,_)
2604-
with *fld0);
2605-
*/
26062599
auto with_anns = annotate_crate(fm, crate);
2607-
2600+
26082601
/* Compute the pre and postcondition for every subexpression */
26092602
auto fld = fold.new_identity_fold[fn_info_map]();
26102603
fld = @rec(fold_item_fn = bind check_item_fn(_,_,_,_,_,_,_) with *fld);

0 commit comments

Comments
 (0)