Brian Anderson
f33d490032
Remove xfail-boot lines from tests
2011-05-14 21:05:22 -04:00
Brian Anderson
ec30c71296
Add a regression test for issue #374 (XFAILed)
2011-05-14 13:29:49 -04:00
Brian Anderson
fb76c25729
WIP
2011-05-14 13:11:37 -04:00
Lindsey Kuper
5679f5c55e
'with' no longer a token; whitespace police.
...
Plus renaming the anonymous objects test to a more descriptive name,
and XFAILing it because it doesn't work yet.
2011-05-13 17:37:01 -07:00
Lindsey Kuper
d3242b9644
Bug fixes.
...
Fixed infinite loop on anonymous objects in parser; added
expr_anon_obj to walk.rs; fixed syntax of test case.
2011-05-13 17:35:13 -07:00
Lindsey Kuper
6c1c5b3948
More progress on anonymous objects.
...
Still segfaulting on the method-overriding.rs test, though.
2011-05-13 17:35:13 -07:00
Lindsey Kuper
7c2979e26f
Starting on support for anonymous objects. Just syntax so far.
2011-05-13 17:35:12 -07:00
Marijn Haverbeke
7647b838a1
Remove reserved word tests (since reserved words were removed)
...
Ping me if you disagree, but I think that in a language that's as
in-flux as rust currently is, it is silly to try and enforce a single
future-compatibility. The reserved words didn't work well with the
parser refactor, so I dropped them for the time being. We can,
eventually, bring them back as type-only reserved words.
2011-05-13 22:00:13 +02:00
Marijn Haverbeke
ae26b775b4
Implement module namespaces
...
Module names no longer clash with type and value names. The
tokenizer/parser still needs to be taught to be more careful in
identifying keywords, so that we can use 'str' and 'vec' and so as
module names.
2011-05-13 17:20:46 +02:00
Marijn Haverbeke
1a12a7b04b
Make module indices hold a list of items
...
This way, they can support having both a type and a value
of the same name.
2011-05-13 13:34:59 +02:00
Marijn Haverbeke
58ec5d1654
Move capture checking into resolve.rs
...
Drops capture.rs. The new algorithm also checks for captures function
arguments and obj fields.
2011-05-13 12:44:05 +02:00
Marijn Haverbeke
9419c5df77
Fix mistaken replacements in error-pattern comments in tests
2011-05-12 21:45:29 +02:00
Marijn Haverbeke
3816e57fd2
Downcase std modules again, move to :: for module dereferencing
...
This should be a snapshot transition.
2011-05-12 21:30:44 +02:00
Marijn Haverbeke
5bea22d75c
Add a missed xfail-stage0
2011-05-11 16:44:42 +02:00
Marijn Haverbeke
e9c12ab1d0
Rewrite comp/middle/resolve.rs
...
* Cleans up the algorithm
* Move first pass to walk (second still folds)
* Support part of a type/value namespace split
(crate metadata and module indices still need to be taught about this)
* Remove a few blatant inefficiencies (import tables being recreated for
every lookup, most importantly)
2011-05-11 12:32:37 +02:00
Brian Anderson
e4c3287367
Reuse a single work buffer every time the SHA1 message block is processed.
...
This finally allows the full lib-sha1 test to run in a reasonable amount of
time. Was 30s, now 3s. Trims a second or two from stage2/rustc. XFAIL lib-sha1
in stage0 since it will be very slow until the next snapshot.
2011-05-11 01:38:17 -04:00
Brian Anderson
e35984b6c6
Introduce str_slice runtime function
...
This reduces the time to execute the new lib-str tests from 1:40ish to a few
seconds and will eventually allow the full lib-sha1 test to run in a
reasonable amount of time. XFAIL lib-str in stage0 - it will run very slowly
until the next snapshot.
2011-05-11 01:38:16 -04:00
Brian Anderson
4c70ddb162
Un-XFAIL syntax-extension-fmt.rs
2011-05-10 19:46:22 -04:00
Brian Anderson
92471efff4
Un-XFAIL compile-fail export tests for stage0
2011-05-10 19:18:38 -04:00
Patrick Walton
70c759030c
rustc: Alias fix part 2 -- Check that the aliasness of function parameters matches. Add a test case.
2011-05-09 14:00:50 -07:00
Marijn Haverbeke
d39ca857fc
Remove a few more superfluous 'mutable' keywords
2011-05-06 22:52:02 +02:00
Marijn Haverbeke
a3ec0b1f64
Rename std modules to be camelcased
...
(Have fun mergining your stuff with this.)
2011-05-06 22:51:19 +02:00
Kelly Wilson
850dff486e
Add quick sort function to the std lib.
2011-05-05 16:40:57 -07:00
Tim Chevalier
6b742aec91
Enforce in typechecker that preds return a bool
...
as well as a test case
2011-05-05 11:26:07 -07:00
Tim Chevalier
acf9bd7909
Test cases for pred / check stuff
2011-05-05 11:26:07 -07:00
Tim Chevalier
3060eadcba
Check well-formedness of constraints
...
Check that the operand in a constraint is an explicit name,
and that the operands are all local variables or literals. Still need
to check that the name refers to a pure function.
2011-05-05 11:26:07 -07:00
Tim Chevalier
bc5650a9d0
Change checks to asserts in test/bench files
2011-05-05 11:26:07 -07:00
Tim Chevalier
4f892dd9d7
Check that the operand in a check is a call
...
In addition, fix bug in fold that was turning asserts into checks.
More typechecking still needs to be done.
2011-05-05 11:26:07 -07:00
Tim Chevalier
59a0e98096
Un-XFAILed not-a-pred in stage0 (it fails correctly)
2011-05-05 11:26:07 -07:00
Marijn Haverbeke
1f45dda9d2
Remove 'deprecated mutable...' from our code
...
This should make compilation a bit less noisy.
2011-05-05 20:19:43 +02:00
Marijn Haverbeke
3d738e9e06
Return a fresh, unreachable context after ret, break, and cont
...
This ensures we don't get compile errors on unreachable code (see
test/run-pass/artificial-block.rs for an example of sane code that
wasn't compiling). In the future, we might want to warn about
non-trivial code appearing in an unreachable context, and/or avoid
generating unreachable code altogether (though I'm sure LLVM will weed
it out as well).
2011-05-05 20:19:43 +02:00
Brian Anderson
bd34770a92
Add missing ret statements to check_mod
...
Un-XFAIL compile-fail export tests
2011-05-04 19:29:27 -04:00
Graydon Hoare
b73a640ce0
More export XFAILs.
2011-05-04 15:35:41 -07:00
Graydon Hoare
978e3d0f4a
XFAIL some compile-fail tests mysteriously failing on win32 tinderbox.
2011-05-04 14:44:57 -07:00
Graydon Hoare
4642d7a355
extend xfail-stage0 to stage1, stage2 on obj-dtor-2.rs
2011-05-04 11:23:05 -07:00
Graydon Hoare
456398a403
Change two compile-fail patterns to match rustc output.
2011-05-04 11:20:47 -07:00
Graydon Hoare
c36645b358
Assume xfail-stage0 implies stage1 and stage2 in tests, for now.
2011-05-03 18:14:02 -07:00
Patrick Walton
2bc17adc29
Revert "Rename the "llvm" API to "llvm-intrinsic"" due to tinderbox bustage
...
This reverts commit 6871c245a6
.
2011-05-03 17:50:37 -07:00
Patrick Walton
6871c245a6
Rename the "llvm" API to "llvm-intrinsic"
2011-05-03 15:55:01 -07:00
Brian Anderson
3014a5887d
Add some tests of tag-export interaction
2011-05-02 22:06:35 -04:00
Brian Anderson
2fc58fc6a0
Revert "Use check instead of assert in export-unexported-dep"
...
This reverts commit 480eda0f10
. The commit
adding the assert keyword has been restored.
2011-05-02 20:56:46 -04:00
Patrick Walton
a833f152ba
rustc: Remove the artificial block in ty.rs. Fixes self-hosting. Add a test case for this, XFAIL'd.
2011-05-02 17:50:46 -07:00
Patrick Walton
147a2d655f
Un-revert "Use different syntax for checks that matter to typestate", fixing the problem.
...
This reverts commit d08b443fff
.
2011-05-02 17:50:46 -07:00
Brian Anderson
480eda0f10
Use check instead of assert in export-unexported-dep
2011-05-02 20:48:52 -04:00
Graydon Hoare
d08b443fff
Revert "Use different syntax for checks that matter to typestate"
...
This reverts commit aa25f22f19
. It broke stage2, not sure why yet.
2011-05-02 17:35:33 -07:00
Brian Anderson
764de078e7
Add a regression test that exports can expose unexported items
...
While those unexported items can't be used by name outside the module in which
they are defined, they can be used as a sort of ADT.
2011-05-02 19:42:00 -04:00
Tim Chevalier
aa25f22f19
Use different syntax for checks that matter to typestate
...
This giant commit changes the syntax of Rust to use "assert" for
"check" expressions that didn't mean anything to the typestate
system, and continue using "check" for checks that are used as
part of typestate checking.
Most of the changes are just replacing "check" with "assert" in test
cases and rustc.
2011-05-02 12:16:29 -07:00
Brian Anderson
a5ccead3fd
Add a test that imports can't circumvent exports
2011-05-01 17:22:20 -04:00
Brian Anderson
f25e678365
Add a regression test for use of unexported fully-qualified paths
...
An unexported foo.baz can't be resolved from inside foo when called as foo.baz
instead of just baz. This behavior may want to change eventually.
2011-05-01 16:57:36 -04:00
Brian Anderson
a697210234
Hide unexported tag variants
2011-05-01 16:57:36 -04:00