Brian Anderson
4a347760ed
Run test functions in isolated tasks. Issue #428
...
Each test is run in its own task so that the failure can be trapped and the
test runner can continue. The easiest way to get the test functions into tasks
currently is by treating them as unsafe pointers.
2011-07-15 10:07:32 -07:00
Brian Anderson
7d475530a0
Remove task_unsupervise from rt builtin functions
...
This was an exact duplicate of the unsupervise function
2011-07-15 10:07:32 -07:00
Brian Anderson
ced8393f20
Modify task::join to indicate how the task terminated
...
This involves sticking yet another field into the task structure
2011-07-15 10:07:29 -07:00
Brian Anderson
d9cc4cb81b
Revert "Add fuzzer as part of 'all' standard build target so people know when it breaks."
...
Try to put out windows tinderbox. The librustc build rules don't seem to work
there yet.
This reverts commit ce6a77e24e
.
2011-07-14 19:42:12 -07:00
Brian Anderson
f634ab45bc
Add task_unsupervise to rustrt.def.in
2011-07-14 19:14:36 -07:00
Brian Anderson
ed6f9bb677
Add tests for unsupervise
2011-07-14 18:50:22 -07:00
Brian Anderson
c99e110119
Modify upcall_fail so that failing tasks relinquish control to the scheduler
...
This is sufficient to let unsupervised tasks that don't allocate fail without
crashing or leaking.
2011-07-14 18:49:18 -07:00
Brian Anderson
01a52d728c
Add an unsupervise builtin and function to std::task
...
Calling task::unsupervise de-parents the current task, with the result
that failures do not propogate up the task tree.
2011-07-14 17:56:59 -07:00
Brian Anderson
4738cf83b0
Move the responsibility for process failure from tasks to the scheduler
...
When the root task fails the process fails. Failures on other tasks propagate
up the task tree. Failures on non-root tasks without parents just
(theoretically) unwind and disappear.
2011-07-14 17:44:39 -07:00
Eric Holk
827e300485
refactor: Move the task and communication-related translation functions to a new module.
2011-07-14 17:33:28 -07:00
Graydon Hoare
ce6a77e24e
Add fuzzer as part of 'all' standard build target so people know when it breaks.
2011-07-14 17:27:37 -07:00
Graydon Hoare
37b879bdf7
Fix fuzzer to compile with ivec-ized pp module.
2011-07-14 17:27:36 -07:00
Michael Sullivan
e9a6fc94d5
Make collect_upvars know about function args.
...
Closes #697 .
2011-07-14 19:18:56 -05:00
Michael Sullivan
a3301f74f9
Generalize collect_upvars to work over any type of ast node.
2011-07-14 19:18:56 -05:00
Brian Anderson
20e94de392
Add a flag to run ignored tests. Issue #428
2011-07-14 17:13:12 -07:00
Brian Anderson
81acf69f97
Add head and tail functions to std::ivec
...
They even have typestate preconditions
2011-07-14 17:13:12 -07:00
Brian Anderson
139aaa1616
Add is_empty, is_not_empty preds to std::ivec
2011-07-14 17:13:12 -07:00
Eric Holk
8afb1a7c63
refactor: Move the LLVM type and constant constructors into a new module.
2011-07-14 17:08:45 -07:00
Michael Sullivan
e2fcd29bbd
Consolidate some arguments in typeck by just passing the record they came from.
2011-07-14 18:45:55 -05:00
Michael Sullivan
53c4cb6a2f
Factor out build_environment's code to find a variable in a function context.
2011-07-14 18:45:02 -05:00
Michael Sullivan
759317ca8b
Factor out closure construction from trans_for_each.
2011-07-14 18:45:01 -05:00
Michael Sullivan
0957525cc6
Fix array out of bounds index in load_environment.
...
Closes #696 .
2011-07-14 18:34:43 -05:00
Patrick Walton
1a6419bd73
rustc: Move metadata::encoder over to interior vectors
2011-07-14 15:39:35 -07:00
Brian Anderson
b3dee95514
Add a facility for ignoring tests. Issue #428
...
Adding the #[ignore] attribute will cause the test not to be run, though it
will still show up in the list of tests.
2011-07-14 13:51:30 -07:00
Graydon Hoare
49da7da441
Fix long line.
2011-07-14 12:55:17 -07:00
Rafael Ávila de Espíndola
c124a025bf
Move rustc to the new llvm type system. Requires an update to llvm trunk.
2011-07-14 15:19:17 -04:00
Patrick Walton
be489ee9e2
rustc: Move much of metadata reading over to interior vectors
2011-07-14 12:00:48 -07:00
Patrick Walton
4664b67ea2
snap: Register new snapshots
2011-07-14 11:54:35 -07:00
Patrick Walton
e76f44453b
rustc: First stab at interior string literals, untested as of yet
2011-07-14 11:47:20 -07:00
Brian Anderson
4038010bc6
The test runner's main returns unit, not int. Issue #428
...
The appropriate way to indicate failure from main is to fail.
2011-07-14 10:51:38 -07:00
Brian Anderson
f4beac4a43
Revert "Allow main to return int"
...
This reverts commit 8c94d8fd54
.
There's no mechanism to actually return the value from main, so all this does
is allow main -> int to compile. Per #688 , the program returns non-zero on
failure, so it's not obvious that this change is appropriate at this time.
2011-07-14 10:37:28 -07:00
Brian Anderson
fc67dddb9b
XFAIL some tests in stage 0
2011-07-14 10:27:02 -07:00
Brian Anderson
8d2706cca8
Flag --test implies '--cfg test'. Issue #428
...
So certain code can be conditionally compiled only when building for testing
2011-07-14 10:27:02 -07:00
Rafael Ávila de Espíndola
7376e751ae
Keep a pointer to rust_object_type.
2011-07-14 12:07:51 -04:00
Rafael Ávila de Espíndola
40f617390d
Main part of the type system rewrite:
...
Change the type of all objects to be { {}*, {}* }.
2011-07-14 00:34:45 -04:00
Brian Anderson
8c94d8fd54
Allow main to return int
2011-07-13 19:22:53 -07:00
Tim Chevalier
f26ca025de
Make resolve and the typechecker check for a main fn of the
...
correct type
This means if a non-library program leaves out the main program,
the error gets caught earlier than link.
Closes #626 .
2011-07-13 18:30:53 -07:00
Patrick Walton
196753e4c3
rustc: Remove some interior vectors from ty, except the ones that I think were causing crashes before
2011-07-13 17:39:33 -07:00
Rafael Ávila de Espíndola
c94fc7aad8
Small cleanups that were missing in the last patch.
2011-07-13 20:21:17 -04:00
Graydon Hoare
b9635df6fe
Slight enhancements to round-trip code (run kdiff3 on mismatch, remove hard-wired input dir)
2011-07-13 17:15:31 -07:00
Jesse Ruderman
7885bdc575
Add issue numbers
2011-07-13 17:15:31 -07:00
Jesse Ruderman
156458b3f6
Fuzzer: test round trips through the pretty printer and parser
2011-07-13 17:15:31 -07:00
Rafael Ávila de Espíndola
9036758191
Next step in the type system change. Add task_type to the context.
2011-07-13 20:07:16 -04:00
Patrick Walton
2a3ab10f20
rustc: Remove exterior vectors from resolve again
...
This reverts commit 6390c43dc4
.
2011-07-13 16:44:39 -07:00
Rafael Ávila de Espíndola
3d353f76a9
First step in the typesystem rewrite:
...
Create the typedesc type in one place. That is where it will be named.
2011-07-13 19:37:19 -04:00
Graydon Hoare
39151f2ad8
Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.
2011-07-13 15:44:09 -07:00
Tim Chevalier
04b239f3cb
Use more precise spans in error messages for bad FRU exprs
...
The type error message for an expression using FRU where a field
expression had the wrong type was using the span for the entire
expression. Fixed it to use the span for the individual field.
Closes #628 .
2011-07-13 15:30:30 -07:00
Tim Chevalier
6b86dcde67
Add test case from issue #675 . The previous fix actually fixes this too.
2011-07-13 15:04:29 -07:00
Tim Chevalier
5e1a6dac44
Parse nullary ret correctly
...
ret is similar to fail: if not followed by an expression, it
should be parsed as a ret without an argument. The old version would
fail if ret was followed by a close paren (for example). Fixed it.
Closes #676 .
2011-07-13 15:00:59 -07:00
Tim Chevalier
0c913e63d9
Add some missing cases to token::can_begin_expr
2011-07-13 15:00:23 -07:00