about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2013-09-01Fix incorrect strftime error handling in rust_localtimeBirunthan Mohanathas-3/+6
Closes #8702.
2013-08-31auto merge of #8903 : luqmana/rust/en, r=thestingerbors-4/+10
Fixes #8735.
2013-08-31auto merge of #8899 : thestinger/rust/repr, r=huonwbors-36/+56
2013-08-31document why some tests are xfail-fastDaniel Micay-5/+5
2013-08-31auto merge of #8905 : sstewartgallus/rust/cleanup_tests, r=bblumbors-154/+153
In this commit I: - removed unneeded heap allocations - added extra whitespace to crowded expressions - and removed unneeded syntax Also, CC @bblum although this change is fairly unobjectionable.
2013-08-31Cleanup concurrency testsSteven Stewart-Gallus-154/+153
In this commit I: - removed unneeded heap allocations - added extra whitespace to crowded expressions - and removed unneeded syntax
2013-08-31librustc: Add export_name attribute to specify symbol name.Luqman Aden-4/+10
2013-08-31repr: remove trailing {} from unit-like structsDaniel Micay-8/+12
2013-08-31repr: print the name of structsDaniel Micay-34/+50
2013-08-30auto merge of #8896 : lightcatcher/rust/default_eq_fix, r=thestingerbors-26/+4
Summary: -removed "ne" methods in libstd and librustpkg -made default "ne" be inlined -made one of the "eq" methods in librustpkg follow more standard parameter naming convention
2013-08-30auto merge of #8862 : dcrewi/rust/drop-redundant-ord-impls, r=thestingerbors-17/+2
If this were to break something, I would expect existing tests to catch it, and a `make check` run passes locally.
2013-08-30auto merge of #8894 : alexcrichton/rust/faster, r=thestingerbors-68/+100
The only changes to the default passes is that O1 now doesn't run the inline pass, just always-inline with lifetime intrinsics. O2 also now has a threshold of 225 instead of 275. Otherwise the default passes being run is the same. I've also added a few more options for configuring the pass pipeline. Namely you can now specify arguments to LLVM directly via the `--llvm-args` command line option which operates similarly to `--passes`. I also added the ability to turn off pre-population of the pass manager in case you want to run *only* your own passes. I would consider this as closing #8890. I don't think that we should change the default inlining threshold because LLVM/clang will probably have chosen those numbers more carefully than we would. Regardless, here's the performance numbers from this commit: ``` $ ./x86_64-apple-darwin/stage0/bin/rustc ./gistfile1.rs --test --opt-level=3 -o before warning: no debug symbols in executable (-arch x86_64) $ ./before --bench running 1 test test bench::aes_bench_x8 ... bench: 1602 ns/iter (+/- 66) = 7990 MB/s test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured $ ./x86_64-apple-darwin/stage1/bin/rustc ./gistfile1.rs --test --opt-level=3 -o after warning: no debug symbols in executable (-arch x86_64) $ ./after --bench running 1 test test bench::aes_bench_x8 ... bench: 2103 ns/iter (+/- 175) = 6086 MB/s test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured $ ./x86_64-apple-darwin/stage1/bin/rustc ./gistfile1.rs --test --opt-level=3 -o after --llvm-args '-inline-threshold=225' warning: no debug symbols in executable (-arch x86_64) $ ./after --bench running 1 test test bench::aes_bench_x8 ... bench: 1600 ns/iter (+/- 71) = 8000 MB/s test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured ```
2013-08-30made Eq for package_id use more standard parameter namesEric Martin-2/+2
2013-08-30Now inline default 'ne' methodsEric Martin-0/+2
2013-08-30remove several 'ne' methodsEric Martin-24/+0
2013-08-30Tweak pass management and add some more optionsAlex Crichton-68/+100
The only changes to the default passes is that O1 now doesn't run the inline pass, just always-inline with lifetime intrinsics. O2 also now has a threshold of 225 instead of 275. Otherwise the default passes being run is the same. I've also added a few more options for configuring the pass pipeline. Namely you can now specify arguments to LLVM directly via the `--llvm-args` command line option which operates similarly to `--passes`. I also added the ability to turn off pre-population of the pass manager in case you want to run *only* your own passes.
2013-08-30auto merge of #8889 : erickt/rust/cleanup, r=catamorphismbors-81/+64
This fixes a couple minor things I've been sitting on. It cleans up some warnings, CapCases some types in librustc's rscope module, and adds a fixme.
2013-08-30auto merge of #8831 : catamorphism/rust/extend_rust_path, r=catamorphismbors-104/+506
r? @brson @metajack requested the ability to violate the "only workspaces can be in the RUST_PATH" rule for the purpose of bootstrapping Servo without having to restructure all the directories. This patch gives rustpkg the ability to find sources if a directory in the RUST_PATH directly contains one of rustpkg's "special" files (lib.rs, main.rs, bench.rs, or test.rs), even if it's not a workspace. In this case, it puts the build artifacts in the first workspace in the RUST_PATH. I'm not sure whether or not it's a good idea to keep this feature in rustpkg permanently. Thus, I added a flag, ```--use-rust-path-hack```, and only enabled it when the flag is set.
2013-08-30rustpkg: Allow package directories to appear in the RUST_PATHTim Chevalier-103/+428
This commit adds a rustpkg flag, --rust-path-hack, that allows rustpkg to *search* inside package directories if they appear in the RUST_PATH, while *building* libraries and executables into a different target directory. This behavior is hidden behind a flag because I believe we only want to support it temporarily, to make it easier to port servo to rustpkg. This commit also includes a fix for how rustpkg fetches sources from git repositories -- it uses a temporary directory as the target when invoking `git clone`, then moves that directory into the workspace if the clone was successful. (The old behavior was that when the `git clone` failed, the empty target directory would be left lying around anyway.)
2013-08-30rustpkg: Add a not_a_workspace conditionTim Chevalier-0/+8
2013-08-30std: Add a file-renaming function to std::osTim Chevalier-0/+69
2013-08-30std: Add a fixme for when we add Trait::<for T>::static_method()Erick Tryzelaar-0/+2
2013-08-30rustc: capitalize types in rscope.rsErick Tryzelaar-51/+51
2013-08-30fix various warningsErick Tryzelaar-30/+11
2013-08-30rustc: Change a stray error! statement to debug!Tim Chevalier-1/+1
2013-08-30auto merge of #8886 : cmr/rust/test-restructure, r=cmrbors-19/+17
2013-08-30Revert "src/test/bench: restructure"Corey Richardson-0/+0
This reverts commit 14cdc26e8a7794e437946f46df5769362b42acdf.
2013-08-30Revert "Teach compiletest to use multiple --src-base's"Corey Richardson-19/+17
This reverts commit 8a07f5708196dd72ec030018c2a215a4dd823b2e.
2013-08-30Revert "Teach the makefile to use multiple src-base's"Corey Richardson-1/+1
This reverts commit 43f851d2cb3976655078f032dc1a8cb88f1c8deb.
2013-08-30auto merge of #8858 : blake2-ppc/rust/small-bugs, r=alexcrichtonbors-17/+26
Fix a bug in `s.slice_chars(a, b)` that did not accept `a == s.len()`. Fix a bug in `!=` defined for DList. Also simplify NormalizationIterator to use the CharIterator directly instead of mimicing the iteration itself.
2013-08-30auto merge of #8877 : bouk/rust/master, r=sanxiynbors-1/+1
Ran into a missing space in the stdlib source
2013-08-30auto merge of #8872 : MicahChalmer/rust/emacs-indent-fix, r=pnkfelixbors-5/+26
This fixes some, but not all, of the issues mentioned in #8787
2013-08-30auto merge of #8869 : alexcrichton/rust/issue-8847-fix-unused, r=huonwbors-0/+86
Closes #8847
2013-08-30auto merge of #8867 : thestinger/rust/smaller-arc, r=alexcrichtonbors-1/+9
2013-08-30auto merge of #8857 : blake2-ppc/rust/std-str-remove, r=thestingerbors-40/+0
These are very easy to replace with methods on string slices, basically `.char_len()` and `.len()`. These are the replacement implementations I did to clean these functions up, but seeing this I propose removal: /// ... pub fn count_chars(s: &str, begin: uint, end: uint) -> uint { // .slice() checks the char boundaries s.slice(begin, end).char_len() } /// Counts the number of bytes taken by the first `n` chars in `s` /// starting from byte index `begin`. /// /// Fails if there are less than `n` chars past `begin` pub fn count_bytes<'b>(s: &'b str, begin: uint, n: uint) -> uint { s.slice_from(begin).slice_chars(0, n).len() }
2013-08-30Add missing spaceBouke van der Bijl-1/+1
2013-08-30auto merge of #8854 : huonw/rust/rt-papercuts, r=brsonbors-33/+27
The only user-facing change is handling non-integer (and zero) `RUST_THREADS` more nicely: ``` $ RUST_THREADS=x rustc # old You've met with a terrible fate, haven't you? fatal runtime error: runtime tls key not initialized Aborted $ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new You've met with a terrible fate, haven't you? fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer Aborted ``` The other changes are converting some `for .. in range(x,y)` to `vec::from_fn` or `for .. in x.iter()` as appropriate; and removing a chain of (seemingly) unnecessary pointer casts. (Also, fixes a typo in `extra::test` from #8823.)
2013-08-30auto merge of #8843 : alexcrichton/rust/fix-bug, r=huonwbors-10/+85
Whenever a generic function was encountered, only the top-level items were recursed upon, even though the function could contain items inside blocks or nested inside of other expressions. This fixes the existing code from traversing just the top level items to using a Visitor to deeply recurse and find any items which need to be translated. This was uncovered when building code with --lib, because the encode_symbol function would panic once it found that an item hadn't been translated. Closes #8134
2013-08-30auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brsonbors-503/+1717
At the same time, this updates the TyVisitor to use a mutable self because it's probably going to be mutating state as it goes along anyway.
2013-08-30auto merge of #8839 : sanxiyn/rust/env, r=thestingerbors-10/+5
2013-08-30Align field names in struct expressions with fields on same line as the ↵Micah Chalmer-4/+14
opening curly brace
2013-08-30Multiline comments with leading *s line up the *sMicah Chalmer-0/+4
2013-08-29auto merge of #8819 : vadimcn/rust/unit-tests, r=brsonbors-25/+84
Some of the tests are failing. I've only managed to fix 'memory_map_file', the rest are up for grabs... Fixes #5261.
2013-08-29One indent after open paren with no argumentMicah Chalmer-2/+8
2013-08-29Correct indent with trailing spaces/comments on previous lineMicah Chalmer-2/+3
2013-08-29Correct the sources of glob importsAlex Crichton-0/+86
Closes #8847
2013-08-29Fix a bug with statics inside blocks in generic fnsAlex Crichton-10/+85
Whenever a generic function was encountered, only the top-level items were recursed upon, even though the function could contain items inside blocks or nested inside of other expressions. This fixes the existing code from traversing just the top level items to using a Visitor to deeply recurse and find any items which need to be translated. This was uncovered when building code with --lib, because the encode_symbol function would panic once it found that an item hadn't been translated. Closes #8134
2013-08-29auto merge of #8458 : cmr/rust/test-restructure, r=brsonbors-17/+19
This should make benchmarks easier to understand. But, it doesn't work. BENCH_RS in mk/tests.mk has everything, from what I can tell in remake, but only those that are direct children of src/test/bench get build and run. @graydon, can you lend your expertise? I can't make heads or tails of this makefile.
2013-08-29reduce the size of UnsafeArc from 2 words to 1Daniel Micay-1/+9
2013-08-29partial revert of 31fa865David Creswick-1/+1
Ratio is generic and so might contain a non-total orderable type. It should not use the default Ord implementation.