Commit graph

15 commits

Author SHA1 Message Date
Brian Anderson
0efd7fac8a stdlib: Add option::is_some 2011-06-16 14:21:42 -07:00
Graydon Hoare
766d54df93 Fix a bunch of compile-command lines to use RBUILD 2011-06-15 12:01:19 -07:00
Graydon Hoare
ce72993488 Reformat source tree (minus a couple tests that are still grumpy). 2011-06-15 11:19:50 -07:00
Brian Anderson
ed0eb8f45a stdlib: Remove unneeded type params from alt patterns 2011-05-31 01:23:53 -04:00
Brian Anderson
443e1e4557 stdlib: Use if/alt expressions in std::option 2011-05-22 12:28:27 -04:00
Patrick Walton
ace8058277 rustc: Have typechecking no longer rebuild the AST 2011-05-17 20:13:04 -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
Tim Chevalier
b7dd75c904 Handle nested items correctly in typestate_check
Summary says it all. Actually, only nested objects and functions
are handled, but that's better than before. The fold that I was using
before to traverse a crate wasn't working correctly, because annotations
have to reflect the number of local variables of the nearest enclosing
function (in turn, because annotations are represented as bit vectors).
The fold was traversing the AST in the wrong order, first filling in
the annotations correctly, but then re-traversing them with the bit
vector length for any outer nested functions, and so on.

Remedying this required writing a lot of tedious boilerplate code
because I scrapped the idea of using a fold altogether.

I also made typestate_check handle unary, field, alt, and fail.

Also, some miscellaneous changes:
* added annotations to blocks in typeck
* fix pprust so it can handle spawn
* added more logging functions in util.common
* fixed _vec.or
* added maybe and from_maybe in option
* removed fold_block field from ast_fold, since it was never used
2011-04-19 14:56:28 -07: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
84321d1f59 Add an option.is_none() method 2011-03-17 11:21:11 -07:00
Patrick Walton
77ff12c435 rustboot: Don't use walk to traverse statements in type.ml; fixes redundant checking, improves diagnostics. Also report untyped slots. 2010-11-18 14:19:06 -08:00
Patrick Walton
adb1754e4d Move the option type to its own module 2010-11-05 11:18:40 -07:00
Patrick Walton
2fcf81cc4b Revert "Move the option type to its own module" 2010-11-05 10:41:23 -07:00
Patrick Walton
1d214b4df3 Move the option type to its own module 2010-11-05 10:23:22 -07:00