Commit Graph

17364 Commits

Author SHA1 Message Date
Brian Anderson
0617d580e6 core::comm: Remove functions in favor of methods
`send`, etc. are never used. I've left the functions for oneshot pipes
because by-value methods don't work.
2013-04-18 14:07:35 -07:00
Brian Anderson
4e22461cd8 core: Remove a stray #[doc(hidden)] attribute 2013-04-18 14:07:35 -07:00
Brian Anderson
056164ac19 core: Inline the protocol definitions of sendp and oneshot
I want to be able to see what is going on
2013-04-18 14:07:35 -07:00
Brian Anderson
3dce936753 core: Remove #[doc(hidden)] attributes and atomic wrapper functions from pipes
Neither are needed
2013-04-18 14:07:35 -07:00
Brian Anderson
8f2d21dc0d core: Just reordering some code 2013-04-18 14:07:35 -07:00
Brian Anderson
ab08b4fbfd core: Remove pipes::spawn_service, spawn_service_recv
These are only used in test cases; pipes isn't the right place for them;
they are unnecessary.

Conflicts:
	src/libcore/rt/uv/mod.rs
2013-04-18 14:07:35 -07:00
bors
2a86485277 auto merge of #5418 : luqmana/rust/stack-float, r=brson
Like I commented in #2043, I can't reproduce the weirdness from #1388 on either mac or linux (x84_64) and pushing to try gives all green.

That's 128 less bytes to have to keep in the stack for every call to __morestack.
2013-04-18 13:45:55 -07:00
bors
b329f2fa82 auto merge of #5798 : recrack/rust/multiple-errors, r=brson
Fix #4569.
2013-04-18 12:21:57 -07:00
bors
348dc250ca auto merge of #5939 : brson/rust/xfail, r=brson
Disabling them because they are failing on incoming. Looking into a fix now.
2013-04-18 11:21:55 -07:00
Brian Anderson
b18f12fb16 test: xfail-macos some tests that don't work on mac i686 2013-04-18 11:17:34 -07:00
Brian Anderson
2686dcb98e test: Add more comments about why extern-pass-TwoU64s is xfailed 2013-04-18 11:17:01 -07:00
Daniel Micay
a523abd75c add dropwhile and takewhile iterators 2013-04-18 13:22:38 -04:00
bors
8796c9fe2d auto merge of #5935 : bjz/rust/master, r=thestinger 2013-04-18 09:03:55 -07:00
Brendan Zabarauskas
a7f6ec8542 Use assert_eq! instead of assert! and remove extraneous parentheses 2013-04-19 01:37:21 +10:00
bors
e4f35a7326 auto merge of #5933 : huonw/rust/core-read-until-byte, r=thestinger
`read_until` is just doing a bytewise comparison. This means the following program prints `xyå12`, not `xy`, which it should if it was actually checking chars.

```rust
fn main() {
    do io::with_str_reader("xyå12") |r| {
        io::println(r.read_until('å', false));
    }
}
```

This patch makes the type of read_until match what it is actually doing.
2013-04-18 08:09:55 -07:00
bors
24fb719b8c auto merge of #5932 : huonw/rust/core-str-iterator, r=thestinger 2013-04-18 07:12:55 -07:00
Huon Wilson
19cc352302 core: io: the read_until function checks bytes not chars, so type should reflect that. 2013-04-18 23:36:38 +10:00
Brendan Zabarauskas
939a97f5cb Add #[inline(always)] to each operator method 2013-04-18 23:24:24 +10:00
bors
2c8278746d auto merge of #5930 : osaut/rust/master, r=thestinger
Just small typos I found during my study of rust sources. 
I have added the fbuild URL for reader's convenience.
2013-04-18 06:15:54 -07:00
Huon Wilson
c967f2bb1e core: add a str iterator 2013-04-18 22:56:21 +10:00
bors
938ddeeed6 auto merge of #5929 : intgr/rust/sketch_output, r=thestinger
The last line of any command output should always have a newline. Also fixed typo, "on on"

summary of 25 test runs: 4563 passed; 0 failed; 344 ignored
2013-04-18 05:21:55 -07:00
bors
bd75463839 auto merge of #5928 : huonw/rust/core-task-spawn-supervised-doc, r=thestinger
The doc-comment didn't reflect the [tasks tutorial](http://static.rust-lang.org/doc/tutorial-tasks.html#failure-modes), or how it works in practice.
2013-04-18 04:30:54 -07:00
Brendan Zabarauskas
d2a81b95c3 Implement bitwise operator traits for ints and uints 2013-04-18 20:58:58 +10:00
Huon Wilson
f43fc5fff8 libcore: make spawn_supervised documentation reflect its behaviour. 2013-04-18 20:46:23 +10:00
bors
d29ef7ad25 auto merge of #5927 : huonw/rust/core-enumerate-iterator, r=thestinger 2013-04-18 03:42:53 -07:00
Huon Wilson
0ff568a3c1 libcore: add an EnumerateIterator, like Python's enumerate. 2013-04-18 20:37:27 +10:00
Olivier Saut
a35376e24e Small typos, year date and URL of the fbuild system for reference. 2013-04-18 11:51:12 +02:00
Marti Raudsepp
5dda8ab129 sketch: Make rust sketch barf output prettier 2013-04-18 12:46:01 +03:00
bors
d32d4d1209 auto merge of #5923 : thestinger/rust/iterator, r=graydon 2013-04-18 01:36:53 -07:00
Youngmin Yoo
6030e3982a Errors with the same span print the span once 2013-04-18 17:19:41 +09:00
bors
3499a37b06 auto merge of #5919 : catamorphism/rust/gitignore, r=catamorphism 2013-04-18 00:39:54 -07:00
bors
d4daee453c auto merge of #5918 : catamorphism/rust/Warnings, r=catamorphism 2013-04-17 23:45:57 -07:00
bors
acf8887047 auto merge of #5916 : danluu/rust/debug_tutorial, r=catamorphism
debug! is used in the tutorial without any explanation of how to get the output. This adds a blurb on how to see the output from debug!
2013-04-17 22:51:56 -07:00
bors
3b48063373 auto merge of #5912 : Dretch/rust/issue-2626, r=graydon
which does currently seem to work on win32 (and linux).

Just mentioning issue #2626 again to make sure github picks it up.
2013-04-17 21:39:56 -07:00
bors
16652c9c17 auto merge of #5909 : brson/rust/rt4, r=graydon
This is just a bunch of minor changes and simplifications to the structure of core::rt. It makes ownership of the ~Scheduler more strict (though it is still mutably aliased sometimes), turns the scheduler cleanup_jobs vector into just a single job, shunts the thread-local scheduler code off to its own file.
2013-04-17 20:42:58 -07:00
bors
a089c6f8fc auto merge of #5908 : jbclements/rust/add-hygiene-machinery, r=graydon
This pull request changes the representation of identifiers by adding an integer to the side of each one.  This integer will eventually be a reference to a side-table of syntax contexts, presumably stored in TLS. This pull request also adds a bunch of utility functions required for hygiene, and associated tests, but doesn't actually deploy those functions.

Finally, it also has a number of small cleanup items.
2013-04-17 19:48:59 -07:00
Tim Chevalier
128e95b89d rustpkg: Add more tests
These are examples of what *should* work, and probably don't
work yet.
2013-04-17 19:00:52 -07:00
Tim Chevalier
958189dba1 rustpkg: Add a list of rustpkg commands that should pass
This is a test file containing examples of commands that should
succeed. When we write the test runner, we will have to figure
out how to automate them.
2013-04-17 18:59:32 -07:00
Tim Chevalier
e2d947d72f rustpkg: Don't execute the standard build logic if there is a pkg.rs 2013-04-17 18:58:59 -07:00
Tim Chevalier
a2761ac7b5 rustpkg: Change this example to show how to do a custom build 2013-04-17 18:58:41 -07:00
Tim Chevalier
35f3b6324f rustpkg: Remove bogus .rc file 2013-04-17 18:58:12 -07:00
Daniel Micay
c98f0cb362 vec: add an external iterator 2013-04-17 21:53:23 -04:00
bors
fdb4ef321e auto merge of #5726 : brson/rust/struct-return, r=brson
r? @nikomatsakis

This doesn't completely fix the x86 ABI for structs, but it does fix some cases. On linux, structs appear to be returned correctly now. On windows, structs are only returned by pointer when they are greater than 8 bytes. That scenario works now.

In the case where the struct is less than 8 bytes our generated code looks peculiar. When returning a pair of u16, C packs both variables into %eax to return them. Our generated code though expects to find one of the pair in %ax and the other in %dx. Similar for u8. I haven't looked into it yet.

There appears to also be struct passing problems on linux, where my `extern-pass-TwoU8s` and `extern-pass-TwoU16s` tests are failing.
2013-04-17 18:45:58 -07:00
bors
68dea75296 auto merge of #5725 : jdm/rust/muttrait, r=nikomatsakis 2013-04-17 17:57:59 -07:00
Tim Chevalier
82765a0b48 rustpkg: Implement clean; replace boolean result flags with fail!()
1. Implemented the `clean` command

2. The methods implementing rustpkg commands all returned `bool`.
Since most of not all of the error situations seem unrecoverable,
I changed the methods to return unit (and also stubbed out several
more methods that were assuming a package script existed, to be
re-implemented in the future)
2013-04-17 15:58:11 -07:00
Brian Anderson
a5ddc00982 rustc: Use an out pointer to return structs in x86 C ABI. #5347
This Adds a bunch of tests for passing and returning structs
of various sizes to C. It fixes the struct return rules on unix,
and on windows for structs of size > 8 bytes. Struct passing
on unix for structs under a certain size appears to still be broken.
2013-04-17 15:49:19 -07:00
Tim Chevalier
e6c3c371a5 rustpkg: Add a few tests
There's no test runner for rustpkg yet; just sketching out a few
basic test scenarios. pass/ contains packages that should compile
successfully, whereas fail/ contains packages that should fail
to build.
2013-04-17 14:32:40 -07:00
Tim Chevalier
c01c3d9fc6 rustpkg: Fail when crate inference fails; inject link attributes
1. Fail when there's no package script and no crates named
main.rs, lib.rs, bench.rs, or test.rs.

2. Inject the crate link_meta "name" and "vers" attributes, so
that the output file gets named correctly in the library case.

3. Normalize '-' to '_' in package names.
2013-04-17 14:32:34 -07:00
Tim Chevalier
2793e49622 gitignore: Add build/ subdirectory 2013-04-17 13:58:42 -07:00
Tim Chevalier
f86bf0ee6e Warning police 2013-04-17 13:42:43 -07:00