- 26 8月, 2014 2 次提交
-
-
由 Luqman Aden 提交于
-
由 Luqman Aden 提交于
-
- 25 8月, 2014 14 次提交
-
-
由 bors 提交于
Closes #16725
-
由 Alex Crichton 提交于
The privacy pass of the compiler was previously not taking into account the privacy of foreign items, or bindings to external functions. This commit fixes this oversight by encoding the visibility of foreign items into the metadata for each crate. Any code relying on this will start to fail to compile and the bindings must be marked with `pub` to indicate that they can be used externally. Closes #16725 [breaking-change]
-
由 bors 提交于
Closes #8492. I did not find this suggestion in the [guidelines][] but it's mentioned in the [old style guide][]. [guidelines]: https://github.com/rust-lang/rust-guidelines [old style guide]: https://github.com/rust-lang/rust/wiki/Note-style-guide/73c864a10a8e231e2a6630e5a3461f1d3022a20a
-
由 bors 提交于
If a task is spinning in an accept loop, there is currently no method of gracefully shutting it down. This PR introduces a way to do so by cloning the acceptor and implementing a close_accept method to unblocking any pending acceptor. As with other I/O methods like this, it is `#[experimental]` from the start and sadly carries with it a good deal of code to support it. Much of the complication is from the fact that you can now concurrently accept on the same socket. I tried to add a good deal of tests for this change, but another set of eyes is always appreciated!
-
由 Alex Crichton 提交于
This commits takes a similar strategy to the previous commit to implement close_accept and clone for the native win32 pipes implementation. Closes #15595
-
由 Alex Crichton 提交于
Document the new code for how close_accept and timeouts are implemented.
-
由 Alex Crichton 提交于
This commit implements TcpAcceptor::{close, close_accept} for windows via WSAEVENT types.
-
由 Alex Crichton 提交于
This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for all of librustuv. This implementation rewrites much of Access, AccessTimeout, and AcceptTimeout to have type parameter for shared state that all acceptors share (a shared queue of sockets). The incoming/outgoing channels have been removed as all timeouts and such are now managed on the event loop rather than concurrently.
-
由 Alex Crichton 提交于
This commits implements {Tcp,Unix}Acceptor::{clone,close_accept} methods for unix. A windows implementation is coming in a later commit. The clone implementation is based on atomic reference counting (as with all other clones), and the close_accept implementation is based on selecting on a self-pipe which signals that a close has been seen.
-
由 bors 提交于
Shows linker spew even when linking succeeds. This is occasionally useful in order to see verbose linker output.
-
由 bors 提交于
This lets the parser understand trailing commas in method calls, method definitions, enum variants, and type parameters. Closes #14240. Closes #15887.
-
由 bors 提交于
Current version of rust fails when casting from bool, e.g. ```rust fn main() { let _a = false as uint; let _b = true as uint; let _c: [bool, ..false as uint]; let _d: [bool, ..true as uint]; // _a and _b work, but _c and _d result in an error // error: expected constant expr for vector length: can't cast str to uint } ``` This commit makes it work as expected.
-
由 bors 提交于
Use ExactSize::len() and defer to its decisions about overly defensive assertions. Remove the length double-check and simply put a failure case if the Zip finds an uneven end in .next_back(). Fixing this up since I think I wrote this, and it's been known to confuse rusties (PR #15886).
-
由 bors 提交于
-
- 24 8月, 2014 21 次提交
-
-
由 Tshepang Lekhonkhobe 提交于
-
由 bors 提交于
-
由 root 提交于
Use ExactSize::len() and defer to its decisions about overly defensive assertions. Remove the length double-check and simply put a failure case if the Zip finds an uneven end in .next_back(). Fixing this up since I think I wrote this, and it's been known to confuse rusties (PR#15886).
-
由 bors 提交于
Also: * Remove unseeming repetition. * By now, the reader has already heard that Rust is safe by default, so reduce the overlong sentence, making it easier to read.
-
由 Tshepang Lekhonkhobe 提交于
-
由 bors 提交于
Fixes #9536 --- From https://github.com/rust-lang/rust/issues/9536#issuecomment-45495670: I've built rustc with the aforementioned fix, once with MergeFunc being run early (that's what the patch for clang that comes with LLVM does), and once with MergeFunc being run late (using `-C passes=mergefunc`). Here are some time/code size measurements I made with them: Build command: `rustc -O -o /dev/null --emit asm .../lib.rs` CPU (user) times, best of three runs: Crate | No MergeFunc | Early MergeFunc | Late MergeFunc -------------|--------------|-----------------|--------------- core | 5.380s | 5.476s | 5.364s collections | 1.884s | 1.856s | 1.892s native | 7.200s | 7.356s | 7.108s rustc | 3m23.584s | 3m28.120s | 3m21.820s std | 13.888s | 13.976s | 13.848s syntax | 48.992s | 47.752s | 48.372s Sizes: Crate | No MergeFunc | Early MergeFunc | Late MergeFunc -----------------------------------------|-------------:|--------------------:|-------------------: lib | 237037581 | 236005998 (-0.44%) | 234708744 (-0.98%) libarena-063bff73-0.11.0-pre.so | 60398 | 60393 (-0.01%) | 60394 (-0.01%) libcollections-d412c0c4-0.11.0-pre.so | 971566 | 971772 (+0.02%) | 971691 (+0.01%) libdebug-1e940314-0.11.0-pre.so | 181352 | 181514 (+0.09%) | 181363 (+0.01%) libflate-92afea7e-0.11.0-pre.so | 137837 | 137869 (+0.02%) | 137837 (+0.00%) libfmt_macros-5125f3bd-0.11.0-pre.so | 132733 | 134598 (+1.41%) | 132465 (-0.20%) libgetopts-c94737d1-0.11.0-pre.so | 158851 | 157427 (-0.90%) | 158272 (-0.36%) libgraphviz-7b3cf89d-0.11.0-pre.so | 53337 | 53178 (-0.30%) | 53337 (+0.00%) liblog-cd053230-0.11.0-pre.so | 85993 | 86017 (+0.03%) | 85780 (-0.25%) libnative-1fb5e2c0-0.11.0-pre.so | 635785 | 639352 (+0.56%) | 621184 (-2.30%) libregex-77385931-0.11.0-pre.so | 450538 | 450741 (+0.05%) | 449504 (-0.23%) librustc-d252d482-0.11.0-pre.so | 51583741 | 51227703 (-0.69%) | 50930784 (-1.27%) librustdoc-6ecbf63e-0.11.0-pre.so | 4557104 | 4501896 (-1.21%) | 4394409 (-3.57%) libserialize-0352aab7-0.11.0-pre.so | 1126096 | 1115503 (-0.94%) | 1101734 (-2.16%) libstd-59beb4f7-0.11.0-pre.so | 4499529 | 4488879 (-0.24%) | 4477710 (-0.48%) libsync-305341d2-0.11.0-pre.so | 306767 | 312211 (+1.77%) | 304086 (-0.87%) libsyntax-555559ea-0.11.0-pre.so | 6699751 | 6632291 (-1.01%) | 6596232 (-1.55%) libterm-4e4945a5-0.11.0-pre.so | 389390 | 392689 (+0.85%) | 385525 (-0.99%) libtest-a79f950d-0.11.0-pre.so | 740161 | 730673 (-1.28%) | 734534 (-0.76%) libtime-4bb3739b-0.11.0-pre.so | 131518 | 132830 (+1.00%) | 131514 (-0.00%) rustlib | 164131038 | 163594366 (-0.33%) | 162796293 (-0.81%) x86_64-unknown-linux-gnu | 164119867 | 163583195 (-0.33%) | 162785122 (-0.81%) lib | 164115771 | 163579099 (-0.33%) | 162781026 (-0.81%) liballoc-1085c790-0.11.0-pre.rlib | 1094410 | 1094444 (+0.00%) | 1094438 (+0.00%) libarena-063bff73-0.11.0-pre.rlib | 312324 | 312152 (-0.06%) | 312210 (-0.04%) libarena-063bff73-0.11.0-pre.so | 60394 | 60394 (+0.00%) | 60394 (+0.00%) libcollections-d412c0c4-0.11.0-pre.rlib | 7048646 | 7049094 (+0.01%) | 7048856 (+0.00%) libcollections-d412c0c4-0.11.0-pre.so | 971575 | 971771 (+0.02%) | 971681 (+0.01%) libcompiler-rt.a | 573802 | 573802 (+0.00%) | 573802 (+0.00%) libcore-c5ed6fb4-0.11.0-pre.rlib | 24204746 | 24209820 (+0.02%) | 24187602 (-0.07%) libdebug-1e940314-0.11.0-pre.rlib | 876616 | 878488 (+0.21%) | 876746 (+0.01%) libdebug-1e940314-0.11.0-pre.so | 181352 | 181509 (+0.09%) | 181353 (+0.00%) libflate-92afea7e-0.11.0-pre.rlib | 175062 | 175074 (+0.01%) | 175082 (+0.01%) libflate-92afea7e-0.11.0-pre.so | 137837 | 137869 (+0.02%) | 137837 (+0.00%) libfmt_macros-5125f3bd-0.11.0-pre.so | 132724 | 134599 (+1.41%) | 132469 (-0.19%) libfourcc-cc0e8bf1-0.11.0-pre.so | 125828 | 126084 (+0.20%) | 125827 (-0.00%) libgetopts-c94737d1-0.11.0-pre.rlib | 864664 | 853040 (-1.34%) | 862548 (-0.24%) libgetopts-c94737d1-0.11.0-pre.so | 158855 | 157425 (-0.90%) | 158275 (-0.37%) libglob-eafe1d22-0.11.0-pre.rlib | 951370 | 944674 (-0.70%) | 946734 (-0.49%) libglob-eafe1d22-0.11.0-pre.so | 159130 | 157385 (-1.10%) | 156791 (-1.47%) libgraphviz-7b3cf89d-0.11.0-pre.rlib | 269600 | 269062 (-0.20%) | 269560 (-0.01%) libgraphviz-7b3cf89d-0.11.0-pre.so | 53334 | 53176 (-0.30%) | 53337 (+0.01%) libgreen-ca0d0b80-0.11.0-pre.rlib | 1374120 | 1389510 (+1.12%) | 1361696 (-0.90%) libgreen-ca0d0b80-0.11.0-pre.so | 372435 | 377929 (+1.48%) | 370991 (-0.39%) libhexfloat-3b978f48-0.11.0-pre.so | 131926 | 132166 (+0.18%) | 131935 (+0.01%) liblibc-4f9a876d-0.11.0-pre.rlib | 617472 | 617472 (+0.00%) | 617472 (+0.00%) liblog-cd053230-0.11.0-pre.rlib | 371190 | 371048 (-0.04%) | 370836 (-0.10%) liblog-cd053230-0.11.0-pre.so | 85996 | 86020 (+0.03%) | 85781 (-0.25%) libmorestack.a | 1388 | 1388 (+0.00%) | 1388 (+0.00%) libnative-1fb5e2c0-0.11.0-pre.rlib | 2233070 | 2264296 (+1.40%) | 2194920 (-1.71%) libnative-1fb5e2c0-0.11.0-pre.so | 635787 | 639341 (+0.56%) | 621184 (-2.30%) libnum-ebe12db7-0.11.0-pre.rlib | 2672318 | 2675292 (+0.11%) | 2669370 (-0.11%) libnum-ebe12db7-0.11.0-pre.so | 398924 | 399357 (+0.11%) | 395821 (-0.78%) librand-2ea8f361-0.11.0-pre.rlib | 1691108 | 1691696 (+0.03%) | 1690264 (-0.05%) libregex-77385931-0.11.0-pre.rlib | 2007348 | 2006050 (-0.06%) | 2003804 (-0.18%) libregex-77385931-0.11.0-pre.so | 450520 | 450790 (+0.06%) | 449535 (-0.22%) libregex_macros-a2216dec-0.11.0-pre.so | 597208 | 569004 (-4.72%) | 568800 (-4.76%) librlibc-d1ece24e-0.11.0-pre.rlib | 12394 | 12394 (+0.00%) | 12394 (+0.00%) librustc-d252d482-0.11.0-pre.so | 51582383 | 51230320 (-0.68%) | 50930784 (-1.26%) librustdoc-6ecbf63e-0.11.0-pre.so | 4557074 | 4501877 (-1.21%) | 4394506 (-3.57%) librustuv-ede8cb89-0.11.0-pre.rlib | 4774956 | 4791366 (+0.34%) | 4732386 (-0.89%) librustuv-ede8cb89-0.11.0-pre.so | 1401710 | 1400237 (-0.11%) | 1386869 (-1.06%) libsemver-e49a2dee-0.11.0-pre.rlib | 392704 | 392434 (-0.07%) | 392940 (+0.06%) libsemver-e49a2dee-0.11.0-pre.so | 71863 | 71847 (-0.02%) | 71860 (-0.00%) libserialize-0352aab7-0.11.0-pre.rlib | 8059698 | 8033972 (-0.32%) | 7989802 (-0.87%) libserialize-0352aab7-0.11.0-pre.so | 1126099 | 1115520 (-0.94%) | 1101721 (-2.16%) libstd-59beb4f7-0.11.0-pre.rlib | 18802728 | 18780212 (-0.12%) | 18743438 (-0.32%) libstd-59beb4f7-0.11.0-pre.so | 4499534 | 4488835 (-0.24%) | 4477677 (-0.49%) libsync-305341d2-0.11.0-pre.rlib | 1377062 | 1400190 (+1.68%) | 1369498 (-0.55%) libsync-305341d2-0.11.0-pre.so | 306762 | 312212 (+1.78%) | 304095 (-0.87%) libsyntax-555559ea-0.11.0-pre.so | 6703330 | 6632254 (-1.06%) | 6596295 (-1.60%) libterm-4e4945a5-0.11.0-pre.rlib | 1503928 | 1512648 (+0.58%) | 1495932 (-0.53%) libterm-4e4945a5-0.11.0-pre.so | 389380 | 392678 (+0.85%) | 385517 (-0.99%) libtest-a79f950d-0.11.0-pre.rlib | 3606962 | 3555410 (-1.43%) | 3589258 (-0.49%) libtest-a79f950d-0.11.0-pre.so | 740255 | 728398 (-1.60%) | 734521 (-0.77%) libtime-4bb3739b-0.11.0-pre.rlib | 847036 | 847178 (+0.02%) | 847194 (+0.02%) libtime-4bb3739b-0.11.0-pre.so | 131516 | 132829 (+1.00%) | 131518 (+0.00%) liburl-b8b5640c-0.11.0-pre.rlib | 647764 | 647558 (-0.03%) | 646896 (-0.13%) liburl-b8b5640c-0.11.0-pre.so | 146616 | 146621 (+0.00%) | 146531 (-0.06%) libuuid-238d8f44-0.11.0-pre.rlib | 359732 | 359682 (-0.01%) | 358936 (-0.22%) libuuid-238d8f44-0.11.0-pre.so | 77110 | 77110 (+0.00%) | 77023 (-0.11%) total | 237081476 | 236049893 (-0.44%) | 234752639 (-0.98%) So running MergeFunc early like in the clang patch isn't nearly as good as running it late. I also tried to enable usage of global aliases instead of just thunks when merging functions, but that crashes.
-
由 Jonas Hietala 提交于
Closes #8492
-
由 bors 提交于
Copy only up to `min(new_size, old_size)` when doing reallocate. This was a bug when running with jemalloc disabled. Fix #16687
-
由 Piotr Jawniak 提交于
-
由 bors 提交于
With no custom message, we should just use concat! + stringify! for `assert!(expr)` to avoid the string formatting code path. Inspired by issue #16625
-
由 bors 提交于
These are somewhat stop-gap solutions to address #16625 core: Separate failure formatting in str methods slice, slice_to, slice_from Use a separate inline-never function to format failure message for str::slice() errors. Using strcat's idea, this makes sure no formatting code from failure is inlined when str::slice() is inlined. The number of `unreachable` being inlined when usingi `.slice()` drops from 5 to just 1. The testcase: ``` #![crate_type = "lib"] pub fn slice(x: &str, a: uint, b: uint) -> &str { x.slice(a, b) } ``` shrinks from 16.9 kB to 3.3 kB llvm IR, and the number of `unreachable` drops from 5 to 1.
-
由 Tshepang Lekhonkhobe 提交于
Also: * Remove unseeming repetition. * By now, the reader has already heard that Rust is safe by default, so reduce the overlong sentence, making it easier to read.
-
由 bors 提交于
Closes #10618 Closes #16382
-
由 Björn Steinbrink 提交于
Fixes #9536
-
由 bors 提交于
First commit fixes issue regarding recognizing MSYS2 build. Second commit fixes issue regarding MSYS/Windows paths.
-
由 Vadim Chugunov 提交于
-
由 bors 提交于
I was doing a lot of parsing ascii strings, and the generic bsearch functions in `tables.rs` came up very high in the profile. This should avoid calling those functions for simple ASCII range chars.
-
由 bors 提交于
There is a check in TwoWaySearcher::new to determine whether the needle is periodic. This is needed because during searching when a match fails, we cannot advance the position by the entire length of the needle when it is periodic, but can only advance by the length of the period. The reason "bananas".contains("nana") (and similar searches) were returning false was because the periodicity check was wrong. Closes #16589 Also, thanks to @Gankro, who came up with many buggy examples.
-
由 Felix S. Klock II 提交于
Fix #16687
-
由 Felix S. Klock II 提交于
-
由 bors 提交于
To avoid a compilation error when running the tests the function has to be public.
-
- 23 8月, 2014 3 次提交
-
-
由 bors 提交于
-
由 root 提交于
With no custom message, we should just use concat! + stringify! for `assert!(expr)`. Inspired by issue #16625
-
由 Daniel Hofstetter 提交于
-