Commit Graph

129 Commits

Author SHA1 Message Date
Michael Woerister
de03900464 debuginfo: Make limited-debuginfo test case more robust against GDB output variations.
Fixes issue #12787.
2014-03-14 19:11:02 +01:00
Alex Crichton
7858065113 std: Rename Chan/Port types and constructor
* Chan<T> => Sender<T>
* Port<T> => Receiver<T>
* Chan::new() => channel()
* constructor returns (Sender, Receiver) instead of (Receiver, Sender)
* local variables named `port` renamed to `rx`
* local variables named `chan` renamed to `tx`

Closes #11765
2014-03-13 13:23:29 -07:00
bors
18356675e5 auto merge of #12816 : michaelwoerister/rust/limited-debuginfo, r=alexcrichton
Fixes #12811 as described in the issue.
2014-03-12 07:42:03 -07:00
Alex Crichton
486a25a30f test: Relax a debuginfo test
This test is blocking a snapshot. Apparently the snapshot bot doesn't print
'limited-debuginfo::main()' but rather just 'main()'. Who knew?
2014-03-11 23:59:56 -07:00
Michael Woerister
3ea50f0e36 debuginfo: Improve commandline option handling for debuginfo (fixes #12811)
The `-g` flag does not take an argument anymore while the argument to `--debuginfo` becomes mandatory. This change makes it possible again to run the compiler like this:

`rustc -g ./file.rs`

This did not work before because `./file.rs` was misinterpreted as the argument to `-g`. In order to get limited debuginfo, one now has to use `--debuginfo=1`.
2014-03-11 18:15:35 +01:00
Michael Woerister
a5b4d94e3d debuginfo: Add test case for limited debuginfo 2014-03-06 07:59:47 +01:00
Michael Woerister
e15fd400ba debuginfo: Expose limited debuginfo in command line options 2014-03-06 07:59:37 +01:00
Michael Woerister
a40b272fae debuginfo: Re-enable test case that should have worked all along. 2014-02-19 17:16:36 +01:00
Michael Woerister
3ce04dc719 debuginfo: Move test case from run-pass to debug-info directory so it does not interfere with RUSTFLAGS=-g 2014-02-19 17:12:37 +01:00
Michael Woerister
5f9e32ad68 debuginfo: Add support for simd types 2014-02-19 17:12:37 +01:00
Florian Hahn
f62460c1f5 Change xfail directives in compiletests to ignore, closes #11363 2014-02-11 18:23:20 +01:00
Alex Crichton
071ee96277 Consolidate codegen-related compiler flags
Move them all behind a new -C switch. This migrates some -Z flags and some
top-level flags behind this -C codegen option.

The -C flag takes values of the form "-C name=value" where the "=value" is
optional for some flags.

Flags affected:

* --llvm-args           => -C llvm-args
* --passes              => -C passes
* --ar                  => -C ar
* --linker              => -C linker
* --link-args           => -C link-args
* --target-cpu          => -C target-cpu
* --target-feature      => -C target-fature
* --android-cross-path  => -C android-cross-path
* --save-temps          => -C save-temps
* --no-rpath            => -C no-rpath
* -Z no-prepopulate     => -C no-prepopulate-passes
* -Z no-vectorize-loops => -C no-vectorize-loops
* -Z no-vectorize-slp   => -C no-vectorize-slp
* -Z soft-float         => -C soft-float
* -Z gen-crate-map      => -C gen-crate-map
* -Z prefer-dynamic     => -C prefer-dynamic
* -Z no-integrated-as   => -C no-integrated-as

As a bonus, this also promotes the -Z extra-debug-info flag to a first class -g
or --debuginfo flag.

* -Z debug-info         => removed
* -Z extra-debug-info   => -g or --debuginfo

Closes #9770
Closes #12000
2014-02-10 00:50:39 -08:00
Daniel Micay
95d897c579 add a hack to fix debug-info tests under gdb 7.7 2014-02-07 21:22:47 -05:00
Derek Guenther
730bdb6403 Added tests to make tidy 2014-02-07 12:49:24 -06:00
Eduard Burtescu
b2d30b72bf Removed @self and @Trait. 2014-02-07 00:38:33 +02:00
Alex Crichton
882b4829ce xfail a test to unblock the snapshot
cc #12021
2014-02-03 17:12:52 -08:00
Huon Wilson
b972cadf61 Update/delete tests using @[]. 2014-02-02 02:59:03 +11:00
bors
1e23c5c051 auto merge of #11879 : thestinger/rust/frame-pointer, r=alexcrichton
This is still used for Rust code (`Options.NoFramePointerElim = true`).
2014-01-29 13:36:40 -08:00
Daniel Micay
cb263e875e enable fp-elim when debug info is disabled
This can almost be fully disabled, as it no longer breaks retrieving a
backtrace on OS X as verified by @alexcrichton. However, it still
breaks retrieving the values of parameters. This should be fixable in
the future via a proper location list...

Closes #7477
2014-01-29 16:35:05 -05:00
Michael Woerister
0a03bc073a debuginfo: Fix name attribute for DWARF compile units 2014-01-27 17:56:05 +01:00
Niko Matsakis
56f4d1831a Link lifetimes in let patterns just as we do for match patterns 2014-01-17 08:04:38 -05:00
Daniel Micay
0e885e42b1 remove reference counting headers from ~
Unique pointers and vectors currently contain a reference counting
header when containing a managed pointer.

This `{ ref_count, type_desc, prev, next }` header is not necessary and
not a sensible foundation for tracing. It adds needless complexity to
library code and is responsible for breakage in places where the branch
has been left out.

The `borrow_offset` field can now be removed from `TyDesc` along with
the associated handling in the compiler.

Closes #9510
Closes #11533
2014-01-14 22:01:40 -05:00
Patrick Walton
119c6141f5 librustc: Remove @ pointer patterns from the language 2014-01-13 14:45:21 -08:00
Brendan Zabarauskas
4fc0452ace Remove re-exports of std::io::stdio::{print, println} in the prelude.
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-11 10:46:00 +11:00
bors
97005c0068 auto merge of #11401 : michaelwoerister/rust/issue11322, r=alexcrichton
`expand_include_str()` in libsyntax seems to have corrupted the CodeMap by always setting the BytePos of any included files to zero. It now uses `CodeMap::new_filemap()` which should set everything properly. This should fix issue #11322 but I don't want to close it before I have confirmation from the reporters that the problem is indeed fixed.
2014-01-08 11:26:30 -08:00
Michael Woerister
ad3a179954 Fix CodeMap issue in expand_include_str() 2014-01-08 16:38:58 +01:00
Brian Anderson
d323632669 'borrowed pointer' -> 'reference' 2014-01-07 18:49:13 -08:00
Michael Woerister
645bb327db debuginfo: Add test case for recursive enum types (issue #11083) 2014-01-02 15:38:57 +01:00
Michael Woerister
01fae5fb2a debuginfo: Updated test cases to also test by-value self arguments. 2013-12-17 18:08:51 +01:00
Michael Woerister
89b47d5557 debuginfo: Add test cases for function prologue handling. 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
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
Brian Anderson
0b69bc95c3 Ignore failing Android debug-info tests. #10381 2013-12-13 16:39:22 -08:00
Erik Price
5731ca3078 Make 'self lifetime illegal.
Also remove all instances of 'self within the codebase.

This fixes #10889.
2013-12-11 10:54:06 -08:00
Alex Crichton
ab387a6838 Register new snapshots 2013-11-28 20:27:56 -08:00
Patrick Walton
9521551b47 librustc: Fix merge fallout. 2013-11-26 11:04:39 -08:00
Patrick Walton
406813957b test: Remove most uses of &fn() from the tests. 2013-11-26 08:19:00 -08:00
Patrick Walton
ba739b2135 librustc: Convert ~fn() to proc() everywhere. 2013-11-18 18:27:31 -08:00
klutzy
3e5185d97a test: Add xfail-win32 to two debug-info tests 2013-11-14 14:43:09 +09:00
Young-il Choi
ca55317e90 tagging issue number(#10381) 2013-11-10 08:18:12 +09:00
sh8281.kim
4e54828b0d Add make check support(arm-linux-androideabi debuginfo) 2013-11-06 09:41:59 +09:00
Alex Crichton
e7a6782948 Relax the constraints on a debuginfo test
The snapshot just failed due to a debuginfo test failing, and according to its
output at
http://buildbot.rust-lang.org/builders/snap3-linux/builds/564/steps/test/logs/stdio
it appears to be because the printed lines has a little less information than
the original lines were checking for. I would suspect that this is just because
of a slightly different version of gdb, but it's not that serious regardless.
2013-11-04 17:11:44 -08:00
Michael Letterle
ca2f3028e9 Updated debugging metadata for ty_nil and ty_bot
ty_nil will now report as "()" in gdb
ty_bot will now report as "!" in gdb

Added test to confirm basic types debugging metadata.

This fixes #9226
2013-11-02 19:35:35 -04:00
Jed Davis
01097cbab0 Unbreak the debuginfo tests.
The variant used in debug-info/method-on-enum.rs had its layout changed
by the smaller discriminant, so that the `u32` no longer overlaps both
of the `u16`s, and thus the debugger is printing partially uninitialized
data when it prints the wrong variant.

Thus, the test runner is modified to accept wildcards (using a string
that should be unlikely to occur literally), to allow for this.
2013-10-29 09:09:20 -07:00
Daniel Micay
142672dca4 register snapshots 2013-10-23 18:06:12 -04:00
Daniel Micay
e1a26ad271 use element count in slices, not size in bytes
This allows the indexing bounds check or other comparisons against an
element length to avoid a multiplication by the size.
2013-10-15 16:23:28 -04:00
Alex Crichton
3396365cab Add appropriate #[feature] directives to tests 2013-10-06 14:39:25 -07:00
Daniel Micay
c9d4ad07c4 remove the float type
It is simply defined as `f64` across every platform right now.

A use case hasn't been presented for a `float` type defined as the
highest precision floating point type implemented in hardware on the
platform. Performance-wise, using the smallest precision correct for the
use case greatly saves on cache space and allows for fitting more
numbers into SSE/AVX registers.

If there was a use case, this could be implemented as simply a type
alias or a struct thanks to `#[cfg(...)]`.

Closes #6592

The mailing list thread, for reference:

https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-10-01 14:54:10 -04:00
bors
a7d68adbdd auto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphism
Progress on #7981

This doesn't completely close the issue because `struct A;` is still allowed, and it's a much larger change to disallow that. I'm also not entirely sure that we want to disallow that. Regardless, punting that discussion to the issue instead.
2013-09-24 15:45:57 -07:00