Marijn Haverbeke
78a0d380cc
Do not try to save block result when the block is an iter body
...
Closes #791
2011-08-02 14:28:32 +02:00
Marijn Haverbeke
6c9b90d06a
Be a little more clever about picking columns to match on in trans_alt
...
This should result in slightly more efficient matching of 'complex'
patterns with multiple discriminants in them.
2011-08-02 12:57:27 +02:00
Marijn Haverbeke
f8fa574864
Copy locals created by destructuring on the content of a box
...
This is required so that assigning to these locals doesn't clobber
the content of the box.
(A possible optimization would be to only do this copying for
locals that actually are assigned to.)
2011-08-02 12:09:15 +02:00
Marijn Haverbeke
043d95a2bd
Move ppaux::ty_to_str to new record syntax
2011-08-02 12:09:15 +02:00
Marijn Haverbeke
8d8ff16dfe
Improve handling of bottom type in alt arms
2011-08-02 10:24:06 +02:00
Tim Chevalier
5cf5f5024d
Handle bang functions correctly in typestate
...
The logic for how the "returns" constraint was handled was always
dodgy, for reasons explained in the comments I added to
auxiliary::fn_info in this commit. Fixed it by adding distinct
"returns" and "diverges" constraints for each function, which
are both handled positively (that is: for a ! function, the
"diverges" constraint must be true on every exit path; for
any other function, the "returns" constraint must be true
on every exit path).
Closes #779
2011-08-01 20:58:16 -07:00
Brian Anderson
c9b16ac4c2
Add std::str::is_whitespace
2011-08-01 18:55:51 -07:00
Brian Anderson
1ad68eafd2
Add std::str::trim/trim_left/trim_right
2011-08-01 18:55:51 -07:00
Brian Anderson
598e25e091
Add std::char_slice
2011-08-01 18:55:51 -07:00
Brian Anderson
0c7a95fde5
Add std::char::is_whitespace
2011-08-01 18:55:51 -07:00
Brian Anderson
6f8f00d1af
Add std::char module
2011-08-01 18:55:51 -07:00
Paul Stansifer
fcc32797de
Fix incorrect uses of str::buf()
2011-08-01 18:51:56 -07:00
Eric Holk
286be2d94e
Adding an intrinsic for recv.
2011-08-01 18:43:05 -07:00
Brian Anderson
2f7ed33517
Ignore whitespace in argument lists in compiletest
...
Makes testing work with DEBUG=1
2011-08-01 16:41:20 -07:00
Eric Holk
939bca0d84
Added send and receive to comm library.
2011-08-01 15:58:39 -07:00
Eric Holk
6a6d5c669e
Enabling logging in circular_buffer again.
2011-08-01 15:58:39 -07:00
Eric Holk
b3d9d9b73c
Objectified library chans and ports.
2011-08-01 15:58:30 -07:00
Eric Holk
5a673cc2c9
Started working on a library-based comm system. Creating and deleting ports work.
2011-08-01 15:58:30 -07:00
Michael Sullivan
7a05f1db7c
Fix closures over dynamically-sized polymorphic values.
2011-08-01 15:19:55 -07:00
Michael Sullivan
601c299d52
Fix closures over known-size polymorphic values.
2011-08-01 15:18:44 -07:00
Michael Sullivan
a32f287c8a
Add a GEPi function that wraps GEP with integer arguments.
2011-08-01 15:18:44 -07:00
Brian Anderson
7b87fa3683
Replace a lock/unlock with scoped_lock in rust_scheduler::create_task
2011-08-01 11:01:59 -07:00
Marijn Haverbeke
4837a57df5
Add tests for destructuring locals
2011-08-01 17:52:43 +02:00
Marijn Haverbeke
92240eb25b
Add check for irrefutable patterns in destructuring locals
2011-08-01 17:52:43 +02:00
Marijn Haverbeke
985c32ef4c
Partially implement destructuring locals
...
You can now say
let {bcx, val} = some_result_returner();
Similar for loop variables. Assigning to such variables is not safe
yet. Function arguments also remain a TODO.
2011-08-01 17:51:37 +02:00
Marijn Haverbeke
48ec25da42
Get rid of walk.rs
...
And we're down to a single AST walker again
2011-07-31 12:24:14 +02:00
Marijn Haverbeke
c7ef6d2866
Stop using walk.rs in the fuzzer
2011-07-31 12:23:42 +02:00
Tim Chevalier
2971cfb145
Remove unused imports
2011-07-31 00:06:25 -07:00
Tim Chevalier
28f7c6af24
Change bitvectors::relax_precond_block to use visit instead of walk
2011-07-31 00:06:25 -07:00
Brian Anderson
d552a0b959
Minimize scheduler locking on task creation
...
This takes my CPU utilization on task-perf-spawnalot from 35% to 55%
2011-07-29 23:02:51 -07:00
Brian Anderson
ec46f07e6e
Add a task spawning benchmark
...
This is the kind of workload that the test runner generates - lots of tiny
little tasks - and currently it leaves the CPU underutilized.
2011-07-29 22:45:01 -07:00
Brian Anderson
6657e729de
Lock the new task's scheduler when creating a task
...
Previously we were locking the spawning task's scheduler. I couldn't
see that that was protecting anything. The newborn_task list in the new task's
scheduler though was unprotected from concurrent access. So now we're locking
the new task's scheduler.
2011-07-29 22:43:11 -07:00
Brian Anderson
96a629d2fa
Base test concurrency on the number of scheduler threads.
...
Ideally we would just spawn every test and collect the results but I'm not
entirely comfortable doing that yet for reasons that I'm too tired to remember
right now. Urgh.
2011-07-29 21:07:03 -07:00
Brian Anderson
9dbe6941c4
Add sched_threads rt function to get the number of scheduler threads
2011-07-29 21:03:17 -07:00
Brian Anderson
b8c209cba1
Refactor std::test
...
Separate the console output from the running of tests
2011-07-29 19:54:05 -07:00
Brian Anderson
4e6bb137fe
Enable build targets to run tests at stage0
...
This allows quicker turnaround for testing the standard library, since you
don't have to wait for the stage1 compiler every time.
2011-07-29 19:03:17 -07:00
Brian Anderson
9a995b0d25
Fix a typo in tests.mk that was building stdtest with the wrong compiler
2011-07-29 19:03:17 -07:00
Eric Holk
d1dbb99984
Removing proxies and message queues.
2011-07-29 18:54:59 -07:00
Graydon Hoare
bc4e9afe25
Fix bug in typechecker counting occurrences of typarams in instantiation rather than checking formals list.
2011-07-29 18:48:15 -07:00
Graydon Hoare
0c9b749d20
Enable kind checking on typarams, fix kind constraints in library and comp.
2011-07-29 18:48:15 -07:00
Lindsey Kuper
6ba4e34959
Reduced test case for current backwarding bug.
...
Still working on getting backwarding to play nicely with self and
overriding. Currently can't fix issue #702 without breaking how self
and overriding interact.
2011-07-29 18:30:27 -07:00
Michael Sullivan
a34f7c8cb3
Switch the heap build and load environment functions to use GEP_tup_like.
2011-07-29 18:22:41 -07:00
Michael Sullivan
56f0fbeafc
Initial trans of lambdas. Doesn't work with polymorphism yet.
2011-07-29 18:22:41 -07:00
Tim Chevalier
766e939857
Test case for previous commit
2011-07-29 18:00:10 -07:00
Tim Chevalier
126cd44c38
Refactor typestate code involving stmt_decls
...
To handle multiple-LHS declarations with initializers properly,
I changed seq_states to take a list of expressions paired with optional
names, not just a list of expressions. Then, the same logic that handles
ordered lists of subexpressions everywhere else can handle multi-
declarations.
2011-07-29 18:00:10 -07:00
Graydon Hoare
59c441a66a
Encode, decode, and thread through typechecking all the param kinds, not just the counts.
2011-07-29 16:40:30 -07:00
Michael Sullivan
a684f6078f
Do some cleanup in load_environment.
2011-07-29 15:29:38 -07:00
Michael Sullivan
6a4d0ce829
Add in some missing cases for typestate with closures.
2011-07-29 15:29:38 -07:00
Lindsey Kuper
7efbad674a
Don't confuse backwards and forwards.
...
Oops. If we already have a backwarding vtable, that means that we are
currently building a forwarding fn. (Progress toward issue #702.)
2011-07-29 15:21:40 -07:00
Lindsey Kuper
6423cc7b52
Comments and cleanup, in preparation for more work on issue #702 .
2011-07-29 15:21:40 -07:00