Commit Graph

24506 Commits

Author SHA1 Message Date
Huon Wilson
ad20a78c54 std::vec::raw: convert init_elem to a method. 2013-12-17 08:35:34 +11:00
Kiet Tran
4f95dceb59 Detect stability attributes on methods.
If it's a trait method, this checks the stability attribute of the
method inside the trait definition. Otherwise, it checks the method
implementation itself.
2013-12-16 16:25:45 -05:00
bors
000cda611f auto merge of #11002 : pnkfelix/rust/fsk-improve-doc-for-ptr-offset, r=alexcrichton
Spell out the units used for the `offset` argument, so that people do not try to scale to units of bytes themselves.
2013-12-16 13:16:40 -08:00
Seo Sanghyeon
4a13364010 Remove obsolete mutability from ast::Ty 2013-12-17 03:01:40 +09:00
bors
35e5056b6a auto merge of #11000 : cmr/rust/auto_encode, r=alexcrichton
Closes #6122
2013-12-16 09:06:38 -08:00
Felix S. Klock II
16f69b225b Spell out the units used for the offset argument, so that people do
not try to scale to units of bytes themselves.
2013-12-16 17:07:04 +01:00
Corey Richardson
b1fcba6024 Update and un-xfail auto-encode test
Closes #6122
2013-12-16 10:17:08 -05:00
Daniel Micay
664c9af1e9 vec: avoid some unsafe code in MoveIterator's dtor 2013-12-16 08:58:41 -05:00
bors
4e77c1148f auto merge of #10966 : michaelwoerister/rust/prelude2, r=cmr
This PR improves the stepping experience in GDB. It contains some fine tuning of line information and makes *rustc* produce nearly the same IR/DWARF as Clang. The focus of the changes is function prologue handling which has caused some problems in the past (https://github.com/mozilla/rust/issues/9641).

It seems that GDB does not properly handle function prologues when the function uses segmented stacks, i.e. it does not recognize that the `__morestack` check is part of the prologue. When setting a breakpoint like `break foo` it will set the break point before the arguments of `foo()` have been loaded and still contain bogus values. For function with the #[no_split_stack] attribute this problem has never occurred for me so I'm pretty sure that segmented stacks are the cause of the problem. @jdm mentioned that segmented stack won't be completely abandoned after all. I'd be grateful if you could tell me about what the future might bring in this regard (@brson, @cmr).

Anyway, this PR should alleviate this problem at least in the case when setting breakpoints using line numbers and also make it less confusing when setting them via function names because then GDB will break *before* the first statement where one could conceivably argue that arguments need not be initialized yet.

Also, a koala: 🐨

Cheers,
Michael
2013-12-16 05:51:32 -08:00
Huon Wilson
33b6bf4bc1 std::vec: remove aliasing &mut [] and &[] from shift_opt.
Also, dramatically simplify it with some tasteful raw pointers, rather
than treating everything as a nail with `transmute`.
2013-12-17 00:18:51 +11:00
bors
7b42497453 auto merge of #10995 : thestinger/rust/fast_move_iter, r=huonw
Closes #10976

Taken from 863fbaaa12, so it will be easily updated to the better vector representation too.
2013-12-16 03:01:58 -08:00
Daniel Micay
e3b168dab3 vec: make the move iterator fast for all types
Closes #10976
2013-12-16 05:56:42 -05:00
Michael Woerister
9384de77bb debuginfo: Add comment on is_local_to_unit parameter. 2013-12-16 10:23:28 +01:00
Michael Woerister
d35fff8994 debuginfo: Added some documentation of source location management. 2013-12-16 10:23:28 +01:00
Michael Woerister
89b47d5557 debuginfo: Add test cases for function prologue handling. 2013-12-16 10:23:28 +01:00
Michael Woerister
91efb2a67f debuginfo: Set correct source position for function calls. 2013-12-16 10:23:28 +01:00
Michael Woerister
b0100c5a0f debuginfo: Set the is_local_to_unit attribute of functions correctly 2013-12-16 10:23:28 +01:00
Michael Woerister
69f4bf79b2 debuginfo: Use same behavior as Clang for calculating scope_line parameter when creating function DIEs. 2013-12-16 10:23:28 +01:00
Michael Woerister
45e472aa4b debuginfo: Get rid of redundant argument copying with debuginfo activated 2013-12-16 10:23:28 +01:00
Michael Woerister
7eae649a01 debuginfo: Create separate lexical block for function bodies. 2013-12-16 10:23:28 +01:00
Michael Woerister
184d39414d debuginfo: Clear source positions where they'd confuse LLVM otherwise. 2013-12-16 10:23:28 +01:00
Michael Woerister
08bc072141 debuginfo: Clear debug source locations at beginning of functions. 2013-12-16 10:23:28 +01:00
Michael Woerister
ae66285732 debuginfo: Always set column information to zero for source locations. 2013-12-16 10:23:27 +01:00
bors
e7b0e0adbb auto merge of #10994 : ktt3ja/rust/issue-10956, r=alexcrichton
Types used inside live struct or enum are now marked live.

Fix #10956 and #10993.
2013-12-16 01:16:29 -08:00
Alex Crichton
c11f290199 Remove workarounds from issue #4404
Closes #10875
2013-12-16 00:28:19 -08:00
Kiet Tran
fb4a1d88f5 Mark live codes in struct/enum for dead-code pass 2013-12-16 02:15:00 -05:00
Kiet Tran
c810ee8038 AST Visitor now walks enum discriminant expression 2013-12-16 02:13:54 -05:00
Alex Crichton
6ebacf2fd7 Move logic for test output generation forward
By performing this logic very late in the build process, it ended up leading to
bugs like those found in #10973 where certain stages of the build process
expected a particular output format which didn't end up being the case. In order
to fix this, the build output generation is moved very early in the build
process to the absolute first thing in phase 2.

Closes #10973
2013-12-15 22:36:44 -08:00
bors
dc7a2e1222 auto merge of #10919 : alexcrichton/rust/snapshots, r=brson
Understand 'pkgid' in stage0. As a bonus, the snapshot now contains now metadata
(now that those changes have landed), and the snapshot download is half as large
as it used to be!
2013-12-15 22:21:30 -08:00
Alex Crichton
d9ea475feb Register new snapshots
Understand 'pkgid' in stage0. As a bonus, the snapshot now contains now metadata
(now that those changes have landed), and the snapshot download is half as large
as it used to be!
2013-12-15 22:17:59 -08:00
Alex Crichton
e2fa3c3af7 Forbid multiple imports in use statements
Closes #10911
2013-12-15 22:04:18 -08:00
bors
9eb89a6c6e auto merge of #10982 : ezyang/rust/lvalue-def, r=pcwalton
Based off of Niko's proposed definition of lvalues.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-15 15:16:28 -08:00
bors
ebbd30b5b2 auto merge of #10929 : pcwalton/rust/deboxing, r=pcwalton
...eyword.

r? @brson
2013-12-15 10:46:28 -08:00
Patrick Walton
998a3bbae0 libstd: Fix merge fallout. 2013-12-15 10:41:15 -08:00
Patrick Walton
775ccadd25 libsyntax: Implement the new box syntax for unique pointers. 2013-12-15 10:41:15 -08:00
Patrick Walton
a87786e3e9 librustc: Remove identifiers named box, since it's about to become a keyword. 2013-12-15 10:41:15 -08:00
bors
8d52dfbace auto merge of #10984 : huonw/rust/clean-raw, r=cmr
See commits for details.
2013-12-15 06:56:27 -08:00
bors
ef7969e86f auto merge of #10974 : huonw/rust/spellck, r=alexcrichton 2013-12-15 05:06:24 -08:00
Huon Wilson
164f7a290e std::vec: convert to(_mut)_ptr to as_... methods on &[] and &mut []. 2013-12-15 23:37:41 +11:00
Edward Z. Yang
b1b905f30b Correct definition of lvalues, fixes #10890
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
2013-12-15 20:31:05 +08:00
Huon Wilson
f53292f7ee Move std::{str,vec}::raw::set_len to an unsafe method on Owned{Vector,Str}. 2013-12-15 23:05:30 +11:00
Huon Wilson
4f62c969f6 std::vec: move pointless raw::get and unsafe_get functions.
This can easily be written as `(*v.unsafe_ref(i)).clone()`, or just
`*v.unsafe_ref(i)` for primitive types like `i32` (the common case).
2013-12-15 23:05:00 +11:00
Huon Wilson
0393c402a6 std::vec::raw: clean up docs. 2013-12-15 22:35:08 +11:00
Huon Wilson
a43bf3ff99 std::vec::bytes: remove obsolete functions.
These are less useful versions of the comparison operators and TotalOrd
trait.
2013-12-15 22:34:56 +11:00
Huon Wilson
f97040a93b std::vec: remove unnecessary count parameter on {bytes,
raw}::copy_memory.

Slices carry their length with them, so we can just use that
information.
2013-12-15 22:23:11 +11:00
bors
09bfb3b473 auto merge of #10970 : erickt/rust/master, r=alexcrichton
This modifies the `configure` to set `CFG_ENABLE_CLANG=1` if `gcc` is actually `clang`. This is needed because OS X's clang enables warning on unused command line arguments. Our build system suppresses this by default, but when `CFG_ENABLE_CLANGE=0`, we do not. This causes one of the tests to fail. This patch changes rust to directly use clang, which fixes the build failure.

Closes #10811
2013-12-15 03:06:24 -08:00
bors
386b455b1b auto merge of #10948 : cmr/rust/update_pkgid, r=metajack 2013-12-15 01:01:43 -08:00
bors
7f5787ac26 auto merge of #10932 : alexcrichton/rust/feature-update, r=cmr 2013-12-14 23:02:15 -08:00
Alex Crichton
6747d0738a Handle more cases in the heap lints 2013-12-14 22:56:33 -08:00
Huon Wilson
b0bcbbb154 extra: fix spelling in docs. 2013-12-15 16:34:14 +11:00