aboutsummaryrefslogtreecommitdiff
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* Further work on typestate_checkTim Chevalier2011-04-281-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of work on typestate_check, seems to get a lot of the way through checking the standard library. * Added for, for_each, assign_op, bind, cast, put, check, break, and cont. (I'm not sure break and cont are actually handled correctly.) * Fixed side-effect bug in seq_preconds so that unioning the preconditions of a sequence of statements or expressions is handled correctly. * Pass poststate correctly through a stmt_decl. * Handle expr_ret and expr_fail properly (after execution of a ret or fail, everything is true -- this is needed to handle ifs and alts where one branch is a ret or fail) * Fixed bug in set_prestate_ann where a thing that needed to be mutated wasn't getting passed as an alias * Fixed bug in how expr_alt was treated (zero is not the identity for intersect, who knew, right?) * Update logging to reflect log_err vs. log * Fixed find_locals so as to return all local decls and exclude function arguments. * Make union_postconds work on an empty vector (needed to handle empty blocks correctly) * Added _vec.cat_options, which takes a list of option[T] to a list of T, ignoring any Nones * Added two test cases.
* stdlib: Use an unsafe cast to speed up the memory writerPatrick Walton2011-04-271-1/+11
|
* stdlib/rt: Add an unsafe function to cast immutable vectors to mutable onesPatrick Walton2011-04-271-0/+2
|
* Fix _str.bytes to trivial version.Graydon Hoare2011-04-271-4/+2
|
* stdlib: Real fix for _uint.parse_buf().Patrick Walton2011-04-271-0/+8
|
* stdlib: Fix a crazy underflow bug in _uint.parse_buf. Oops.Patrick Walton2011-04-271-3/+2
|
* Fix the interaction between various flags in #fmtBrian Anderson2011-04-261-7/+12
|
* Support octal #fmt conversionsBrian Anderson2011-04-261-0/+7
|
* Make #fmt char conversions behave like printfBrian Anderson2011-04-261-1/+1
|
* stdlib: Add a silly ANSI color libraryPatrick Walton2011-04-262-0/+55
|
* Add GetOpts module to stdMarijn Haverbeke2011-04-262-0/+250
|
* Add _str.slice to std libMarijn Haverbeke2011-04-261-2/+6
|
* Skip likely-zero initial probe, speed up map.rs.Graydon Hoare2011-04-251-5/+5
|
* Minimize calls to hash function in map.rsGraydon Hoare2011-04-221-11/+12
|
* stdlib: Add a pointer equality function to the standard library and a test casePatrick Walton2011-04-212-0/+9
|
* Handle nested items correctly in typestate_checkTim Chevalier2011-04-192-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove half-baked 'opacity' layer qualifier.Graydon Hoare2011-04-191-2/+2
|
* Remove effect system from src.Graydon Hoare2011-04-1911-107/+92
|
* replace error logging with log_err in stdlib and rustcMarijn Haverbeke2011-04-193-17/+17
|
* Precision overrides 0-padding in #fmtBrian Anderson2011-04-181-34/+49
|
* Rearrange ExtFmt.RT.pad to recover some horizontal spaceBrian Anderson2011-04-181-49/+51
|
* Left-justification overrides 0-padding in #fmtBrian Anderson2011-04-181-22/+24
|
* Support 0 flag in #fmtBrian Anderson2011-04-181-5/+49
|
* Support the space flag in #fmtBrian Anderson2011-04-171-4/+9
|
* Support + flag in #fmtBrian Anderson2011-04-171-3/+8
|
* Support #fmt precision for bools, with same rules as stringsBrian Anderson2011-04-171-2/+6
| | | | | Not totally confident this is desirable. The alternative would be to make it a compile error.
* Treat char #fmt conversions just like str conversionsBrian Anderson2011-04-171-1/+1
| | | | Add missing tests
* Support #fmt precision for signed typesBrian Anderson2011-04-171-37/+46
|
* Support #fmt precision for unsigned typesBrian Anderson2011-04-171-11/+49
|
* Support #fmt precision for string typesBrian Anderson2011-04-171-2/+25
|
* Support left-justification in #fmt conversionsBrian Anderson2011-04-161-3/+29
|
* Make #fmt support explicit conversion widthsBrian Anderson2011-04-161-9/+45
|
* stdlib: Add some vector functions: empty, empty_mut, grow_set, and freeze. ↵Patrick Walton2011-04-151-4/+31
| | | | Change _vec.grow to use uint arguments.
* rustc: Use union-find for variable substitutionPatrick Walton2011-04-141-16/+12
|
* Add support for upper-case hex and binary output to #fmt.Brian Anderson2011-04-132-0/+24
| | | | Only works for uints at present. Necessitated the addition of _str.to_upper.
* Add more commentary about ExtFmtBrian Anderson2011-04-131-1/+30
|
* Add support for printing uints as lower-case hex to ExtFmt.Brian Anderson2011-04-131-5/+22
| | | | | Begin passing an ExtFmt.RT.conv parsed format description to each of the ExtFmt.RT.conv* functions.
* Move #fmt conversion model into ExtFmt.CT namespaceBrian Anderson2011-04-131-44/+44
|
* Make expr_while work in typestate_checkTim Chevalier2011-04-131-0/+11
| | | | | | Also did some refactoring in typestate_check. All test cases in compile-fail that involve uninitialized vars now fail correctly! (All eight of them, that is.)
* Slight updates to match API drift in io, lib-io.rs passes.Graydon Hoare2011-04-131-1/+1
|
* Further work on typestate. Handles expr_rec and expr_assign now.Tim Chevalier2011-04-121-3/+12
| | | | | | | | | | | | 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.
* Factor out creation of calls into ExtFmt.RTBrian Anderson2011-04-111-4/+4
|
* Add support for bool, char to extfmt.Brian Anderson2011-04-111-0/+12
| | | | XFAIL syntax-extension-fmt in rustboot.
* Move ExtFmt compile-time functions into their own moduleBrian Anderson2011-04-111-170/+173
|
* Use correct indentation for ExtFmt.rsBrian Anderson2011-04-111-6/+15
|
* Make ExtFmt call its own functions instead of others defined in stdBrian Anderson2011-04-111-0/+11
|
* Move extfmt parsing into standard libraryBrian Anderson2011-04-111-0/+213
|
* Move the extfmt data model into the standard library.Brian Anderson2011-04-112-0/+48
|
* Make lexer buffer the whole fileMarijn Haverbeke2011-04-091-0/+8
| | | | | This way, it won't have to go through a bunch of calls for each byte fetched.
* Implemented computing prestates and poststates for a few expression forms.Tim Chevalier2011-04-081-0/+15
| | | | | The typestate checker (if it's uncommented) now correctly rejects a trivial example program that has an uninitialized variable.