Commit Graph

4331 Commits

Author SHA1 Message Date
Brian Anderson
4828d8f73f Remove unused procsrv::clone function from compiletest 2011-08-02 10:39:12 -07:00
Brian Anderson
291c43af31 Fix comment typo in compiletest 2011-08-02 10:39:12 -07:00
Brian Anderson
39d3b93a38 Pretty-print tests only run on .rs files. Issue #789
The pretty-printer can't handle .rc files currently
2011-08-02 10:39:12 -07:00
Brian Anderson
4e8ab8b3a8 Introduce pretty-print testing mode to compiletest. Issue #789 2011-08-02 10:39:12 -07:00
Brian Anderson
af2eecdabe Replace an open-coded conversion with ivec::from_vec 2011-08-02 10:39:12 -07:00
Brian Anderson
a8af13e784 Move compiletest modules into separate files 2011-08-02 10:39:12 -07:00
Brian Anderson
840a09c86e Add a --no-trans command line option
Runs all passes before translation. This will be used for pretty-printing
tests to verify that the results are still probably valid Rust code.
2011-08-02 10:39:12 -07:00
Brian Anderson
5f4b7e1ba7 Compiler accepts input from stdin when source file is called "-" 2011-08-02 10:39:09 -07:00
Marijn Haverbeke
2d5b651f49 Assign collection element ty to loop local tvar when checking loops
This makes the type declarationg for the loop variable optional in
most cases.

Closes #790
2011-08-02 15:09:29 +02:00
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