Commit graph

22 commits

Author SHA1 Message Date
Brian Anderson
6432599c5d stdlib: Use if/alt expressions in std::bitv 2011-05-22 02:10:08 -04:00
Brian Anderson
fc8b9671bb stdlib: Export only what's needed from std::bitv 2011-05-20 22:12:57 -04:00
Tim Chevalier
e16b097599 Rewrite tstate.annotate to use walk instead of fold
and various other tidying in typestate
2011-05-19 11:40:16 -07:00
Tim Chevalier
ea1701de8c Add a set_all function in bitv that's the inverse of clear 2011-05-19 11:40:16 -07:00
Marijn Haverbeke
09d8ef8d51 Finally rename std::_xxx to std::xxx
Except for _task, which is still a keyword.
2011-05-17 20:41:41 +02:00
Graydon Hoare
fbbc1a77d2 Rewrite everything to use [] instead of vec() in value position. 2011-05-16 18:21:22 -07:00
Marijn Haverbeke
3816e57fd2 Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
2011-05-12 21:30:44 +02:00
Marijn Haverbeke
a3ec0b1f64 Rename std modules to be camelcased
(Have fun mergining your stuff with this.)
2011-05-06 22:51:19 +02:00
Marijn Haverbeke
1f45dda9d2 Remove 'deprecated mutable...' from our code
This should make compilation a bit less noisy.
2011-05-05 20:19:43 +02:00
Patrick Walton
147a2d655f Un-revert "Use different syntax for checks that matter to typestate", fixing the problem.
This reverts commit d08b443fff.
2011-05-02 17:50:46 -07:00
Graydon Hoare
d08b443fff Revert "Use different syntax for checks that matter to typestate"
This reverts commit aa25f22f19. It broke stage2, not sure why yet.
2011-05-02 17:35:33 -07:00
Tim Chevalier
aa25f22f19 Use different syntax for checks that matter to typestate
This giant commit changes the syntax of Rust to use "assert" for
"check" expressions that didn't mean anything to the typestate
system, and continue using "check" for checks that are used as
part of typestate checking.

Most of the changes are just replacing "check" with "assert" in test
cases and rustc.
2011-05-02 12:16:29 -07:00
Graydon Hoare
d2bd07dcb0 Remove effect system from src. 2011-04-19 13:35:49 -07:00
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)