Commit Graph

91 Commits

Author SHA1 Message Date
Daniel Micay
49c74524e2 vec: rm old_iter implementations, except BaseIter
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.

This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04:00
Brian Anderson
fb2765eebd rusti: Disable tests on macos harder 2013-06-18 22:17:58 -07:00
Graydon Hoare
04b1dbabf5 rusti: disable tests on 32bit mac. r=burningtree. 2013-06-18 16:43:49 -07:00
Huon Wilson
30973ccb90 std: allow any sort of string to be Added with +. 2013-06-16 10:50:28 +10:00
bors
83d44f87e5 auto merge of #7125 : alexcrichton/rust/rusti-issues, r=brson
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another.

@brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made.

Additionally, this fixes two recently reported issues with rusti.
2013-06-15 01:04:05 -07:00
Daniel Micay
585f5f7f79 add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
Alex Crichton
9c3b1cbc19 Resolve LLVM crashing in rustpkg tests 2013-06-13 22:53:30 -07:00
Alex Crichton
079ffa362f Correctly parse commands for rusti
Closes #7120
2013-06-13 21:48:16 -07:00
Alex Crichton
a90fffe367 Revert "Revert "Have JIT execution take ownership of the LLVMContextRef""
This reverts commit 19adece68b.
2013-06-13 21:25:18 -07:00
Alex Crichton
1a3edecbf2 Revert "Revert "Remove all usage of the global LLVMContextRef""
This reverts commit 541c657a73.
2013-06-13 21:25:12 -07:00
Brian Anderson
541c657a73 Revert "Remove all usage of the global LLVMContextRef"
This reverts commit 779191cd4b.

Conflicts:
	src/librustc/middle/trans/base.rs
	src/librustc/middle/trans/common.rs
2013-06-13 13:08:57 -07:00
Brian Anderson
19adece68b Revert "Have JIT execution take ownership of the LLVMContextRef"
This reverts commit 5c5095d25e.

Conflicts:
	src/librusti/rusti.rc
2013-06-13 13:08:57 -07:00
Alex Crichton
0c47632898 Rewrite rusti 2013-06-12 21:03:17 -07:00
Huon Wilson
096f6f56a8 Use @str instead of @~str in libsyntax and librustc. Fixes #5048.
This almost removes the StringRef wrapper, since all strings are
Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts
several things to be &'static str (the lint table and the intrinsics
table).

There are many instances of .to_managed(), unfortunately.
2013-06-13 10:20:52 +10:00
Huon Wilson
3ac00a9489 std: remove substr & str::count_*, methodise char_len, implement slice_chars.
The confusing mixture of byte index and character count meant that every
use of .substr was incorrect; replaced by slice_chars which only uses
character indices. The old behaviour of `.substr(start, n)` can be emulated
via `.slice_from(start).slice_chars(0, n)`.
2013-06-12 12:21:04 +10:00
Alex Crichton
5c5095d25e Have JIT execution take ownership of the LLVMContextRef
Also stop leaking the ExecutionEngine created for jit code by forcibly disposing
of it after the JIT code has finished executing
2013-06-10 13:17:04 -07:00
Huon Wilson
ccd0ac59e9 std: remove str::{connect,concat}*. 2013-06-10 23:57:03 +10:00
Huon Wilson
f632f46614 std: convert str::trim* to methods. 2013-06-10 23:02:55 +10:00
Huon Wilson
1e8982bdb2 std: replace str::each_split* with an iterator 2013-06-10 23:02:54 +10:00
John Clements
ae02bf70e0 removed some interner fields 2013-06-05 12:01:38 -07:00
Philipp Brüschweiler
34ee63e93b std::cell: Modernize constructors
Part of #3853
2013-06-04 12:03:58 +02:00
Tim Chevalier
c120464be0 rustc/rusti/rustpkg: Infer packages from extern mod directives
This commit won't be quite as useful until I implement RUST_PATH and
until we change `extern mod` to take a general string instead of
an identifier (#5682 and #6407).

With that said, now if you're using rustpkg and a program contains:

extern mod foo;

rustpkg will attempt to search for `foo`, so that you don't have to
provide a -L directory explicitly. In addition, rustpkg will
actually try to build and install `foo`, unless it's already
installed (specifically, I tested that `extern mod extra;` would
not cause it to try to find source for `extra` and compile it
again).

This is as per #5681.

Incidentally, I changed some driver code to infer the link name
from the crate link_meta attributes. If that change isn't ok, say
something. Also, I changed the addl_lib_search_paths field in the
session options to be an @mut ~[Path] so that it can be modified
after expansion but before later phases.
2013-06-01 18:48:07 -07:00
Björn Steinbrink
1720d9f663 Remove a bunch of unnecessary allocations and copies 2013-05-30 11:49:04 +02:00
Patrick Walton
206ab89629 librustc: Stop reexporting the standard modules from prelude. 2013-05-29 19:04:53 -07:00
bors
d2957091c4 auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)
2013-05-29 12:13:49 -07:00
bors
e3e55c5c04 auto merge of #6793 : graydon/rust/drop-ast-before-llvm, r=Aatch 2013-05-29 00:52:47 -07:00
Alex Crichton
ba33472f9f Un-ignore rusti/rustpkg tests on i686 2013-05-28 21:23:42 -05:00
Graydon Hoare
b4a3fe25c6 librustc: drop AST before running LLVM, frees 400mb on a librustc build 2013-05-28 15:31:32 -07:00
Alex Crichton
b04c40bb1c Silence various warnings throughout test modules 2013-05-28 15:27:35 -05:00
Erick Tryzelaar
50f6198ee2 cleanup warnings from librusti 2013-05-23 17:57:07 -07:00
Ted Horst
34cfd2183b more testing fallout from core->std/std->extra move 2013-05-23 15:06:29 -05:00
Patrick Walton
f3723cf7c4 libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra 2013-05-22 21:57:07 -07:00
kud1ing
da94580ddc "Type :help for help", similar to ghci 2013-05-22 10:03:51 +03:00
Daniel Micay
20ef4238bb reduce the usage of explicit version markers 2013-05-19 00:21:41 -04:00
Brian Anderson
2d35c01a28 rusti: Ignore tests. Failing on i686. #6489 2013-05-14 19:11:57 -07:00
Alex Crichton
8b87fd7ec0 Don't emit common warnings in rusti 2013-05-14 14:11:29 -04:00
Alex Crichton
9af04f3e77 Add regression tests for various other rusti issues 2013-05-14 14:11:08 -04:00
Alex Crichton
4a9d8ff1a7 Fix use statements with rusti 2013-05-14 14:11:07 -04:00
Alex Crichton
54f2147e8e Get unit tests for rusti working
* They didn't work before, because the location of the tests caused the
  'sysroot' option to crate lookup to be wrong for finding the correct stage's
  core/std libraries. This moves the compiled tests from the $host/test
  directory into a $host/$stage/test directory. This means that the sysroot will
  be correct and the core/std libraries can actually be found
* The LLVM bindings apparently aren't threadsafe, so we can't run multiple tests
  in parallel.
2013-05-14 14:11:07 -04:00
Alex Crichton
ccfb3ebf03 rusti: Remove #[allow(vecs_implicitly_copyable)] 2013-05-14 12:25:18 -04:00
Björn Steinbrink
bdc182cc41 Use static string with fail!() and remove fail!(fmt!())
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Alex Crichton
63c7e2f991 Remove the '<->' operator from the language 2013-05-10 22:51:06 -04:00
Björn Steinbrink
1393c3a3f4 Use a specialized string interner to reduce the need for owned strings
&str can be turned into @~str on demand, using to_owned(), so for
strings, we can create a specialized interner that accepts &str for
intern() and find() but stores and returns @~str.
2013-05-09 14:40:19 +02:00
Daniel Micay
f792baba42 only use #[no_core] in libcore 2013-04-27 21:34:24 -04:00
Alex Crichton
c97bee2696 Assorted fixes from de-modeing rustc/syntax (rusti, rustdoc, fuzzer, rustpkg) 2013-04-19 23:23:23 -04:00
Tim Chevalier
3d43af15d8 rustc: Anti-copy police
In this case, some copies are still necessary to convert from
a mutable to an immutable @-box. It's still an improvement,
I hope.
2013-04-18 17:40:42 -07:00
Huon Wilson
c2b15345c7 librusti: only use std::rl if stdin is connected to a tty. 2013-04-13 21:30:21 +10:00
Brian Anderson
23e44a529b Bump version to 0.7-pre 2013-04-10 13:12:53 -07:00
Brian Anderson
23251b2438 Bump version to 0.7-pre 2013-04-09 10:59:32 -07:00
Dan Luu
eaa8bbbb2e Fix comment to match style of surrounding text 2013-04-08 23:58:29 -04:00