Michael Sullivan
7bcde7270d
Have trans_bind_thunk handle polymorphic but statically sized return values.
...
Closes #775 .
2011-08-03 14:24:41 -07:00
Tim Chevalier
001df3f0ca
Revert "Revert "Handle conditionals on _|_ - typed values correctly""
...
This reverts commit ea81c03960
.
Changed the case in trans_if where the conditional is _|_ - typed
but the block is terminated to return the result of the cond,
instead of nil.
This passes "make check" with optimization disabled as well as
enabled.
2011-08-03 13:07:41 -07:00
Paul Stansifer
513276e595
Add #concat_idents[] and #ident_to_str[]
2011-08-03 12:42:35 -07:00
Michael Sullivan
4a636b06f6
Actually un-xfail the test for put in fns.
2011-08-03 11:59:11 -07:00
Michael Sullivan
c9ae548dae
Reject programs that do a put outside of iterators.
...
Closes #774 .
2011-08-03 11:43:50 -07:00
Michael Sullivan
8871462575
Do a bunch more typechecking for iters and for each loops.
...
Closes #771 .
Closes #772 .
Closes #796 .
2011-08-03 11:07:53 -07:00
Michael Sullivan
3254fb9806
Code cleanup in check_expr.
2011-08-03 11:06:58 -07:00
Michael Sullivan
fcc458d4a0
Fix typechecking when spawning something type inferred.
...
Of course, we still don't *translate* it.
Closes #757 .
2011-08-03 11:06:58 -07:00
Brian Anderson
228422303f
Remove the last remaining xfail-boot directive
2011-08-03 10:55:59 -07:00
Brian Anderson
c53402846e
Remove all xfail-stage0 directives
...
While it is still technically possible to test stage 0, it is not part of any
of the main testing rules and maintaining xfail-stage0 is a chore. Nobody
should worry about how tests fare in stage0.
2011-08-03 10:55:59 -07:00
Brian Anderson
92a4c0cee7
Ignore xfail-pretty, xfail-stage2 files when reformatting
...
We shouldn't be trying to reformat source that we don't know to work because
we could just be breaking it more.
2011-08-03 10:55:59 -07:00
Brian Anderson
63600828cd
Un-xfail more pretty-printing tests
2011-08-03 10:55:59 -07:00
Brian Anderson
e4da7c5bee
parse_crate_from_source_str takes a parse_sess, not codemap
...
This was causing problems when reading from stdin for subsequent passes that
needed to generate node ids.
2011-08-03 10:55:59 -07:00
Brian Anderson
97a8784c98
Fix pretty-printer to read from files again
...
I accidentally made the pretty-printer always read from stdin
2011-08-03 10:55:59 -07:00
Brian Anderson
0b7a94a94c
Pretty-print kinds of type params
2011-08-03 10:55:59 -07:00
Brian Anderson
843767a841
Disambiguate unop statements in pretty-printer. Closes #674
2011-08-03 10:55:59 -07:00
Brian Anderson
ea81c03960
Revert "Handle conditionals on _|_ - typed values correctly"
...
This reverts commit 13f8b3f2a6
.
run-pass/if-ret.rs does not translate correctly when unoptimized. Issue #797
2011-08-03 10:48:52 -07:00
Marijn Haverbeke
d08c0f0ec1
Make ast::pat_bindings an iterator
...
And use it to get rid of some repetetive code
2011-08-03 10:26:41 +02:00
Tim Chevalier
948f8090ae
Handle _|_ - typed discriminants in alts correctly
...
Stop me, won't you, if you've heard this one before?
Closes #794
2011-08-02 19:02:38 -07:00
Tim Chevalier
13f8b3f2a6
Handle conditionals on _|_ - typed values correctly
...
Closes #776
2011-08-02 18:34:44 -07:00
Tim Chevalier
7c34550931
Make _|_ type binopable
...
But don't actually generate code that does the operation. That means
hoisting the check I added in my last commit from trans_compare
up into trans_eager_binop (don't generate any code if one operand
has type _|_ ).
Closes #777
2011-08-02 18:06:46 -07:00
Brian Anderson
44c93b5fb2
Remove task-comm-chan-chan test
...
This issue has a smaller test case in chan-leak.rs
2011-08-02 17:49:11 -07:00
Brian Anderson
a6cb0c2843
Enable more tests that pretty-print correctly now
2011-08-02 17:49:11 -07:00
Brian Anderson
2911156820
Pretty-print fn constraints more correctish
2011-08-02 17:49:11 -07:00
Brian Anderson
637037f68c
Un-xfail run-pass/claim-nonterm
...
Seems to work
2011-08-02 17:49:11 -07:00
Brian Anderson
25b16ba9a2
Un-xfail run-fail/fn-constraint-claim
...
Seems to work
2011-08-02 17:49:11 -07:00
Brian Anderson
3eef9993af
Don't pp extra lines after block open when preserving whitespace. Closes #759
2011-08-02 17:49:11 -07:00
Tim Chevalier
731797d075
In trans, don't assume both sides of a binop have the same type
...
This was at least partially responsible for Issue 777.
The only solution I can think of is for trans to just not generate
code for a comparison if one or both sides has type _|_. Since
that means evaluating that subexpression diverges, it should be ok
to never do the comparison. Actually generating code for the
comparison would trip an LLVM assertion failure.
2011-08-02 17:36:41 -07:00
Lindsey Kuper
430a28bb49
Refactor: a backwarding vtable can only have one kind of method.
2011-08-02 16:59:49 -07:00
Lindsey Kuper
48467c4faa
Comment tweaks and re-flows.
2011-08-02 16:53:31 -07:00
Michael Sullivan
f371482593
Consolidate environment building/loading between closure types.
2011-08-02 16:30:56 -07:00
Michael Sullivan
4cf4e17e1d
Track the node_id of the function in trans_common::fn_ctxt.
2011-08-02 16:30:56 -07:00
Michael Sullivan
f8b0d3d7d2
Use GEPi a bunch.
2011-08-02 16:26:00 -07:00
Graydon Hoare
bc11cd5ca5
Fix majority of valgrind-purity bugs observed in a rustc run (LLVM still appears to leak some of its own memory).
2011-08-02 15:00:51 -07:00
Paul Stansifer
ab4764520c
Allow patterns of the form `[a, b, c ...] to be matched and transcribed.
2011-08-02 14:46:02 -07:00
Brian Anderson
ea2a968146
Include benchmarks in pretty-print tests
2011-08-02 14:37:03 -07:00
Brian Anderson
795e80fc19
Register new snapshots
2011-08-02 13:43:13 -07:00
Tim Chevalier
40c1b864c6
Use or-patterns in trans::trans_compare, eliminating a FIXME
2011-08-02 13:17:59 -07:00
Brian Anderson
091a2c2f71
Run pretty-printer tests as part of make check. Issue #789
2011-08-02 10:39:14 -07:00
Brian Anderson
35e9e02066
Use ioivec::read_whole_file_str in a few places
2011-08-02 10:39:14 -07:00
Brian Anderson
a1a25969a0
Add ioivec::read_whole_file/read_whole_file_str
2011-08-02 10:39:14 -07:00
Brian Anderson
77be30fa73
Typecheck pretty-printing test results as libraries. Issue #789
...
After running source files through the pretty printer, we sanity check them by
running the results through the compiler with the --no-trans flag. Now also
use the --lib flag so that pretty-printer tests don't have to include a main
function.
2011-08-02 10:39:14 -07:00
Brian Anderson
0fbb6782bb
Add dedicated pretty-printer tests with new pp-exact directive
...
Add a new src/test/pretty directory to hold just source files for testing the
pretty-printer.
Add a new pp-exact directive. When this directive is followed by a file name
it specifies a file containing the output that the pretty-printer should
generate. When pp-exact is not followed by a filename it says that the file
should pretty-print as written.
2011-08-02 10:39:13 -07:00
Brian Anderson
eea888af25
Add missing BENCH_TESTS variable to tests.mk
2011-08-02 10:39:13 -07:00
Brian Anderson
07950c8851
Add a FIXME about simplifying the make check rules
2011-08-02 10:39:13 -07:00
Brian Anderson
e13390a199
Pretty-print test the rfail tests. Issue #789
2011-08-02 10:39:13 -07:00
Brian Anderson
0a6e3362c6
Add xfail-pretty directives to tests that don't pretty-print correctly
...
Issue #789
2011-08-02 10:39:13 -07:00
Brian Anderson
166c73546a
Remove test/run-pass/simple-qsort
...
This is part of stdtest now
2011-08-02 10:39:13 -07:00
Brian Anderson
67b8f8b13a
Display the name of the test being waited for before the result is in
...
So the test runner displays the name of the test, then waits for it to finish,
then displays the result. It worked this way before things were parallelized
and it's just much friendlier this way.
2011-08-02 10:39:13 -07:00
Brian Anderson
1702b8507d
Add xfail-pretty test directive. Issue #789
...
Indicates that this test should not be used to test the pretty-printer
2011-08-02 10:39:13 -07:00