Commit Graph

4559 Commits

Author SHA1 Message Date
Tim Chevalier
2baaeab784 Implement the occurs check
In the writeback phase, the typechecker now checks that it isn't
replacing a type variable T with a type that contains T. It
also does an occurs check in do_autoderef in order to avoid
getting into an infinite chain of derefs.

I'm a bit worried that there are more places where the occurs
check needs to happen where I'm not doing it now, though.

Closes #768
2011-08-04 15:30:09 -07:00
Lindsey Kuper
d7d4b4fc38 trans_args no longer needs llobj argument. 2011-08-04 11:34:06 -07:00
Patrick Walton
2a3235b58c rustc: Actually emit shapes 2011-08-04 11:25:46 -07:00
Eric Holk
0e70332b29 Merge branch 'master' of github.com:graydon/rust 2011-08-04 11:17:34 -07:00
Eric Holk
b55b80ed11 Merge commit '6ec4829' into snap 2011-08-04 11:13:52 -07:00
Eric Holk
5538f0ac56 Merge branch 'master' of github.com:graydon/rust 2011-08-04 11:06:18 -07:00
Eric Holk
6ec4829068 Registering snapshot. 2011-08-04 11:06:11 -07:00
Patrick Walton
4061ca2bbd rustc: Generate shapes 2011-08-04 10:46:10 -07:00
Patrick Walton
6bb6922c28 rt: Change int to uint32_t. Put out burning tinderbox. 2011-08-04 09:50:11 -07:00
Patrick Walton
e351ad762d rt: Stub shape glue and implement shape::print and shape::size_of. 2011-08-03 20:25:44 -07:00
Lindsey Kuper
1b1d8e7b91 Killing an obsolete comment. 2011-08-03 20:03:05 -07:00
Lindsey Kuper
6df7c041bc Pointer-ifying llenv. Step 1 of 2 steps to object system sanity. 2011-08-03 19:50:19 -07:00
Lindsey Kuper
29ec2503db Put comments on trans contexts back where they belong. :( 2011-08-03 19:49:29 -07:00
Michael Sullivan
316bf01e26 Fix the pretty print tests to handle terminal newlines. Sorry! 2011-08-03 19:47:54 -07:00
Lindsey Kuper
ebca1ae238 Merge pull request #801 from erickt/master
Fix a typo in lock_and_signal.cpp
2011-08-03 19:40:39 -07:00
Erick Tryzelaar
a8943f3442 timeout_in_ns was renamed to timeout_in_ms. 2011-08-03 19:28:49 -07:00
Eric Holk
7a2e9f4874 Sleep for a nonzero amount of time on Windows. 2011-08-03 18:21:19 -07:00
Michael Sullivan
5d5a3ca52d Fix trans_put to properly return (). Closes #773. 2011-08-03 18:10:54 -07:00
Michael Sullivan
5ea8d7f467 Make the pretty printer put trailing newlines at the end of files. 2011-08-03 17:52:25 -07:00
Michael Sullivan
9bfbb2bf83 Remove an obsolete FIXME in stdtest/deque.rs. Closes #140. 2011-08-03 17:08:23 -07:00
Brian Anderson
2298a2b29f Whitespace cleanup 2011-08-03 16:25:38 -07:00
Brian Anderson
89f2c43cf3 Convert line endings when doing exact pretty-print testing
For the benefit of windows
2011-08-03 15:37:51 -07:00
Brian Anderson
4ae6c835cb Add some hacks to get stdin piping working more correctly in windows
The way pipes work in windows is not the same as unix, though I'm not
entirely clear on the differences. This patch changes the windows pipe
method to return non-inheritable fds, and the windows rust_run_program
method to duplicate them before spawning the new process.

This allows make-check-pretty to work on windows.
2011-08-03 15:09:00 -07:00
Michael Sullivan
e33de59e47 Clean up how we deal with dynamic size function arguments/returns. 2011-08-03 14:24:41 -07:00
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