about summary refs log tree commit diff
path: root/src/comp/middle/mut.rs
AgeCommit message (Collapse)AuthorLines
2012-02-15make mut a keyword synonymous with mutableNiko Matsakis-295/+0
first step towards issue #1273
2012-02-10Remove a vestige of return-by-referenceMarijn Haverbeke-2/+1
2012-02-09Remove some pointless importsMarijn Haverbeke-2/+0
2012-02-06Make ty::t type self-sufficientMarijn Haverbeke-7/+7
It is now no longer needed to have a ty::ctxt to get at the contents of a ty::t. The straight-forward approach of doing this, simply making ty::t a box type, unfortunately killed our compiler performance (~15% slower) through refcounting cost. Thus, this patch now represents ty::t as an unsafe pointer, assuming that the ty::ctxt, which holds these boxes alive, outlives any uses of the ty::t values. In the current compiler this trivially holds, but it is does of course add a new potential pitfall. ty::get takes a ty::t and returns a boxed representation of the type. I've changed calls to ty::struct(X) to do ty::get(X).struct. Type structs are full of vectors, and copying them every time we wanted to access them was a bit of a cost.
2012-02-05resolve some merge failuresNiko Matsakis-2/+3
2012-02-05infer modes rather than overwriting with expected tyNiko Matsakis-4/+8
2012-02-02Fix assumption in mut.rs that op overloading breaksMarijn Haverbeke-4/+1
Closes #1733
2012-01-31Change option::t to optionTim Chevalier-2/+2
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-31Require alts to be exhaustiveTim Chevalier-0/+6
middle::check_alt does the work. Lots of changes to add default cases into alts that were previously inexhaustive.
2012-01-30Substitute type parameters more eagerlyMarijn Haverbeke-1/+1
This simplifies the typechecker a bit (no more ty_param_substs_opt_and_ty) and is needed for another experiment I'm playing with. I hope it also makes compilation faster (the bots will tell).
2012-01-27Allow moving out of mutable unsafe pointersMarijn Haverbeke-10/+12
This makes it possible to de-initialize values anywhere in memory, which is needed, for example, for a fast imlementation of vec::pop.
2012-01-25Rename tag to enum throughout the compilerMarijn Haverbeke-3/+3
This should reduce confusion of people trying to read the code.
2012-01-19rustc: ";" to "," in enumsPatrick Walton-2/+2
2012-01-19rustc: "tag" -> "enum"Patrick Walton-2/+2
2012-01-19Remove support for the '.' after a nullary tag in a patternTim Chevalier-3/+3
(Commit also includes lots of changes to remove '.'s that a git merge messed up, or else it was monkeys.)
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-14/+14
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-13distinguish "any closure" and "stack closure" (block)Niko Matsakis-1/+1
2012-01-13Obj system? What obj system?Marijn Haverbeke-5/+1
Removes the obj system from the compiler. Closes #1484
2012-01-12Make driver::session::session no longer an objectMarijn Haverbeke-0/+1
Rather, it is now a struct where properties like opts are accessed directly, and the error-reporting methods are part of a static impl (with the same name as the type).
2011-12-21Make { || ... } sugar for any type of closure, inferredNiko Matsakis-4/+9
2011-12-19Add type argument field to expr_pathMarijn Haverbeke-1/+1
This way, you can explicitly provide type parameters when calling a generic method. Issue #1227
2011-12-16Make uses of self in impls compileMarijn Haverbeke-0/+3
Get rid of expr_self_call, introduces def_self. `self` is now, syntactically, simply a variable. A method implicitly brings a `self` binding into scope. Issue #1227
2011-12-16Parse and resolve implementations.Marijn Haverbeke-0/+1
Issue #1227
2011-12-15rustc: Box the vectors returned from ty::tag_variantsBrian Anderson-1/+1
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-1/+1
2011-12-07Disallow binding by-mut-ref and by-move argumentsMarijn Haverbeke-0/+25
Fix bug in bound by-copy arguments. Closes #1261
2011-11-22Make ast::visit only descend into types when necessaryMarijn Haverbeke-4/+3
If visit_ty is not overridden, it uses a stub function which does not descend into types. Closes #1204
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-03Disallow writing to function arguments againMarijn Haverbeke-2/+4
Remove implicit copying hack. Closes #1118
2011-10-21Change the way block calls are parsed, mark them as block-calls.Marijn Haverbeke-1/+1
This makes it possible to omit the semicolon after the block, and will cause the pretty-printer to properly print such calls (if pretty-printing of blocks wasn't so broken). Block calls (with the block outside of the parentheses) can now only occur at statement level, and their value can not be used. When calling a block-style function that returns a useful value, the block must be put insde the parentheses. Issue #1054
2011-10-17Correct two more analyses of mutable? as mutableBrian Anderson-2/+2
I can't come up with test cases but this seems correct.
2011-10-17Don't allow assignment to mutable-wha?Brian Anderson-9/+9
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-3/+3
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-09-26Fix bug in mutability-checking passMarijn Haverbeke-10/+13
It wasn't properly handling function arguments.
2011-09-22Fix ty_uniq case in maybe_auto_unboxBrian Anderson-0/+1
Closes #961 Issue #409
2011-09-22Add support for mutable unique boxesBrian Anderson-1/+1
Issue #409
2011-09-22Convert ty::ty_uniq to contain a mutable typeBrian Anderson-1/+1
Issue #409
2011-09-16Remove autoderef for callsMarijn Haverbeke-3/+1
We were only using it in a single place, and there for no discernable reason (probably as part of the bare-fn-vals-are-not-copyable plan). It seems more surprising than useful.
2011-09-16Clean up (and optimize) root-mutability analysis in alias.rsMarijn Haverbeke-5/+0
2011-09-15Forbid assignment to by-reference bindingsMarijn Haverbeke-0/+1
Issue #918
2011-09-15Add representation for by-ref let bindingsMarijn Haverbeke-1/+1
Issue #918
2011-09-13Apply implicit copying for unsafe references to alt patternsMarijn Haverbeke-5/+0
2011-09-12Rename alias to reference in docs and error messagesMarijn Haverbeke-4/+4
Update docs to reflect new approach to aliases
2011-09-12Properly implement copy expressionsMarijn Haverbeke-1/+1
(And use them in some places that were doing {expr} before.)
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-24/+19
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-12Make the names of the arg mode tag reflect their (revised) meaningMarijn Haverbeke-3/+4
2011-09-12Pass all arguments by reference, make immut alias mode equiv to valueMarijn Haverbeke-4/+8
Arguments that can't be safely referenced will be implicitly copied. (Warnings for expensive copies will be forthcoming.) This will allow us to get rid of most of the ampersands in function signatures. See [1]. [1] https://mail.mozilla.org/pipermail/rust-dev/2011-September/000759.html
2011-09-02Reformat. Issue #855Brian Anderson-40/+42
2011-09-01Rename std::istr to std::str. Issue #855Brian Anderson-2/+2
2011-09-01Make resolve recognize upvarsMarijn Haverbeke-2/+6
Upvars are now marked with def_upvar throughout, not just when going through freevars::lookup_def. This makes things less error-prone. One thing to watch out for is that def_upvar is used in `for each` bodies too, when they refer to a local outside the body.