Commit graph

1390 commits

Author SHA1 Message Date
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
Brian Anderson
a1131748c2 Add a waitpid wrapper to std::run that interprets the exit status on unix
This makes the result of running a program a little more uniform between unix
and windows
2011-09-11 17:31:34 -07:00
Jesse Ruderman
8e00161819 Make the pretty printer disambiguatae blocks followed by vec expressions.
Semicolons are needed here now that postfix [] is used for vec indexing (the syntax change made in rev 518dc52f85).
2011-09-09 19:47:40 -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
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
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
5c49e4f4e9 Reformat. Issue #855 2011-09-02 22:11:42 -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
10ea787772 test: Add a test case for linearize_ty_params() and shapes 2011-09-02 10:39:05 -07:00
Brian Anderson
9c173f17c0 Remove lots of estr code from rustc. Issue #855 2011-09-01 23:25:33 -07:00
Brian Anderson
418d09e547 Convert all uses of #ifmt to #fmt. Issue #855 2011-09-01 18:54:03 -07:00
Brian Anderson
6972f07510 Make #fmt and #ifmt synonymous. Issue #855 2011-09-01 17:56:25 -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
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
ec763bba9c Add a test that lambdas can't deinitialize upvars 2011-09-01 16:32:05 -07:00
Brian Anderson
e824775d53 Remove std::str. Issue #855 2011-09-01 16:09:15 -07:00
Brian Anderson
f07a328c16 Convert rust_list_files to istrs. Issue #855 2011-09-01 15:51:47 -07:00
Tim Chevalier
3690f38d79 No, not all fn constraints have the same args as the fn does, in the same order...
derp!

Closes #862
2011-09-01 15:41:09 -07:00
Brian Anderson
dabf1be226 Add a benchmark for cross-task kernel memory region synchronization
Vectors are allocated from the kernel's memory region, which has some heinous
synchronization. This is a stress test of vector allocation in many tasks.
2011-09-01 14:20:02 -07:00
Brian Anderson
baa1e8790d Check error code in rust_file_is_dir. Prevent comparison of uninitialized mem 2011-09-01 13:16:44 -07:00
Tim Chevalier
4951bb8bfc Test for #876
This is the test case for #876. Xfailed for now.
2011-09-01 13:12:59 -07:00
Brian Anderson
91ea2577cd Remove a few more istr conversions. Issue #855 2011-09-01 12:14:36 -07:00
Brian Anderson
7924368268 Allow istrs as patterns. Issue #855 2011-09-01 12:14:36 -07:00
Brian Anderson
4c25d81041 Remove some uses of str_buf builtin. Issue #855 2011-09-01 12:14:35 -07:00
Brian Anderson
bb56a75343 Convert main functions to istrs. Issue #855 2011-09-01 12:14:35 -07:00
Brian Anderson
3fe743bc9c Remove various istr conversions. Issue #855 2011-09-01 12:14:34 -07:00
Brian Anderson
5ebe61cdda Consolidate std::str tests into stdtest::str 2011-09-01 12:14:34 -07:00
Brian Anderson
d0c509ad1b Remove a bunch of string builtins. Issue #855 2011-09-01 12:14:33 -07:00
Brian Anderson
34d197de97 Remove last users of str::sbuf. Issue #855 2011-09-01 12:14:32 -07:00
Brian Anderson
b714150487 Remove more functions from std::str. Issue #855 2011-09-01 12:14:32 -07:00
Brian Anderson
6b22640a1f Convert std::test to istrs. Issue #855 2011-09-01 12:14:31 -07:00
Marijn Haverbeke
6ba4eacddf Make resolve recognize upvars
Upvars are now marked with def_upvar throughout, not just when going
through freevars::lookup_def. This makes things less error-prone. One
thing to watch out for is that def_upvar is used in `for each` bodies
too, when they refer to a local outside the body.
2011-09-01 16:32:44 +02:00
Marijn Haverbeke
2d1dec78e7 Move mutability checking into its own pass.
Having it in the alias pass was slightly more efficient (finding
expression roots has to be done in both passes), but further muddled
up the already complex alias checker.

Also factors out some duplication in the mutability-checking code.
2011-09-01 16:32:38 +02:00
Brian Anderson
53a9d5a1d2 Start paring down std::str. Issue #855 2011-08-31 16:24:09 -07:00
Brian Anderson
cb55ef6e12 Convert benchmarks to istrs. Issue #855 2011-08-31 16:24:08 -07:00
Michael Sullivan
7c02517f75 Check all paths return properly in blocks. Closes #874. 2011-08-31 16:15:02 -04:00
Michael Sullivan
722fa00681 Get rid of the hack that ignores () typed things in fn tail position.
Closes #868. Unfortunately, this causes certain invalid programs to
fail type-checking instead of failing type-state when a type-state
error message would probably be more intuitive. (Although, by any
reasonable interpretation of the static semantics, it technically
ought to be a type error.)
2011-08-31 16:01:25 -04:00
Brian Anderson
498e38b705 Convert uses of #fmt to #ifmt. Issue #855 2011-08-31 11:44:06 -07:00
Marijn Haverbeke
6209e844ee Replace xfail-stageN with simply xfail-test
Closes #799
2011-08-31 16:32:16 +02:00
Marijn Haverbeke
66bc014720 Revert "Replace xfail-stageN with simply xfail-test"
This reverts commit 574194f6bc.
2011-08-31 14:24:08 +02:00
Marijn Haverbeke
574194f6bc Replace xfail-stageN with simply xfail-test
Closes #799
2011-08-31 13:43:09 +02:00
Brian Anderson
be2ad97a61 Allow main to take istrs. Issue #855 2011-08-30 23:57:09 -07:00
Brian Anderson
4007006574 Convert compiletest to istrs. Issue #855 2011-08-30 21:08:07 -07:00
Brian Anderson
eb70267e5e Convert #env to istrs. Temporarily disable usage in rustc. Issue #855 2011-08-30 21:08:07 -07:00
Brian Anderson
c94d4cff03 Convert std::net to istrs. Issue #855 2011-08-30 21:08:07 -07:00
Brian Anderson
0abec867c3 Support istrs as fail argument. Issue #855 2011-08-30 21:08:07 -07:00
Brian Anderson
4c936d7992 Add #ifmt extension, like #fmt but for istrs. Issue #855 2011-08-30 21:08:07 -07:00
Brian Anderson
9e2c5f77a4 Remove the %S istr conversion from #fmt
I want to do the #fmt transition a different way. Issue #855
2011-08-30 21:08:07 -07:00
Tim Chevalier
6d8bb3ce29 Un-xfail zip-same-length
There was a type error that was getting reported poorly. Fixed it.
(Now to figure out why the error was reported so poorly...)
2011-08-30 17:19:13 -07:00
Tim Chevalier
4fc72c2130 XFAIL zip-same-length -- that's ok, since it's a new test 2011-08-30 16:43:12 -07:00
Tim Chevalier
819b00079c Library test cases for vec::zip 2011-08-30 16:42:32 -07:00
Tim Chevalier
268533a920 Add a precondition on vec::zip
vec::zip now has the precondition that the two argument vectors
are the same length. Changed uses of it to reflect that.

Also added a few vector-enumerating utilities to vec.rs, which
necessitated in making some functions in u8 declared-pure.
2011-08-30 16:39:22 -07:00
Tim Chevalier
d37e8cfc67 Test that fn preconditions get typechecked 2011-08-30 16:39:17 -07:00
Marijn Haverbeke
c9c5ee252a Implement non-internal ivecs
Vectors are now similar to our old, pre-internal vectors, except that
they are uniquely owned, not refcounted.

Their name should probably change too, then. I've renamed them to vec
in the runtime, will do so throughout the compiler later.
2011-08-29 09:07:53 +02:00
Brian Anderson
138973335a Add std::istr::as_buf for converting to cstrs. Issue #855 2011-08-27 15:54:44 -07:00
Brian Anderson
7284f820d5 Support istrs in #fmt. Issue #855
The format string may be an istr and istr args may be used with %S
2011-08-27 15:54:44 -07:00
Brian Anderson
652332f9d4 Convert std::map::new_str_hash to istrs. Issue #855 2011-08-27 15:54:44 -07:00
Brian Anderson
15e3ae7936 Convert std::os to istrs. Issue #855 2011-08-27 15:54:44 -07:00
Brian Anderson
85b4253bc1 Convert std::generic_os to istrs. Issue #855 2011-08-27 15:54:43 -07:00
Brian Anderson
ccc68fc18b Add std::istr::str_from_cstr. Issue #855 2011-08-27 15:54:43 -07:00
Brian Anderson
fcc031c5b4 Convert std::io to istrs. Issue #855 2011-08-27 15:54:43 -07:00
Brian Anderson
20178b9312 Convert std::run to istrs. Issue #855 2011-08-27 15:53:09 -07:00
Brian Anderson
4cf2e510e0 Convert std::getopts to istrs. Issue #855 2011-08-27 15:53:09 -07:00
Brian Anderson
3a5f4e7a74 Convert the task-comm parts of compiletest to istrs. Issue #855
This reduces the amount of voodoo in compiletest considerably.
2011-08-27 15:53:09 -07:00
Brian Anderson
c2eafd268b Convert std::fs to istrs. Issue #855 2011-08-27 15:53:09 -07:00
Brian Anderson
051f1ff562 Convert std::sha1 to istrs. Issue #855 2011-08-27 15:53:09 -07:00
Brian Anderson
8146ca982e Convert std::u64 to istrs. Issue #855 2011-08-27 15:53:08 -07:00
Brian Anderson
53be480d20 Convert std::int to istrs. Issue #855 2011-08-27 15:53:08 -07:00
Brian Anderson
ee2a11eb4f Convert std::uint to istrs. Issue #855 2011-08-27 15:53:08 -07:00
Eric Holk
640886ceb6 Polymorphic MapReduce! 2011-08-26 18:03:33 -07:00
Eric Holk
5c0cc474be stdlib: more test cases for treemap. 2011-08-26 18:03:32 -07:00
Eric Holk
2fab948e01 stdlib: Added a treemap traversal function. 2011-08-26 18:03:32 -07:00
Eric Holk
cd913b454d stdlib: Added an incredibly simple treemap. 2011-08-26 18:03:32 -07:00
Eric Holk
45cac8a95f Adding a test case to make sure spawning polymorphic functions works. 2011-08-26 16:31:14 -07:00
Tim Chevalier
844e2d7d1c Test case for checks on pattern-bound vars 2011-08-26 00:46:53 -07:00
Tim Chevalier
809a833e34 Test case for unchecked blocks 2011-08-25 18:33:57 -07:00
Tim Chevalier
d9bc3cb10c Change "pred" to "pure fn" in all libraries and test cases 2011-08-25 18:24:45 -07:00
Tim Chevalier
e241f2996d Allow pure fns to have any return type 2011-08-25 17:23:35 -07:00
Eric Holk
2f7c583bc1 Cleaning up task and comm exports, updating all the test cases. 2011-08-25 11:21:25 -07:00
Brian Anderson
b31815f8a0 Fix istr::unsafe_from_bytes. Issue #855 2011-08-25 10:33:28 -07:00
Brian Anderson
5b5689d4dd Test that processes that are supposed to fail return a non-zero status 2011-08-24 13:24:03 -07:00
Brian Anderson
65357eeecc XFAIL task-comm-2. Doesn't work under windows 2011-08-24 12:03:08 -07:00
Brian Anderson
18576e55f7 Resolve a number of FIXMEs 2011-08-23 18:55:37 -07:00
Brian Anderson
c1f2394245 Zero locals with initializers that may break or terminate. Closes #787 2011-08-23 16:29:21 -07:00
Graydon Hoare
c011f13144 Add kind-checking for assign-op, copy, ret, be, fail exprs. Fix caught kinding-violations in rustc and libstd. 2011-08-23 15:58:53 -07:00
Brian Anderson
a3c8d4a5a5 Recheck the while loop contition after continuing. Closes #825 2011-08-23 14:51:22 -07:00
Brian Anderson
c274d16b7f Eliminate unused variable warnings in stdtest 2011-08-22 21:33:52 -07:00
Brian Anderson
663d07d319 Add std::istr. Issue #855 2011-08-22 21:33:49 -07:00
Brian Anderson
d6e4fa6b44 Teach rustc to append istrs. Issue #855 2011-08-22 17:40:06 -07:00
Brian Anderson
3ab86fb79e Teach rustc to add istrs. Issue #855 2011-08-22 16:39:18 -07:00
Brian Anderson
aae212727d Encode the istr shape correctly. Issue #855 2011-08-22 16:12:42 -07:00
Brian Anderson
6841f3827a Fix ivec self-append. Closes #816 2011-08-22 15:04:28 -07:00
Brian Anderson
0f1f5e67ea Create correct drop glue for istrs. Issue #855 2011-08-22 14:34:55 -07:00
Brian Anderson
fd8ca2cf5d Translate istr literals. Issue #855 2011-08-22 14:34:36 -07:00
Brian Anderson
3a5bfae9d9 Silence unused variable warnings in compiletest 2011-08-22 11:00:43 -07:00
Marijn Haverbeke
7d08678b74 Implement pattern guards
The syntax is

    alt x {
        mypat where mycond { ... }
    }

The condition may refer to any of the variables bound by the pattern.
When a guard fails, pattern-matching continues with the next pattern.

Closes #857
2011-08-22 17:49:31 +02:00
Marijn Haverbeke
42864377a4 Remove silly restriction on passing type params by alias
Since they are now passed by pointer, this is no longer a problem
2011-08-22 14:06:20 +02:00
Marijn Haverbeke
b24f978011 Drop arguments on the caller side, not the callee
This makes it easier for the caller to optimize the take/drop away for
temporary values, and opens up new possibilities for alias handling.

Breaks tail calls.
2011-08-22 10:16:09 +02:00
Brian Anderson
abdb6cd71b Rewrite reap_dead_tasks to never grab the sched lock before a task lock
Doing so contradicts the locking order used everywhere else and causes
deadlocks.

Un-XFAIL task-perf-spawnalot

Closes #854
2011-08-20 16:21:27 -07:00
Brian Anderson
15e456d547 Convert task-perf-spawnalot to spawn_joinable. XFAIL 2011-08-20 13:02:53 -07:00
Brian Anderson
bc1b6b594b Stop parsing ~[] vector syntax 2011-08-20 11:04:00 -07:00
Brian Anderson
518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00
Brian Anderson
7053b6010a Parse x[y] as indexes 2011-08-19 12:50:05 -07:00
Michael Sullivan
a7e559ee2e Fix polymorphic iterators. Closes #829. 2011-08-19 11:54:46 -07:00
Brian Anderson
cc2ebbec92 Pretty-print constrained types correctly 2011-08-19 10:16:39 -07:00
Brian Anderson
09e21fe2b9 Pretty-print parens around more things that need disambiguation
Ridiculous stuff like (ret 0) == (log "error")
2011-08-19 10:16:38 -07:00
Brian Anderson
8327416411 Teach the pretty-printer to disambiguate 'if ret { }' et. al 2011-08-19 10:16:38 -07:00
Brian Anderson
664b0ad3fc Add some tests for expression corner cases, mostly involving ret and fail
Some of these don't actually work.
2011-08-19 10:16:38 -07:00
Brian Anderson
d681f062c7 Clean up run-pass/fun-call-variants
Uncomment parts of the test that work correctly now, enable pretty testing
2011-08-19 10:16:38 -07:00
Brian Anderson
a0ca1ac1bc Remove xfail-pretty directives from working tests 2011-08-19 10:16:38 -07:00
Brian Anderson
22c8eebc48 Add a comment about our single use of no-reformat 2011-08-19 10:16:38 -07:00
Brian Anderson
113be53df3 Do better at preserving blank lines during pretty-printing 2011-08-19 10:16:38 -07:00
Brian Anderson
8c3ed8640b Don't pretty-print extra blank lines after anon object methods 2011-08-19 10:16:38 -07:00
Brian Anderson
b02f1f46e5 Don't pretty-print trailing whitespace for blank lines inside block comments 2011-08-18 19:22:10 -07:00
Brian Anderson
84fb821e40 Try harder to disambig blocks followed by various exprs in pprust. Closes #840
As it turns out, it's not just unops we need to worry about. Also tuples and
anything that requires parens.
2011-08-18 18:53:36 -07:00
Tim Chevalier
d81d86440f Handle sequential let semantics properly in typestate
Closes #824
2011-08-18 17:21:55 -07:00
Graydon Hoare
e8bcca2829 Kill another case of a spurious blank line. Closes #809. 2011-08-18 17:02:23 -07:00
Michael Sullivan
0a00fab249 Fix task-comm-15 type errors and un-xfail. 2011-08-18 16:13:03 -07:00
Brian Anderson
f5ce3bf15d More misc ivec->vec renaming 2011-08-18 15:01:49 -07:00
Brian Anderson
1aa1f8c4b7 Rename various things from ivec to vec 2011-08-18 14:32:25 -07:00
Brian Anderson
53eb4a3025 Pretty-print ivecs as [] 2011-08-18 13:09:00 -07:00
Eric Holk
3ab21e5ee0 Better type inference for chans and ports. 2011-08-17 17:16:23 -07:00
Tim Chevalier
f023f82090 Track arguments in typestate
Add the infrastructure for arguments -- as well as local vars --
to be deinitialized with move-mode calls. Address Issue #819
2011-08-17 17:15:46 -07:00
Brian Anderson
df10df821b Remove last mentions of vec<> type in Rust source 2011-08-17 16:08:17 -07:00
Brian Anderson
ad598ebea0 Use the new task join methods in the test runner. Closes #826
It should report failures properly again
2011-08-17 15:34:54 -07:00
Brian Anderson
deef212bf7 Move some test setup from runtest to compiletest 2011-08-17 15:11:17 -07:00
Eric Holk
9e020b8b8f Convenience methods for spawning and joining tasks. 2011-08-17 15:07:19 -07:00
Eric Holk
efac7c9a19 Yet another comm interface. 2011-08-17 14:42:40 -07:00
Eric Holk
94260fb91d Using move-mode for spawn thunks to avoid race conditions. 2011-08-17 11:44:50 -07:00
Brian Anderson
bfbe8870d7 Refactor import lookup in middle:resolve
Issue #817
2011-08-17 11:05:04 -07:00
Brian Anderson
cd54e77720 Allow multiple imports in a single statement
Like so: import foo::{bar, baz};

Issue #817
2011-08-17 11:04:56 -07:00
Brian Anderson
c4ce463f37 Add compile-fail tests for malformed glob imports 2011-08-17 11:04:05 -07:00
Brian Anderson
67cc5b9e34 Allow multiple exports in a single export statement. Issue #817 2011-08-17 11:04:05 -07:00
Eric Holk
fc616af820 Updating to new type parameter syntax. 2011-08-16 16:52:52 -07:00
Eric Holk
8686645aad New channel-based task status notifications. 2011-08-16 16:47:40 -07:00
Erick Tryzelaar
b3eba15271 Port the tests to the expr foo::<T> syntax. 2011-08-16 15:05:57 -07:00
Erick Tryzelaar
3520499544 Port the tests to the decl foo<T> syntax. 2011-08-16 15:05:56 -07:00
Erick Tryzelaar
21f46a1655 Port the tests to the typaram foo<T> syntax. 2011-08-16 15:05:56 -07:00
Brian Anderson
2f61848b24 Add pp test for interleaving comments through vectors. Closes #679 2011-08-16 11:39:04 -07:00
Brian Anderson
f05a91a0dc Rename std::ivec to std::vec 2011-08-16 10:36:19 -07:00
Brian Anderson
f32079f7c0 Convert most main functions to the ivec signature
Converting rustc will still take a snapshot
2011-08-16 10:29:08 -07:00
Brian Anderson
053b8bff5a Accept main(args: [str]) as main signature 2011-08-16 10:29:08 -07:00
Eric Holk
88a47020cf Updating sio tests. 2011-08-16 09:45:55 -07:00
Eric Holk
cf2def46c1 Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library. 2011-08-16 09:36:29 -07:00
Marijn Haverbeke
e33af7e0b5 Make let bindings' scope start at their definition
Also, allow let bindings in a block to shadow each other.
2011-08-16 13:45:41 +02:00
Marijn Haverbeke
92719e438c Clean up zip and unzip in std::ivec 2011-08-16 13:45:41 +02:00
Lindsey Kuper
f91351aaf6 The wonky for...in... whitespace was bothering me. Sorry! 2011-08-15 22:19:50 -07:00
Brian Anderson
cb239cc028 XFAIL task-comm-15
Fails consistently on windows
2011-08-15 19:28:38 -07:00
Lindsey Kuper
d55048ec5c Test case for issue #115. 2011-08-15 17:10:13 -07:00
Lindsey Kuper
4ff6b6fc27 Test cases for issue #822. 2011-08-15 16:29:42 -07:00
Lindsey Kuper
93d425e7a5 Simple example of anonymous objects from nothing. Closes #812. 2011-08-15 16:13:29 -07:00
Michael Sullivan
886c2ee93e Tests for type inferred lambda-blocks. 2011-08-15 15:48:11 -07:00
Graydon Hoare
814bf41d89 Add operator 'copy', translates as fall-through. 2011-08-15 15:44:41 -07:00
Brian Anderson
9ca8df93b3 XFAIL run-pass/task-killjoin
Seems to be failing with some consistency
2011-08-15 15:41:33 -07:00
Paul Stansifer
87b56b5565 Allow [a, b, ..., c] transcription patterns in MBE. 2011-08-15 15:35:27 -07:00
Paul Stansifer
6d39be465f Add backtraces for syntax problems. 2011-08-15 15:35:27 -07:00
Eric Holk
5c6790519b Reducing the chances for race conditions in join. 2011-08-15 12:39:55 -07:00
Eric Holk
871013b942 Syntax updates. 2011-08-15 09:52:18 -07:00
Eric Holk
aa0a51a7f5 Converted over benchmarks. 2011-08-15 09:26:52 -07:00
Eric Holk
be7325073a Removed spawn and task from the parser. Updated all the tests except for the benchmarks. 2011-08-15 09:26:52 -07:00
Eric Holk
c3535f5842 Porting a bunch of tests over. 2011-08-15 09:26:52 -07:00
Eric Holk
cc353aa17a Removed old object-based chans. 2011-08-15 09:26:51 -07:00
Eric Holk
7ad13392bd Converted two more spawn tests. 2011-08-15 09:26:51 -07:00
Eric Holk
b9f1f77622 Fixed memory accounting and task stack creation bugs. 2011-08-15 09:26:51 -07:00
Eric Holk
2f23405a60 Working on more spawn test cases. 2011-08-15 09:26:51 -07:00
Eric Holk
b2dad8af31 Added a library version of spawn. Before long, we can remove the old version. 2011-08-15 09:26:51 -07:00
Eric Holk
871d1317e5 Move mode for lib comm, converted a few tests. 2011-08-15 09:26:51 -07:00
Eric Holk
39b16077bb Port ID-based channels. 2011-08-15 09:26:51 -07:00
Marijn Haverbeke
1570949ef1 Re-add some deleted tuple tests 2011-08-15 13:39:45 +02:00
Michael Sullivan
0340f32748 Eliminate autoderef on binops and unary negation.
Autoderef on binops is basically unused, kind of silly, and
complicates typechecking. There were only three instances of it in the
compiler and the test drivers, two of which were of the form "*foo =
foo + 1", which should be written as "*foo += 1" anyways.
2011-08-12 18:28:03 -07:00
Michael Sullivan
e527140548 Change some tests that used binop autoderef. 2011-08-12 18:28:03 -07:00
Tim Chevalier
c01e487485 Un-XFAIL do-while-body-fails
Made it work both with optimization enabled, and with optimization
disabled. Huzzah!
2011-08-12 16:26:10 -07:00
Brian Anderson
ee7d03f7d7 Convert most working tests to ivecs
I tried to pay attention to what was actually being tested so, e.g. when I
test was just using a vec as a boxed thing, I converted to boxed ints, etc.

Haven't converted the macro tests yet. Not sure what to do there.
2011-08-12 16:13:13 -07:00
Michael Sullivan
2421312dea Don't rely on binop autoderef in the compiler. 2011-08-12 15:16:01 -07:00
Brian Anderson
4e62c0d6cb Remove std::vec 2011-08-12 12:14:07 -07:00
Brian Anderson
3d1634db15 Remove all usages of std::vec::vbuf 2011-08-12 12:14:07 -07:00
Brian Anderson
f9623f0056 Remove vecs from std::sha1 2011-08-12 12:14:07 -07:00
Brian Anderson
235109f8d2 XFAIL run-pass/vec-self-append
Broken under the ivec regime
2011-08-12 12:14:07 -07:00
Brian Anderson
12cd11ecda Remove last uses of vec::len 2011-08-12 12:14:07 -07:00
Brian Anderson
544bdf05c5 Convert uint::parse_buf to ivecs 2011-08-12 12:14:07 -07:00
Brian Anderson
5f71a204d3 Remove vecs from std::getopts 2011-08-12 12:14:07 -07:00
Brian Anderson
f323aeed17 Remove more vectors from std 2011-08-12 12:14:06 -07:00
Brian Anderson
7625ed52ee Remove vecs from std::sort 2011-08-12 12:14:06 -07:00
Brian Anderson
13439dc870 Convert std::run to ivecs 2011-08-12 12:11:12 -07:00
Brian Anderson
5c042a02cd Remove vecs from std::bitv 2011-08-12 12:11:12 -07:00
Brian Anderson
28437a1890 Convert compile-fail/alias-mismatch to ivecs 2011-08-12 12:11:12 -07:00
Brian Anderson
b762ba0890 Convert benchmarks to ivecs 2011-08-12 12:11:12 -07:00
Brian Anderson
48ad07b5d6 Convert run-pass/import-glob-crate to ivecs 2011-08-12 12:11:12 -07:00
Brian Anderson
cb59e28679 Convert run-pass/mod-view-items to ivecs 2011-08-12 12:11:12 -07:00
Brian Anderson
a76165f670 Move the ivec::reverse tests to stdtest 2011-08-12 12:11:11 -07:00
Brian Anderson
4dec0f6d96 Add reverse and reversed to std::ivec
Modify tests to use the ivec version
2011-08-12 12:11:11 -07:00
Brian Anderson
97dc75da16 Remove stdtest::vec 2011-08-12 12:11:11 -07:00
Brian Anderson
ae4c17e267 Add some of stdtest::vec into stdtest::ivec
Add missing functions to std::ivec as needed
2011-08-12 12:10:25 -07:00
Brian Anderson
3814d8d4b0 Convert run-pass/vec-append to ivecs 2011-08-12 12:08:28 -07:00
Brian Anderson
c06d95f178 Remove references to std::vec from compile-fail/cross-crate-glob-collision.rs 2011-08-12 12:08:28 -07:00
Brian Anderson
e790f1e6c5 Remove run-pass/vec-alloc-append.rs
There is no ivec::append and this is the only remaining user of vec::append
2011-08-12 12:08:28 -07:00
Brian Anderson
fc7664e4c6 Remove run-pass/vec-ref-count.rs
This test will be irellevant when vecs are gone
2011-08-12 12:08:28 -07:00
Brian Anderson
7d05da96f7 Rename std::ioivec to std::io 2011-08-12 12:08:27 -07:00
Brian Anderson
82b1e3f5cc Convert all uses of std::io to std::ioivec 2011-08-12 12:08:27 -07:00
Brian Anderson
119f43e0c7 Rename str::connect_ivec to str::connect 2011-08-12 12:08:27 -07:00
Brian Anderson
369be5c8df Convert uses of str::connect to str::connect_ivec 2011-08-12 12:08:27 -07:00
Brian Anderson
09cc957030 Convert str::concat to ivecs 2011-08-12 12:08:27 -07:00
Brian Anderson
1e397eee2a Rename str::split_ivec to str::split 2011-08-12 12:08:27 -07:00
Brian Anderson
64f53dfbb0 Convert uses of str::split to split_ivec 2011-08-12 12:08:27 -07:00
Brian Anderson
cfb9cba19f Convert str::from_chars, to_chars to ivecs 2011-08-12 12:08:27 -07:00
Brian Anderson
740196987e Rename std::str::unsafe_from_bytes_ivec to unsafe_from_bytes 2011-08-12 12:08:27 -07:00
Brian Anderson
a9ce342fa3 Convert all uses of unsafe_from_bytes to unsafe_from_bytes_ivec 2011-08-12 12:08:26 -07:00
Brian Anderson
49b80f9bf7 Remove str::from_bytes
This is exactly the same as str::unsafe_from_bytes
2011-08-12 12:08:26 -07:00
Brian Anderson
7e255335d2 Convert str::is_utf8 to ivecs 2011-08-12 12:08:26 -07:00
Brian Anderson
2e7e58812b Remove vec version of str::bytes, rename bytes_ivec to str::bytes 2011-08-12 12:08:26 -07:00
Brian Anderson
d6626143cc Remove vecs from compiletest 2011-08-12 12:08:26 -07:00
Michael Sullivan
8a9766000e Change a bunch of places in the stdlib to use blocks. 2011-08-12 11:47:44 -07:00
Marijn Haverbeke
de4b383a0f Properly typecheck unary minus
Closes #813
2011-08-12 16:05:56 +02:00
Brian Anderson
5e840182e6 XFAIL do-while-body-fails
Doesn't work w/out optimizations
2011-08-11 18:05:39 -07:00
Tim Chevalier
051b401051 Handle _|_ - typed things in the bodies of do-while loops
The resulting code is strange, but perhaps someone else can
fix it. The obvious things, like returning body_res, all resulted
in completely incomprehensible LLVM errors.

Closes #814
2011-08-11 17:23:47 -07:00
Lindsey Kuper
f2e22b2e8e Sanity-check the code examples that appear in the object system docs. 2011-08-11 16:19:51 -07:00
Brian Anderson
4b22243416 Un-ignore stdtest::task::test_sleep
Works for me.
2011-08-11 10:15:14 -07:00
Brian Anderson
9742148e25 Bring run-pass/spawn-fn up to date and un-XFAIL 2011-08-11 10:15:14 -07:00
Brian Anderson
d4a17caf1e Bring run-pass/spawn-module-qualified up to date and un-XFAIL 2011-08-11 10:15:14 -07:00
Brian Anderson
832d89db47 Bring run-pass/task-killjoin up to date and un-XFAIL 2011-08-11 10:15:14 -07:00
Brian Anderson
ffd6ee0730 Fill out some of the run-pass/binops tests
Un-XFAIL, and just comment out and add a FIXME to the two cases that fail on
linux.

Closes #577. This still doesn't compare <, >, etc for channels, ports and
tasks, but since they use pointer equality, that's a bit difficult to set up.
2011-08-11 10:15:07 -07:00
Brian Anderson
29ceb41cc3 Update and un-XFAIL run-pass/many.rs 2011-08-11 10:09:02 -07:00
Brian Anderson
4ff6763b60 rustc: Lowercase "main function not found" error 2011-08-11 10:09:02 -07:00
Brian Anderson
0f8e58e3ce Lowercase the "wrong type in main fn" error 2011-08-11 10:09:02 -07:00
Brian Anderson
32438e82b3 Fix the error-pattern in compile-fail/bad-main.rs. Un-XFAIL
This is also tested by compile-fail/main-wrong-type.rs but the type signatures
are slightly different, so I guess it's worth holding on to.
2011-08-11 10:09:02 -07:00
Tim Chevalier
a8a4d4ec05 Use actual type, not declared type, when zeroing move arguments
trans was failing with a bounds check error because the caller
was using the declared type (an out-of-scope ty param) and not
the actual type in a list of argument types to zero.

Closes #811
2011-08-10 17:22:57 -07:00
Lindsey Kuper
b23360ec8e Test case for issue #812. 2011-08-10 15:11:32 -07:00
Brian Anderson
40ae704ff2 Begin valgrinding run-fail tests
Introduce a temporary no-valgrind directive for the few that aren't clean
2011-08-10 13:36:57 -07:00
Graydon Hoare
a5997f2eb2 Actually perform handoff from caller to callee on move-mode args. 2011-08-09 17:56:26 -07:00
Patrick Walton
169f1e5b5a test: XFAIL binops.rs for now due to mysterious tinderbox failure on Linux 2011-08-09 17:50:21 -07:00
Patrick Walton
a73a0dd74e test: Update binops.rs with the new equality semantics 2011-08-09 17:02:17 -07:00
Erick Tryzelaar
491ed7f12c Port the fuzzer and tests to ivec type [T] syntax. 2011-08-09 15:53:26 -07:00
Lindsey Kuper
bf84d20f7c Move along; nothing to see here... 2011-08-09 15:42:48 -07:00
Lindsey Kuper
0d74d22eda Un-XFAIL a test. Issue #435. 2011-08-09 12:35:41 -07:00
Brian Anderson
c4877f88fa Update comments on sio-ctx test 2011-08-09 12:30:50 -07:00
Lindsey Kuper
eaefb0f1f6 Test case for issue #758. 2011-08-09 12:25:47 -07:00
Brian Anderson
dcc9a81d17 XFAIL sio-ctx
Reportedly fails sometimes, probably when RUST_THREADS > 1
2011-08-09 12:03:30 -07:00
Lindsey Kuper
ff22368279 The self-stack stuff (from #702) also closes issue #718. 2011-08-09 11:46:15 -07:00