Commit Graph

27409 Commits

Author SHA1 Message Date
Huon Wilson
ddc796096b rustc: put ty_closure behind some indirection.
This reduces the size of sty from 112 to 96; like with the ty_trait
variant, this variant of sty occurs rarely (~1%) so the benefits are
large and the costs small.
2014-03-19 22:20:56 +11:00
Huon Wilson
405b5fc1ee rustc: put ty_trait behind some indirection.
This reduces ty::sty from 160 bytes to just 112, and some measurements
eddyb made suggest that the ty_trait variant occurs very
rarely (e.g. ~1% of all sty instances) hence this will result in a large
memory saving, and the cost of the indirection is unlikely to be an
issue.
2014-03-19 22:19:05 +11:00
bors
ff033357bf auto merge of #12955 : sfackler/rust/vec_ng-doc, r=alexcrichton
I also removed a couple of methods that were silly and added sort.
2014-03-19 01:41:43 -07:00
klutzy
2d31bcaf16 rustc: Fix x86 ffi for empty struct arguments 2014-03-19 16:41:51 +09:00
klutzy
7437995b3e rustc: Fix x86 ffi for struct arguments
This fixes struct passing abi on x86 ffi: Structs are now passed
indirectly with byval attribute (as clang does).
2014-03-19 16:41:50 +09:00
Eduard Burtescu
c04d4846f2 Discard MTWT & interner tables from TLD after they stop being useful. 2014-03-19 07:28:18 +02:00
Steven Fackler
0f2d46f396 Docify std::vec_ng
I also removed a couple of methods that were silly and added sort.
2014-03-18 22:03:17 -07:00
bors
a39c294155 auto merge of #12954 : brson/rust/atomicdocs, r=alexcrichton
This adds lots of docs to the atomics module. Two of the examples
are using the future atomics API (relying on `Share`) and are ignored temporarily.
I discovered a bug in the way AtomicBool's fetch_nand method is
implemented and fixed it by using the correct value for `true`.
I also fixed the implementation of AcqRel fences (it was only doing
a release barrier), and made a "relaxed" fence a failure.
2014-03-18 21:16:46 -07:00
Brian Anderson
8fcb8dd065 std: Improve option docs 2014-03-18 18:22:33 -07:00
bors
87e72c3812 auto merge of #13006 : alexcrichton/rust/rollup, r=alexcrichton
Closes #13008 (Made the `clone_from` implementation for `~T` reuse the `T` itself if possible)
Closes #13003 (Make method Vec::remove() public)
Closes #13002 (disallow duplicate methods in trait impls)
Closes #13000 (rustc: test: don't silently ignore bad benches)
Closes #12999 (rustc: buffer the output writer for -Z ast-json[-noexpand].)
Closes #12993 (syntax: Don't parameterize the the pretty printer)
Closes #12990 (`char` reference: s/character/Unicode scalar value/)
Closes #12987 (Move syntax-extension-hexfloat.rs)
Closes #12983 (Fix linkage1 test which fails due to --as-needed)
Closes #12978 (rustc: remove linker_private/linker_private_weak)
Closes #12976 (libsyntax: librustdoc: ignore utf-8 BOM in .rs files)
Closes #12973 (closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type)
Closes #12972 (Add impl IntoStr for ::std::vec_ng::Vec<Ascii>)
Closes #12968 (deny missing docs getopts)
Closes #12965 (Documentation and formatting changes for option.rs.)
Closes #12962 (Relax the memory ordering on the implementation of UnsafeArc)
Closes #12958 (Typo fixes.)
Closes #12950 (Docsprint: Document ops module, primarily Deref.)
Closes #12946 (rustdoc: Implement cross-crate searching)
2014-03-18 18:22:23 -07:00
Alex Crichton
2a5e04c2a4 Test fixes from the rollup 2014-03-18 16:29:57 -07:00
Marvin Löbel
113596655a Made the clone_from implementation for ~T reuse the T itself if
possible by also calling `clone_from` on it.

In general, `Clone` implementors that overwrite `clone_from`
should try to to use it recursivly for substructures.
2014-03-18 16:29:57 -07:00
Alex Crichton
848f7b734e rustdoc: Implement cross-crate searching
A major discoverability issue with rustdoc is that all crates have their
documentation built in isolation, so it's difficult when looking at the
documentation for libstd to learn that there's a libcollections crate with a
HashMap in it.

This commit moves rustdoc a little closer to improving the multiple crate
experience. This unifies all search indexes for all crates into one file so all
pages share the same search index. This allows searching to work across crates
in the same documentation directory (as the standard distribution is currently
built).

This strategy involves updating a shared file amongst many rustdoc processes, so
I implemented a simple file locking API for handling synchronization for updates
to the shared files.

cc #12554
2014-03-18 13:51:29 -07:00
Matthew McPherrin
d717d613e3 Docsprint: Document ops module, primarily Deref. 2014-03-18 13:51:17 -07:00
Lindsey Kuper
783a00e796 Typo fixes. 2014-03-18 13:49:53 -07:00
Jonathan S
168cd3a2f5 Relaxed the memory ordering on the implementation of UnsafeArc 2014-03-18 13:49:45 -07:00
Ziad Hatahet
c297cff777 Documentation and formatting changes for option.rs. 2014-03-18 13:49:37 -07:00
Alan Andrade
175bf9470a deny missing docs 2014-03-18 13:49:22 -07:00
Eunchong Yu
e627bce939 Add impl IntoStr for ::std::vec_ng::Vec<Ascii> 2014-03-18 13:49:16 -07:00
Jeff Olson
2265512033 closes #12967 fix [en|de]coding of HashMap<K,V> where K is a numeric type
serialize: ref #12697 minor adj. to last char check + prettyencode test
2014-03-18 13:49:13 -07:00
Liigo Zhuang
20e178c582 libsyntax: librustdoc: ignore utf-8 BOM in .rs files
Closes #12974
2014-03-18 13:49:11 -07:00
Ben Noordhuis
8f7a7970f3 rustc: remove obsolete linkage types
Remove obsolete linkage types from the llvm::Linkage enum.  The linkage
types are no-ops and weren't used inside rustc anyway.
2014-03-18 13:49:09 -07:00
Ben Noordhuis
c800c98574 rustc: remove linker_private/linker_private_weak
Remove the linker_private and linker_private_weak linkage attributes,
they have been superseded by private and private_weak and have been
removed in upstream LLVM in commit r203866.
2014-03-18 13:49:09 -07:00
Nick Cameron
3301223c99 Fix linkage1 test which fails due to --as-needed
It appears that the --as-needed flag to linkers will not pull in a dynamic library unless it satisfies a non weak undefined symbol. The linkage1 test was creating a dynamic library where it was only used for a weak-symbol as part of an executable, so the dynamic library was getting discarded.

This commit adds another symbol to the library which satisfies a strong undefined symbol, so the library is pulled in to resolve the weak reference.
2014-03-18 13:48:12 -07:00
Nick Cameron
083d423976 Move syntax-extension-hexfloat.rs
Move syntax-extension-hexfloat.rs to run-pass-fulldeps so it depends on libhexfloat being compiled before running.
2014-03-18 13:48:09 -07:00
Simon Sapin
4ab95bcf20 char: s/character/Unicode scalar value/
Tweak the definition of `char` to use the appropriate Unicode terminology.
2014-03-18 13:48:06 -07:00
Alex Crichton
87c7c03f45 syntax: Don't parameterize the the pretty printer
The pretty printer constitues an enormous amount of code, there's no reason for
it to be generic. This just least to a huge amount of metadata which isn't
necessary. Instead, this change migrates the pretty printer to using a trait
object instead.

Closes #12985
2014-03-18 13:48:03 -07:00
Huon Wilson
92f0bc2935 rustc: buffer the output writer for -Z ast-json[-noexpand].
This takes the time for `rustc libstd/lib.rs -Z ast-json-noexpand >
file.json` from 9.0s to 3.5s (~0.5s spent parsing etc.) and `-Z
ast-json` from 11s to 5s (~1.5s spent parsing and expanding).
2014-03-18 13:47:55 -07:00
Corey Richardson
873f7408bd rustc: test: don't silently ignore bad benches
This is adequate because when a function has a type that isn't caught here,
that is, it has a single argument, but it *isn't* `&mut BenchHarness`, it
errors later on with:

     error: mismatched types: expected `fn(&mut test::BenchHarness)` but found
     `fn(int)` (expected &-ptr but found int)

which I consider acceptable.

Closes #12997
2014-03-18 13:47:50 -07:00
Corey Richardson
f9e0baa19a remove duplicate methods in impls 2014-03-18 13:47:42 -07:00
Corey Richardson
1607871dc2 rustc: disallow duplicate methods in trait impls
Closes #8153
2014-03-18 13:47:42 -07:00
bors
891eab94a3 auto merge of #12994 : alexcrichton/rust/fix-android, r=huonw
This compile-fail test didn't have a main function for architectures other than
x86
2014-03-18 11:52:31 -07:00
Jorge Aparicio
1f4c63049e Make method Vec::remove() public 2014-03-18 11:53:32 -05:00
Alex Crichton
6a7306fdab test: Fix android tests
This compile-fail test didn't have a main function for architectures other than
x86
2014-03-18 09:20:07 -07:00
Brian Anderson
749e527be6 std: Improve docs for atomics. Fix two bugs
This adds lots of docs to the atomics module. Two of the examples
are using the future atomics API and are ignored temporarily.
I discovered a bug in the way AtomicBool's fetch_nand method is
implemented and fixed it by using the correct value for `true`.
I also fixed the implementation of AcqRel fences (it was only doing
a release barrier), and made a "relaxed" fence a failure.
2014-03-17 18:27:54 -07:00
bors
af9368452d auto merge of #12935 : lbonn/rust/nullenum, r=alexcrichton
Fix for #12560
2014-03-17 11:57:08 -07:00
bors
0a181a8917 auto merge of #12742 : FlaPer87/rust/issue-11411-static-mut-slice, r=nikomatsakis
This PR enables the use of mutable slices in *mutable* static items. The work was started by @xales and I added a follow-up commit that moves the *immutable* restriction to the recently added `check_static`

Closes #11411
2014-03-17 09:57:06 -07:00
bors
79203b522b auto merge of #12957 : lkuper/rust/docsprint, r=alexcrichton 2014-03-17 08:01:56 -07:00
bors
50e3aa31e2 auto merge of #12951 : cadencemarseille/rust/issue-12943-remove-AtomicFlag, r=alexcrichton
fixes #12943
2014-03-17 05:17:02 -07:00
Laurent Bonnans
695114ea2c rustc: disallow trailing parentheses for nullary enum variants
Fixes #12560
2014-03-17 12:11:22 +01:00
bors
e4c91e6c7c auto merge of #12735 : eddyb/rust/at-exodus-chapter-11, r=cmr 2014-03-17 02:11:56 -07:00
Eduard Burtescu
e2ebc8f811 Fix rustdoc and tests. 2014-03-17 09:55:41 +02:00
Eduard Burtescu
e02aa722aa Refactor pprust a bit. 2014-03-17 09:53:08 +02:00
Eduard Burtescu
871e570810 De-@ codemap and diagnostic. 2014-03-17 09:53:08 +02:00
Eduard Burtescu
0bb6de3076 De-@ move maps and rework parts of trans. 2014-03-17 09:53:08 +02:00
Eduard Burtescu
3f64d4126b De-@ gather_loans. 2014-03-17 09:53:07 +02:00
Eduard Burtescu
a1e24c7f22 De-@ typeck::check::method. 2014-03-17 09:53:07 +02:00
Eduard Burtescu
da842c6278 De-@ resolve_lifetime. 2014-03-17 09:53:07 +02:00
Eduard Burtescu
90cbe0cad2 De-@ ParseSess uses. 2014-03-17 09:53:07 +02:00
Eduard Burtescu
555a239301 De-@ CStore uses. 2014-03-17 09:53:07 +02:00