about summary refs log tree commit diff
path: root/src/comp/middle
AgeCommit message (Collapse)AuthorLines
2011-07-11Add elipses, reorganize the macro components into their own AST node.Paul Stansifer-4/+4
2011-07-11Move macro expansion to a separate phase, change macro syntax, and add ↵Paul Stansifer-11/+8
parse_sess to session.
2011-07-11In typeck, check for dynamically sized by-value arguments to thunksTim Chevalier-11/+36
A check in trans didn't have a corresponding check in typeck, causing some programs (to wit, compile-fail/chan-parameterized-args.rs - part of this commit) to fail with an assertion failure in trans instead of a type error. Fixed it. In short, arguments that are future thunk arguments (any spawn arguments, and _ arguments in bind) need to either not contain type params or type vars, or be by-reference. Closes #665.
2011-07-11rustc: Implement explicit global scope resolution via leading "::"; add a ↵Patrick Walton-18/+27
test case
2011-07-11Unify the rhs and lhs types in a sendTim Chevalier-0/+1
Closes #662. One-line fixes are always the best :-D
2011-07-11rustc: Implement pointer dereference; add a test casePatrick Walton-2/+5
2011-07-11Fix comparisons of the nil type to do something sensible.Michael Sullivan-21/+19
Closes #576.
2011-07-11Use some actual or-patterns in resolve.rsMarijn Haverbeke-70/+34
2011-07-11Fix autoderef of function calls when the function is not an lval.Michael Sullivan-18/+4
As it turns out, the correct way to handle this is much simpler than what I did originally. Also add more tests.
2011-07-11Fix handling of derived tydescs in bind.Michael Sullivan-4/+10
In trans_bind_thunk, we need to load the tydescs from the environment *before* we try to construct derived tydescs from them.
2011-07-11Fix bind to work with boxed arguments with type parameters.Michael Sullivan-2/+6
This still doesn't work with bare fn arguments with type parameters.
2011-07-11Implement record patternsMarijn Haverbeke-2/+90
Closes #469.
2011-07-11Move visit to newtype-style nominal typeMarijn Haverbeke-17/+16
This makes getting the function fields out of the visitor less cumbersome and more efficient (no take/drop).
2011-07-11Output a meaningful error when too few or too many type parameters givenMarijn Haverbeke-3/+11
Closes #619
2011-07-11Implement or-patterns in case clausesMarijn Haverbeke-22/+76
You can now say expr_move(?dst, ?src) | expr_assign(?dst, ?src) { ... } to match both expr_move and expr_assign. The names, types, and number of bound names have to match in all the patterns. Closes #449.
2011-07-11Spill instead of copy when binding a pattern that's only a var bindingMarijn Haverbeke-17/+11
The alias rules guarantee that the alt-ed value will outlive the binding's last use, so this is safe. This is a preparation for or-patterns. Joining scoped bindings seems like it would get messy.
2011-07-10Use more encapsulation for metadata::cstoreBrian Anderson-2/+2
2011-07-09rustc: Make rust-intrinsics take an explicit return pointerPatrick Walton-23/+48
2011-07-08Propagate constraints through copy, move, and swapTim Chevalier-133/+442
Assignments and moves with a simple local variable reference on the RHS now propagate any typestate constraints the RHS was involved in to the LHS. Swaps where both sides are local variables exchange the constraints. This was a pain in the butt and I'm still not proud of the resulting code. Needs refactoring like whoa.
2011-07-08Minor refactoringTim Chevalier-3/+11
2011-07-08Improve impossible-case handling in ty::get_element_typeTim Chevalier-4/+5
2011-07-08Improve the error message for import glob collisions. Closes #482Brian Anderson-17/+31
Instead of noting where the imported things were defined, note where they were imported. This is more useful and avoids issue #482.
2011-07-08rustc: Use interior vectors for the union-find in rustcPatrick Walton-21/+24
2011-07-08rustc: Fix a level-of-indirection problem by using size_of() to compute ↵Patrick Walton-4/+2
dynamically sized interior vector element sizes instead of field_of_tydesc()
2011-07-08Add just enough logic to the driver so that we can link std statically.Rafael Ávila de Espíndola-0/+3
2011-07-08rustc: Do dynamic size calculations properly when concatenating interior ↵Patrick Walton-23/+40
vectors. Closes #640.
2011-07-08Don't export tyencode from the metadata moduleBrian Anderson-4/+0
This involves pulling the type_abbrev cache out of crate_ctxt
2011-07-08Make the interface to metadata::csearch more consistentBrian Anderson-5/+6
2011-07-08Begin splitting metadata::decoder into decoding and crate search modulesBrian Anderson-13/+12
2011-07-08Move external crate/lib resolution to its own passBrian Anderson-2/+0
The scope of external crate reading is beyond the resolve pass now, as it builds up tables of information needed for several different purposes.
2011-07-08Move crate_map from resolve to cstoreBrian Anderson-7/+4
2011-07-08Replace the crate cache in session with the one in cstoreBrian Anderson-2/+4
2011-07-08Ignore current scope when resolving self-shadowing importsMarijn Haverbeke-18/+15
That is, for example, import x::y::x, which defines a local x, and thus wouldn't be able to find x::y anymore. Closes issue #624
2011-07-08Don't unbox types in ty::is_binopable, do it on typeck side insteadMarijn Haverbeke-17/+4
Closes issue #631 Removes ty::strip_boxes entirely, since unboxing is now more complicated anyway.
2011-07-08Remove useless return value in typeck::check_decl_localMarijn Haverbeke-6/+2
2011-07-08Auto-bind generic functions when their value is taken in non-call contextMarijn Haverbeke-4/+28
trans::trans_lval will now autobind if the given expression was the name of a generic functions. Those callees (trans_call and trans_bind) that are interested in the generics information call trans_lval_gen now.
2011-07-08Avoid superfluous take/drop for temp values passes as argumentsMarijn Haverbeke-8/+16
2011-07-08Make for-each bodies close over their parent's iterbodyMarijn Haverbeke-6/+19
Closes issue #639
2011-07-07rustc: Check iter return types. Closes #638.Patrick Walton-0/+2
2011-07-07rustc: Fix long linePatrick Walton-1/+2
2011-07-07rustc: Make trans use interior vectorsPatrick Walton-679/+651
2011-07-07rustc: Remove all exterior vectors from the ASTPatrick Walton-14/+11
2011-07-07Fix a bug that was interfering with method overriding. Issue #543.Lindsey Kuper-23/+36
Previously, we were creating both a normal vtable entry and a forwarding function for overriding methods, when they should have just gotten a vtable entry. This patch fixes that.
2011-07-07Merge pull request #634 from robarnold/upstream-stablePatrick Walton-6/+26
Allocate ivecs out of the kernel pool
2011-07-07Remove duplicate definition of def_to_str from middle::tyBrian Anderson-4/+0
2011-07-07rustc: Change lots of AST nodes to use interior vectorsPatrick Walton-191/+208
2011-07-07Command line changes for adding support for static libraries.Rafael Ávila de Espíndola-4/+4
2011-07-07Clean up trans_arg_exprMarijn Haverbeke-45/+25
As a preparation for implementing the temporary-move optimization for argument passing. The optimization itself isn't in yet, since it mysteriously corrupts memory.
2011-07-07Make moving of temporaries do the right thing, use it to optimizeMarijn Haverbeke-135/+174
This adds support for dropping cleanups for temporary values when they are moved somewhere else. It then adds wraps most copy operations (return, put in data structure, box, etc) in a way that will fall back to a move when it is safe. This saves a lot of taking/dropping, shaving over a megabyte off the stage2/rustc binary size. In some cases, most notably function returns, we could detect that the returned value is a local variable, and can thus be safely moved even though it is not a temporary. This will require putting some more information in lvals. I did not yet handle function arguments, since the logic for passing them looked too convoluted to touch. I'll probably try that in the near future, since it's bound to be a big win.
2011-07-07Improve handling of move and swap by alias checkerMarijn Haverbeke-10/+24
Closes issue #541. Closes issue #591