Commit Graph

20630 Commits

Author SHA1 Message Date
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
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
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
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
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
bors
5d409ccd30 auto merge of #8143 : brson/rust/change-dir-lock, r=luqmana 2013-07-31 05:46:21 -07:00
bors
6296dc0d73 auto merge of #8141 : graydon/rust/foreach-in-sketch, r=brson
This is a preliminary implementation of `for ... in ... { ...}` using a transitionary keyword `foreach`. Codesize seems to be a little bit down (10% or less non-opt) and otherwise it seems quite trivial to rewrite lambda-based loops to use it. Once we've rewritten the codebase away from lambda-based `for` we can retarget that word at the same production, snapshot, rewrite the keywords in one go, and expire `foreach`.

Feedback welcome. It's a desugaring-based approach which is arguably something we should have been doing for other constructs before. I apologize both for the laziness associated with doing it this way and with any sense that I'm bending rules I put in place previously concerning "never doing desugarings". I put the expansion in `expand.rs` and would be amenable to the argument that the code there needs better factoring / more helpers / to move to a submodule or helper function. It does seem to work at this point, though, and I gather we'd like to get the shift done relatively quickly.
2013-07-31 03:58:21 -07:00
Seo Sanghyeon
428ea7d7ce Revert atomicrmw {max, min, umax, umin} 2013-07-31 19:44:20 +09:00
bors
8b7e241e02 auto merge of #8139 : brson/rust/rm-old-task-apis, r=pcwalton
This removes a bunch of options from the task builder interface that are irrelevant to the new scheduler and were generally unused anyway. It also bumps the stack size of new scheduler tasks so that there's enough room to run rustc and changes the interface to `Thread` to not implicitly join threads on destruction, but instead require an explicit, and mandatory, call to `join`.
2013-07-31 02:10:24 -07:00
Björn Steinbrink
c725926cf5 Reduce code bloat from assert!()
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 10:15:52 +02:00
Björn Steinbrink
02f7f72a9a Provide a "configure" option to disable LLVM assertions
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 09:41:46 +02:00
bors
8a737b5020 auto merge of #8138 : Dretch/rust/posix-path-push, r=pcwalton
\ is allowed inside file names on linux, for example my system has a file at:

`/run/udev/firmware-missing/intel-ucode\x2f06-3a-09`
2013-07-31 00:22:21 -07:00
Björn Steinbrink
fac18c1cb8 Unify the take glue functions for unique pointer types
These glue function just return void, no point in having a copy for each
type.
2013-07-31 08:21:26 +02:00
bors
4fbd37d4bd auto merge of #8135 : dim-an/rust/master, r=pcwalton
Fix std::getopt::opts_str

Closes #6492 (std::getopt::opts_str fails for arguments other than the first one).
2013-07-30 22:34:20 -07:00
Brian Anderson
0a87589b94 test: Remove a test of the oldsched runtime api 2013-07-30 21:51:18 -07:00
Brian Anderson
11fc1fd485 test: Use a test extern in various foreign fn tests 2013-07-30 21:13:55 -07:00
Brian Anderson
91f1ab4896 rt: Use the correct global change_dir lock 2013-07-30 21:06:02 -07:00
bors
38d62feec1 auto merge of #8111 : brson/rust/no-bench, r=graydon 2013-07-30 20:46:18 -07:00
bors
5633a5363b auto merge of #8008 : bblum/rust/select, r=brson
Main logic in ```Implement select() for new runtime pipes.```. The guts of the ```PortOne::try_recv()``` implementation are now split up across several functions, ```optimistic_check```, ```block_on```, and ```recv_ready```.

There is one weird FIXME I left open here, in the "implement select" commit -- an assertion I couldn't get to work in the receive path, on an invariant that for some reason doesn't hold with ```SharedPort```. Still investigating this.
2013-07-30 18:58:17 -07:00
Graydon Hoare
a696f0fecb test: add testcases for external iterators using foreach. 2013-07-30 18:50:28 -07:00
Graydon Hoare
62b6fa0943 rustc: silence unused-var warning. 2013-07-30 18:50:28 -07:00
Graydon Hoare
e5b0f1d132 rustc: fix a pp bug. 2013-07-30 18:50:28 -07:00
Graydon Hoare
c29e9fb60b syntax: implement foreach .. in .. { .. } via desugaring. 2013-07-30 18:50:28 -07:00
Brian Anderson
33df9fc1d0 std: Remove foreign_stack_size spawn option. Irrelevant to future FFI changes 2013-07-30 17:10:23 -07:00
Brian Anderson
8f835d42d7 std: Remove get_task function. Unused 2013-07-30 17:10:21 -07:00
bors
6534b4d4ce auto merge of #8115 : bjz/rust/num-traits, r=brson
Continues #4819
2013-07-30 17:10:19 -07:00
Graydon Hoare
9a2d183d6a syntax: add temporary 'foreach' keyword. 2013-07-30 16:11:49 -07:00
Graydon Hoare
a8840d70a5 syntax: add 'in' keyword 2013-07-30 16:11:49 -07:00
Gareth Smith
de0092c48e No longer treat \ as a path separator on posix systems. 2013-07-30 23:43:39 +01:00
bors
912d806d32 auto merge of #8137 : omasanori/rust/ubool-false, r=bblum
Obvious mistake, but there is no failure because no code uses FALSE.
2013-07-30 15:22:21 -07:00
OGINO Masanori
5ec1d5b69d FALSE is not 1u8 but 0u8, of cource.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-31 07:13:38 +09:00
Brian Anderson
81dda9d9cb std: Remove CurrentScheduler spawn mode. Unused 2013-07-30 14:23:46 -07:00
Brian Anderson
08480e4fda std: Remove ExistingScheduler spawn mode. Unused 2013-07-30 14:23:46 -07:00
Brian Anderson
5d2b8d4372 std: Remove PlatformThread spawn mode. Obsolete 2013-07-30 14:23:45 -07:00
Brian Anderson
85fd75ac47 std: Remove ThreadPerTask spawn mode. Unimplemented 2013-07-30 14:23:45 -07:00
Brian Anderson
cb9ee7f5be std: Remove ManualThreads spawn mode 2013-07-30 14:23:45 -07:00
Brian Anderson
0144c83213 std::rt: Change Thread interface to require an explicit join
Makes it more obvious what's going on
2013-07-30 14:23:44 -07:00
Brian Anderson
7265cc6530 std::rt: Use 2MB stacks
Seems to be around the minimum needed by rustc without split stacks
2013-07-30 14:17:56 -07:00
Dmitry Ermolov
ef7e94550c Fix comment. 2013-07-31 00:08:53 +04:00
Dmitry Ermolov
ed0f014935 Fix opts_str.
opt_val doesn't not fail! for missing options.

Closes #6492
2013-07-30 23:26:52 +04:00
Dmitry Ermolov
0ed8713d79 Modify test to expose issue #6492. 2013-07-30 23:23:19 +04:00
bors
436d9fa45d auto merge of #8133 : blake2-ppc/rust/overlong-utf8, r=cmr
Fix is_utf8 and UTF-8 char width functions to deny non-canonical 'overlong encodings' in UTF-8.

We address the function is_utf8 to make it more strict and correct, but no changes are made to the handling of invalid UTF-8.

Fixes issue #3787
2013-07-30 12:16:20 -07:00