about summary refs log tree commit diff
path: root/src/lib
AgeCommit message (Collapse)AuthorLines
2011-05-11Rewrite comp/middle/resolve.rsMarijn Haverbeke-0/+11
* Cleans up the algorithm * Move first pass to walk (second still folds) * Support part of a type/value namespace split (crate metadata and module indices still need to be taught about this) * Remove a few blatant inefficiencies (import tables being recreated for every lookup, most importantly)
2011-05-11Reuse a single work buffer every time the SHA1 message block is processed.Brian Anderson-3/+7
This finally allows the full lib-sha1 test to run in a reasonable amount of time. Was 30s, now 3s. Trims a second or two from stage2/rustc. XFAIL lib-sha1 in stage0 since it will be very slow until the next snapshot.
2011-05-11Remove unnecessary array access from SHA1Brian Anderson-14/+15
Provides a very small speedup.
2011-05-11Introduce str_slice runtime functionBrian Anderson-7/+5
This reduces the time to execute the new lib-str tests from 1:40ish to a few seconds and will eventually allow the full lib-sha1 test to run in a reasonable amount of time. XFAIL lib-str in stage0 - it will run very slowly until the next snapshot.
2011-05-10rustc: Create mutable vectors in macos_OS.rs. Should put out Darwin tinderbox.Patrick Walton-2/+2
2011-05-10Remove a couple more spurious 'mutable' value qualifiers from macos_OS.rs.Graydon Hoare-2/+2
2011-05-10stdlib: Remove Str.unsafe_from_mutable_bytes(). rustc now self-hosts 18 ↵Patrick Walton-10/+1
seconds faster.
2011-05-06Failure to re-stage changes strikes again.Graydon Hoare-1/+1
2011-05-06Fix GenericOS.getenv returning a raw str, return an Option.t[str] instead.Graydon Hoare-3/+8
2011-05-06Rename std modules to be camelcasedMarijn Haverbeke-352/+351
(Have fun mergining your stuff with this.)
2011-05-06Ge the host triple using LLVM. Fix a few 'mutable' warnings also.Kelly Wilson-6/+6
2011-05-05Add quick sort function to the std lib.Kelly Wilson-0/+52
2011-05-05Attempt to fix fs.dirname harder.Graydon Hoare-7/+4
2011-05-05Because good hackers at least check to see if the code compiles.Graydon Hoare-2/+2
2011-05-05Fix assumption that only os_fs.path_sep can separate paths, sigh.Graydon Hoare-1/+7
2011-05-05Remove 'deprecated mutable...' from our codeMarijn Haverbeke-24/+24
This should make compilation a bit less noisy.
2011-05-02Un-revert "Use different syntax for checks that matter to typestate", fixing ↵Patrick Walton-38/+39
the problem. This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
2011-05-02Revert "Use different syntax for checks that matter to typestate"Graydon Hoare-39/+38
This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
2011-05-02Use different syntax for checks that matter to typestateTim Chevalier-38/+39
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-04-29stdlib: Add a Time module to the standard libraryPatrick Walton-0/+13
2011-04-28stdlib: Provide "array" as a friendlier shorthand for "vec[mutable? T]"Patrick Walton-17/+18
2011-04-28stdlib: Add a color_supported() function to TermPatrick Walton-0/+12
2011-04-28stdlib: Add getenv(3) to win32_os.Patrick Walton-0/+2
2011-04-28Further work on typestate_checkTim Chevalier-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.
2011-04-27stdlib: Use an unsafe cast to speed up the memory writerPatrick Walton-1/+11
2011-04-27stdlib/rt: Add an unsafe function to cast immutable vectors to mutable onesPatrick Walton-0/+2
2011-04-27Fix _str.bytes to trivial version.Graydon Hoare-4/+2
2011-04-27stdlib: Real fix for _uint.parse_buf().Patrick Walton-0/+8
2011-04-27stdlib: Fix a crazy underflow bug in _uint.parse_buf. Oops.Patrick Walton-3/+2
2011-04-26Fix the interaction between various flags in #fmtBrian Anderson-7/+12
2011-04-26Support octal #fmt conversionsBrian Anderson-0/+7
2011-04-26Make #fmt char conversions behave like printfBrian Anderson-1/+1
2011-04-26stdlib: Add a silly ANSI color libraryPatrick Walton-0/+55
2011-04-26Add GetOpts module to stdMarijn Haverbeke-0/+250
2011-04-26Add _str.slice to std libMarijn Haverbeke-2/+6
2011-04-25Skip likely-zero initial probe, speed up map.rs.Graydon Hoare-5/+5
2011-04-22Minimize calls to hash function in map.rsGraydon Hoare-11/+12
2011-04-21stdlib: Add a pointer equality function to the standard library and a test casePatrick Walton-0/+9
2011-04-19Handle nested items correctly in typestate_checkTim Chevalier-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
2011-04-19Remove half-baked 'opacity' layer qualifier.Graydon Hoare-2/+2
2011-04-19Remove effect system from src.Graydon Hoare-107/+92
2011-04-19replace error logging with log_err in stdlib and rustcMarijn Haverbeke-17/+17
2011-04-18Precision overrides 0-padding in #fmtBrian Anderson-34/+49
2011-04-18Rearrange ExtFmt.RT.pad to recover some horizontal spaceBrian Anderson-49/+51
2011-04-18Left-justification overrides 0-padding in #fmtBrian Anderson-22/+24
2011-04-18Support 0 flag in #fmtBrian Anderson-5/+49
2011-04-17Support the space flag in #fmtBrian Anderson-4/+9
2011-04-17Support + flag in #fmtBrian Anderson-3/+8
2011-04-17Support #fmt precision for bools, with same rules as stringsBrian Anderson-2/+6
Not totally confident this is desirable. The alternative would be to make it a compile error.
2011-04-17Treat char #fmt conversions just like str conversionsBrian Anderson-1/+1
Add missing tests