@@ -367,8 +367,6 @@ fn mk_fn_info_item_obj(&fn_info_map fi, &span sp, ident i, &ast._obj o,
367
367
auto all_methods = _vec. clone [ @method] ( o. methods ) ;
368
368
plus_option[ @method] ( all_methods, o. dtor ) ;
369
369
for ( @method m in all_methods) {
370
- /* FIXME: also need to pass in fields so we can say
371
- they're initialized? */
372
370
fi. insert ( m. node . id , mk_fn_info ( m. node . meth ) ) ;
373
371
log ( m. node . ident + " has " +
374
372
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,
1938
1936
|| changed;
1939
1937
changed = extend_poststate ( stmt_ann. states . poststate ,
1940
1938
expr_poststate ( * e) ) || changed;
1941
-
1939
+ /*
1942
1940
log("Summary: stmt = ");
1943
1941
log_stmt(*s);
1944
1942
log("prestate = ");
@@ -1949,7 +1947,7 @@ fn find_pre_post_state_stmt(&fn_info_map fm, &fn_info enclosing,
1949
1947
log_bitv(enclosing, stmt_ann.states.poststate);
1950
1948
log("changed =");
1951
1949
log(changed);
1952
-
1950
+ */
1953
1951
ret changed;
1954
1952
}
1955
1953
case ( _) { ret false ; }
@@ -2105,12 +2103,12 @@ fn check_states_against_conditions(fn_info enclosing, &ast._fn f) -> () {
2105
2103
fn check_fn_states ( & fn_info_map f_info_map, & fn_info f_info, & ast . _fn f)
2106
2104
-> ( ) {
2107
2105
/* 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
+
2111
2109
/* Now compare each expr's pre-state to its precondition
2112
2110
and post-state to its postcondition */
2113
- check_states_against_conditions ( f_info, f) ;
2111
+ check_states_against_conditions ( f_info, f) ;
2114
2112
}
2115
2113
2116
2114
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 {
2598
2596
auto fm = mk_f_to_fn_info( crate ) ;
2599
2597
2600
2598
/* 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
- */
2606
2599
auto with_anns = annotate_crate( fm, crate ) ;
2607
-
2600
+
2608
2601
/* Compute the pre and postcondition for every subexpression */
2609
2602
auto fld = fold. new_identity_fold[ fn_info_map] ( ) ;
2610
2603
fld = @rec( fold_item_fn = bind check_item_fn( _, _, _, _, _, _, _) with * fld) ;
0 commit comments