Commit graph

1390 commits

Author SHA1 Message Date
Niko Matsakis
70164739e8 convert a few tests from unsafe fns to fns with unsafe bodies 2011-10-12 16:33:07 -07:00
Niko Matsakis
81533ff737 add pass to check that unsafe fns cannot be used as values 2011-10-12 16:33:06 -07:00
Niko Matsakis
e39db5a100 all tests pass 2011-10-12 16:33:06 -07:00
Niko Matsakis
db16fce77f all tests pass 2011-10-12 16:33:06 -07:00
Niko Matsakis
85da98db4a continue to annotate functions as unsafe where neccessary 2011-10-12 16:33:06 -07:00
Niko Matsakis
d4d7eb069b add unsafe tags into various points in the translation chains
and so forth
2011-10-12 16:33:06 -07:00
Niko Matsakis
8ea1a8eef9 make treatment of unchecked/unsafe blocks more uniform
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 16:32:57 -07:00
Brian Anderson
8366f3caa3 Revert "Test for #954"
This reverts commit 7edb043889.
2011-10-12 15:53:54 -07:00
Brian Anderson
7edb043889 Test for #954 2011-10-12 15:53:15 -07:00
Brian Anderson
40fa88febb Ignore stdtest::os::test_setenv. Fails periodically on mac 2011-10-12 15:27:58 -07:00
Niko Matsakis
24b201fa48 skip test, remove whitespace 2011-10-12 14:39:34 -07:00
Niko Matsakis
cbe8da0655 make treatment of unchecked/unsafe blocks more uniform
also repair various errors in the parser related to such blocks.
rename checked_blk to default_blk to reflect the fact that it
inherits its purity from the surrounding context.
2011-10-12 14:39:24 -07:00
Niko Matsakis
8c1231ae5f fix test to include a main() function 2011-10-12 14:26:47 -07:00
Niko Matsakis
d207bc3a0b it is also legal to call unsafe functions from other unsafe functions 2011-10-12 14:26:47 -07:00
Niko Matsakis
046ca827dd Add unsafe blocks, unsafe functions, and two rudimentary tests
related to them
2011-10-12 14:26:47 -07:00
Brian Anderson
99f876e3a8 Make build_environment and trans_bind_thunk GEP bound arguments the same
These functions both use GEP_tup_like to get at the arguments bound to the
environment, but they were starting from a different 'level' of the
environment-box structure. Frighteningly, this was leading to them having
different opinions of how the bound arguments were aligned in some cases.
2011-10-12 12:11:07 -07:00
David Rajchenbach-Teller
75bda422df [Tests] added float tests 2011-10-12 10:56:05 +02:00
Lindsey Kuper
813c2eb369 Revert "Revert "Add a test case for #898. Closes #898.""
This reverts commit e305ab3851.

Oops again.  Reverting a mistaken revert.
2011-10-11 22:03:23 -04:00
Lindsey Kuper
e305ab3851 Revert "Add a test case for #898. Closes #898."
This reverts commit f480203fdd.

Oops.  This patch requires people to bump their LLVM version.
2011-10-11 22:00:17 -04:00
Brian Anderson
f480203fdd Add a test case for #898. Closes #898.
Seems to have been fixed.
2011-10-11 16:50:50 -07:00
Brian Anderson
8c77d063a9 Add a test for assignment of bare functions
Issue #1022
2011-10-11 13:40:31 -07:00
Brian Anderson
b04f84275a Add a test that bare functions are word-sized
Issue #1022
2011-10-11 13:40:28 -07:00
Brian Anderson
90c2402089 Add a test that uses a hypothetical bare-fn spawn signature
Issue #1022
2011-10-11 12:10:56 -07:00
Brian Anderson
84e98f4f65 Add a test for higher-order bare functions
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
145feb3298 Add a test for binding bare functions
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
5b0f79b75a Don't allow bind to produce bare functions
Issue #1022
2011-10-11 10:51:10 -07:00
Brian Anderson
9c46cc58cb Add a temporary syntax for bare functions
Bare functions will be represented as 'fn#' until they're implemented. Then
we'll switch it over to just 'fn'.

Issue #1022
2011-10-11 10:51:09 -07:00
Marijn Haverbeke
33167f7dec Adjust function signatures to allow for vecs being immediate
Some code was relying on vectors being implicitly by-reference (as
non-immediate value). This adds the necessary &&-sigils.

Closes #1021
2011-10-10 16:01:51 +02:00
Marijn Haverbeke
b4bae8fea5 Make vectors and strings immediates again
There's no good reason to force them to be spilled anymore. Some
pieces of trans become more elegant this way, and less stack allocs
and load/stores are needed.

Issue #1021
2011-10-10 15:59:16 +02:00
Marijn Haverbeke
1efe5f0577 Fix up test for last commit 2011-10-07 16:58:27 +02:00
Marijn Haverbeke
f26e770745 Make 1-1 parse again
Issue #954

This is not a very elegant fix -- we should probably do something with
constant folding to handle negative-int alt patterns in the future.
2011-10-07 16:46:44 +02:00
Marijn Haverbeke
7586082bb0 Add tests for programs that are invalid by arg-passing-style
Closes #1008
2011-10-07 10:41:40 +02:00
Marijn Haverbeke
41528dc543 Add pass-by-ref annotation to the tests to make them typecheck
Issue #1008
2011-10-07 10:41:39 +02:00
Brian Anderson
04e89af6db Add std::str::contains 2011-10-06 16:08:44 -07:00
Brian Anderson
82ef8519c3 Fix some path handling in std::fs on win32 2011-10-05 16:21:55 -07:00
Brian Anderson
a8ce543dc9 Add std::os::get_exe_path
Need this to correctly determine sysroot in rustc
2011-10-04 21:35:06 -07:00
Brian Anderson
2124839cd7 Hide unused variable warnings in stdtest::treemap 2011-10-04 21:35:06 -07:00
Brian Anderson
6f5a0c7500 Add std::fs::normalize 2011-10-04 21:22:03 -07:00
Brian Anderson
51ae30287b Add std::fs::split 2011-10-04 20:18:04 -07:00
Brian Anderson
b5bb42acfb XFAIL run-fail/linked-failure4. Deadlocks on mac 2011-10-03 14:46:52 -07:00
Brian Anderson
3a6f3cf275 Move compiletest to src/ and cleanup build rules 2011-10-02 17:28:59 -07:00
Brian Anderson
196cc6de2e Teach compiletest to construct the PATH variable correctly on win32 2011-09-29 22:58:34 -07:00
Marijn Haverbeke
d946e09a72 Move closure construction over to DPS style
Issue #667
2011-09-29 10:36:40 +02:00
Brian Anderson
e1ba559c03 Test cases for #985
Other restrictions on pinned kinds happened to fix this

Closes #985
2011-09-28 15:35:21 -07:00
Brian Anderson
cb4e99b688 Don't allow vectors of pinned kinds
Vectors of pinned kinds can't be safe because most interesting uses of vector
perform copies
2011-09-28 15:35:21 -07:00
Brian Anderson
14bac217b0 Make error patterns in some kind tests more specific 2011-09-28 15:35:21 -07:00
Brian Anderson
657e3ffaf5 xfail-fast run-pass/alt-range.rs 2011-09-28 12:46:29 -07:00
Brian Anderson
381205b747 Revert "Revert "Implement pattern ranges for all numeric types.""
This reverts commit a034f87146.

Conflicts:

	src/comp/middle/check_alt.rs
	src/comp/middle/trans_alt.rs
	src/comp/syntax/ast.rs
	src/comp/syntax/ast_util.rs
	src/comp/syntax/fold.rs
	src/comp/syntax/print/pprust.rs

Conflicts:

	src/comp/middle/trans_alt.rs
2011-09-28 12:46:29 -07:00
Wade Mealing
f375391cb6 Patch to error instead of crashing when parsing unmatched double quotes
Patch to error and fail instead of using all available memory
then crashing to detect the error condition of an unmatched
double quote before the end of a file.

I couldn't get it to show nice error messages, so this may not be
the ideal fix.

A test case for this situation has also been added.
2011-09-27 23:20:31 -07:00
Brian Anderson
a96b16e8c3 Make it again possible to initialize resource locals via assignment
Some special cases allow both 'let a <- my_resource(x)' and
'let a = my_resource(x)' to work as expected despite ostensibly being
copies and moves.
2011-09-27 23:20:27 -07:00