about summary refs log tree commit diff
path: root/src/comp/rustc.rc
AgeCommit message (Collapse)AuthorLines
2011-06-30Switch rustc's crate metadata to use the link attributeBrian Anderson-4/+5
2011-06-28Add some helper functions for attributes. Issue #487Brian Anderson-0/+1
2011-06-28Add simple syntax extension (#simplext)Paul Stansifer-0/+1
2011-06-28Add AST fold.Paul Stansifer-0/+1
2011-06-27Rename metadata::defs to metadata::tagsBrian Anderson-1/+1
2011-06-27Don't export some of the metadata modulesBrian Anderson-0/+5
2011-06-27Move what's left of metadata::cwriter into middle::transBrian Anderson-1/+0
2011-06-27Extract metadata::decoder from metadata::creaderBrian Anderson-0/+1
2011-06-27Extract metadata::tydecode from metadata::creaderBrian Anderson-0/+1
2011-06-27Extract llvm-independent code from cwriter to metadata::encoderBrian Anderson-0/+1
2011-06-27Move metadata tag definition to metadata::defsBrian Anderson-0/+1
2011-06-27Move metadata::cwriter::encode to metadata::tyencodeBrian Anderson-0/+1
2011-06-27Rename middle::metadata to metadata::cwriter. Move creader to metadataBrian Anderson-2/+5
Preparation for a lot more metadata refactoring
2011-06-22Compute typestate properly for moveTim Chevalier-0/+1
typestate now drops constraints correctly in the post-state of a move expression or a declaration whose op is a move. It doesn't yet drop constraints mentioning variables that get updated. To do this, I had to change typestate to use trit-vectors instead of bit-vectors, because for every constraint, there are three possible values: known-to-be-false (e.g. after x <- y, init(y) is known-to-be-false), known-to-be-true, and unknown. Before, we conflated known-to-be-false with unknown. But move requires them to be treated differently. Consider: (program a) (a1) x = 1; (a2) y <- x; (a3) log x; (program b) (b1) x = 1; (b2) y <- z; (b3) log x; With only two values, the postcondition of statement a2 for constraint init(x) is the same as that of b2: 0. But in (a2)'s postcondition, init(x) *must* be false, but in (b2)'s condition, it's just whatever it was in the postcondition of the preceding statement.
2011-06-20Remove the old library names. These were unused since rustboot.Rafael Ávila de Espíndola-17/+1
Right now rustc hardcodes -lrustllvm. The idea is to instead remember all the native modules used and convert them to -l directives to the linker. In the case of a library that is installed in an unusual location, Graydon suggested using metadata: native module foo = "bar" { }
2011-06-20Add a separate AST mapping phaseMarijn Haverbeke-0/+1
This will replace the various node_id-to-node mappings done in several other passes. This commit already uses the new map in resolve, dropping the ast_map that was built there before.
2011-06-18Replace unexported meta tags with attributesBrian Anderson-3/+2
Issue #487
2011-06-18rustc: Replace 'export meta' with attributesBrian Anderson-4/+4
Issue #487
2011-06-17rustc: Use correct version key in metadataBrian Anderson-1/+1
2011-06-10Implement meta tag matching in creader. Start using it in rustc.rc. Close ↵Graydon Hoare-1/+3
#459. Close #457.
2011-06-09Further support for predicate constraintsTim Chevalier-0/+1
Changed function types to include a list of constraints. Added code for parsing and pretty-printing constraints. This necessitated splitting pprust into two files (pprust and ppaux) to break a circulate dependency, as ty_to_str now needs to print out constraints, which may include literals, but pprust depended on ty.
2011-06-09Add new visitor frameworkMarijn Haverbeke-0/+1
2011-06-08Tidy up 'export meta' situation now that snapshot understands it.Graydon Hoare-5/+8
2011-06-06First take on an alias-safety checkerMarijn Haverbeke-0/+1
The alias checker works by ensuring that any value to which an alias is created is rooted in some way that ensures it outlives the alias. It is now disallowed to create an alias to the content of a mutable box, or to a box hanging off a mutable field. There is also machinery in place to prevent assignment to local variables whenever they are the root of a live alias.
2011-06-04rustc: Introduce ext module. Move some things from parser to ext.Brian Anderson-0/+1
Introduce an ext_ctxt record to provide a span_err method for use while expanding syntax extensions. Hopefully it will be useful for other things.
2011-05-26Remove residual uses of fold, and fold itself.Graydon Hoare-1/+0
2011-05-20rustc: Move the interner to a new module intended to be used for general ↵Patrick Walton-1/+1
data structures
2011-05-19Remove type_glue.rs, don't think it's going to work.Graydon Hoare-1/+0
2011-05-16Rename aux.rs to auxiliary.rs since win32 doesn't like files named "aux". ↵Graydon Hoare-3/+2
Really.
2011-05-16Started adding support for return checking and non-returning function ↵Tim Chevalier-2/+13
annotations * Reorganized typestate into several modules. * Made typestate check that any function with a non-nil return type returns a value. For now, the check is a warning and not an error (see next item). * Added a "bot" type (prettyprinted as _|_), for constructs like be, ret, break, cont, and fail that don't locally return a value that can be inspected. "bot" is distinct from "nil". There is no concrete syntax for _|_, while the concrete syntax for the nil type is (). * Added support to the parser for a ! annotation on functions whose result type is _|_. Such a function is required to have either a fail or a call to another ! function that is reached in all control flow paths. The point of this annotation is to mark functions like unimpl() and span_err(), so that an alt with a call to err() in one case isn't a false positive for the return-value checker. I haven't actually annotated anything with it yet. * Random bugfixes: * * Fixed bug in trans::trans_binary that was throwing away the cleanups for nested subexpressions of an and or or (tests: box-inside-if and box-inside-if2). ** In typeck, unify the expected type arguments of a tag with the actual specified arguments.
2011-05-16rustc: Factor out the code that interns types into an "interner" data structurePatrick Walton-0/+1
2011-05-13rustc: lowercase the link and link::write modulesBrian Anderson-1/+1
2011-05-13Slight adjustments to shape, rename to type_glue.rs.Graydon Hoare-1/+1
2011-05-13Make the parser more careful about keywordsMarijn Haverbeke-1/+1
Keywords are now only recognized in contexts where they are valid. The lexer no longer recognizes them, all words are lexed as IDENT tokens, that get interpreted by the parser.
2011-05-13Move capture checking into resolve.rsMarijn Haverbeke-1/+0
Drops capture.rs. The new algorithm also checks for captures function arguments and obj fields.
2011-05-12rustc: Beginnings of a "shape" module to convert types to shapesPatrick Walton-0/+1
2011-05-12Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke-5/+5
This should be a snapshot transition.
2011-05-10Add meta info to rustc.rcBrian Anderson-0/+6
2011-05-09rustc: Declare upcalls with real signatures; preparation for killing ↵Patrick Walton-0/+1
rust_native_rust_* stubs
2011-05-05rustc: Add a Link module; move crate writing to it to slim down trans slightlyPatrick Walton-0/+1
2011-05-04Add #env syntax extension for plucking strings out of the compilation ↵Graydon Hoare-0/+1
environment.
2011-04-20Change collect_upvars from using fold to using walkMarijn Haverbeke-0/+1
2011-04-19rustc: Cache the results of type_of()Patrick Walton-16/+16
2011-04-19Remove effect system from src.Graydon Hoare-26/+0
2011-04-11Implement the "attempted dynamic environment-capture" error in rustc.Rafael Ávila de Espíndola-0/+1
2011-04-09Move to single-uint file-position representation.Marijn Haverbeke-0/+1
This makes passing them around cheaper. There is now a table (see front/codemap.rs) that is needed to transform such an uint into an actual filename/line/col location. Also cleans up the span building in the parser a bit.
2011-04-08Implemented computing prestates and poststates for a few expression forms.Tim Chevalier-0/+4
The typestate checker (if it's uncommented) now correctly rejects a trivial example program that has an uninitialized variable.
2011-04-07Revise EBML reader APIMarijn Haverbeke-0/+2
New one is less stateful, easier to work with.
2011-04-06Continued sketching out code for checking states against preconditions.Tim Chevalier-1/+5
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-06More work on typestate. Sketched out code for computing and checking ↵Tim Chevalier-0/+2
prestates and poststates. Still a long ways away.