Brian Anderson
f6763efb02
Gitignore the recommended build directory
2011-04-02 21:31:55 -04:00
Brian Anderson
1326d424c9
Add more tests for alt expressions
2011-04-02 20:35:51 -04:00
Brian Anderson
99901bdbc4
Add FIXMEs around type handling in trans_if, trans_alt
2011-04-02 20:35:51 -04:00
Brian Anderson
21fb49ad95
Join the results of alt arms so alt can be used as an expression.
...
Un-XFAIL expr-alt.rs.
2011-04-02 20:35:50 -04:00
Brian Anderson
203e33b611
Make join_results branch into the join block even when only one edge is live.
...
I don't don't totally understand the implications of this but it makes the
behavior consistent for all live edges, which is going to make joining the
arms of an alt expression work correctly.
2011-04-02 20:35:50 -04:00
Brian Anderson
6e6acaa39a
Fail on non-exhaustive alt matches
2011-04-02 20:35:50 -04:00
Brian Anderson
9d0a505d61
Terminate fail blocks by making their ends unreachable.
...
This will make implementing default alt arms simpler.
2011-04-02 20:35:50 -04:00
Graydon Hoare
4f90c88b4d
Write typarams for variants. Typecheck gets as far as ty.rs now.
2011-04-01 18:53:08 -07:00
Graydon Hoare
5b7961b641
Encode ty_native ebml node for native types so typechecker has something to work with.
2011-04-01 18:34:13 -07:00
Graydon Hoare
c077da553d
Remove typestate_check reference to nonexistent ast.init node; rustc compiling itself notices what rustboot did not :)
2011-04-01 18:33:47 -07:00
Graydon Hoare
23f18a096f
Re-enable typestate_check in build, was lost during merge. Sorry.
2011-04-01 17:23:56 -07:00
Graydon Hoare
0397c05f42
Support for passing native types through metadata/creader.
2011-04-01 17:04:51 -07:00
Graydon Hoare
2a2ea6351d
Comment out import for not-yet-compiling typestate_check.
2011-04-01 17:04:07 -07:00
Graydon Hoare
3971110d7f
Guh. Actually commit the staged undo-of-indentation. Forgotten git staging wins again.
2011-04-01 16:04:22 -07:00
Graydon Hoare
7d88e63ec8
Switch private linkage to local, re-indent trans.rs.
2011-04-01 15:01:46 -07:00
Patrick Walton
3a8b0be1cb
rustc: Write symbols for native items into the crate metadata
2011-04-01 14:18:46 -07:00
Patrick Walton
a0eb9c814b
rustc: Don't try to write symbols into the metadata for nullary tags. Puts out burning tinderbox.
2011-04-01 14:14:10 -07:00
Patrick Walton
6dc452335a
rustc: Get tag variants from the crate metadata
2011-04-01 13:02:44 -07:00
Patrick Walton
ec9d7abf8c
rustc: Have tag_variants() return a new variant_info structure instead of an AST node
2011-04-01 11:37:31 -07:00
Tim Chevalier
8b211f4782
added Mac .DS_Store directory to .gitignore
2011-04-01 11:27:32 -07:00
Tim Chevalier
3130348ee1
Started adding support for typestate checking.
...
I added a new field to the ast "ann" type for typestate information.
Currently, the field contains a record of a precondition bit vector and
postcondition vector, but I tried to structure things so as to make
it easy to change the representation of the typestate annotation type.
I also had to add annotations to some syntactic forms that didn't have
them before (fail, ret, be...), with all the boilerplate changes
that that would imply.
The main call to the typestate_check entry point is commented out and
the actual pre-postcondition algorithm only has a few cases
implemented, though the overall AST traversal is there. The rest of
the typestate algorithm isn't implemented yet.
2011-04-01 11:27:32 -07:00
Patrick Walton
69a34b992b
rustc: Remove useless call to tag_variant_with_id()
2011-04-01 10:59:59 -07:00
Brian Anderson
1bc06bc59b
Cleanup typos and newlines
2011-04-01 00:05:13 -04:00
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