about summary refs log tree commit diff
path: root/src/comp/middle
AgeCommit message (Collapse)AuthorLines
2011-06-02rustc: Typecheck patterns from the top down; remove pushdown_patPatrick Walton-156/+72
2011-06-02Handle _|_ values properly in transTim Chevalier-4/+9
Generate an LLVMUndef value of the proper type for an argument of type _|_. Otherwise we get an LLVM assertion failure.
2011-06-02Fix unification bugTim Chevalier-1/+2
Hello from SFO Terminal 3! unify_fn_common had the expected and actual types reversed in one place. This was causing the type of an occurence of a function f with type fn(int) -> T to be set to fn(_|_) -> T at a call site like f(fail); I think this was also making some of the type error messages come out backwards, but I haven't checked. Also: ty_bot does not contain pointers
2011-06-02Merge pull request #450 from paulstansifer/quick_error_message_fix_2Patrick Walton-0/+14
Flatten functions and objects in trans::simplify_type.
2011-06-02Flatten functions and objects in trans::simplify_type.Paul Stansifer-0/+14
2011-06-02Refactor make_fp_cmp_glue and make_integral_cmp_glue into one.Lindsey Kuper-73/+95
2011-06-02Implement pcwalton's code review suggestions.Paul Stansifer-12/+7
2011-06-02Error message, instead of segfault, when recursive types are used.Paul Stansifer-3/+23
2011-06-01Improve type error message for non-constructor in patternTim Chevalier-2/+2
2011-06-01Redo typestate-related data structures to support predicate constraints. No ↵Tim Chevalier-147/+410
actual support yet, just infrastructure.
2011-06-01Use span_err instead of err. Fixes issue #444.Lindsey Kuper-3/+2
2011-06-01rustc: Remove rustboot workaround from walk::default_visitor()Patrick Walton-48/+30
2011-06-01rustc: Allow walking over patternsPatrick Walton-0/+8
2011-06-01Comments.Lindsey Kuper-0/+8
2011-06-01Don't create an empty section.Rafael Ávila de Espíndola-3/+3
2011-06-01Visibility is an ELF concept and protected visibility is not very well ↵Rafael Ávila de Espíndola-3/+6
implemented, avoid using it for now. Instead, mark pairs that are not needed elsewhere as internal.
2011-06-01Comments and cleanup.Lindsey Kuper-22/+49
2011-05-31Now imports are not re-exported unless 'export' is explicitly used.Paul Stansifer-213/+32
2011-05-31Support move as an initializer.Michael Sullivan-0/+8
2011-05-31Implement move semantics.Michael Sullivan-4/+42
2011-05-31Insert plumbing for move that behaves just like assign.Michael Sullivan-0/+68
2011-05-31Teach the compiler to understand yield and join, as well as using task as a ↵Eric Holk-1/+3
type name.
2011-05-31rustc: Teach rustc to use block results as fn return values. Closes #372Brian Anderson-3/+54
2011-05-31Move rust_vec_append_glue to rt.Rafael Ávila de Espíndola-142/+0
2011-05-31Consolidate formatting functions a bit more.Graydon Hoare-11/+13
2011-05-31Add span to field to catch per-field comments in rec exprs.Graydon Hoare-11/+12
2011-05-31Start finishing up the rust_start signature transition.Rafael Ávila de Espíndola-1/+1
2011-05-31Have blocks return their result by writing to a reserved spaceMarijn Haverbeke-71/+103
This makes it possible to pass the location of that space through to nested blocks, resulting in less copying, taking, and dropping. This makes the compiler slightly faster and 19k smaller. A FIXME is to use 'move' semantics when returning the values from the block -- don't bump the refcount and drop it again for the returning block, but simply assign ownership to the receiver. To do this, we'll need a way to (safely) scrub things from a block's cleanup list.
2011-05-31rustc: Remove unneeded type params from alt patternsBrian Anderson-236/+236
2011-05-31rustc: Pushdown type params for tag patterns. Closes #363Brian Anderson-4/+14
2011-05-27In pre/postcondition computation, failing calls should set the postconditionTim Chevalier-3/+12
A non-returning call should have a postcondition in which all predicates are true -- not just a poststate. Otherwise, alt expressions where one or more branches terminate in a non-returning call and others initialize a variable get rejected. Includes a test case.
2011-05-27change commentTim Chevalier-3/+3
2011-05-27Fix two typestate bugsTim Chevalier-8/+11
* Non-returning calls should set all predicates to be true, not just the "this function returns" predicate * Fixed a bug in the expr_alt case in tstate.states that wasn't updating the changed flag properly, then fixed *another* bug that was updating it too enthusiastically, but was masked by the first bug.
2011-05-27Lots of comments, and some more descriptive names.Lindsey Kuper-55/+202
2011-05-27Check the declaration type in a for loop against the sequence typeTim Chevalier-15/+39
Changed the typechecker to correctly typecheck the declared variable type in a for or for-each loop against the vector element type (for a for loop) or the iterator type (for a for-each loop). Added a test case.
2011-05-27add a function that returns the type of a local declTim Chevalier-0/+11
2011-05-27Generating names for wrappers, removed extra loggingEric Holk-35/+5
2011-05-27Switched calling conventions so that spawn with multiple arguments works.Eric Holk-6/+5
2011-05-27Switching over to wrappers for spawning functions of multiple arguments. ↵Eric Holk-42/+114
Doesn't quite work yet.
2011-05-27Removing excessively verbous logging.Eric Holk-37/+0
2011-05-27Programs using spawn terminateEric Holk-0/+17
2011-05-27Working on 2 argument spawn. The arguments seem to be copied correctly once, ↵Eric Holk-3/+1
but then they get lost.
2011-05-27Arguments seem to be correctly passed to child processes now.Eric Holk-10/+13
2011-05-27New tasks run, but their arguments get lost and something ends up in an ↵Eric Holk-2/+6
infinite loop when the task exits.
2011-05-27Use annotations on blocksTim Chevalier-10/+9
Previously, block_ty returned the type of the terminating expression of the block (or nil if said expression was absent). I changed check_expr to write the type of that expression into the annotation for the block itself, so now block_ty can use the block's annotation.
2011-05-26Make _|_ unify with anythingTim Chevalier-12/+9
The typechecker had a number of special cases for unifying types with _|_ (as with checking if and alt). But, a value of type _|_ should be usable in any context, as such a value always diverges, and will never be used by its immediate context. Changed unify accordingly, removed special cases.
2011-05-27Handle circularity in glob imports in a more elegant fashion.Paul Stansifer-75/+87
2011-05-27Add a map from def_id s to items in resolve::env.Paul Stansifer-1/+24
Use it to provide better error messages in the event of glob-importing the same name multiple times.
2011-05-27Fix bugs: make sure glob imports show up in the right module,Paul Stansifer-65/+92
and make sure that circular glob imports don't diverge.
2011-05-27"import module::*;" now works.Paul Stansifer-54/+69