Commit Graph

20717 Commits

Author SHA1 Message Date
Ben Blum
963d37e821 Temporary workaround to prevent taskgroup cleanup code from failing without an exception handler. 2013-08-01 17:07:31 -04:00
Ben Blum
aeaed77301 Make a forgotten assert in comm be cfg(test)-dependent 2013-08-01 16:52:37 -04:00
Ben Blum
036a6d2f00 Document task killing design and relaxed barrier rationale. 2013-08-01 16:52:37 -04:00
Ben Blum
880246618b Relax some atomic barriers. Loosen up all that tension. There, doesn't that feel good? 2013-08-01 16:52:37 -04:00
bors
82b24559e6 auto merge of #8190 : thestinger/rust/for, r=thestinger 2013-08-01 12:52:29 -07:00
Corey Richardson
2b026718c3 Add a boatload of Linux x86/x86-64/arm errnos 2013-08-01 15:37:01 -04:00
Daniel Micay
94f1a5d6f8 migrate to foreach 2013-08-01 15:28:45 -04:00
Brian Anderson
4b3e766ac6 Remove the pipes compiler
The pipes compiler produced data types that encoded efficient and safe
bounded message passing protocols between two endpoints. It was also
capable of producing unbounded protocols.

It was useful research but was arguably done before its proper time.

I am removing it for the following reasons:

* In practice we used it only for producing the `oneshot` and `stream`
  unbounded protocols and all communication in Rust use those.
* The interface between the proto! macro and the standard library
  has a large surface area and was difficult to maintain through
  language and library changes.
* It is now written in an old dialect of Rust and generates code
  which would likely be considered non-idiomatic.
* Both the compiler and the runtime are difficult to understand,
  and likewise the relationship between the generated code and
  the library is hard to understand. Debugging is difficult.
* The new scheduler implements `stream` and `oneshot` by hand
  in a way that will be significantly easier to maintain.

This shouldn't be taken as an indication that 'channel protocols'
for Rust are not worth pursuing again in the future.
2013-08-01 12:17:32 -07:00
Huon Wilson
7c21ccc483 rustc: add a lint for for, suggesting foreach or do.
This is just to aid the transistion to the new `for` loop, by
pointing at each location where the old one occurs.
2013-08-01 15:07:19 -04:00
bors
479809a267 auto merge of #8166 : emillon/rust/clean-tests-mk, r=brson
Hello,

While looking at `tests.mk` I noticed two errors:

  - there's a `srcrustllvm` instead of `src/rustllvm`
  - some filtered out files don't exist anymore

These two commits fix these issues. Thanks!
2013-08-01 11:10:35 -07:00
bors
7daea7c9c1 auto merge of #8165 : graydon/rust/2013-07-31-new-codegen-tests, r=brson
r? @pcwalton or someone
2013-08-01 09:28:36 -07:00
blake2-ppc
78cde5b9fb std: Change Times trait to use do instead of for
Change the former repetition::

    for 5.times { }

to::

    do 5.times { }

.times() cannot be broken with `break` or `return` anymore; for those
cases, use a numerical range loop instead.
2013-08-01 16:54:22 +02:00
blake2-ppc
7e210a8129 std: Replace for with do { .. } expr in std::gc
Change all users of old-style for with internal iterators to using
`do`-loops.

The code in stackwalk.rs does not actually implement the
looping protocol (no break on return false).

The code in gc.rs does not use loop breaks, nor does any code using it.

We remove the capacity to break from the loops in std::gc and implement
the walks using `do { .. }` expressions.

No behavior change.
2013-08-01 16:54:22 +02:00
blake2-ppc
e5a64f2add std: Remove the internal iterator methods from trait Set
.intersection(), .union() etc methods in trait std::container::Set use
internal iters. Remove these methods from the trait.

I reported issue #8154 for the reinstatement of iterator-based set algebra
methods to the Set trait.

For bitv and treemap, that lack Iterator implementations of set
operations, preserve them as methods directly on the types themselves.

For HashSet, these methods are replaced by the present .union_iter()
etc.
2013-08-01 16:54:22 +02:00
blake2-ppc
310e0b6e92 extra: Use external iterators in bitv implementation
Convert some internally used functions to use a external iterators.

Change all uses of remaining internal iterators to use `do` expr
2013-08-01 16:54:22 +02:00
blake2-ppc
dbcb74e247 extra: Replace for with do { .. } expr where internal iterators are used 2013-08-01 16:54:22 +02:00
blake2-ppc
b18bd785ec std: Replace for with do { .. } expr where internal iterators are used 2013-08-01 16:54:22 +02:00
blake2-ppc
02bdf90cf6 extra: Use do instead of for in extra::iter 2013-08-01 16:54:22 +02:00
blake2-ppc
6d7a0c8cbc std: Use do blocks instead of for with .iter_bytes() 2013-08-01 16:54:22 +02:00
bors
fe28ac6891 auto merge of #8164 : brson/rust/noportset, r=pcwalton
...haredChan.
2013-08-01 07:46:38 -07:00
Huon Wilson
e995d9935b syntax: implement cfg!() which evaluates to true/false where #[cfg] would keep/remove.
Example:

   if cfg!(test) {
      calculation_to_run_only_when_testing();
   }
2013-08-01 23:03:03 +10:00
bors
18d124b9b5 auto merge of #8158 : bblum/rust/task-cleanup, r=brson
r? @brson
2013-08-01 06:01:39 -07:00
bors
9824d90ffd auto merge of #8155 : stepancheg/rust/unit-zero, r=alexcrichton 2013-08-01 04:19:35 -07:00
bors
5c6069c7a9 auto merge of #8184 : thestinger/rust/retreat, r=huonw 2013-08-01 02:37:36 -07:00
Daniel Micay
1fc4db2d08 migrate many for loops to foreach 2013-08-01 05:34:55 -04:00
Alex Crichton
ea5f829307 Resolve globals having different addresses across crates
* All globals marked as `pub` won't have the `internal` linkage type set
* All global references across crates are forced to use the address of the
  global in the other crate via an external reference.
2013-08-01 01:54:34 -07:00
Daniel Micay
5f59c46e0f rc: from_{owned,const} -> from_{send,freeze} 2013-08-01 04:39:00 -04:00
bors
1b018dd9ba auto merge of #8149 : omasanori/rust/cleanup, r=alexcrichton
Fixed a warning.
2013-08-01 00:40:33 -07:00
bors
8ec70ae5de auto merge of #8162 : thestinger/rust/no-copy, r=brson 2013-07-31 22:52:31 -07:00
Daniel Micay
b57ffef37e convert pure to a reserved keyword 2013-08-01 01:00:32 -04:00
Daniel Micay
dabd476203 make in and foreach get treated as keywords 2013-08-01 00:21:13 -04:00
bors
0c716c66fb auto merge of #8177 : graydon/rust/2013-07-31-register-new-snapshots, r=thestinger
r? someone
2013-07-31 20:55:34 -07:00
Graydon Hoare
4700b00ef7 register snapshots. 2013-07-31 19:38:43 -07:00
Brian Anderson
05eff5f731 extra: Remove dbg module and rt support code
This stuff is ancient, unused, and tied to oldsched
2013-07-31 18:51:57 -07:00
Brian Anderson
1d256ba6e8 test: Disable morestack tests
The new scheduler does not yet implement split stacks
2013-07-31 18:11:19 -07:00
Daniel Micay
c47be6929b remove copy as a keyword 2013-07-31 20:18:28 -04:00
Daniel Micay
4bad515854 rm ancient error for lowercase kinds
3 of these kinds no longer even exist in the CamelCase form
2013-07-31 20:18:26 -04:00
Etienne Millon
0e2a086350 mk/tests.mk: remove mention of nonexistent files 2013-08-01 00:36:06 +02:00
Etienne Millon
bd980bcbf5 mk/tests.mk: fix typo "srcrustllvm" 2013-08-01 00:36:01 +02:00
Graydon Hoare
8261f2c37c test: add more codegen tests, add copyright headers to all. 2013-07-31 15:02:22 -07:00
Brian Anderson
ebd14c92f8 std: Remove PortSet. Not supported by new scheduler. Replace uses with SharedChan. 2013-07-31 14:59:49 -07:00
bors
ef87e2cc96 auto merge of #8151 : sanxiyn/rust/atomicrmw, r=cmr
#8039 broke ARM build, and nothing uses these yet.
2013-07-31 14:58:20 -07:00
bors
66a0b5870d auto merge of #8150 : dotdash/rust/assert_bloat, r=huonw
Assertions without a message get a generated message that consists of a
prefix plus the stringified expression that is being asserted. That
prefix is currently a unique string, while a static string would be
sufficient and needs less code.
2013-07-31 12:58:22 -07:00
Ben Blum
bc7cee7bbf Move atomically to unstable::sync, and document what it actually does. Close #7872. 2013-07-31 14:37:22 -04:00
Ben Blum
2e6dc161b6 Give tasks useful names. #2891 2013-07-31 14:37:22 -04:00
bors
e07e49ea8f auto merge of #8147 : dotdash/rust/assertion_option, r=pcwalton
Builds are considerably faster without assertions, so when working on
e.g. libstd, which doesn't directly interact with LLVM, one might want
to disable them.
2013-07-31 11:10:20 -07:00
bors
389aba0952 auto merge of #8146 : dotdash/rust/simple_take_glue, r=thestinger
These glue function just return void, no point in having a copy for each
type.
2013-07-31 09:22:21 -07:00
bors
9e857458d6 auto merge of #8145 : brson/rust/rttestfixes, r=pcwalton
Two commits here that fix test case dependencies on the old scheduler.
2013-07-31 07:34:24 -07:00
OGINO Masanori
6a69d27a0f Remove unused variables.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-31 23:22:57 +09:00
Stepan Koltsov
a5912736be Implement Zero for unit 2013-07-31 18:19:26 +04:00