about summary refs log tree commit diff
path: root/src/comp/driver
AgeCommit message (Collapse)AuthorLines
2011-06-15Refactor data structures representing constraints (again...)Tim Chevalier-5/+5
I added a "resolved" version of the ast::constr type -- ty::constr_def -- that has a def_id field instead of an ann_field. This is more consistent with other types and eliminates some checking. Incidentally, I removed the def_map argument to the top-level function in middle::alias, since the ty::ctxt already has a def_map field.
2011-06-15Add support for producing shared libraries directly in the rust driver.Rafael Ávila de Espíndola-22/+19
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-319/+217
2011-06-14Apply the makefile changes again, this time fixin the driver to not produce aRafael Ávila de Espíndola-5/+3
rustc.exe.exe.
2011-06-13Enough driver support to link an empty program on linux. WillRafael Ávila de Espíndola-5/+16
try to update the Makefiles to use it.
2011-06-11rustc: Link with main.oPatrick Walton-3/+4
2011-06-09Further support for predicate constraintsTim Chevalier-3/+4
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-07rustc: Use a set-based approach to unification; remove ty_bound_param and ↵Patrick Walton-1/+1
ty_local. Sorry, big perf regression; will fix soon.
2011-06-07More work on proper linkage name-mangling. Almost right, aside from version ↵Graydon Hoare-15/+28
numbers.
2011-06-06First take on an alias-safety checkerMarijn Haverbeke-0/+3
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-01rustc: Add a new mode to the pretty printer that prints out node IDs, for ↵Patrick Walton-3/+6
debugging
2011-06-01rustc: Remove else-after-return in mainPatrick Walton-21/+21
2011-06-01rustc: Fold --pretty and --typed-pretty into a single option with an ↵Patrick Walton-17/+39
optional argument
2011-05-31Now imports are not re-exported unless 'export' is explicitly used.Paul Stansifer-3/+3
2011-05-31rustc: Remove unneeded type params from alt patternsBrian Anderson-4/+4
2011-05-26Add a span_str function in sessionTim Chevalier-4/+12
2011-05-26Remove residual uses of fold, and fold itself.Graydon Hoare-3/+0
2011-05-26Add early returns to rustc main on non-compiling paths.Graydon Hoare-0/+2
2011-05-22rustc: More cleanup of rustc.rsBrian Anderson-65/+61
2011-05-22rustc: Some refactoring of rustc.rsBrian Anderson-46/+63
2011-05-22rustc: Cleanup formatting in rustc.rsBrian Anderson-16/+12
2011-05-20Annotate erroring functions in session and parserTim Chevalier-6/+6
2011-05-20Options fix from erickt.Graydon Hoare-1/+1
2011-05-19Move type cache and node type table into type context.Graydon Hoare-12/+9
2011-05-19OptLevel changes. Accepts levels 0 to 3 only. '-O' is synonym for --OptLevel=2.Graydon Hoare-7/+40
2011-05-19Typestate checking code no longer uses fold -- only walk.Tim Chevalier-3/+3
2011-05-17rustc: Have typechecking no longer rebuild the ASTPatrick Walton-3/+1
2011-05-17rustc: Add a typed pretty-printing mode for debuggingPatrick Walton-8/+24
2011-05-17rustc: Make return value checking warnings a little prettier. Also introduce ↵Patrick Walton-0/+5
a new "note" diagnostic level.
2011-05-17Finally rename std::_xxx to std::xxxMarijn Haverbeke-25/+25
Except for _task, which is still a keyword.
2011-05-16Merge remote branch 'origin/master' into HEADGraydon Hoare-14/+20
Conflicts: src/comp/middle/trans.rs
2011-05-16Rewrite everything to use [] instead of vec() in value position.Graydon Hoare-22/+22
2011-05-16Fix get_os and get_archTim Chevalier-12/+17
get_os and get_arch were failing to return a value in the error case; they were also assuming that strings are indexed from 1. No idea how they ever worked, but anyway, fixed.
2011-05-16Started adding support for return checking and non-returning function ↵Tim Chevalier-2/+3
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-16Replace --bitcode with the canonical --emit-llvmKelly Wilson-3/+3
2011-05-16Add automatic exe generation capabilities. Add --bitcode flag to generate ↵Kelly Wilson-2/+68
only an LLVM bitcode file.
2011-05-13rustc: lowercase the link and link::write modulesBrian Anderson-13/+13
2011-05-13Fix naming of libc that was mangled by recent module changesBrian Anderson-3/+3
It doesn't appear that rustc makes use of these strings so it didn't actually break anything yet.
2011-05-13Move capture checking into resolve.rsMarijn Haverbeke-3/+0
Drops capture.rs. The new algorithm also checks for captures function arguments and obj fields.
2011-05-13Change resolve to use walk instead of foldMarijn Haverbeke-4/+2
Possibly, at some point, we should add a state-passing variant of walk, or a wrapper that makes it easier to thread state. (See the repetetive pop_state_for_* functions in this commit.)
2011-05-12rustc: Pass a node type table around, unused as of yetPatrick Walton-2/+4
2011-05-12Add stats option and lazily emit glue.Graydon Hoare-0/+5
2011-05-12Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke-159/+160
This should be a snapshot transition.
2011-05-12Keep resolve data in external hash table, rather than embedded defsMarijn Haverbeke-12/+14
One step closer to removing fold and having a single, immutable AST. Resolve still uses fold, because it has to detect and transform expr_field expressions. If we go through on our plan of moving to a different syntax for module dereferencing, the parser can spit out expr_field expressions, and resolve can move to walk. (I am truly sorry for the things I did in typestate_check.rs. I expect we'll want to change that to walk as well in the near future, at which point it should probably pass around a context record, which could hold the def_map.)
2011-05-11Give the lexer a session so that it can fail more informativelyBrian Anderson-1/+1
2011-05-11Use a const for crate-num-zero (ast.local_crate)Marijn Haverbeke-2/+2
2011-05-10rustc: Make -g not take an argumentPatrick Walton-1/+1
2011-05-10Add --time-llvm-passes.Graydon Hoare-2/+6
2011-05-06Rename std modules to be camelcasedMarijn Haverbeke-46/+46
(Have fun mergining your stuff with this.)
2011-05-06Ge the host triple using LLVM. Fix a few 'mutable' warnings also.Kelly Wilson-8/+26