Niko Matsakis
e39db5a100
all tests pass
2011-10-12 16:33:06 -07:00
Niko Matsakis
db16fce77f
all tests pass
2011-10-12 16:33:06 -07:00
Niko Matsakis
85da98db4a
continue to annotate functions as unsafe where neccessary
2011-10-12 16:33:06 -07:00
Niko Matsakis
d4d7eb069b
add unsafe tags into various points in the translation chains
...
and so forth
2011-10-12 16:33:06 -07:00
Niko Matsakis
8ea1a8eef9
make treatment of unchecked/unsafe blocks more uniform
...
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 16:32:57 -07:00
Brian Anderson
8366f3caa3
Revert "Test for #954 "
...
This reverts commit 7edb043889
.
2011-10-12 15:53:54 -07:00
Brian Anderson
7edb043889
Test for #954
2011-10-12 15:53:15 -07:00
Brian Anderson
40fa88febb
Ignore stdtest::os::test_setenv. Fails periodically on mac
2011-10-12 15:27:58 -07:00
Niko Matsakis
24b201fa48
skip test, remove whitespace
2011-10-12 14:39:34 -07:00
Niko Matsakis
cbe8da0655
make treatment of unchecked/unsafe blocks more uniform
...
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 14:39:24 -07:00
Niko Matsakis
8c1231ae5f
fix test to include a main() function
2011-10-12 14:26:47 -07:00
Niko Matsakis
d207bc3a0b
it is also legal to call unsafe functions from other unsafe functions
2011-10-12 14:26:47 -07:00
Niko Matsakis
046ca827dd
Add unsafe blocks, unsafe functions, and two rudimentary tests
...
related to them
2011-10-12 14:26:47 -07:00
Brian Anderson
99f876e3a8
Make build_environment and trans_bind_thunk GEP bound arguments the same
...
These functions both use GEP_tup_like to get at the arguments bound to the
environment, but they were starting from a different 'level' of the
environment-box structure. Frighteningly, this was leading to them having
different opinions of how the bound arguments were aligned in some cases.
2011-10-12 12:11:07 -07:00
David Rajchenbach-Teller
75bda422df
[Tests] added float tests
2011-10-12 10:56:05 +02:00
Lindsey Kuper
813c2eb369
Revert "Revert "Add a test case for #898 . Closes #898.""
...
This reverts commit e305ab3851
.
Oops again. Reverting a mistaken revert.
2011-10-11 22:03:23 -04:00
Lindsey Kuper
e305ab3851
Revert "Add a test case for #898 . Closes #898."
...
This reverts commit f480203fdd
.
Oops. This patch requires people to bump their LLVM version.
2011-10-11 22:00:17 -04:00
Brian Anderson
f480203fdd
Add a test case for #898 . Closes #898 .
...
Seems to have been fixed.
2011-10-11 16:50:50 -07:00
Brian Anderson
8c77d063a9
Add a test for assignment of bare functions
...
Issue #1022
2011-10-11 13:40:31 -07:00
Brian Anderson
b04f84275a
Add a test that bare functions are word-sized
...
Issue #1022
2011-10-11 13:40:28 -07:00
Brian Anderson
90c2402089
Add a test that uses a hypothetical bare-fn spawn signature
...
Issue #1022
2011-10-11 12:10:56 -07:00
Brian Anderson
84e98f4f65
Add a test for higher-order bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
145feb3298
Add a test for binding bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
5b0f79b75a
Don't allow bind to produce bare functions
...
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
9c46cc58cb
Add a temporary syntax for bare functions
...
Bare functions will be represented as 'fn#' until they're implemented. Then
we'll switch it over to just 'fn'.
Issue #1022
2011-10-11 10:51:09 -07:00
Marijn Haverbeke
33167f7dec
Adjust function signatures to allow for vecs being immediate
...
Some code was relying on vectors being implicitly by-reference (as
non-immediate value). This adds the necessary &&-sigils.
Closes #1021
2011-10-10 16:01:51 +02:00
Marijn Haverbeke
b4bae8fea5
Make vectors and strings immediates again
...
There's no good reason to force them to be spilled anymore. Some
pieces of trans become more elegant this way, and less stack allocs
and load/stores are needed.
Issue #1021
2011-10-10 15:59:16 +02:00
Marijn Haverbeke
1efe5f0577
Fix up test for last commit
2011-10-07 16:58:27 +02:00
Marijn Haverbeke
f26e770745
Make 1-1 parse again
...
Issue #954
This is not a very elegant fix -- we should probably do something with
constant folding to handle negative-int alt patterns in the future.
2011-10-07 16:46:44 +02:00
Marijn Haverbeke
7586082bb0
Add tests for programs that are invalid by arg-passing-style
...
Closes #1008
2011-10-07 10:41:40 +02:00
Marijn Haverbeke
41528dc543
Add pass-by-ref annotation to the tests to make them typecheck
...
Issue #1008
2011-10-07 10:41:39 +02:00
Brian Anderson
04e89af6db
Add std::str::contains
2011-10-06 16:08:44 -07:00
Brian Anderson
82ef8519c3
Fix some path handling in std::fs on win32
2011-10-05 16:21:55 -07:00
Brian Anderson
a8ce543dc9
Add std::os::get_exe_path
...
Need this to correctly determine sysroot in rustc
2011-10-04 21:35:06 -07:00
Brian Anderson
2124839cd7
Hide unused variable warnings in stdtest::treemap
2011-10-04 21:35:06 -07:00
Brian Anderson
6f5a0c7500
Add std::fs::normalize
2011-10-04 21:22:03 -07:00
Brian Anderson
51ae30287b
Add std::fs::split
2011-10-04 20:18:04 -07:00
Brian Anderson
b5bb42acfb
XFAIL run-fail/linked-failure4. Deadlocks on mac
2011-10-03 14:46:52 -07:00
Brian Anderson
3a6f3cf275
Move compiletest to src/ and cleanup build rules
2011-10-02 17:28:59 -07:00
Brian Anderson
196cc6de2e
Teach compiletest to construct the PATH variable correctly on win32
2011-09-29 22:58:34 -07:00
Marijn Haverbeke
d946e09a72
Move closure construction over to DPS style
...
Issue #667
2011-09-29 10:36:40 +02:00
Brian Anderson
e1ba559c03
Test cases for #985
...
Other restrictions on pinned kinds happened to fix this
Closes #985
2011-09-28 15:35:21 -07:00
Brian Anderson
cb4e99b688
Don't allow vectors of pinned kinds
...
Vectors of pinned kinds can't be safe because most interesting uses of vector
perform copies
2011-09-28 15:35:21 -07:00
Brian Anderson
14bac217b0
Make error patterns in some kind tests more specific
2011-09-28 15:35:21 -07:00
Brian Anderson
657e3ffaf5
xfail-fast run-pass/alt-range.rs
2011-09-28 12:46:29 -07:00
Brian Anderson
381205b747
Revert "Revert "Implement pattern ranges for all numeric types.""
...
This reverts commit a034f87146
.
Conflicts:
src/comp/middle/check_alt.rs
src/comp/middle/trans_alt.rs
src/comp/syntax/ast.rs
src/comp/syntax/ast_util.rs
src/comp/syntax/fold.rs
src/comp/syntax/print/pprust.rs
Conflicts:
src/comp/middle/trans_alt.rs
2011-09-28 12:46:29 -07:00
Wade Mealing
f375391cb6
Patch to error instead of crashing when parsing unmatched double quotes
...
Patch to error and fail instead of using all available memory
then crashing to detect the error condition of an unmatched
double quote before the end of a file.
I couldn't get it to show nice error messages, so this may not be
the ideal fix.
A test case for this situation has also been added.
2011-09-27 23:20:31 -07:00
Brian Anderson
a96b16e8c3
Make it again possible to initialize resource locals via assignment
...
Some special cases allow both 'let a <- my_resource(x)' and
'let a = my_resource(x)' to work as expected despite ostensibly being
copies and moves.
2011-09-27 23:20:27 -07:00
Brian Anderson
459353e107
Prevent copies of resources into various things
2011-09-27 21:50:07 -07:00
Brian Anderson
8217e4bd38
Add xfailed tests that resources can't be copied into various things
2011-09-27 16:03:10 -07:00
Brian Anderson
b8bb663df7
Don't ever raise unique kinds of pinned kinds to shared (again)
...
So *resource, ~resource, [resource] are all pinned. This is counter to the
design of the kind system, but this way is a much clearer path to type safety.
Once we've established a good baseline with lots of tests, then we can try to
make raising pinned kinds work.
2011-09-27 16:03:10 -07:00
Brian Anderson
1097463d96
Add an xfailed test for bogus deep copying of things containing resources
2011-09-27 14:28:20 -07:00
Brian Anderson
4bffa5e13a
Add an xfailed test for bogus vector addition of typarams
2011-09-27 14:24:28 -07:00
Jesse Ruderman
923aa4744e
Test for #924
2011-09-27 11:05:16 -07:00
Brian Anderson
b49f4689f5
Add two xfailed tests for invalid copies into vectors
2011-09-26 23:45:51 -07:00
Brian Anderson
1796abc3ef
xfail-win32 -> xfail-fast
2011-09-26 23:34:54 -07:00
Brian Anderson
4f2a0117c7
Try to appease windows by xfail-win32'ing a random test
2011-09-26 23:34:12 -07:00
Brian Anderson
df19b7a13a
Test for issue #980
2011-09-26 23:24:53 -07:00
Brian Anderson
6b42ad5ea0
Enforce copy restrictions on let initializers
2011-09-26 22:00:15 -07:00
Brian Anderson
07e13fe447
Make some nocopy tests a bit more futureproof
...
Turn the let assignment initializers into move initializers since
that assignment is going to become illegal
2011-09-26 22:00:15 -07:00
Brian Anderson
3778b6c6a8
Prevent copying of uncopyable things via the copy op
2011-09-26 20:03:30 -07:00
Brian Anderson
755001725a
Prevent copying of uncopyable things via compound assignment ops
2011-09-26 20:03:24 -07:00
Brian Anderson
99cbea51a1
Don't allow vectors of pinned kinds to be copied
2011-09-26 19:57:00 -07:00
Brian Anderson
4bee452221
Don't allow copying of unique boxes of pinned kinds
...
Issue #409
2011-09-26 18:43:49 -07:00
Brian Anderson
2d5e085eb9
Add a test that unique boxes in vectors are copied when the vector is
...
Issue #409
2011-09-26 17:59:58 -07:00
Patrick Walton
5c973142df
rt: Turn on cycle collection at task death; add a test case
2011-09-26 16:59:15 -07:00
Brian Anderson
389852b5c0
Fix tags of unique boxes
...
Issue #409
2011-09-26 14:44:08 -07:00
Brian Anderson
223f5be166
Unique vectors and boxes of pinned are unique kinds. Closes #977
2011-09-26 13:38:46 -07:00
Patrick Walton
37cf7b92c8
test: Fix more typos in weird-exprs.rs.
2011-09-26 10:26:30 -07:00
Patrick Walton
2348858995
test: wierd-exprs -> weird-exprs
2011-09-26 10:24:46 -07:00
Jesse Ruderman
798b3531a6
Enable hammertime
2011-09-25 21:13:52 -07:00
Jesse Ruderman
73898351d2
Test for #973
2011-09-25 21:01:50 -07:00
Jesse Ruderman
60ec49b121
Test for #942
2011-09-25 20:57:44 -07:00
Jesse Ruderman
56410b2fb6
Remove FIXME test that's covered by run-pass/unreachable-code.rs
2011-09-25 20:56:19 -07:00
Brian Anderson
98db2febd3
Handle ~fail. Closes #968
2011-09-24 23:52:22 -07:00
Brian Anderson
895674b6eb
Add a test for assignment of unique boxes of generics
...
Closes #976
Issue #409
2011-09-24 21:31:28 -07:00
Brian Anderson
4f7ecce7d1
Support non-immediates in trans_uniq::copy_val
...
Issue #409
2011-09-24 21:28:58 -07:00
Jesse Ruderman
0125532106
Don't iloop (future-proof test against improved reachability computations)
2011-09-24 16:13:32 -07:00
Jesse Ruderman
c29f1af17e
Remove irrelevant parts of test
2011-09-24 16:11:50 -07:00
Brian Anderson
9029416e28
Tweak random thing to make windows build succeed. Awesome.
...
So, a recent commit made syntax-extension-fmt fail under check-fast.
This commit disables lots-a-fail under check-fast and voila! *grumble*
2011-09-24 14:44:42 -07:00
Brian Anderson
e804352de4
Move a previous run-pass test for kind-lowered unique boxes to compile-fail
...
This test tries to swap unique boxes containing resources, which is not
allowed.
Issue #409
2011-09-24 12:36:51 -07:00
Brian Anderson
c5877450e6
Tweak the type allocated for unique pointers
...
Seems to be more correctish...
Issue #409
2011-09-24 12:36:51 -07:00
Brian Anderson
777a536313
Support non-immediates in unique-box type glue
...
Issue #409
2011-09-24 12:36:51 -07:00
Brian Anderson
856acbf66d
Vectors containing pinned kinds become pinned
...
Otherwise they could be copied
2011-09-24 12:36:51 -07:00
Brian Anderson
e5d5682065
Unique pointers containing pinned kinds become pinned
...
Issue #409
2011-09-24 12:36:51 -07:00
Brian Anderson
97629727b1
Add tests for swapping unique boxes
...
Issue #409
2011-09-24 12:36:50 -07:00
Jesse Ruderman
3a7a2943dd
Add vec::filter
2011-09-23 19:10:48 -07:00
Brian Anderson
d8f6e9f237
Add let destructuring for unique boxes
...
Issue #409
2011-09-23 16:12:04 -07:00
Brian Anderson
122f714fde
Add missing case for pat_uniq to syntax::visit
...
Issue #409
2011-09-23 16:03:35 -07:00
Brian Anderson
27972a6def
Add two tests for sending unique boxes across channels
...
Issue #409
2011-09-23 15:32:31 -07:00
Brian Anderson
68512f2d9d
Actually use unique boxes in run-fail/unwind-unique
2011-09-23 15:23:44 -07:00
Brian Anderson
18b01d5cfe
Create a bunch of test cases for unique boxes by copying box tests
...
XFAIL the ones that don't work
Issue #409
2011-09-23 15:15:30 -07:00
Brian Anderson
2082f67765
Begin to support pattern matching on unique boxes
...
Issue #409
2011-09-23 15:15:30 -07:00
Jesse Ruderman
7b1a3bb8e6
Add more unreachable-code tests. Closes #935
2011-09-23 15:01:19 -07:00
Brian Anderson
d10d23f0ad
xfail-win32 linked-failure and send-iloop
2011-09-23 12:30:36 -07:00
Marijn Haverbeke
5310cf4f30
xfail-pretty unreachable-code.rs
2011-09-23 11:33:27 +02:00
Marijn Haverbeke
420484579d
Better handling of unreachable code in trans
...
The builder functions in trans_build now look at an 'unreachable' flag
in the block context and don't generate code (returning undefined
placeholder values) when this flag is set. Threading the unreachable
flag through context still requires some care, but this seems a more
sane approach than re-checking for terminated blocks throughout the
compiler.
When creating a block, if you use its closest dominator as parent, the
flag will be automatically passed through. If you can't do that,
because the dominator is a scope block that you're trying to get out
of, you'll have to do something like this to explicitly pass on the
flag:
if bcx.unreachable { Unreachable(next_cx); }
Closes #949 . Closes #946 . Closes #942 . Closes #895 . Closes #894 .
Closes #892 . Closes #957 . Closes #958 .
2011-09-23 11:09:57 +02:00
Brian Anderson
93b9574d32
Remove deprecated mutable type constructor from run-pass/issue-511
...
This was triggering a warning that was making the pretty-print test fail
2011-09-22 23:08:59 -07:00
Brian Anderson
cee7b4caee
Add test for issue #511 . Closes #511
2011-09-22 22:50:12 -07:00
Brian Anderson
33dd7cc854
Add a test for negative constants. Closes #358
2011-09-22 21:59:09 -07:00
Brian Anderson
0e5f76a718
Fix ty_uniq case in maybe_auto_unbox
...
Closes #961
Issue #409
2011-09-22 18:14:18 -07:00
Brian Anderson
1a48023a79
Add take glue for unique boxes
...
Closes #962
Issue #409
2011-09-22 18:05:36 -07:00
Brian Anderson
f628003da6
Adda test for returning unique boxes
...
Issue #409
2011-09-22 17:00:53 -07:00
Brian Anderson
7a76323459
Allow vectors to contain unique boxes. Closes #952
...
Issue #409
2011-09-22 17:00:53 -07:00
Brian Anderson
dfa5bd1114
XFAIL task-comm
2011-09-22 16:09:10 -07:00
Brian Anderson
30a4eab380
Autoderef indexes and fields of unique boxes
...
Issue #409
2011-09-22 16:06:25 -07:00
Brian Anderson
dff4986f9e
Add tests for moving unique boxes
...
Issue #409
2011-09-22 15:43:08 -07:00
Brian Anderson
d174d917e2
Calculate the correct kind for unique boxes
...
Issue #409
2011-09-22 15:28:49 -07:00
Brian Anderson
61a14f3df0
Add a test for mutable references to unique boxes as function arguments
...
Issue #409
2011-09-22 15:03:44 -07:00
Brian Anderson
1367f2b63e
Add a test for unique boxes as fn args
...
Issue #409
2011-09-22 14:55:08 -07:00
Brian Anderson
3bb7035914
Add a test for unique boxes containing shared boxes
...
Issue #409
2011-09-22 14:39:57 -07:00
Brian Anderson
3f41563cc9
Drop the previous value when copying one unique box local to another
...
Issue #409
2011-09-22 13:53:34 -07:00
Brian Anderson
7c4fe10f02
Add a test that assignment of unique boxes to locals does a copy
...
Issue #409
2011-09-22 13:53:34 -07:00
Brian Anderson
67bac873e0
Add assignment to unique box locals
...
Issue #409
2011-09-22 13:53:33 -07:00
Brian Anderson
268a9fe5fb
Initialize unique box locals from other locals
...
Issue #409
2011-09-22 13:53:33 -07:00
Brian Anderson
f6ab12a3b1
Don't unify unique boxes with different mutability
...
Issue #409
2011-09-22 11:10:48 -07:00
Brian Anderson
5ab0840353
XFAIL spawnfail and task-comm-15
2011-09-22 11:06:26 -07:00
Brian Anderson
ea67099234
Add support for mutable unique boxes
...
Issue #409
2011-09-22 10:26:34 -07:00
Brian Anderson
4d088bd528
Call drop glue on the thing in a unique box
...
Issue #409
2011-09-22 10:26:34 -07:00
Brian Anderson
a993621e43
Log and compare unique boxes
...
Issue #409
2011-09-21 17:08:40 -07:00
Brian Anderson
92af552956
Add an unwind test for failure during unique box construction
2011-09-21 14:45:08 -07:00
Brian Anderson
2cc01e2ca2
Add ability to deref unique boxes. Make unique boxes immediates.
...
Issue #409
2011-09-21 14:40:55 -07:00
Brian Anderson
956bc69330
Add more unwind tests for failure during construction of allocated things
2011-09-21 14:14:17 -07:00
Marijn Haverbeke
80778f642f
Revert "rustc: Make bottom types immediates. Add a |log ret| testcase. Closes #935."
...
This reverts commit f19ab1ff3c
.
2011-09-21 21:39:31 +02:00
Patrick Walton
f19ab1ff3c
rustc: Make bottom types immediates. Add a |log ret| testcase. Closes #935 .
2011-09-21 10:55:28 -07:00
Marijn Haverbeke
a034f87146
Revert "Implement pattern ranges for all numeric types."
...
This reverts commit ce0f054f9d
.
2011-09-21 18:42:09 +02:00
Marijn Haverbeke
07eb29dbce
Revert "rustc: Make bottom types immediates. Add a |log ret| testcase. Closes #935."
...
This reverts commit e6a84f252a
.
2011-09-21 11:05:54 +02:00
Josh Matthews
ce0f054f9d
Implement pattern ranges for all numeric types.
2011-09-21 09:36:12 +02:00
Patrick Walton
e6a84f252a
rustc: Make bottom types immediates. Add a |log ret| testcase. Closes #935 .
2011-09-20 22:52:26 -07:00
Jesse Ruderman
f7b67944cd
Add another testcase for #910
2011-09-20 20:00:34 -07:00
Brian Anderson
7ae251789c
Make creation of unique boxes work again
...
Issue #409
2011-09-20 17:51:17 -07:00
Brian Anderson
865dcb663d
Parse unique box types
...
Issue #409
2011-09-20 17:51:17 -07:00
Brian Anderson
13f57dfbea
Remove bogus comments from run-pass/task-comm-3
2011-09-20 12:01:48 -07:00
Brian Anderson
a609da7c15
Rehabilitate run-fail/trivial-message2
2011-09-20 11:59:51 -07:00
Brian Anderson
12d7363469
Remove a bogus comment from run-fail/spawnfail
2011-09-20 11:51:15 -07:00
Brian Anderson
e3b1397097
Actually un-xfail task-comm-14
2011-09-20 11:49:13 -07:00
Brian Anderson
c6d460d4e3
Rehabilitate task-comm-14
2011-09-20 11:47:22 -07:00
Brian Anderson
564bdacece
Add an assert to run-fail/unwind-alt
...
Jesse reported not being able to reproduce this without the assert. May have
to do with optimtizations.
2011-09-20 11:26:01 -07:00
Brian Anderson
870117f44e
Zero locals that are inited via alt expressions. Closes #945
2011-09-20 10:28:16 -07:00
Brian Anderson
107f1292eb
Add tests for moving nullary functions
...
I believe this was fixed by marijn recently.
Closes #922
2011-09-19 19:04:33 -07:00
Brian Anderson
91d8e69621
Un-xfail various tests
2011-09-19 18:55:26 -07:00
Brian Anderson
f4a19f800e
Un-xfail-fast run-pass/send-iloop
2011-09-19 18:36:31 -07:00
Brian Anderson
a528614af5
Remove a spurious error pattern from run-pass/linked-failure
2011-09-19 18:25:32 -07:00
Brian Anderson
9371a1ad12
Un-xfail two tests under check-fast
...
Closes #937 . Fixed by majick.
2011-09-19 18:23:34 -07:00
Brian Anderson
7e046edebb
Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2"
...
This reverts commit 5f44a1356e
.
Issue #936
2011-09-19 18:00:41 -07:00
Brian Anderson
facc7fd2ef
Check for the correct exit code on cfail tests. Closes #938
2011-09-19 18:00:17 -07:00
Brian Anderson
7c6630a367
Build tuples in two phases to avoid cleaning up partial tuples
2011-09-19 17:59:53 -07:00
Brian Anderson
9626e2f71f
Register tuple cleanups after the tuple is built
...
Issue #936
2011-09-19 17:59:47 -07:00
Brian Anderson
a18986c1a1
Revert "Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2""
...
This reverts commit 6eabe6f3f4
.
2011-09-19 16:08:17 -07:00
Brian Anderson
7bc282a561
Revert "Check for the correct exit code on cfail tests. Closes #938 "
...
This reverts commit c42401ebbc
.
2011-09-19 16:08:06 -07:00
Brian Anderson
6eabe6f3f4
Revert "xfail some tests that hang (instead of segfaulting) since eafb6789a2"
...
This reverts commit 5f44a1356e
.
Issue #936
2011-09-19 15:45:39 -07:00
Brian Anderson
c42401ebbc
Check for the correct exit code on cfail tests. Closes #938
2011-09-19 15:33:14 -07:00
Brian Anderson
dd1cf63515
Build records in two phases to avoid cleanups on partial records
2011-09-19 14:28:04 -07:00
Brian Anderson
432e931a2a
Don't register record cleanups until the record is built
2011-09-19 14:28:04 -07:00
Marijn Haverbeke
5f44a1356e
xfail some tests that hang (instead of segfaulting) since eafb6789a2
...
See issue #936
2011-09-18 22:13:54 +02:00
Brian Anderson
1002623201
Make move-mode arguments unwind correctly. Closes #939
2011-09-16 14:38:04 -07:00
Marijn Haverbeke
575aae407b
Saner approach to lvalues and callable values in trans
...
LValues no longer carry information about generics and objs, instead
there's an extended form of lvalue, lval_maybe_callee, only used by
call and bind, which holds this info.
This makes it possible to take the value of a method and get a working
closure, and will (with some more work) allow us to call statically
known functions without loading from their pair.
Closes #435
Closes #758
2011-09-16 21:31:36 +02:00
Brian Anderson
679c2d25a1
Un-xfail some task-comm tests
2011-09-16 11:29:40 -07:00
Brian Anderson
4028a099f5
Yield after send
2011-09-16 11:08:01 -07:00
Brian Anderson
25394950ae
Handle the case where a child task tries to kill a parent while it is dying
...
Still looks pretty racy
2011-09-16 10:05:12 -07:00
Marijn Haverbeke
ad470d741e
Revert "Saner approach to lvalues and callable values in trans"
...
This reverts commit 66153436c9
.
2011-09-16 18:37:46 +02:00
Marijn Haverbeke
133d36f452
Require body of else-less if expressions to be a value-less block
...
For consistency with other constructs that could not possibly return a
value (say, loops).
2011-09-16 18:21:06 +02:00
Marijn Haverbeke
66153436c9
Saner approach to lvalues and callable values in trans
...
LValues no longer carry information about generics and objs, instead
there's an extended form of lvalue, lval_maybe_callee, only used by
call and bind, which holds this info.
This makes it possible to take the value of a method and get a working
closure, and will (with some more work) allow us to call statically
known functions without loading from their pair.
Closes #435
Closes #758
2011-09-16 18:21:05 +02:00
Marijn Haverbeke
f8a35234ad
Remove autoderef for calls
...
We were only using it in a single place, and there for no discernable reason
(probably as part of the bare-fn-vals-are-not-copyable plan). It seems more
surprising than useful.
2011-09-16 14:39:30 +02:00
Marijn Haverbeke
d7587c1eda
Change convention for specifying referenced argument
...
It is now 1-based, rather than 0 based. (Seems more natural, and allows 0 to
be used to refer to self and maybe to closure.)
Also allows non-referenced args to be implicitly copied again.
Issue #918
2011-09-16 12:42:18 +02:00
Jesse Ruderman
ce1877dc8e
Add parens, as needed, around else-if conditions.
2011-09-15 21:24:24 -07:00
Brian Anderson
906f1fc425
Add regression tests for previously ambiguous syntactic forms
2011-09-15 08:47:23 -07:00
Marijn Haverbeke
b843cf2117
Generalize expression roots in alias analysis
...
This allows calls-returning-a-reference to count as expression roots,
making it possible to return the result of such a call by reference.
Issue #918
2011-09-15 17:01:35 +02:00
Marijn Haverbeke
29177864c3
Add tests for returning by reference
...
Issue #918
2011-09-15 16:37:37 +02:00
Marijn Haverbeke
3798b6f780
Remove maybe_protect_block kludge from pretty-printer
...
It is no longer needed.
2011-09-15 10:14:52 +02:00
Marijn Haverbeke
7298b8f4ba
Insert omitted semicolons for statements
2011-09-15 09:49:00 +02:00
Brian Anderson
2bed548d1b
xfail-fast run-pass/linked-failure.rs. Not sure what the problem is.
2011-09-14 17:47:48 -07:00
Brian Anderson
a0ad9a42cd
Unsupervise tasks before the scheduler kills them. Unblock before yield->fail
2011-09-14 17:05:35 -07:00
Brian Anderson
69eda46af8
Add a run-pass test for linked failure
2011-09-14 15:51:46 -07:00
Brian Anderson
103197bc42
Make failure propagation to dead parents work
...
The failure will basically go 'through' the dead parent and continue
propagating the failure (as if the child was reparented).
2011-09-14 15:48:14 -07:00
Brian Anderson
9505d70513
Make linked task failure work again
2011-09-14 14:20:41 -07:00
Brian Anderson
ad2bdbee08
Add another XFAILed test for failing destructors
2011-09-14 10:59:17 -07:00
Brian Anderson
ca0d3cae5c
Add another unwind test
...
This makes sure that cleanups added after the first invoke in a scope are
actually run on unwind
2011-09-14 09:21:28 -07:00
Josh Matthews
f6fe07d1f3
Add support for negative literals.
2011-09-14 00:47:14 -04:00
Michael Sullivan
c84b8e90b8
Print something when we can't figure out a tag name. Mitigates #876 .
2011-09-13 13:14:49 -04:00
Marijn Haverbeke
bc62b17543
Ensure that the declared type and actual type of a constant agree
...
Closes #899
2011-09-13 16:29:23 +02:00
Marijn Haverbeke
be5537e95f
Be more strict about what constitutes a block expression
...
Blocks (or statements involving blocks) that end in a semicolon are no
longer considered the block-expression of their outer block. This used
to be an expression block, but now is a statement block:
{ if foo { ret 1; } else { ret 10; } }
This helps clear up some ambiguities in our grammar.
2011-09-13 15:50:03 +02:00
Marijn Haverbeke
2f402343c9
Make for loop alias-safe
2011-09-13 13:05:59 +02:00
Marijn Haverbeke
3e92f90952
Apply implicit copying for unsafe references to alt patterns
2011-09-13 12:23:36 +02:00
Brian Anderson
393deeb06f
Merge branch 'unwind'
...
Conflicts:
src/comp/middle/trans.rs
src/comp/middle/trans_build.rs
src/lib/run_program.rs
src/test/compiletest/runtest.rs
2011-09-12 09:36:51 -07:00
Marijn Haverbeke
982a1a4783
Rename alias to reference in docs and error messages
...
Update docs to reflect new approach to aliases
2011-09-12 14:24:46 +02:00
Marijn Haverbeke
8dd46d4384
Properly implement copy expressions
...
(And use them in some places that were doing {expr} before.)
2011-09-12 13:13:20 +02:00
Marijn Haverbeke
ca1df2b111
Pretty-print for new arg-mode syntax
2011-09-12 12:49:00 +02:00
Marijn Haverbeke
fc6b7c8b38
Reformat for new mode syntax, step 1
...
Long lines were fixed in a very crude way, as I'll be following up
with another reformat in a bit.
2011-09-12 12:04:14 +02:00
Marijn Haverbeke
8b7909afd7
Fix tests for new argument-passing convention
2011-09-12 11:07:20 +02:00
Brian Anderson
6ffcfba6b9
XFAIL bench/shootout-nbody
...
This is the only file in the whole codebase that depends on the (broken) llvm
native ABI.
2011-09-11 23:19:05 -07:00
Brian Anderson
cb50e4329a
Add an XFAILed test for native "llvm" modules
...
This functionality is completely broken
2011-09-11 23:14:42 -07:00
Brian Anderson
fda196769a
Actually fail the process when compiletest has a test failure
...
We previously failed by coincidence because of memory leaks.
2011-09-11 21:13:59 -07:00
Brian Anderson
69d6e0d208
Add some more unwind tests
...
They worked without modifications, but I wrote them so we're keeping them.
Issue #236
2011-09-11 17:31:41 -07:00
Brian Anderson
7940382070
XFAIL run-pass/task-comm-15 on win32 again
...
Maybe it works with check-fast, but it stills fails for me
2011-09-11 17:31:41 -07:00
Brian Anderson
be9fe24220
XFAIL some run-pass unwinding tests on win32
...
Curiously, because of some unfortunate interaction between win32 hacks, all the
run-fail unwind tests actually pass (that wouldn't be the case if we were
valgrinding though).
2011-09-11 17:31:40 -07:00
Brian Anderson
d00be1d962
Add the ability to xfail tests by platform
...
We'll use this to xfail some unwinding tests on windows
2011-09-11 17:31:40 -07:00
Brian Anderson
d267e7486e
Zero locals when the initializer might call a function
...
The function might fail, leaving the local uninitialized
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson
0ea55ffdc8
Use a unique exit status when the runtime fails normally
...
Check for it in run-fail tests
2011-09-11 17:31:40 -07:00
Brian Anderson
118194381c
Invoke put functions
...
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson
5b7145a9f4
Add an XFAILed test for failing destructors
...
Issue #236
2011-09-11 17:31:39 -07:00
Brian Anderson
e8a16353ea
Remove the no-valgrind test directive now that unwinding is more worky
...
Issue #236
2011-09-11 17:31:39 -07:00
Brian Anderson
a7c9f817bb
XFAIL run-fail/linked-failure
...
This test is hitting a bug in the runtime that makes it fail incorrectly and
not valgrind-clean
2011-09-11 17:31:39 -07:00
Brian Anderson
f28bbb2f95
Begin valgrinding some run-fail tests that unwind correctly
...
Issue #236
2011-09-11 17:31:39 -07:00
Brian Anderson
f99cf2d62f
Add a number of unwinding tests
...
Issue #236
2011-09-11 17:31:39 -07:00
Brian Anderson
4fba02c7e9
Invoke upcall_fail
...
This allows landing pads to be generated around fail statements
Issue #236
2011-09-11 17:31:38 -07:00
Brian Anderson
4c9eee8aa4
Run cleanups during unwinding
...
Issue #236
2011-09-11 17:31:38 -07:00
Brian Anderson
f1e348ce6a
Change the exit status used for valgrind errors and check for it in tests
2011-09-11 17:31:37 -07:00
Brian Anderson
a1131748c2
Add a waitpid wrapper to std::run that interprets the exit status on unix
...
This makes the result of running a program a little more uniform between unix
and windows
2011-09-11 17:31:34 -07:00
Jesse Ruderman
8e00161819
Make the pretty printer disambiguatae blocks followed by vec expressions.
...
Semicolons are needed here now that postfix [] is used for vec indexing (the syntax change made in rev 518dc52f85
).
2011-09-09 19:47:40 -07:00
Brian Anderson
c337fd5467
Child tasks take a ref to their parents
...
This is so that when a child dies after the parent, it still holds a valid
pointer and can call supervisor->kill() safely.
2011-09-07 10:32:58 -07:00
Tim Chevalier
8ab02f7b21
Forbid blocks from deinitializing upvars
...
Move expressions where the RHS is an upvar are now forbidden within
block expressions.
2011-09-06 15:27:48 -07:00
Brian Anderson
6217ce958e
Print the type of istrs as 'str' in error messages. Issue #855
2011-09-02 22:11:46 -07:00
Brian Anderson
5c49e4f4e9
Reformat. Issue #855
2011-09-02 22:11:42 -07:00
Brian Anderson
72c14d5a41
Eliminate const_refcount. Issue #855
2011-09-02 15:13:41 -07:00
Brian Anderson
99ee0fca67
Remove estrs and evecs from runtime. Issue #855
2011-09-02 15:13:41 -07:00
Patrick Walton
10ea787772
test: Add a test case for linearize_ty_params() and shapes
2011-09-02 10:39:05 -07:00
Brian Anderson
9c173f17c0
Remove lots of estr code from rustc. Issue #855
2011-09-01 23:25:33 -07:00
Brian Anderson
418d09e547
Convert all uses of #ifmt to #fmt. Issue #855
2011-09-01 18:54:03 -07:00
Brian Anderson
6972f07510
Make #fmt and #ifmt synonymous. Issue #855
2011-09-01 17:56:25 -07:00
Brian Anderson
60d0a9227b
Do less work in run-pass/task-comm.rs
...
This test is not important enough to be taking so long
2011-09-01 17:33:39 -07:00
Brian Anderson
ab6bb035e5
Rename std::istr to std::str. Issue #855
2011-09-01 17:27:58 -07:00
Brian Anderson
913667ba25
Fix the error-patterns in 2 cfail tests. Issue #855
2011-09-01 17:19:36 -07:00
Brian Anderson
d8a833dccd
Convert some comm tests to istrs. Issue #855
...
These spawn thunks need to take move-mode strings to be correct
2011-09-01 16:53:53 -07:00
Tim Chevalier
ec763bba9c
Add a test that lambdas can't deinitialize upvars
2011-09-01 16:32:05 -07:00
Brian Anderson
e824775d53
Remove std::str. Issue #855
2011-09-01 16:09:15 -07:00
Brian Anderson
f07a328c16
Convert rust_list_files to istrs. Issue #855
2011-09-01 15:51:47 -07:00
Tim Chevalier
3690f38d79
No, not all fn constraints have the same args as the fn does, in the same order...
...
derp!
Closes #862
2011-09-01 15:41:09 -07:00
Brian Anderson
dabf1be226
Add a benchmark for cross-task kernel memory region synchronization
...
Vectors are allocated from the kernel's memory region, which has some heinous
synchronization. This is a stress test of vector allocation in many tasks.
2011-09-01 14:20:02 -07:00
Brian Anderson
baa1e8790d
Check error code in rust_file_is_dir. Prevent comparison of uninitialized mem
2011-09-01 13:16:44 -07:00
Tim Chevalier
4951bb8bfc
Test for #876
...
This is the test case for #876 . Xfailed for now.
2011-09-01 13:12:59 -07:00
Brian Anderson
91ea2577cd
Remove a few more istr conversions. Issue #855
2011-09-01 12:14:36 -07:00
Brian Anderson
7924368268
Allow istrs as patterns. Issue #855
2011-09-01 12:14:36 -07:00
Brian Anderson
4c25d81041
Remove some uses of str_buf builtin. Issue #855
2011-09-01 12:14:35 -07:00
Brian Anderson
bb56a75343
Convert main functions to istrs. Issue #855
2011-09-01 12:14:35 -07:00
Brian Anderson
3fe743bc9c
Remove various istr conversions. Issue #855
2011-09-01 12:14:34 -07:00
Brian Anderson
5ebe61cdda
Consolidate std::str tests into stdtest::str
2011-09-01 12:14:34 -07:00
Brian Anderson
d0c509ad1b
Remove a bunch of string builtins. Issue #855
2011-09-01 12:14:33 -07:00
Brian Anderson
34d197de97
Remove last users of str::sbuf. Issue #855
2011-09-01 12:14:32 -07:00
Brian Anderson
b714150487
Remove more functions from std::str. Issue #855
2011-09-01 12:14:32 -07:00
Brian Anderson
6b22640a1f
Convert std::test to istrs. Issue #855
2011-09-01 12:14:31 -07:00
Marijn Haverbeke
6ba4eacddf
Make resolve recognize upvars
...
Upvars are now marked with def_upvar throughout, not just when going
through freevars::lookup_def. This makes things less error-prone. One
thing to watch out for is that def_upvar is used in `for each` bodies
too, when they refer to a local outside the body.
2011-09-01 16:32:44 +02:00
Marijn Haverbeke
2d1dec78e7
Move mutability checking into its own pass.
...
Having it in the alias pass was slightly more efficient (finding
expression roots has to be done in both passes), but further muddled
up the already complex alias checker.
Also factors out some duplication in the mutability-checking code.
2011-09-01 16:32:38 +02:00
Brian Anderson
53a9d5a1d2
Start paring down std::str. Issue #855
2011-08-31 16:24:09 -07:00
Brian Anderson
cb55ef6e12
Convert benchmarks to istrs. Issue #855
2011-08-31 16:24:08 -07:00
Michael Sullivan
7c02517f75
Check all paths return properly in blocks. Closes #874 .
2011-08-31 16:15:02 -04:00
Michael Sullivan
722fa00681
Get rid of the hack that ignores () typed things in fn tail position.
...
Closes #868 . Unfortunately, this causes certain invalid programs to
fail type-checking instead of failing type-state when a type-state
error message would probably be more intuitive. (Although, by any
reasonable interpretation of the static semantics, it technically
ought to be a type error.)
2011-08-31 16:01:25 -04:00
Brian Anderson
498e38b705
Convert uses of #fmt to #ifmt. Issue #855
2011-08-31 11:44:06 -07:00
Marijn Haverbeke
6209e844ee
Replace xfail-stageN with simply xfail-test
...
Closes #799
2011-08-31 16:32:16 +02:00
Marijn Haverbeke
66bc014720
Revert "Replace xfail-stageN with simply xfail-test"
...
This reverts commit 574194f6bc
.
2011-08-31 14:24:08 +02:00