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
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
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
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
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
Patrick Walton
f463e69d20
librustc: Add a small vector optimization for GEPi. Shaves a second off trans, I think?
2013-06-28 10:44:15 -04:00
Patrick Walton
f9b54541ee
librustc: Disallow "mut" from distributing over bindings.
...
This is the backwards-incompatible part of per-binding-site "mut".
2013-06-28 10:44:15 -04:00
bors
8600c18812
auto merge of #7272 : Aatch/rust/namegen_thunk, r=thestinger
...
This removes the `namegen` thunk that was in `common.rs`. I also take the opportunity to refactor a few uses where we had a `str -> ident -> str` chain that seemed somewhat redundant to me.
Also cleans up some warnings that made their way in already.
2013-06-28 01:01:52 -07:00
James Miller
a897a9ab9f
Remove useless namegen thunk
2013-06-28 18:00:20 +12:00
bors
61dc7760d0
auto merge of #7410 : luqmana/rust/bare-self, r=catamorphism
...
Finally sorted this out. Fixes #5321 , #4439 , and #4850 .
2013-06-27 20:19:38 -07:00
Luqman Aden
767374976b
librustc: Always pass self ByRef.
2013-06-27 21:36:30 -04:00
bors
927f454ac1
auto merge of #7432 : michaelwoerister/rust/WP3, r=jdm
2013-06-27 17:22:42 -07:00
bors
63afb8ccc8
auto merge of #7430 : huonw/rust/vec-kill, r=thestinger
2013-06-27 15:01:58 -07:00
Michael Woerister
2f5e33d02f
debuginfo: Some corrections after review.
2013-06-27 19:28:37 +02:00
Michael Woerister
6af78610e7
debuginfo: Added support for region pointers.
2013-06-27 19:28:37 +02:00
Michael Woerister
46d28c874c
debuginfo: Replaced many instances of @ with &.
2013-06-27 19:28:17 +02:00
Michael Woerister
4d8f2fd871
debuginfo: Many little formatting improvements.
2013-06-27 19:28:17 +02:00
Michael Woerister
7bb189e56c
Fixed debug information bug regarding struct padding.
2013-06-27 19:28:17 +02:00
Philipp Brüschweiler
7295a6da92
Remove many shared pointers
...
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.
Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 15:06:19 +02:00
Huon Wilson
d2e3e1e52b
Convert vec::{head, tail, init, last} (and similar fns) to methods.
2013-06-27 22:37:00 +10:00
Huon Wilson
d0512b1055
Convert vec::[mut_]slice to methods, remove vec::const_slice.
2013-06-27 22:36:09 +10:00
bors
a28f9ba526
auto merge of #7361 : brson/rust/incoming, r=brson
2013-06-27 01:04:33 -07:00
bors
f1e09d6f1f
auto merge of #7420 : mozilla/rust/rollup, r=thestinger
2013-06-26 23:07:41 -07:00
bors
32adc0e730
auto merge of #7382 : msullivan/rust/cleanup, r=bblum
2013-06-26 15:13:37 -07:00
Philipp Brüschweiler
2234f61038
Remove the last traces of shapes
2013-06-26 18:08:23 -04:00
bors
a30ab764e1
auto merge of #7255 : michaelwoerister/rust/debuginfo, r=jdm
...
This PR contains no real code changes. Just some documentation additions in the form of comments and some internal reordering of functions within debuginfo.rs.
2013-06-26 05:20:06 -07:00
bors
22408d9ad5
auto merge of #7269 : luqmana/rust/drop, r=thestinger
...
Finally rename finalize to drop.
Closes #4332 .
2013-06-25 20:29:06 -07:00
Brian Anderson
5d3ca4b843
Merge remote-tracking branch 'mozilla/master' into incoming
...
Conflicts:
src/librustc/middle/astencode.rs
src/librustc/middle/check_const.rs
2013-06-25 19:32:00 -07:00
Luqman Aden
ca2966c6d0
Change finalize -> drop.
2013-06-25 21:14:39 -04:00
Daniel Micay
e67c48a591
remove each
from vec, HashMap and HashSet
2013-06-25 16:28:02 -04:00
Michael Sullivan
663f298183
Get rid of cast on every self reference.
2013-06-25 10:17:34 -07:00
Michael Sullivan
13e5f0ebdf
Remove some essentially dead code in method handling.
2013-06-25 10:17:33 -07:00
bors
d161e630d8
auto merge of #7317 : Aatch/rust/no-drop-flag, r=thestinger
...
This adds a `#[no_drop_flag]` attribute. This attribute tells the compiler to omit the drop flag from the struct, if it has a destructor. When the destructor is run, instead of setting the drop flag, it instead zeroes-out the struct. This means the destructor can run multiple times and therefore it is up to the developer to use it safely.
The primary usage case for this is smart-pointer types like `Rc<T>` as the extra flag caused the struct to be 1 word larger because of alignment.
This closes #7271 and #7138
2013-06-25 07:23:06 -07:00
bors
7aee5da08d
auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmr
...
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730 , #3475 .
Update: this now also removes the unused shape fields in tydescs.
2013-06-25 04:38:06 -07:00
James Miller
721164d5ec
Zero the struct in the take glue, not the drop glue
2013-06-25 16:39:56 +12:00
James Miller
0cca08a21a
Add support for #[no_drop_flag] attribute
2013-06-25 16:11:33 +12:00
Brian Anderson
c06ee9f7a7
Merge remote-tracking branch 'cmr/various-cleanup' into incoming
2013-06-24 15:11:36 -07:00
Alex Crichton
8fdc8f392c
Support foreign 'static mut' variables as well
2013-06-23 18:00:32 -07:00
Alex Crichton
1841b31c61
Add 'static mut' items to the language
2013-06-23 17:59:35 -07:00
Ben Blum
ce857e3d60
Parse and typecheck (not kindcheck) bounds on trait paths.
2013-06-23 14:40:14 -04:00
Philipp Brüschweiler
e2f1049bd5
Remove unused TyDesc parameter from the glue functions
...
To remove the environment pointer, support for function pointers without
an environment argument is needed (i.e. a fixed version of #6661 ).
2013-06-23 13:02:00 +02:00
Philipp Brüschweiler
273f90566c
Small cleanups
2013-06-23 12:49:16 +02:00
Philipp Brüschweiler
8bf0033345
Remove unused shape fields from typedescs
2013-06-23 12:49:16 +02:00
Philipp Brüschweiler
469f394b25
Remove intrinsic module
...
To achieve this, the following changes were made:
* Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics
* Convert TyDesc, TyVisitor and Opaque to lang items instead of specially
handling the intrinsics module
* Removed TypeDesc, FreeGlue and get_type_desc() from sys
Fixes #3475 .
2013-06-23 12:49:16 +02:00