Commit graph

9 commits

Author SHA1 Message Date
Tim Chevalier
d7e8818414 Further work on typestate. Handles expr_rec and expr_assign now.
Also changed the ts_ann field on statements to be an ann instead,
which explains most of the changes.

As well, got rid of the "warning: no type for expression" error
by filling in annotations for local decls in typeck (not sure whether
this was my fault or not).

Finally, in bitv, added a clone() function to copy a bit vector,
and fixed is_true, is_false, and to_str to not be nonsense.
2011-04-12 14:31:46 -07:00
Tim Chevalier
9c001af07c Implemented computing prestates and poststates for a few expression forms.
The typestate checker (if it's uncommented) now correctly rejects a
trivial example program that has an uninitialized variable.
2011-04-08 17:46:46 +00:00
Tim Chevalier
2e90bd94de Continued sketching out code for checking states against preconditions.
It's still sketchy. I added a typestate annotation field to statements
tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate
that's different from that of its child node. This necessitated trivial
changes to a bunch of other files all over to the compiler. I also added a
few small standard library functions, some of which I didn't actually end
up using but which I thought might be useful anyway.
2011-04-06 17:58:18 -07:00
Patrick Walton
0cf16e77ca Add "mutable?" to _vec in the standard library; fix callers 2011-03-18 14:01:03 -07:00
Graydon Hoare
11a10c7a7b Remove redundant imports in lib (rustc doesn't like 'std' as a synonym for root within std.rc anyway) 2011-03-09 17:29:18 -08:00
Graydon Hoare
3e9be14757 Add a check for binding an alias. Good thing, as we had two instances in our library. 2010-11-08 15:45:30 -08:00
Graydon Hoare
7db115834f Split out stratum-checking pass, implement more-strict (overly aggressive) impure-effect checking. 2010-11-02 15:24:46 -07:00
Dave Herman
6421c13157 eliminated bitv.test, which now lives in test/run-pass 2010-10-21 13:34:16 -07:00
Dave Herman
dbe27199b8 line length police; moved comp.util.bits to std.bitv 2010-10-21 11:39:53 -07:00
Renamed from src/comp/util/bits.rs (Browse further)