bors
132cfcdd88
auto merge of #7363 : bblum/rust/soundness, r=nikomatsakis
...
The commit f9a5453 is meant to be a temporary hold-over. Whether or not there is added a way for the compiler to "implicitly borrow" stack closures in this way, there should be a codegen optimization that prevents having to traverse possibly-very-many function pointers to find the function you ultimately wanted to call. I tried to separate out the changes so this particular commit could be straight-up reverted if auto-borrowing happens in the future.
r? @nikomatsakis
2013-06-29 04:22:53 -07:00
bors
c80e3bac3e
auto merge of #7244 : bblum/rust/once, r=nikomatsakis
...
@graydon suggested that once closures not be part of the language for 1.0, but that they might be hidden behind a -Z compile flag as an "experimental feature" in case people decide they need them.
Regardless of whether ```-Z once-fns``` is set, this PR will parse the ```once``` keyword and will prevent closures labelled with it from being called more than once. It will also permit moving out of captured vars in heap closures, just to let the runtime writers stop using ```Cell``` sooner. Setting ```-Z once-fns``` only toggles whether the move-out-from-capture privilege is also given for stack closures.
r? @nikomatsakis
2013-06-29 02:34:43 -07:00
Ben Blum
d7544fe987
Add two tests for the case of the recurring closure.
2013-06-29 04:39:38 -04:00
Ben Blum
d4722e5333
Trade stack closure copyability for type soundness.
2013-06-29 04:39:37 -04:00
Ben Blum
98c169e4e5
Make librust satisfy noncopyable stack closures
2013-06-29 04:39:37 -04:00
Ben Blum
ff4ab9e147
'Borrow' stack closures rather than copying them (e.g., "|x|f(x)"), in prep for making them noncopyable.
2013-06-29 04:39:34 -04:00
Ben Blum
89110fdf55
Use more deriving(IterBytes) in librustc.
2013-06-29 03:58:50 -04:00
Ben Blum
75b80bad63
Use more deriving(IterBytes) in libsyntax.
2013-06-29 03:58:50 -04:00
Ben Blum
5784c0912f
Change taskgroup key type to fn:Copy in prep for noncopyable stack closures.
2013-06-29 03:58:50 -04:00
Ben Blum
e0788c7f52
xfail-fast once fn run-pass tests
2013-06-29 03:54:09 -04:00
bors
a229c980c8
auto merge of #7439 : catamorphism/rust/cut-rustpkg-output, r=catamorphism
...
Closes #7250
2013-06-29 00:49:45 -07:00
bors
4e78c1e2a8
auto merge of #7479 : mozilla/rust/rollup, r=thestinger
...
22b7eb3
r=thestinger
28a3613
r=cmr
a0c31ec
r=bstrie
ee7307e
r=thestinger
b9cf6a3
r=thestinger
2013-06-28 22:25:48 -07:00
Young-il Choi
21cc0ccea1
librustc: fix #7467 for android
2013-06-29 01:22:35 -04:00
Young-il Choi
51beba6cf9
libextra: unused import fix for android AGAIN
2013-06-29 01:22:29 -04:00
blake2-ppc
b9cf6a33d2
iterator: UnfoldrIterator::new should have function argument last
...
To match Rust conventions and enable use of `do` etc, make sure the
closure is the last argument to the `new` method.
2013-06-29 01:03:37 -04:00
Kevin Ballard
ee7307e6cb
Smarter warning in extra::term::Terminal.reset()
...
Don't spew a warn!() in reset() if num_colors is 0, because
non-color-supporting terminals are legit. Use debug!() there instead.
Continue spewing warn!() if we believe the terminal to support colors.
Use a better warning when the `op` capability can't be found.
2013-06-29 01:02:07 -04:00
Jordi Boggiano
a0c31ece9d
Remove unused variable
2013-06-29 01:00:13 -04:00
Daniel Micay
28a3613a1d
fix zsh completion for lint and debug flags
...
this correctly makes them accept 1 argument, and auto-completes the
comma-separated list of lint flags
2013-06-29 00:58:24 -04:00
Brian Anderson
22b7eb3802
Rename #[mutable] to #[no_freeze]
2013-06-29 00:56:36 -04:00
Brian Anderson
4af7ebcd8f
Rename #[non_sendable] to #[no_send]
2013-06-29 00:56:36 -04:00
bors
d681bccb6a
auto merge of #7471 : msullivan/rust/default-methods, r=graydon
...
This fixes a bunch of default method bugs and restructures how vtable resolutions are represented.
(It also adds a depth counter to llvm::type_to_str as a hacky work around for our circular llvm types. This is related in the sense that I needed to do it to make debug tracing not cause rustc to crash after running out of stack space.)
2013-06-28 20:16:56 -07:00
Jordi Boggiano
647b4a6bcd
Optimize str::each_split_within when it is called with large limits
2013-06-29 04:53:52 +02:00
Michael Sullivan
9340fd5ce0
Add tests for some default method things.
2013-06-28 18:09:02 -07:00
Michael Sullivan
c05165bf93
Drop the impl_id field from fn_ctxt.
2013-06-28 18:09:02 -07:00
Michael Sullivan
5943118728
Drop an unused field from param_substs.
2013-06-28 18:09:02 -07:00
Michael Sullivan
0252693db2
Improve handling of trait bounds on a trait in default methods.
...
This is work on #7460 .
It does not properly handle certain cross crate situations,
because we don't properly export vtable resolution information.
2013-06-28 18:09:02 -07:00
bors
e23934645a
auto merge of #7466 : thestinger/rust/passes, r=cmr
2013-06-28 16:49:49 -07:00
Michael Sullivan
649b26f7c6
Rework vtable_res to not be flattened. It is now a list of the resolutions for each param.
2013-06-28 16:12:08 -07:00
Michael Sullivan
57ee34c2bf
Actually resolve trait bounds on impls. Closes #7266 .
2013-06-28 16:12:08 -07:00
Michael Sullivan
817f98085f
Make calling methods parameterized on the trait work from default methods.
...
This is done by adding a new notion of "vtable_self".
We do not yet properly handle super traits.
Closes #7183 .
2013-06-28 16:12:08 -07:00
Michael Sullivan
a9e51f5f70
Make default method handling not choke on self region params. Closes #7341 .
2013-06-28 16:12:08 -07:00
Michael Sullivan
050d0e6b29
Add a depth counter to llvm::type_to_str to work around infinite llvm types.
2013-06-28 16:12:04 -07:00
Michael Sullivan
47afb33981
Add Float to llvm::type_to_str.
2013-06-28 16:12:04 -07:00
Daniel Micay
2bdc88b652
copy the optimization passes from clang
2013-06-28 18:18:09 -04:00
bors
5d2e565bb1
auto merge of #7437 : brson/rust/winver, r=brson
...
r? @graydon (or anybody)
2013-06-28 14:14:03 -07:00
Philipp Brüschweiler
a2227f9e0c
librustc: don't skip ahead when computing register types of SSEFloatVectors
...
Also fixes an unrelated typo (found by comparing to the original code
of the clay project) and some cleanup.
Fixes #7415 .
2013-06-28 21:28:58 +02:00
bors
f44b951a1e
auto merge of #7451 : cmr/rust/rewrite-each-path, r=pcwalton
2013-06-28 12:05:12 -07:00
Corey Richardson
4f044891a5
Fix merge fallout
2013-06-28 14:10:06 -04:00
Corey Richardson
d600601162
Add each_parent to WindowsPath
2013-06-28 10:47:59 -04:00
Corey Richardson
8f5cb92f89
Fix threadring
2013-06-28 10:47:59 -04:00
James Miller
fae4a9e5ba
Rename Const/Owned in more places
2013-06-28 10:47:59 -04:00
Patrick Walton
10bcb60e8f
librustc: Fix even *MORE* merge fallout!
2013-06-28 10:47:59 -04:00
Patrick Walton
f25f466afe
librustc: Fix even *more* merge fallout!
2013-06-28 10:47:59 -04:00
Patrick Walton
f6a27cbda2
libextra: Fix even more merge fallout.
2013-06-28 10:47:56 -04:00
Patrick Walton
3625781cfe
librustc: Fix more merge fallout.
2013-06-28 10:44:17 -04:00
Patrick Walton
bb830558d1
librustc: Fix merge fallout and test cases.
2013-06-28 10:44:17 -04:00
Patrick Walton
e015bee286
Rewrite each_path to allow performance improvements in the future.
...
Instead of determining paths from the path tag, we iterate through
modules' children recursively in the metadata. This will allow for
lazy external module resolution.
2013-06-28 10:44:16 -04:00
Patrick Walton
89eb995195
librustc: Fix merge fallout.
2013-06-28 10:44:16 -04:00
Patrick Walton
03ab6351cc
librustc: Rewrite reachability and forbid duplicate methods in type implementations.
...
This should allow fewer symbols to be exported.
2013-06-28 10:44:16 -04:00
Patrick Walton
a1531ed946
librustc: Remove the broken overloaded assign-ops from the language.
...
They evaluated the receiver twice. They should be added back with
`AddAssign`, `SubAssign`, etc., traits.
2013-06-28 10:44:16 -04:00