Commit Graph

21191 Commits

Author SHA1 Message Date
Luqman Aden
fcfd6e7c79 rustc: Add --target-cpu flag to select a more specific processor instead of the default, 'generic'. 2013-08-10 17:03:43 -04:00
bors
8b9e1ce75a auto merge of #8430 : erickt/rust/cleanup-iterators, r=erickt
This PR does a bunch of cleaning up of various APIs. The major one is that it merges `Iterator` and `IteratorUtil`, and renames functions like `transform` into `map`. I also merged `DoubleEndedIterator` and `DoubleEndedIteratorUtil`, as well as I renamed various .consume* functions to .move_iter(). This helps to implement part of #7887.
2013-08-10 13:17:19 -07:00
Erick Tryzelaar
20953bb1fb Merge branch 'match' of https://github.com/msullivan/rust into rollup 2013-08-10 13:04:16 -07:00
Erick Tryzelaar
f007a46d37 Merge branch 'master' of https://github.com/MAnyKey/rust into rollup 2013-08-10 13:03:34 -07:00
Erick Tryzelaar
fb00463feb Merge branch 'issue-8393-attributes-in-macros' of https://github.com/nikomatsakis/rust into rollup 2013-08-10 13:03:19 -07:00
Erick Tryzelaar
b19c2ed8f3 Merge branch 'master' of https://github.com/p2j4d2c/rust into rollup 2013-08-10 13:02:44 -07:00
Erick Tryzelaar
4e92faad13 Merge branch 'trie-bound-iters' of https://github.com/dim-an/rust into rollup 2013-08-10 13:01:20 -07:00
Erick Tryzelaar
5e1ca23a65 Merge branch 'vec-exh' of https://github.com/stepancheg/rust into rollup 2013-08-10 13:00:20 -07:00
Erick Tryzelaar
09f4c9af13 Merge branch 'enum-method-privacy' of https://github.com/michaelwoerister/rust into rollup
Conflicts:
	src/libsyntax/opt_vec.rs
2013-08-10 12:59:52 -07:00
Erick Tryzelaar
c8a93efdae Merge remote-tracking branch 'remotes/origin/master' into cleanup-iterators 2013-08-10 12:04:40 -07:00
bors
2ba36ec629 auto merge of #8327 : sstewartgallus/rust/factor_out_waitqueue, r=bblum
I'm a bit disappointed that I couldn't figure out how to factor out more of the code implementing `extra::sync` but I feel this is an okay start. Also I added some documentation explaining that `WaitQueue` isn't thread safe, and needs an exclusive lock.
 
@bblum
2013-08-10 07:47:14 -07:00
Erick Tryzelaar
5b2c1c543f syntax and rustc: fix some warnings 2013-08-10 07:33:22 -07:00
Erick Tryzelaar
e48ca19bc5 std: fix the non-stage0 str::raw::slice_bytes which broke in a merge 2013-08-10 07:33:22 -07:00
Erick Tryzelaar
6fcf2ee8e3 std: Transform.find_ -> .find 2013-08-10 07:33:22 -07:00
Erick Tryzelaar
f9dee04aaa std: Iterator.len_ -> .len 2013-08-10 07:33:22 -07:00
Erick Tryzelaar
74d2552b0a std: Iterator.last_ -> .last 2013-08-10 07:33:21 -07:00
Erick Tryzelaar
1db62d8311 std: Iterator.chain_ -> .chain 2013-08-10 07:33:21 -07:00
Erick Tryzelaar
60c2661684 std: Iterator.flat_map_ -> .flat_map 2013-08-10 07:33:21 -07:00
Erick Tryzelaar
24d2cd0ef4 std: Iterator.take_ -> .take 2013-08-10 07:33:21 -07:00
Erick Tryzelaar
68f40d215e std: Rename Iterator.transform -> .map
cc #5898
2013-08-10 07:33:21 -07:00
Erick Tryzelaar
4062b84f4a std: merge Iterator and IteratorUtil 2013-08-10 07:02:17 -07:00
Erick Tryzelaar
a6614621af std: merge iterator::DoubleEndedIterator and DoubleEndedIteratorUtil 2013-08-10 07:01:08 -07:00
Erick Tryzelaar
229eeda4cd Clean up some unused imports in tests 2013-08-10 07:01:07 -07:00
Erick Tryzelaar
fad7857c7b Mass rename of .consume{,_iter}() to .move_iter()
cc #7887
2013-08-10 07:01:07 -07:00
bors
e70aac572a auto merge of #8270 : dotdash/rust/ret_alloca_elim, r=pcwalton
When there is only a single store to the ret slot that dominates the
load that gets the value for the "ret" instruction, we can elide the
ret slot and directly return the operand of the dominating store
instruction. This is the same thing that clang does, except for a
special case that doesn't seem to affect us.

Fixes #8238
2013-08-10 04:44:13 -07:00
Björn Steinbrink
4b74b8dca4 Elide unnecessary ret slot allocas
When there is only a single store to the ret slot that dominates the
load that gets the value for the "ret" instruction, we can elide the
ret slot and directly return the operand of the dominating store
instruction. This is the same thing that clang does, except for a
special case that doesn't seem to affect us.

Fixes #8238
2013-08-10 11:04:50 +02:00
bors
f0fc9c92ff auto merge of #8425 : dim-an/rust/increase-stack-size, r=brson 2013-08-10 01:20:14 -07:00
Chris Morgan
1ceee6a843 Remove in-tree test binary.
I presume this was accidentally committed.
2013-08-10 16:14:39 +10:00
bors
60f5011005 auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=erickt
This PR fixes #7235 and #3371, which removes trailing nulls from `str` types. Instead, it replaces the creation of c strings with a new type, `std::c_str::CString`, which wraps a malloced byte array, and respects:

*  No interior nulls
* Ends with a trailing null
2013-08-09 21:56:17 -07:00
Erick Tryzelaar
ee59aacac4 Merge remote-tracking branch 'remotes/origin/master' into remove-str-trailing-nulls 2013-08-09 18:48:01 -07:00
bors
e81e81f234 auto merge of #8387 : brson/rust/nooldrt, r=brson 2013-08-09 18:41:13 -07:00
Tim Chevalier
4fb37edd93 docs: In rustpkg manual, note future plans about versions 2013-08-09 18:26:22 -07:00
Michael Sullivan
437a4c28a3 Fix interaction between default matches and guards. Closes #3121. 2013-08-09 17:39:21 -07:00
Brian Anderson
b473ce304f rustc: Obey RUST_MIN_STACK env var
A lot of people are hitting stack overflows in rustc. This will make it
easier to experiment with stack size.
2013-08-09 17:28:27 -07:00
Brian Anderson
b75915d0ca Remove the C++ runtime. Sayonara 2013-08-09 16:45:50 -07:00
Dmitry Ermolov
980bcdd381 Increase system stack size. 2013-08-10 03:37:39 +04:00
bors
6f6dce7bbc auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphism
r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).
2013-08-09 16:17:10 -07:00
Michael Sullivan
8cefcc0ac5 Fix some warnings. 2013-08-09 16:07:26 -07:00
Tim Chevalier
37fd8f03fd rustpkg: Simplify the PkgId struct
Get rid of special cases for names beginning with "rust-" or
containing hyphens, and just store a Path in a package ID. The Rust-identifier
for the crate is none of rustpkg's business.
2013-08-09 14:11:55 -07:00
Tim Chevalier
96fd606ddd std/rustc/rustpkg/syntax: Support the extern mod = ... form
This commit allows you to write:

 extern mod x = "a/b/c";

which means rustc will search in the RUST_PATH for a package with
ID a/b/c, and bind it to the name `x` if it's found.

Incidentally, move get_relative_to from back::rpath into std::path
2013-08-09 14:11:50 -07:00
Erick Tryzelaar
cab6d46e58 rustpkg: another fix for windows 2013-08-09 14:06:03 -07:00
bors
1de201c3c6 auto merge of #8415 : brson/rust/newrt-local-heap-perf, r=pcwalton,brson
Mostly optimizing TLS accesses to bring local heap allocation performance
closer to that of oldsched. It's not completely at parity but removing the
branches involved in supporting oldsched and optimizing pthread_get/setspecific
to instead use our dedicated TCB slot will probably make up for it.
2013-08-09 13:53:08 -07:00
Alex Crichton
2f3fde60c3 Implement an address_insignificant attribute
This can be applied to statics and it will indicate that LLVM will attempt to
merge the constant in .data with other statics.

I have preliminarily applied this to all of the statics generated by the new
`ifmt!` syntax extension. I compiled a file with 1000 calls to `ifmt!` and a
separate file with 1000 calls to `fmt!` to compare the sizes, and the results
were:

fmt           310k
ifmt (before) 529k
ifmt (after)  202k

This now means that ifmt! is both faster and smaller than fmt!, yay!
2013-08-09 13:49:41 -07:00
Corey Richardson
4be086b7f6 Remove rtdebug_! and make rtdebug! work properly.
It now actually does logging, and is compiled out when `--cfg rtdebug` is not
given to the libstd build, which it isn't by default. This makes the rt
benchmarks 18-50% faster.
2013-08-09 14:48:10 -04:00
Michael Sullivan
fb32ddf1a2 Fix vector pattern matching. Closes #6909. 2013-08-09 11:29:41 -07:00
Michael Sullivan
6362c3ad6b Switch to using .enumerate() some places in _match. 2013-08-09 11:29:41 -07:00
Erick Tryzelaar
c14e14e63a std: more windows fixes to os.rs and run.rs 2013-08-09 11:13:26 -07:00
bors
c20b90647e auto merge of #8369 : yichoi/rust/arm-test, r=sanxiyn
fix some part of test code to pass make check on ARM Android
2013-08-09 10:59:08 -07:00
Felix S. Klock II
eee044734c Add parse-error recovery for erroneous struct_id { } form.
There are 4 different new tests, to check some different scenarios for
what the parse context is at the time of recovery, becasue our
compile-fail infrastructure does not appear to handle verifying
error-recovery situations.

Differentiate between unit-like struct definition item and unit-like
struct construction in the error message.

----

More generally, outlines a more generic strategy for parse error
recovery: By committing to an expression/statement at set points in
the parser, we can then do some look-ahead to catch common mistakes
and skip over them.

One detail about this strategy is that you want to avoid emitting the
"helpful" message unless the input is reasonably close to the case of
interest.  (E.g. do not warn about a potential unit struct for an
input of the form `let hmm = do foo { } { };`)

To accomplish this, I added (partial) last_token tracking; used for
`commit_stmt` support.

The check_for_erroneous_unit_struct_expecting fn returns bool to
signal whether it "made progress"; currently unused; this is meant for
use to compose several such recovery checks together in a loop.
2013-08-09 18:32:46 +02:00
bors
74efdf6197 auto merge of #8352 : stepancheg/rust/ipv6-to-str, r=luqmana
Reported by @luqmana
2013-08-09 08:17:04 -07:00