about summary refs log tree commit diff
path: root/src/lib
AgeCommit message (Collapse)AuthorLines
2011-04-06Continued sketching out code for checking states against preconditions.Tim Chevalier-0/+62
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-01Started adding support for typestate checking.Tim Chevalier-0/+23
I added a new field to the ast "ann" type for typestate information. Currently, the field contains a record of a precondition bit vector and postcondition vector, but I tried to structure things so as to make it easy to change the representation of the typestate annotation type. I also had to add annotations to some syntactic forms that didn't have them before (fail, ret, be...), with all the boilerplate changes that that would imply. The main call to the typestate_check entry point is commented out and the actual pre-postcondition algorithm only has a few cases implemented, though the overall AST traversal is there. The rest of the typestate algorithm isn't implemented yet.
2011-03-31rustc: Use the crate index to look up defsPatrick Walton-0/+32
2011-03-31stdlib: Add a write_be_uint() function to writersPatrick Walton-0/+14
2011-03-26Add a result_str method to std.sha1.sha1.Graydon Hoare-0/+12
2011-03-25rustc: Parse definition IDs from crates; add a function to parse unsigned ↵Patrick Walton-0/+12
ints to the standard library
2011-03-25rustc: Look up names in "use"d cratesPatrick Walton-6/+18
2011-03-25stdlib: Implement a memory buffer reader, untested at the momentPatrick Walton-22/+61
2011-03-25stdlib: Separate basic I/O reading functionality into a separate buf_reader ↵Patrick Walton-25/+85
object, like writing
2011-03-25Start making the standard-lib utf-8 awareMarijn Haverbeke-42/+229
Finally implements _str.is_utf8, adds from_chars, from_char, to_chars, char_at, char_len, (push|pop|shift|unshift)_char. Also, proper character I/O for streams.
2011-03-24rustc: Open "use"d crates; add a _vec.vec_from_buf() method along the way; ↵Patrick Walton-1/+7
XFAIL use-import-export.rs in rustc
2011-03-22stdlib: Provide a function to extract the underlying buf_writer from a writerPatrick Walton-0/+9
2011-03-22stdlib: Add EBML writing functionalityPatrick Walton-2/+67
2011-03-22stdlib: Add a convenience method for opening paths as a FILEPatrick Walton-0/+10
2011-03-22stdlib: Make writers seekable; switch file writers to the C FILE interface ↵Patrick Walton-14/+101
to make this work
2011-03-22Revert "Remove usages of case(_) { fail; } since the compiler does this ↵Patrick Walton-0/+2
automatically". When we have exhaustiveness checking, "case(_) { fail; }" will be useful to silence warnings. This reverts commit 92a716d862d92d3cc52a400457d2c3900d0c57a2.
2011-03-22lib: Add an EBML reader modulePatrick Walton-0/+110
2011-03-22Remove usages of case(_) { fail; } since the compiler does this automaticallyBrian Anderson-2/+0
2011-03-21Add a "last" function to return the last element of a vector to the standard ↵Patrick Walton-0/+12
library
2011-03-21Add a binding to ftell()Patrick Walton-0/+7
2011-03-20Switch win32 path_sep to '/', add comment explaining a bit.Graydon Hoare-1/+7
2011-03-20Add slightly nicer failure message to io.rs when it can't open a file.Graydon Hoare-1/+4
2011-03-18rustc: Fix list.foldl() to pass its second argument by aliasPatrick Walton-2/+2
2011-03-18rustc: Box the tuples returned by hashmap.items() for now since we don't ↵Patrick Walton-3/+3
have alias iterators yet
2011-03-18Fix bug in string comparison. std.rc typechecks now.Patrick Walton-1/+1
2011-03-18Add "mutable?" to _vec in the standard library; fix callersPatrick Walton-19/+20
2011-03-18Add some mutable variants of vector functions to the standard libraryPatrick Walton-0/+25
2011-03-18Make some standard library pieces no longer dependent on mutable parameters, ↵Patrick Walton-10/+14
which rustc doesn't support
2011-03-17Add an option.is_none() methodPatrick Walton-0/+7
2011-03-16rustc: Add str_from_cstr() and str_from_buf() functions to the standard ↵Patrick Walton-0/+10
library, as well as a test case
2011-03-16Remove uses of 'break' in std lib; rustc doesn't support it yet, this is ↵Graydon Hoare-3/+7
easier for now.
2011-03-16Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. ↵Graydon Hoare-60/+134
Tweak std lib vec fns in process.
2011-03-15Typo: FIXE -> FIXMEPatrick Walton-1/+1
2011-03-15Add a fs.connect() function to join pathsPatrick Walton-0/+8
2011-03-15Add an OS-specific dylib_filename() function to the standard libraryPatrick Walton-0/+12
2011-03-14Put out darwin fire.Graydon Hoare-1/+2
2011-03-14Add _int.powBrian Anderson-0/+17
2011-03-14Add functionality for running external programs to the std libMarijn Haverbeke-2/+182
See lib/run_program.rs.
2011-03-14Extend stream functionalityMarijn Haverbeke-81/+129
Writer and reader streams now come with methods to write and read little-endian numbers. Whether that is the right place for such methods is debatable, but for now, that's where they live.
2011-03-14Add basic file-system functionalityMarijn Haverbeke-40/+86
std.fs.list_dir will list the files in a directory, std.fs.file_is_dir will, given a pathname, determine whether it is a directory or not.
2011-03-09Remove redundant imports in lib (rustc doesn't like 'std' as a synonym for ↵Graydon Hoare-29/+2
root within std.rc anyway)
2011-03-09Have the pretty-printer take a writer stream as argumentMarijn Haverbeke-21/+22
It now uses a string writer to also fill in for middle.ty.ast_ty_to_str
2011-03-09Add stdout_writer and string_writer to std.ioMarijn Haverbeke-23/+48
For use by pretty-printer. string_writer API is a bit silly right now, feel free to suggest a cleaner way to do this.
2011-03-07Add a pretty-printerMarijn Haverbeke-13/+17
Adds a -pp option to the compiler which will cause it to simply pretty-print the given file.
2011-03-06Change io.fileflag to a tag type. Remove FIXMEBrian Anderson-19/+8
2011-03-06Make _str.bytes use _vec.init_fn. Remove FIXME.Brian Anderson-18/+3
2011-02-22Rustify some comments lifted directly from the sha-1 reference implementationBrian Anderson-2/+2
2011-02-22Rename std._io to std.io since 'io' is no longer a keywordBrian Anderson-2/+2
2011-02-21Implement sha-1 in standard library. Closes #228Brian Anderson-0/+285
2011-01-10Add std.path module for pathname manipulations.Graydon Hoare-0/+22