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
Marijn Haverbeke
574194f6bc
Replace xfail-stageN with simply xfail-test
...
Closes #799
2011-08-31 13:43:09 +02:00
Brian Anderson
be2ad97a61
Allow main to take istrs. Issue #855
2011-08-30 23:57:09 -07:00
Brian Anderson
4007006574
Convert compiletest to istrs. Issue #855
2011-08-30 21:08:07 -07:00
Brian Anderson
eb70267e5e
Convert #env to istrs. Temporarily disable usage in rustc. Issue #855
2011-08-30 21:08:07 -07:00
Brian Anderson
c94d4cff03
Convert std::net to istrs. Issue #855
2011-08-30 21:08:07 -07:00
Brian Anderson
0abec867c3
Support istrs as fail argument. Issue #855
2011-08-30 21:08:07 -07:00
Brian Anderson
4c936d7992
Add #ifmt extension, like #fmt but for istrs. Issue #855
2011-08-30 21:08:07 -07:00
Brian Anderson
9e2c5f77a4
Remove the %S istr conversion from #fmt
...
I want to do the #fmt transition a different way. Issue #855
2011-08-30 21:08:07 -07:00
Tim Chevalier
6d8bb3ce29
Un-xfail zip-same-length
...
There was a type error that was getting reported poorly. Fixed it.
(Now to figure out why the error was reported so poorly...)
2011-08-30 17:19:13 -07:00
Tim Chevalier
4fc72c2130
XFAIL zip-same-length -- that's ok, since it's a new test
2011-08-30 16:43:12 -07:00
Tim Chevalier
819b00079c
Library test cases for vec::zip
2011-08-30 16:42:32 -07:00
Tim Chevalier
268533a920
Add a precondition on vec::zip
...
vec::zip now has the precondition that the two argument vectors
are the same length. Changed uses of it to reflect that.
Also added a few vector-enumerating utilities to vec.rs, which
necessitated in making some functions in u8 declared-pure.
2011-08-30 16:39:22 -07:00
Tim Chevalier
d37e8cfc67
Test that fn preconditions get typechecked
2011-08-30 16:39:17 -07:00
Marijn Haverbeke
c9c5ee252a
Implement non-internal ivecs
...
Vectors are now similar to our old, pre-internal vectors, except that
they are uniquely owned, not refcounted.
Their name should probably change too, then. I've renamed them to vec
in the runtime, will do so throughout the compiler later.
2011-08-29 09:07:53 +02:00
Brian Anderson
138973335a
Add std::istr::as_buf for converting to cstrs. Issue #855
2011-08-27 15:54:44 -07:00
Brian Anderson
7284f820d5
Support istrs in #fmt. Issue #855
...
The format string may be an istr and istr args may be used with %S
2011-08-27 15:54:44 -07:00
Brian Anderson
652332f9d4
Convert std::map::new_str_hash to istrs. Issue #855
2011-08-27 15:54:44 -07:00
Brian Anderson
15e3ae7936
Convert std::os to istrs. Issue #855
2011-08-27 15:54:44 -07:00
Brian Anderson
85b4253bc1
Convert std::generic_os to istrs. Issue #855
2011-08-27 15:54:43 -07:00
Brian Anderson
ccc68fc18b
Add std::istr::str_from_cstr. Issue #855
2011-08-27 15:54:43 -07:00
Brian Anderson
fcc031c5b4
Convert std::io to istrs. Issue #855
2011-08-27 15:54:43 -07:00
Brian Anderson
20178b9312
Convert std::run to istrs. Issue #855
2011-08-27 15:53:09 -07:00
Brian Anderson
4cf2e510e0
Convert std::getopts to istrs. Issue #855
2011-08-27 15:53:09 -07:00
Brian Anderson
3a5f4e7a74
Convert the task-comm parts of compiletest to istrs. Issue #855
...
This reduces the amount of voodoo in compiletest considerably.
2011-08-27 15:53:09 -07:00
Brian Anderson
c2eafd268b
Convert std::fs to istrs. Issue #855
2011-08-27 15:53:09 -07:00
Brian Anderson
051f1ff562
Convert std::sha1 to istrs. Issue #855
2011-08-27 15:53:09 -07:00
Brian Anderson
8146ca982e
Convert std::u64 to istrs. Issue #855
2011-08-27 15:53:08 -07:00
Brian Anderson
53be480d20
Convert std::int to istrs. Issue #855
2011-08-27 15:53:08 -07:00
Brian Anderson
ee2a11eb4f
Convert std::uint to istrs. Issue #855
2011-08-27 15:53:08 -07:00
Eric Holk
640886ceb6
Polymorphic MapReduce!
2011-08-26 18:03:33 -07:00
Eric Holk
5c0cc474be
stdlib: more test cases for treemap.
2011-08-26 18:03:32 -07:00
Eric Holk
2fab948e01
stdlib: Added a treemap traversal function.
2011-08-26 18:03:32 -07:00
Eric Holk
cd913b454d
stdlib: Added an incredibly simple treemap.
2011-08-26 18:03:32 -07:00
Eric Holk
45cac8a95f
Adding a test case to make sure spawning polymorphic functions works.
2011-08-26 16:31:14 -07:00
Tim Chevalier
844e2d7d1c
Test case for checks on pattern-bound vars
2011-08-26 00:46:53 -07:00
Tim Chevalier
809a833e34
Test case for unchecked blocks
2011-08-25 18:33:57 -07:00
Tim Chevalier
d9bc3cb10c
Change "pred" to "pure fn" in all libraries and test cases
2011-08-25 18:24:45 -07:00
Tim Chevalier
e241f2996d
Allow pure fns to have any return type
2011-08-25 17:23:35 -07:00
Eric Holk
2f7c583bc1
Cleaning up task and comm exports, updating all the test cases.
2011-08-25 11:21:25 -07:00
Brian Anderson
b31815f8a0
Fix istr::unsafe_from_bytes. Issue #855
2011-08-25 10:33:28 -07:00
Brian Anderson
5b5689d4dd
Test that processes that are supposed to fail return a non-zero status
2011-08-24 13:24:03 -07:00
Brian Anderson
65357eeecc
XFAIL task-comm-2. Doesn't work under windows
2011-08-24 12:03:08 -07:00
Brian Anderson
18576e55f7
Resolve a number of FIXMEs
2011-08-23 18:55:37 -07:00
Brian Anderson
c1f2394245
Zero locals with initializers that may break or terminate. Closes #787
2011-08-23 16:29:21 -07:00
Graydon Hoare
c011f13144
Add kind-checking for assign-op, copy, ret, be, fail exprs. Fix caught kinding-violations in rustc and libstd.
2011-08-23 15:58:53 -07:00
Brian Anderson
a3c8d4a5a5
Recheck the while loop contition after continuing. Closes #825
2011-08-23 14:51:22 -07:00
Brian Anderson
c274d16b7f
Eliminate unused variable warnings in stdtest
2011-08-22 21:33:52 -07:00
Brian Anderson
663d07d319
Add std::istr. Issue #855
2011-08-22 21:33:49 -07:00
Brian Anderson
d6e4fa6b44
Teach rustc to append istrs. Issue #855
2011-08-22 17:40:06 -07:00
Brian Anderson
3ab86fb79e
Teach rustc to add istrs. Issue #855
2011-08-22 16:39:18 -07:00
Brian Anderson
aae212727d
Encode the istr shape correctly. Issue #855
2011-08-22 16:12:42 -07:00
Brian Anderson
6841f3827a
Fix ivec self-append. Closes #816
2011-08-22 15:04:28 -07:00
Brian Anderson
0f1f5e67ea
Create correct drop glue for istrs. Issue #855
2011-08-22 14:34:55 -07:00
Brian Anderson
fd8ca2cf5d
Translate istr literals. Issue #855
2011-08-22 14:34:36 -07:00
Brian Anderson
3a5bfae9d9
Silence unused variable warnings in compiletest
2011-08-22 11:00:43 -07:00
Marijn Haverbeke
7d08678b74
Implement pattern guards
...
The syntax is
alt x {
mypat where mycond { ... }
}
The condition may refer to any of the variables bound by the pattern.
When a guard fails, pattern-matching continues with the next pattern.
Closes #857
2011-08-22 17:49:31 +02:00
Marijn Haverbeke
42864377a4
Remove silly restriction on passing type params by alias
...
Since they are now passed by pointer, this is no longer a problem
2011-08-22 14:06:20 +02:00
Marijn Haverbeke
b24f978011
Drop arguments on the caller side, not the callee
...
This makes it easier for the caller to optimize the take/drop away for
temporary values, and opens up new possibilities for alias handling.
Breaks tail calls.
2011-08-22 10:16:09 +02:00
Brian Anderson
abdb6cd71b
Rewrite reap_dead_tasks to never grab the sched lock before a task lock
...
Doing so contradicts the locking order used everywhere else and causes
deadlocks.
Un-XFAIL task-perf-spawnalot
Closes #854
2011-08-20 16:21:27 -07:00
Brian Anderson
15e456d547
Convert task-perf-spawnalot to spawn_joinable. XFAIL
2011-08-20 13:02:53 -07:00
Brian Anderson
bc1b6b594b
Stop parsing ~[] vector syntax
2011-08-20 11:04:00 -07:00
Brian Anderson
518dc52f85
Reformat
...
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Brian Anderson
7053b6010a
Parse x[y] as indexes
2011-08-19 12:50:05 -07:00
Michael Sullivan
a7e559ee2e
Fix polymorphic iterators. Closes #829 .
2011-08-19 11:54:46 -07:00
Brian Anderson
cc2ebbec92
Pretty-print constrained types correctly
2011-08-19 10:16:39 -07:00
Brian Anderson
09e21fe2b9
Pretty-print parens around more things that need disambiguation
...
Ridiculous stuff like (ret 0) == (log "error")
2011-08-19 10:16:38 -07:00
Brian Anderson
8327416411
Teach the pretty-printer to disambiguate 'if ret { }' et. al
2011-08-19 10:16:38 -07:00
Brian Anderson
664b0ad3fc
Add some tests for expression corner cases, mostly involving ret and fail
...
Some of these don't actually work.
2011-08-19 10:16:38 -07:00
Brian Anderson
d681f062c7
Clean up run-pass/fun-call-variants
...
Uncomment parts of the test that work correctly now, enable pretty testing
2011-08-19 10:16:38 -07:00
Brian Anderson
a0ca1ac1bc
Remove xfail-pretty directives from working tests
2011-08-19 10:16:38 -07:00
Brian Anderson
22c8eebc48
Add a comment about our single use of no-reformat
2011-08-19 10:16:38 -07:00
Brian Anderson
113be53df3
Do better at preserving blank lines during pretty-printing
2011-08-19 10:16:38 -07:00
Brian Anderson
8c3ed8640b
Don't pretty-print extra blank lines after anon object methods
2011-08-19 10:16:38 -07:00
Brian Anderson
b02f1f46e5
Don't pretty-print trailing whitespace for blank lines inside block comments
2011-08-18 19:22:10 -07:00
Brian Anderson
84fb821e40
Try harder to disambig blocks followed by various exprs in pprust. Closes #840
...
As it turns out, it's not just unops we need to worry about. Also tuples and
anything that requires parens.
2011-08-18 18:53:36 -07:00
Tim Chevalier
d81d86440f
Handle sequential let semantics properly in typestate
...
Closes #824
2011-08-18 17:21:55 -07:00
Graydon Hoare
e8bcca2829
Kill another case of a spurious blank line. Closes #809 .
2011-08-18 17:02:23 -07:00
Michael Sullivan
0a00fab249
Fix task-comm-15 type errors and un-xfail.
2011-08-18 16:13:03 -07:00
Brian Anderson
f5ce3bf15d
More misc ivec->vec renaming
2011-08-18 15:01:49 -07:00
Brian Anderson
1aa1f8c4b7
Rename various things from ivec to vec
2011-08-18 14:32:25 -07:00
Brian Anderson
53eb4a3025
Pretty-print ivecs as []
2011-08-18 13:09:00 -07:00
Eric Holk
3ab21e5ee0
Better type inference for chans and ports.
2011-08-17 17:16:23 -07:00
Tim Chevalier
f023f82090
Track arguments in typestate
...
Add the infrastructure for arguments -- as well as local vars --
to be deinitialized with move-mode calls. Address Issue #819
2011-08-17 17:15:46 -07:00
Brian Anderson
df10df821b
Remove last mentions of vec<> type in Rust source
2011-08-17 16:08:17 -07:00
Brian Anderson
ad598ebea0
Use the new task join methods in the test runner. Closes #826
...
It should report failures properly again
2011-08-17 15:34:54 -07:00
Brian Anderson
deef212bf7
Move some test setup from runtest to compiletest
2011-08-17 15:11:17 -07:00
Eric Holk
9e020b8b8f
Convenience methods for spawning and joining tasks.
2011-08-17 15:07:19 -07:00
Eric Holk
efac7c9a19
Yet another comm interface.
2011-08-17 14:42:40 -07:00
Eric Holk
94260fb91d
Using move-mode for spawn thunks to avoid race conditions.
2011-08-17 11:44:50 -07:00
Brian Anderson
bfbe8870d7
Refactor import lookup in middle:resolve
...
Issue #817
2011-08-17 11:05:04 -07:00
Brian Anderson
cd54e77720
Allow multiple imports in a single statement
...
Like so: import foo::{bar, baz};
Issue #817
2011-08-17 11:04:56 -07:00
Brian Anderson
c4ce463f37
Add compile-fail tests for malformed glob imports
2011-08-17 11:04:05 -07:00
Brian Anderson
67cc5b9e34
Allow multiple exports in a single export statement. Issue #817
2011-08-17 11:04:05 -07:00
Eric Holk
fc616af820
Updating to new type parameter syntax.
2011-08-16 16:52:52 -07:00
Eric Holk
8686645aad
New channel-based task status notifications.
2011-08-16 16:47:40 -07:00
Erick Tryzelaar
b3eba15271
Port the tests to the expr foo::<T> syntax.
2011-08-16 15:05:57 -07:00
Erick Tryzelaar
3520499544
Port the tests to the decl foo<T> syntax.
2011-08-16 15:05:56 -07:00
Erick Tryzelaar
21f46a1655
Port the tests to the typaram foo<T> syntax.
2011-08-16 15:05:56 -07:00
Brian Anderson
2f61848b24
Add pp test for interleaving comments through vectors. Closes #679
2011-08-16 11:39:04 -07:00
Brian Anderson
f05a91a0dc
Rename std::ivec to std::vec
2011-08-16 10:36:19 -07:00