Commit Graph

20539 Commits

Author SHA1 Message Date
Ben Blum
f34fadd126 Implement select() for new runtime pipes. 2013-07-30 13:19:25 -04:00
Ben Blum
7326bc879e Optimize try_recv to not require the two context switches when data is available. 2013-07-29 16:04:16 -04:00
Ben Blum
1137fbd9ab Remove ChanOneHack/PortOneHack extra allocation 2013-07-29 16:04:16 -04:00
bors
2830d7d013 auto merge of #8032 : catamorphism/rust/rustpkg-tags, r=graydon
r? @graydon    Package IDs can now be of the form a/b/c#FOO, where (if a/b/c is
    a git repository) FOO is any tag in the repository. Non-numeric
    tags only match against package IDs with the same tag, and aren't
    compared linearly like numeric versions.
    
 While I was at it, refactored the code that calls `git clone`,  and segregated build output properly for different packages.
2013-07-29 11:04:25 -07:00
bors
fddb35e988 auto merge of #7984 : gifnksm/rust/tutorial-links, r=bstrie 2013-07-29 09:16:22 -07:00
bors
63c9b112b5 auto merge of #8003 : crnobog/rust/case-insensitive-error-prefix, r=cmr
Paths are case insensitive on windows and rustc and compiletest may disagree on casing.
Fixes test compile-fail/circular_modules_main on win32
2013-07-29 07:31:24 -07:00
bors
8413d4769f auto merge of #8085 : mrordinaire/rust/percent-p, r=huonw
pull request for #8011
2013-07-29 05:40:26 -07:00
Do Nhat Minh
79f1052b19 Added %p directive to fmt!, which expects *T as argument 2013-07-29 20:34:01 +08:00
bors
27812ea5e0 auto merge of #8091 : kevinmehall/rust/const-struct-base, r=alexcrichton
With an expression like

    static w : foo = foo { a:5, ..x };

Rust currently gives the error "constant contains unimplemented expression type". This branch implements support for constant structs with `..base`.
2013-07-28 20:34:29 -07:00
Kevin Mehall
1493141bfd Add support for ..base on static struct initializers. 2013-07-28 22:07:27 -04:00
bors
52dbe138cf auto merge of #8100 : blake2-ppc/rust/str-collect, r=pcwalton
FromIterator initially only implemented for Iterator<char>, which is the
type of the main iterator.
2013-07-28 18:49:24 -07:00
blake2-ppc
4849a42bf6 std: Implement FromIterator for ~str
FromIterator initially only implemented for Iterator<char>, which is the
type of the main iterator.
2013-07-29 02:40:28 +02:00
bors
4cc3bbb83d auto merge of #8095 : jmgrosen/rust/no-iterator-prefixes, r=pcwalton
Resolves #8093
2013-07-28 15:46:37 -07:00
jmgrosen
a0f0f3012e Refactored vec and str iterators to remove prefixes 2013-07-28 13:37:35 -07:00
bors
6dc5e2c61f auto merge of #8046 : kmcallister/rust/unused-log, r=pcwalton 2013-07-28 12:52:25 -07:00
bors
85b55131be auto merge of #8092 : dotdash/rust/peak_mem, r=alexcrichton
This fixes the recently introduced peak memory usage regression by
freeing the intermediate results as soon as they're not required
anymore instead of keeping them around for the whole compilation
process.

Refs #8077
2013-07-28 11:04:27 -07:00
Björn Steinbrink
075560a9f2 Free intermediate translation results as soon as possible
This fixes the recently introduced peak memory usage regression by
freeing the intermediate results as soon as they're not required
anymore instead of keeping them around for the whole compilation
process.

Refs #8077
2013-07-28 20:02:31 +02:00
bors
293ec2c582 auto merge of #8081 : stepancheg/rust/each_byte, r=huonw
Took a patch by @martine, and fixed a tests: replaced with_str_reader with file_reader, because with_str_reader seems not to reveal the problem.
2013-07-28 06:58:21 -07:00
Stepan Koltsov
b92d1ea723 ReaderUtil::each_byte shouldn't include EOF byte -- Issue #5056 2013-07-28 16:53:00 +04:00
bors
5842ab36b8 auto merge of #8087 : Aatch/rust/atomics, r=huonw
Adds a fence operation to close #8061

Also adds static initializers to for atomic types. Since the fields are private, you aren't able to have `static mut` variables that are an atomic type. Each atomic type's initializer starts at a 0-value (so unset for `AtomicFlag` and false for `AtomicBool`).
2013-07-28 03:55:22 -07:00
bors
fe9929e303 auto merge of #8086 : luqmana/rust/rhelp, r=Aatch
#7617 

While the code that was there should've been perfectly fine (and seemingly is on linux at least) there seems to be some sort of weird interaction going on with statics and vectors. I couldn't get a smaller test case to reproduce that behaviour. The for loop in `rust::usage` seemingly just goes past the end of the vector thus getting garbage which it tries to pass to malloc somewhere down the line.

In any case, using a fixed length vector seems to mitigate this.
2013-07-28 02:07:27 -07:00
Luqman Aden
7bd6a92a5a librust: Stop rust tool from crashing on macos. 2013-07-28 04:52:13 -04:00
James Miller
639819f3d9 Fix spelling errors 2013-07-28 20:45:23 +12:00
James Miller
5c7e016700 Add static initializers for atomics 2013-07-28 20:26:49 +12:00
James Miller
4a1a0fbed5 Add an atomic fence intrinsic 2013-07-28 20:26:49 +12:00
bors
20454da2db auto merge of #8069 : erickt/rust/maikklein, r=erickt
Good evening,

This is a superset of @MaikKlein's #7969 commit, that I've fixed up to compile. I had a couple commits I wanted to do on top of @MaikKlein's work that I didn't want to bitrot.
2013-07-28 00:19:21 -07:00
Erick Tryzelaar
b147d70b08 std: cleanup imports in result::tests 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
3478589b99 std and rustc: cleanup uses of result methods 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
ea106f72f7 core: correct the casing of result::{Ok,Err} in the docs 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
796b3371f9 std: Put the option tests into a tests submodule 2013-07-27 23:42:53 -07:00
Erick Tryzelaar
03a16dbb8e std: fix the casing of option::{Some,None} in the docs 2013-07-27 23:41:10 -07:00
Erick Tryzelaar
2a68c719f4 to_either + fixes 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
aad53cb6e2 cleanup .map and .map_err 2013-07-27 23:41:09 -07:00
maikklein
9dc1de4c9e cleanup .get and .get_err 2013-07-27 23:41:09 -07:00
maikklein
f6bcf5d5f1 cleanup .chain and .chain_err + fixing other files 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
e308167a2f cleanup .unwrap and .unwrap_err fixing io tests 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
4eb95f6d1c cleanup .iter and .iter_err 2013-07-27 23:41:09 -07:00
Erick Tryzelaar
225f1c760d cleanup get_ref 2013-07-27 23:41:09 -07:00
bors
9325535b41 auto merge of #7978 : sstewartgallus/rust/rename_arc, r=bblum
To be more specific:

`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:31:22 -07:00
Steven Stewart-Gallus
39b3a0561f Fix nits. 2013-07-27 22:06:29 -07:00
Steven Stewart-Gallus
d0b7515aed Change concurrency primitives to standard naming conventions
To be more specific:

`UPPERCASETYPE` was changed to `UppercaseType`
`type_new` was changed to `Type::new`
`type_function(value)` was changed to `value.method()`
2013-07-27 22:06:29 -07:00
bors
3078e83c3f auto merge of #8076 : omasanori/rust/cleanup, r=huonw
A cleanup suggested on #7922.
2013-07-27 20:13:22 -07:00
bors
82b29ae5a5 auto merge of #7864 : brson/rust/start-on-main-thread, r=brson
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 18:25:24 -07:00
Brian Anderson
34a27db8bf std::rt: Add start_on_main_thread function
Applications that need to use the GUI can override start and set up the runtime using
this function.
2013-07-27 17:36:14 -07:00
bors
b027c5fce3 auto merge of #8074 : thestinger/rust/iterator, r=cmr
d7c9bb4 r=alexcrichton
7ae17e0 r=huonw
2013-07-27 16:37:27 -07:00
bors
098106870e auto merge of #8077 : graydon/rust/reorganize-driver, r=pcwalton
The purpose here is to get rid of compile_upto, which pretty much always requires the user to read the source to figure out what it does. It's replaced by a sequence of obviously-named functions:

  - phase_1_parse_input(sess, cfg, input);
  - phase_2_configure_and_expand(sess, cfg, crate);
  - phase_3_run_analysis_passes(sess, expanded_crate);
  - phase_4_translate_to_llvm(sess, expanded_crate, &analysis, outputs);
  - phase_5_run_llvm_passes(sess, &trans, outputs);
  - phase_6_link_output(sess, &trans, outputs); 

Each of which takes what it takes and returns what it returns, with as little variation as possible in behaviour: no "pairs of options" and "pairs of control flags". You can tell if you missed a phase because you will be missing a `phase_N` call to some `N` between 1 and 6.

It does mean that people invoking librustc from outside need to write more function calls. The benefit is that they can _figure out what they're doing_ much more easily, and stop at any point, rather than further overloading the tangled logic of `compile_upto`.
2013-07-27 14:49:28 -07:00
Daniel Micay
fe955e7b06 iterator: add an Extendable trait 2013-07-27 17:42:10 -04:00
Daniel Micay
ffe549daf5 vec: replace some as_mut_buf with to_mut_ptr 2013-07-27 17:30:29 -04:00
bors
32622cef99 auto merge of #8078 : luqmana/rust/gst, r=Aatch
Fixes #5917 by not trying to treat `&[T]` as a slice since it already is one.
2013-07-27 13:01:32 -07:00
blake2-ppc
7ae17e0964 Remove dummy type parameters from iterator adaptors
With the recent fixes to method resolution, we can now remove the
dummy type parameters used as crutches in the iterator module.

For example, the zip adaptor type is just ZipIterator<T, U> now.
2013-07-27 14:37:55 -04:00