Commit Graph

1369 Commits

Author SHA1 Message Date
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