Tim Chevalier
85b5b2a8e4
Tests for while loops that may invalidate constraints
...
Wrote some small test cases that use while loops and moves, to
make sure the poststate for the loop body gets propagated into the
new prestate and deinitialization gets reflected.
Along with that, rewrite the code for intersecting states. I still
find it dodgy, but I guess I'll continue trying to add more tests.
Also, I'll probably feel better about it once I start formalizing
the algorithm.
2011-06-27 18:14:23 -07:00
Michael Sullivan
12d9d07a84
Improve the tests for vector self appending.
2011-06-27 12:34:45 -07:00
Michael Sullivan
ec80918865
Add a test written by jdm that tests repeated vector self appending.
2011-06-27 12:34:45 -07:00
Rafael Ávila de Espíndola
ac081c30be
Record and link with used native libraries.
2011-06-27 15:24:44 -04:00
Tim Chevalier
1656fa19ef
Implement move for scalar values
...
Before, something like:
let int y = 42;
let int x;
x <- y;
would cause an LLVM assertion failure. Fixed it.
2011-06-27 11:32:06 -07:00
Eric Holk
4bc773465f
Basic multithreading support. The infinite loops test successfully maxes out the CPU.
2011-06-27 09:58:39 -07:00
Brian Anderson
cfaa0f4b91
Fail typechecking for bad binop/type combinations
...
Includes assignment operations. Add regression tests for lots of less useful,
less used or unexpected combinations, as well as a selection of compile-fail
tests. Closes #500 (again!)
2011-06-25 19:42:59 -07:00
Marijn Haverbeke
781a265b88
Remove variable name 'res' from test suite
2011-06-25 21:15:04 +02:00
Paul Stansifer
142ff011da
Make a test compile faster.
2011-06-24 14:47:36 -07:00
Brian Anderson
1e7f06b17a
test: Improve ternary operator tests
2011-06-23 23:27:32 -07:00
Brian Anderson
05c0216654
rustc: Add ternary operator. Closes #565
...
The implementation is so simple it might be considered cheating: at almost
every step the expr_ternary is just converted to expr_if.
2011-06-23 22:16:11 -07:00
Michael Sullivan
5495ad17d1
Fix type inference inside of anonymous functions.
2011-06-23 21:36:10 -07:00
Eric Holk
98dee91f25
Wrote swap_context in assembly. Closes #548 . This also allows us to re-enable optimization on OSX for both gcc and clang. Also, re-enamed task-comm-1.rs, which was previously broken by optimization.
2011-06-23 18:49:29 -07:00
Lindsey Kuper
5bd65de289
Typo fix in test case.
2011-06-23 10:47:29 -07:00
Brian Anderson
7105cd1761
test: Add test for string matching in pattern alts. Closes #53
2011-06-22 22:05:11 -07:00
Brian Anderson
8746b84eec
rustc: Handle valueless ret expressions as block results. Closes #521
2011-06-22 17:20:01 -07:00
Paul Stansifer
b4c3b83f26
Fix bug: globbed imports were importing everything visible from the other
...
module, not just everything exported.
2011-06-22 15:41:39 -07:00
Brian Anderson
adc18bb24a
rustc: Introduce and parse additional meta_item forms
...
Examples: #[test], #[link(name = "vers")]
Issue #487
2011-06-22 13:55:58 -07:00
Brian Anderson
cc2a514cdc
test: Enable more tests
2011-06-22 08:35:02 -07:00
Lindsey Kuper
efd8ff4647
Comments for all the anon obj tests.
2011-06-21 16:35:21 -07:00
Tim Chevalier
7fb35ecf84
Serialize constraints in types (literal arguments still not supported)
...
This involved, in part, changing the ast::def type so that a def_fn
has a "purity" field. This lets the typechecker determine whether
functions defined in other crates are pure.
It also required updating some error messages in tests. As a test
for cross-crate constrained functions, I added a safe_slice function
to std::str (slice(), with one of the asserts replaced with a
function precondition) and some test cases (various versions of
fn-constraint.rs) that call it. Also, I changed "fn" to "pred" for
some of the boolean functions in std::uint.
2011-06-21 14:37:33 -07:00
Lindsey Kuper
84005fadbf
Some progress on support for extending objects with new fields (issue
...
into four separate issues (#538 , #539 , #540 , #543 ) with corresponding
tests.
2011-06-21 13:31:27 -07:00
Lindsey Kuper
718ee98f43
More descriptive identifiers.
2011-06-21 13:31:27 -07:00
Brian Anderson
34040be580
test: Add a test for distinguishing attributes from extensions
...
Issue #487
2011-06-21 11:50:55 -07:00
Brian Anderson
23d6a6bde1
rustc: Remove unused slice call from extfmt. Closes #532
2011-06-21 07:49:40 -07:00
Eric Holk
a2dcd08cc2
Added string duplication to deep_copy. Closes #520 .
2011-06-20 13:47:02 -07:00
Eric Holk
992153672b
Removed duplicated ret_ty_of_fn. This also means the native function branch is working now, so this commit closes #506 .
2011-06-20 12:04:33 -07:00
Eric Holk
ce50ae3212
Added a test case for #506
2011-06-20 12:04:33 -07:00
Patrick Walton
7bb6733f2c
test: Add a test case for derived-tydescs-before-dynamic-allocas
2011-06-18 18:44:21 -07:00
Patrick Walton
ca2ff9c50d
stdlib: Add ivec::grow_set()
2011-06-18 16:41:09 -07:00
Patrick Walton
5d90b1df4b
stdlib: Add ivec::grow() and ivec::grow_fn()
2011-06-18 16:29:45 -07:00
Patrick Walton
ef65542b1d
test: Add test cases for ivec::init_elt, ivec::last, and ivec::slice
2011-06-18 16:05:44 -07:00
Tim Chevalier
7fc89f573d
Restructure the "checking" pass in typestate
...
I noticed that typestate was being lazier than it should be,
because it was only checking typestate for statements and
top-level expression (that is, the expression in a stmt_expr, but
not any subexpressions). So I rewrote the checks in tstate/ck.rs
to use walk, which exposed a few bugs in typestate that I fixed.
Also added some more test cases for if-check.
2011-06-17 19:09:18 -07:00
Patrick Walton
a4eb6630f3
rustc: Increment by the dynamically-computed size in ivec::trans_append. Uncomment init_fn test in lib-ivec.
2011-06-17 19:01:14 -07:00
Patrick Walton
e0afcb400b
test: Comment out the init-fn line in lib-ivec. Puts out burning tinderbox.
2011-06-17 17:53:43 -07:00
Patrick Walton
5fb9325848
rustc: Fix a bunch of memory management bugs relating to generic interior vectors. Uncomment all tests in lib-ivec.
2011-06-17 17:31:24 -07:00
Eric Holk
9adacfb26a
Adding a test case for getcwd and related functions.
2011-06-17 15:53:20 -07:00
Eric Holk
71e1db596c
Added a test case for #507
2011-06-17 15:17:46 -07:00
Brian Anderson
2a69db5b76
test: Fix mismatched types in prep for typechecker fixes
...
Issue #500
2011-06-17 11:35:00 -07:00
Patrick Walton
982f51aa95
stdlib: Fix reserve on zero-length interior vectors; uncomment test_unsafe_ptrs()
2011-06-16 18:01:57 -07:00
Patrick Walton
d47101703e
stdlib: Sketch out ivec::init_fn, currently segfaulting
2011-06-16 17:48:59 -07:00
Brian Anderson
a68a5c9b5e
Disable lib-ivec's test_unsafe_ptrs. Not working here
2011-06-16 17:34:39 -07:00
Brian Anderson
e83a115d79
rustc: Parse crate attributes in standalone .rs files
...
Issue #487
2011-06-16 17:23:20 -07:00
Brian Anderson
ffae642663
rustc: Parse attributes in crate files
...
Issue #487
2011-06-16 17:23:20 -07:00
Brian Anderson
62939e41b2
rustc: Parse inner items of file-level modules linked from crate files
...
Issue #487
2011-06-16 17:23:20 -07:00
Patrick Walton
40746fa447
rustc: Implement conversions from interior vector data to unsafe pointers and vice-versa
2011-06-16 17:07:02 -07:00
Graydon Hoare
eb9969f546
Add support for marking files no-reformat.
2011-06-16 16:42:29 -07:00
Patrick Walton
050f62983d
stdlib: Introduce an ivec module into the standard library; add a minimal test case
2011-06-16 16:08:26 -07:00
Patrick Walton
d90ad442b4
rustc: Work around leak when translating interior vectors. Un-XFAIL interior-vec.rs.
2011-06-16 15:07:21 -07:00
Patrick Walton
5b341443da
test: Add an interior-vec test case, XFAIL'd for now because of leaks in the compiler
2011-06-16 14:30:10 -07:00