Commit Graph

5174 Commits

Author SHA1 Message Date
Brian Anderson
c047cfb710 Unwind the stack on task failure
When a task fails, we will throw an exception, then catch it at the bottom of
the stack.

On Windows we don't do this yet because the exception doesn't propagate
correctly.

No cleanups yet.

Issue #236
2011-09-07 10:32:58 -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
Brian Anderson
25ae3d655c Rewrite spawn yet again
The motivation here is that the bottom of each stack needs to contain a C++
try/catch block so that we can unwind. This is already the case for main, but
not spawned tasks.

Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson
1bd627039e Begin compiling with exceptions enabled
Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson
bb08ffbaf4 Refactor task failure a bit
Issue #236
2011-09-07 10:32:58 -07:00
Marijn Haverbeke
1339d05434 Work around destructuring bug 2011-09-07 17:01:46 +02:00
Marijn Haverbeke
f3edf8dd5e Make it possible to take the value of (and bind) native fns
Closes #820
2011-09-07 12:12:20 +02: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
Tim Chevalier
efed843b1a Merge remote-tracking branch 'graydon/master' 2011-09-06 15:27:45 -07:00
Patrick Walton
d3e8887d3c rt: Implement poison-on-free, for debugging memory issues 2011-09-06 14:15:01 -07:00
Tim Chevalier
5f061591ac Merge remote-tracking branch 'graydon/master' 2011-09-06 12:19:51 -07:00
Brian Anderson
23210a3293 Remove unused runtime functions. Issue #855 2011-09-03 00:50:57 -07:00
Brian Anderson
470eb3a58b Register new snapshots 2011-09-03 00:47:11 -07:00
Brian Anderson
1b67d211b4 Add a rust_str typedef to the runtime. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson
01b254b411 Rename istr-stuff to str in the runtime. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson
a1d71995ec Rename istr-stuff to str in rustc. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson
f1555e2ca8 Rename ty_istr to ty_str. Issue #855 2011-09-02 22:11:46 -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
b16457627c Stop parsing transitional istr forms. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson
c8fba11bd3 Remove transitional code from combine-tests.py. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson
5c49e4f4e9 Reformat. Issue #855 2011-09-02 22:11:42 -07:00
Tim Chevalier
c7bd3f695b Merge remote-tracking branch 'graydon/master' 2011-09-02 19:44:18 -07:00
Tim Chevalier
b5f9053423 Add a constraint to trans::type_of
trans::type_of now has a constraint saying that its type argument
is statically sized. This eliminates the "impossible happened" case
in type_of. Yay!

I note that this change decreased translation time for stage2/rustc
from 16.1 s to 14.0 s. I also think many of the remaining checks
could be eliminated with some mildly clever use of constrained types
and further preconditions. Future work!
2011-09-02 19:35:17 -07:00
Patrick Walton
07691e725a rustc: Zero out unique pointers after we drop them 2011-09-02 19:33:52 -07:00
Tim Chevalier
bdd0417cec Handle if-check with no else correctly in typestate
Propagate the if-check constraint into the consequent even when
there's no else branch. (Oops!)
2011-09-02 19:05:27 -07:00
Patrick Walton
b329324f71 rustc: Zero out unique pointers after we drop them 2011-09-02 17:51:28 -07:00
Brian Anderson
477c1bf6e1 Remove rustc::syntax::untyped_ast. Dead code 2011-09-02 16:40:59 -07:00
Brian Anderson
1e8200dadd Rename std::vec::unsafe::ivec_repr to vec_repr. Issue #855 2011-09-02 15:13:41 -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
e68f687179 rustc: Root values spilled via do_spill() 2011-09-02 15:12:27 -07:00
Patrick Walton
00470fef12 rt: Remove evecs from the shape code 2011-09-02 10:49:03 -07:00
Patrick Walton
10ea787772 test: Add a test case for linearize_ty_params() and shapes 2011-09-02 10:39:05 -07:00
Patrick Walton
670b60f027 rustc: Make the shape-emitting code aware of linearized type parameters 2011-09-02 10:27:08 -07:00
Marijn Haverbeke
785c26f7f4 Rename ivecs to vecs in the compiler 2011-09-02 16:09:41 +02:00
Marijn Haverbeke
a0e2809f54 Remove remaining evec support from trans 2011-09-02 15:56:59 +02:00
Brian Anderson
9c173f17c0 Remove lots of estr code from rustc. Issue #855 2011-09-01 23:25:33 -07:00
Brian Anderson
1d3eb4911a Remove #ifmt. Issue #855 2011-09-01 18:54:06 -07:00
Brian Anderson
418d09e547 Convert all uses of #ifmt to #fmt. Issue #855 2011-09-01 18:54:03 -07:00
Brian Anderson
b4b81117ce Register new snapshots 2011-09-01 18:42:46 -07:00
Brian Anderson
6972f07510 Make #fmt and #ifmt synonymous. Issue #855 2011-09-01 17:56:25 -07:00
Brian Anderson
fc45eb785a Use #env to get the rustc version again. Issue #855 2011-09-01 17:49:39 -07:00
Tim Chevalier
786963d33d Add a constraint in trans
Experimenting with adding typestate constraints in the compiler.
Added a constraint to GEP_tag that says the variant index is in
bounds. Added necessary checks.
2011-09-01 17:41:10 -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
e35c021aa4 Parse "",str as istrs. Pretty print istrs as "",str. Issue #855 2011-09-01 16:53:53 -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
e412652f00 Make GEP_tag take a uint instead of an int
Seems to make more sense and avoids the need for some casts.
2011-09-01 16:32:05 -07:00
Tim Chevalier
1f4f8d317c Declare a bunch of int functions as pure 2011-09-01 16:32:05 -07:00