| Age | Commit message (Collapse) | Author | Lines |
|
first step towards issue #1273
|
|
|
|
|
|
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.
|
|
|
|
|
|
Closes #1733
|
|
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).
|
|
middle::check_alt does the work. Lots of changes to add default cases
into alts that were previously inexhaustive.
|
|
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).
|
|
This makes it possible to de-initialize values anywhere in
memory, which is needed, for example, for a fast imlementation
of vec::pop.
|
|
This should reduce confusion of people trying to read the code.
|
|
|
|
|
|
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
|
|
Does what it says on the tin.
The next commit will remove support for this syntax.
|
|
|
|
Removes the obj system from the compiler.
Closes #1484
|
|
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).
|
|
|
|
This way, you can explicitly provide type parameters when calling a
generic method.
Issue #1227
|
|
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
|
|
Issue #1227
|
|
|
|
|
|
Fix bug in bound by-copy arguments.
Closes #1261
|
|
If visit_ty is not overridden, it uses a stub function which does not
descend into types.
Closes #1204
|
|
|
|
Remove implicit copying hack.
Closes #1118
|
|
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
|
|
I can't come up with test cases but this seems correct.
|
|
|
|
Add sprinkle && throughout the compiler to make it typecheck again.
Issue #1008
|
|
It wasn't properly handling function arguments.
|
|
Closes #961
Issue #409
|
|
Issue #409
|
|
Issue #409
|
|
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.
|
|
|
|
Issue #918
|
|
Issue #918
|
|
|
|
Update docs to reflect new approach to aliases
|
|
(And use them in some places that were doing {expr} before.)
|
|
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
|
|
|
|
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
|
|
|
|
|
|
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.
|