Comments only: annotate remainder of FIXMEs in typestate
This commit is contained in:
parent
64b5ae27ac
commit
8c6d439a81
@ -168,7 +168,9 @@ fn find_pre_post_state_call(fcx: fn_ctxt, pres: prestate, a: @expr,
|
||||
id: node_id, ops: [init_op], bs: [@expr],
|
||||
cf: ret_style) -> bool {
|
||||
let mut changed = find_pre_post_state_expr(fcx, pres, a);
|
||||
// FIXME: This could be a typestate constraint
|
||||
// FIXME: This could be a typestate constraint (except we're
|
||||
// not using them inside the compiler, I guess... see
|
||||
// discussion at #2178)
|
||||
if vec::len(bs) != vec::len(ops) {
|
||||
fcx.ccx.tcx.sess.span_bug(a.span,
|
||||
#fmt["mismatched arg lengths: \
|
||||
@ -511,8 +513,6 @@ fn find_pre_post_state_expr(fcx: fn_ctxt, pres: prestate, e: @expr) -> bool {
|
||||
ret find_pre_post_state_sub(fcx, pres, x, e.id, none);
|
||||
}
|
||||
expr_fail(maybe_fail_val) {
|
||||
// FIXME Should factor out this code,
|
||||
// which also appears in find_pre_post_state_exprs
|
||||
/* if execution continues after fail, then everything is true!
|
||||
woo! */
|
||||
let post = false_postcond(num_constrs);
|
||||
|
@ -27,6 +27,8 @@ export to_str;
|
||||
11 should never appear
|
||||
FIXME: typestate precondition (uncertain and val must
|
||||
have the same length; 11 should never appear in a given position)
|
||||
(except we're not putting typestate constraints in the compiler, as
|
||||
per discussion at #2178).
|
||||
*/
|
||||
|
||||
type t = {uncertain: bitv::bitv, val: bitv::bitv, nbits: uint};
|
||||
@ -88,11 +90,9 @@ fn trit_or(a: trit, b: trit) -> trit {
|
||||
tfalse {
|
||||
alt b {
|
||||
ttrue { dont_care }
|
||||
|
||||
|
||||
|
||||
|
||||
/* FIXME: ?????? */
|
||||
/* FIXME: ??????
|
||||
Again, unit tests would help here -- #2538
|
||||
*/
|
||||
_ {
|
||||
tfalse
|
||||
}
|
||||
@ -106,6 +106,7 @@ fn trit_or(a: trit, b: trit) -> trit {
|
||||
// all variables start out in a 0 state. Probably I need
|
||||
// to make it so that all constraints start out in a 0 state
|
||||
// (we consider a constraint false until proven true), too.
|
||||
// #2538 would help.
|
||||
fn trit_and(a: trit, b: trit) -> trit {
|
||||
alt a {
|
||||
dont_care { b }
|
||||
|
Loading…
x
Reference in New Issue
Block a user