Commit Graph

20890 Commits

Author SHA1 Message Date
bors
dc5b0b9410 auto merge of #8282 : brson/rust/more-newsched-fixes, r=brson 2013-08-04 18:10:53 -07:00
Luqman Aden
9c39992021 Add support for vanilla linux on arm. 2013-08-04 19:28:06 -04:00
bors
77bc6c5955 auto merge of #8218 : brson/rust/nogc, r=brson
These are both obsoleted by the forthcoming new GC.
2013-08-04 16:25:54 -07:00
Dmitry Ermolov
28165d5ad8 Remove debug printing. 2013-08-05 02:51:43 +04:00
Dmitry Ermolov
d49bb43fc1 Implemented iterator for TrieMap
Closes #5506.
2013-08-05 02:29:51 +04:00
Daniel Micay
c327835a44 fix warning still mentioning the again keyword 2013-08-04 18:21:29 -04:00
Brian Anderson
3f4c6cead6 Remove old tests and code for select
Not compatible with newsched
2013-08-04 15:11:56 -07:00
Brian Anderson
2f8346b949 std::rt: Remove the test for context()
This is no longer testable once newsched is turned on
2013-08-04 15:11:56 -07:00
Brian Anderson
a27f339cb4 std::rt: Don't allow schedulers to exit before handling all messages
Every time run_sched_once performs a 'scheduling action' it needs to guarantee
that it runs at least one more time, so enqueue another run_sched_once callback.
The primary reason it needs to do this is because not all async callbacks
are guaranteed to run, it's only guaranteed that *a* callback will run after
enqueing one - some may get dropped.

At the moment this means we wastefully create lots of callbacks to ensure that
there will *definitely* be a callback queued up to continue running the scheduler.
The logic really needs to be tightened up here.
2013-08-04 15:11:56 -07:00
Brian Anderson
f0f7e1b3fc std::rt: 3MB stacks!
rustc needs *even more* megabytes when run without optimizations
2013-08-04 15:11:56 -07:00
Brian Anderson
75734a9cd3 std::rt: Run the tests for Local in a bare thread
Otherwise interferes with the existing runtime
2013-08-04 15:11:56 -07:00
Brian Anderson
835e963dbd std::rt: Improve the error message when the thread-local ptr is null
Also fix some incorrect comments and variable names.
2013-08-04 15:11:55 -07:00
bors
d6f2364076 auto merge of #8260 : omasanori/rust/fix-extra-unicode, r=pcwalton
WIth this patch `RUSTFLAGS='--cfg unicode' make check"` passed successfully.

* Why doesn't `#[link_name="icuuc"]` make libextra to link against libicuuc.so?
* In `extra::unicode::tests`, `use unicode; unicode::is_foo('a')` failed but `use unicode::*; is_foo('a')` succeeded. Is it right?
2013-08-04 14:43:51 -07:00
Steven Fackler
147c4fd81b Fixed str::raw::push_byte
It was previously pushing the byte on top of the string's null
terminator. I added a test to make sure it doesn't break in the future.
2013-08-04 16:19:40 -04:00
bors
3d14470be4 auto merge of #7115 : alexcrichton/rust/llvm-upgrades, r=thestinger
This is a reopening of #6713

This is still blocked on windows failures. I'll re-push try once the existing crisis has passed.
2013-08-04 12:49:53 -07:00
Daniel Micay
b49d026ecd Merge pull request #8284 from huonw/emacs-in-kw
etc: add the `in` keyword to the emacs mode.
2013-08-04 12:49:11 -07:00
Alex Crichton
60e9507086 Integrate new arm patch and fix an LLVM bug
Thanks @luqama!
2013-08-04 10:58:23 -07:00
Alex Crichton
bb93930575 Add a workaround for 8199 for now 2013-08-04 10:58:23 -07:00
Alex Crichton
4ace3b7434 Fix setting the fixed stack segment attribute on LLVM functions
At the same time create a more robust wrapper to try to prevent this type of
issue from cropping up in the future.
2013-08-04 10:58:23 -07:00
Alex Crichton
8d29367650 Fix build issues once LLVM has been upgraded
* LLVM now has a C interface to LLVMBuildAtomicRMW
* The exception handling support for the JIT seems to have been dropped
* Various interfaces have been added or headers have changed
2013-08-04 10:58:23 -07:00
Alex Crichton
1d06aaae64 Update LLVM 2013-08-04 10:58:22 -07:00
Brian Anderson
9ae0658fd0 Try to fix a periodic windows build failure due to broken rwildcard macro 2013-08-04 10:58:22 -07:00
bors
8495ee52b2 auto merge of #8262 : dotdash/rust/no_rval_copies, r=pcwalton
rvalues aren't going to be used anywhere but as the argument, so
there's no point in copying them. LLVM used to eliminate the copy
later, but why bother emitting it in the first place?
2013-08-04 10:55:53 -07:00
bors
22f9ce4df6 auto merge of #8243 : stepancheg/rust/ipv, r=brson
multicast functions now take IpAddr (without port), because they dont't
need port.

Uv* types renamed:
* UvIpAddr -> UvSocketAddr
* UvIpv4 -> UvIpv4SocketAddr
* UvIpv6 -> UvIpv6SocketAddr

"Socket address" is a common name for (ip-address, port) pair (e.g. in
sockaddr_in struct).

P. S. Are there any backward compatibility concerns? What is std::rt module, is it a part of public API?
2013-08-04 08:49:55 -07:00
bors
f7c4359a2c auto merge of #8237 : blake2-ppc/rust/faster-utf8, r=brson
Use unchecked vec indexing since the vector bounds are checked by the
loop. Iterators are not easy to use in this case since we skip 1-4 bytes
each lap. This part of the commit speeds up is_utf8 for ASCII input.

Check codepoint ranges by checking the byte ranges manually instead of
computing a full decoding for multibyte encodings. This is easy to read
and corresponds to the UTF-8 syntax in the RFC.

No changes to what we accept. A comment notes that surrogate halves are
accepted.

Before:

	test str::bench::is_utf8_100_ascii ... bench: 165 ns/iter (+/- 3)
	test str::bench::is_utf8_100_multibyte ... bench: 218 ns/iter (+/- 5)

After:
	test str::bench::is_utf8_100_ascii ... bench: 130 ns/iter (+/- 1)
	test str::bench::is_utf8_100_multibyte ... bench: 156 ns/iter (+/- 3)

An improvement upon the previous pull #8133
2013-08-04 07:10:56 -07:00
bors
5cf69d5bf8 auto merge of #8254 : brson/rust/libuv-mac-supp, r=pcwalton
I suspect that this is a race between process exit and the termination of
worker threads used by libuv (if I sleep before exit it doesn't leak). This
isn't going to cause any real problems but should probably be fixed at
some point.

r? @pcwalton

cc #8253
2013-08-04 05:28:57 -07:00
bors
91b711883c auto merge of #8217 : brson/rust/reset_stack_limit, r=pcwalton
In some scenarios upcall_rust_stack_limit fails to record the stack
limit, leaving it 0, and allowing subsequent Rust code to run into
the red zone.
2013-08-04 03:34:56 -07:00
Huon Wilson
88620c25f5 std: implement Total{Ord,Eq} for pointers. 2013-08-04 19:46:52 +10:00
Huon Wilson
8407ec9fed syntax: make #[deriving(TotalOrd)] lazy.
Previously it would call:

  f(sf1.cmp(&of1), f(sf2.cmp(&of2), ...))

(where s/of1 = 'self/other field 1', and f was
std::cmp::lexical_ordering)

This meant that every .cmp subcall got evaluated when calling a derived
TotalOrd.cmp.

This corrects this to use

   let test = sf1.cmp(&of1);
   if test == Equal {
      let test = sf2.cmp(&of2);
      if test == Equal {
        // ...
      } else {
        test
      }
   } else {
     test
   }

This gives a lexical ordering by short-circuiting on the first comparison
that is not Equal.
2013-08-04 19:46:52 +10:00
Huon Wilson
44acdad5f8 libsyntax/ext/deriving/cmp/* was ignored by the build system. 2013-08-04 19:37:29 +10:00
Dmitry Ermolov
73ec9f36e4 Implemented TreeMap::{lower_bound_iter,upper_bound_iter}
(issue #4604)
2013-08-04 13:14:13 +04:00
Dmitry Ermolov
98a66568ce Remove redundant print. 2013-08-04 13:14:13 +04:00
Dmitry Ermolov
d8e74b3dcb Additional check in treemap iterator test. 2013-08-04 13:14:13 +04:00
Brian Anderson
044fa35bf8 rt: Fix a corner-case in unwinding that leads to stack overflow
In some scenarios upcall_rust_stack_limit fails to record the stack
limit, leaving it 0, and allowing subsequent Rust code to run into
the red zone.
2013-08-03 23:40:25 -07:00
Brian Anderson
ea84c1fd69 std: Remove gc and stackwalk
These are both obsoleted by the forthcoming new GC.
2013-08-03 23:39:04 -07:00
bors
fbeeeebf47 auto merge of #8264 : thestinger/rust/snapshot, r=Aatch 2013-08-03 23:25:55 -07:00
bors
93432a2c2f auto merge of #8269 : brson/rust/fix-task-cleanup, r=brson
...y/catch

And before collect_failure. These are both running user dtors and need to be handled
in the task try/catch block and before the final task cleanup code.
2013-08-03 21:46:56 -07:00
Daniel Micay
e7bb33aed8 rm obsolete for support from the compiler 2013-08-04 00:39:48 -04:00
Patrick Walton
9c08db58ab librustc: Implement #[no_main], which omits the entry point entirely.
Useful for SDL and possibly Android too.
2013-08-03 20:01:00 -07:00
Daniel Micay
1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Corey Richardson
118158729e Work around #8256, do not fail the task, just return None 2013-08-03 22:36:48 -04:00
Daniel Micay
9f74217d80 register snapshots 2013-08-03 21:09:28 -04:00
Daniel Micay
8ce953347c Merge pull request #8251 from chris-morgan/vim-sigil-highlighting
Highlight sigils and operators in Vim.

r=huonw, known spurious failure on one bot
2013-08-03 18:02:04 -07:00
Brian Anderson
3c9e393354 std::rt: Run local storage cleanup and the box annihilator inside the try/catch
And before collect_failure. These are both running user dtors and need to be handled
in the task try/catch block and before the final task cleanup code.
2013-08-03 14:43:16 -07:00
bors
18e3db7392 auto merge of #8246 : stepancheg/rust/contains-key, r=thestinger
Map::contains_key can be implemented with Map::find.

Remove several implementations of contains_key.
2013-08-03 13:40:49 -07:00
bors
b5d77d20ec auto merge of #8223 : davidhalperin/rust/master, r=Aatch
Closes #7907

This is my first pull request so let me know if I've done anything wrong.  I tried to pick off a nice easy one.
2013-08-03 11:52:50 -07:00
bors
800dbffa69 auto merge of #8219 : sstewartgallus/rust/fix_dynamic_lib, r=graydon
A test case was also created for this situation to prevent the problem
occuring again.

A similar problem was also fixed for the symbol method.

There was some minor code cleanup.

I am unsatisfied with using /dev/null as an invalid dynamic library. It is not cross platform.
2013-08-03 10:04:58 -07:00
bors
34101d2320 auto merge of #8213 : kballard/rust/fd-limit, r=brson
Revert the workaround 49b72bd and instead bump the fd limit on OS X.
2013-08-03 07:46:53 -07:00
Björn Steinbrink
a51e3e46ef trans_arg_expr: Omit extra copies for rvalues
rvalues aren't going to be used anywhere but as the argument, so
there's no point in copying them. LLVM used to eliminate the copy
later, but why bother emitting it in the first place?
2013-08-03 15:03:58 +02:00
bors
6be014d23c auto merge of #8186 : huonw/rust/hashmap-=rt, r=Aatch
The `new` constructor uses the task-local RNG to retrieve seeds for the
two key values, which requires the runtime. Exposing a constructor that
takes the keys directly allows HashMaps to be used in programs that wish
to avoid the runtime.
2013-08-03 05:37:52 -07:00