Commit graph

2065 commits

Author SHA1 Message Date
Brian Anderson
efb738153c Add an XFAILed test for treating alts as expressions 2011-03-31 23:23:27 -04:00
Brian Anderson
dcf04ffbad Un-XFAIL expr-if-box.rs 2011-03-31 23:15:11 -04:00
Brian Anderson
f16e7242d2 Initialize the alloca used to retrieve boxed block results to null.
This allows blocks to be used in conditional constructs where the block may
not ever execute: the drop glue will notice that it was never used and ignore
it.

Also, beef up the comments.
2011-03-31 23:15:11 -04:00
Brian Anderson
524e803582 Only use allocas to hold expression results for boxed types 2011-03-31 23:15:11 -04:00
Brian Anderson
f05d3c516b Add more comments to trans_block 2011-03-31 23:15:11 -04:00
Brian Anderson
cf16f4f7e5 Add a test for block expressions of generic types. XFAILed 2011-03-31 23:15:11 -04:00
Brian Anderson
c27b72e323 Add another test for blocks as expressions 2011-03-31 23:15:11 -04:00
Brian Anderson
19a949c15e Un-XFAIL expr-block-box.rs 2011-03-31 23:15:11 -04:00
Brian Anderson
125bebbf60 Modify trans.rs to allow blocks to result in boxed values 2011-03-31 23:15:11 -04:00
Brian Anderson
bd1c61548e Move str test from expr-if.rs to expr-if-box.rs in preperation for breaking that code path. 2011-03-31 23:15:11 -04:00
Brian Anderson
d631f29d47 Add block_to_str and expr_to_str methods to the pprust module.
Since pprust is authed impure these can be used for debug logging.
2011-03-31 23:15:11 -04:00
Brian Anderson
2490cd3275 Add a test for block expressions that have results. XFAILed. 2011-03-31 23:15:11 -04:00
Patrick Walton
c66edca83d rustc: Add a type annotation to tag items 2011-03-31 19:12:40 -07:00
Patrick Walton
1eeedbd008 rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead of ty_params, and to check in external crates 2011-03-31 18:45:24 -07:00
Patrick Walton
bdea343879 rustc: Use the path index. Speeds up compilation a lot. 2011-03-31 18:28:59 -07:00
Patrick Walton
fffc5d3b3d rustc: Write out a path index as well 2011-03-31 18:28:59 -07:00
Graydon Hoare
1b65a61cad Couple minor bug fixes in creader, lib-bitv, int, rand, sort, sha1, uint and vec all work. 2011-03-31 15:57:36 -07:00
Graydon Hoare
6d857c0c84 Fix error where make check would not produce compilers first, due to make's infinite-recursion-prevention heuristic. 2011-03-31 14:58:44 -07:00
Patrick Walton
3c1de96cda rustc: Use the crate index to look up defs 2011-03-31 14:37:44 -07:00
Lindsey Kuper
ef0c903f6a More stuff to go with the new expr_call_self AST node 2011-03-31 14:16:02 -07:00
Lindsey Kuper
e939d6f17c More machinery for adding an expr_call_self AST node. 2011-03-31 14:04:53 -07:00
Graydon Hoare
a505e3c0ec Improve 'clean' make target. 2011-03-31 14:03:43 -07:00
Patrick Walton
6c383bbd7b rustc: Index only the local part of definition IDs 2011-03-31 12:24:59 -07:00
Patrick Walton
3945ace520 rustc: Write out an index of definition info in crate metadata 2011-03-31 11:56:02 -07:00
Patrick Walton
6a60cb1e0c rustc: Mix the bits more when hashing def ids 2011-03-31 11:55:28 -07:00
Patrick Walton
dec92d392e stdlib: Add a write_be_uint() function to writers 2011-03-31 11:54:52 -07:00
Patrick Walton
7f3f66df7b rustc: Use the scaled index, not the raw index, if a vector has generic size. lib-vec.rs works now. 2011-03-31 10:10:21 -07:00
Brian Anderson
607fa14960 Rename incr_all_refcnts to take_ty, to match drop_ty 2011-03-31 14:52:30 +00:00
Brian Anderson
b0b72ab472 Restore scope block contexts to the translation of expr_block.
I removed this previously but that was wrong because it caused
block expressions to not create a new scope.
2011-03-31 14:52:29 +00:00
Brian Anderson
50e354611f Remove redundant parser logic.
These cases are all dealt with in parse_expr_inner.
2011-03-31 14:52:29 +00:00
Marijn Haverbeke
6a75740e96 handle unterminated block comments and line comment at eof 2011-03-31 14:41:40 +00:00
Marijn Haverbeke
39f0656b4f Improve line comment positioning
This involved making ast.variant spanned.
2011-03-31 14:41:40 +00:00
Marijn Haverbeke
8a7ea941bb Support break and cont in pretty-printer 2011-03-31 14:41:40 +00:00
Marijn Haverbeke
f8393cc572 Add effect field to ast.ty_fn.
Still not used, except by the pretty-printer.
2011-03-31 14:41:40 +00:00
Marijn Haverbeke
e7e6f396d8 Preserve comments when pretty-printing.
The patch also includes a number of smaller fixes to the
pretty-printer that were encountered on the way.
2011-03-31 14:41:39 +00:00
Graydon Hoare
ffc188a4dd Tweak build command on rustc. 2011-03-31 14:41:35 +00:00
Patrick Walton
ab8d200fb0 rustc: Read 'y' tags from external crates 2011-03-30 18:28:33 -07:00
Patrick Walton
ae5ba62b24 rustc: Use the type cache to construct external item references 2011-03-30 18:15:29 -07:00
Patrick Walton
cc59cea8b0 rustc: Thread an item-to-type mapping throughout the typechecking and translation phases 2011-03-30 17:28:06 -07:00
Graydon Hoare
a154c5b656 Um, that'd be, align the word *before* retpc. Addresses point to the low part of a word. Un-XFAIL nbody on Darwin. 2011-03-30 14:10:06 -07:00
Graydon Hoare
3e7b991d49 Ensure task stacks start out with a 16-byte aligned entry frame. Should make OSX behave a bit better. 2011-03-30 13:04:18 -07:00
Graydon Hoare
b5a4336487 Re-XFAIL lib-int.rs and lib-uint.rs. 2011-03-29 23:10:28 -07:00
Graydon Hoare
61e5587eab Re-XFAIL lib-bitv.rs harder 2011-03-29 22:58:50 -07:00
Graydon Hoare
51807ad628 Re-XFAIL lib-bitv.rs 2011-03-29 22:08:35 -07:00
Graydon Hoare
94731fa458 Add support for --enable-foo and --disable-foo flags to configure, that Makefile.in respects. 2011-03-30 04:45:09 +00:00
Patrick Walton
301cfe1354 rustc: Add all items to the item table during translation. lib-vec now compiles, but asserts and then segfaults. 2011-03-29 18:16:53 -07:00
Patrick Walton
b09e09c673 rustc: Un-XFAIL lib-uint.rs 2011-03-29 18:16:53 -07:00
Graydon Hoare
b55c8333cb Beef up the SREQ variables in Makefile.in, make tests depend on libstd.so 2011-03-29 17:33:39 -07:00
Patrick Walton
601cf8c97f rustc: Un-XFAIL lib-int.rs. 2011-03-29 17:31:48 -07:00
Patrick Walton
626bdaaa1f rustc: Parse parameter IDs in external crate metadata. Un-XFAIL lib-bitv.rs. 2011-03-29 17:25:55 -07:00