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