about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-04-07Merge branch 'master' of github.com:graydon/rustPatrick Walton-137/+380
2011-04-07Run optimizations.Rafael Ávila de Espíndola-5/+100
It is always on for now just to make sure the bots are happy. If they are, I will add a -O option and update the makefile.
2011-04-06Continued sketching out code for checking states against preconditions.Tim Chevalier-132/+280
It's still sketchy. I added a typestate annotation field to statements tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate that's different from that of its child node. This necessitated trivial changes to a bunch of other files all over to the compiler. I also added a few small standard library functions, some of which I didn't actually end up using but which I thought might be useful anyway.
2011-04-06Merge branch 'master' of github.com:graydon/rustPatrick Walton-218/+689
2011-04-06Remove reference to nonexistent ast.module from typestate_check.rs, stage1 ↵Graydon Hoare-1/+0
doesn't like it.
2011-04-05Brute force and ignorance workaround for tag-and-generic-obj; un-XFAIL it.Graydon Hoare-0/+3
2011-04-06More work on typestate. Sketched out code for computing and checking ↵Tim Chevalier-80/+508
prestates and poststates. Still a long ways away.
2011-04-05Last pieces of self-call support.Lindsey Kuper-6/+37
The last few pieces of the hack that lets us use trans.trans_call() to translate self-calls, plus a fix for the parser buy that was preventing self-call expressions from getting past parsing. test/run-pass/obj-self.rs works now (as in it actually prints "hi!" twice!).
2011-04-05Further on the path toward self-awareness.Lindsey Kuper-118/+99
Mostly: * Merciless refactoring of trans.rs so that trans_call can work for self-calls as well as other kinds of calls Also: * Various changes to go with having idents, rather than exprs, in expr_call_self AST nodes * Added missing case for SELF token to token.to_str()
2011-04-05FIx native wrapper generation to handle more arg types.Graydon Hoare-3/+23
2011-04-05Oops -- if we're going to use the pretty-printer, we need it to work.Lindsey Kuper-0/+5
2011-04-05Knocking out a quick fixme: pretty-printing exprs in error messages.Lindsey Kuper-2/+3
2011-04-04Make box prefix operator and box type carry mutability flag.Graydon Hoare-14/+17
2011-04-03rustc: Make type_of() return the type of the wrapper for native functions. ↵Patrick Walton-4/+4
lib-map now compiles, but fails to work properly.
2011-04-03Begin comparing vectors from the correct addressBrian Anderson-1/+1
Start at the first element instead of the address of the vector.
2011-04-02Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. ↵Graydon Hoare-1/+4
Major perf win.
2011-04-02Add FIXMEs around type handling in trans_if, trans_altBrian Anderson-0/+2
2011-04-02Join the results of alt arms so alt can be used as an expression.Brian Anderson-12/+18
Un-XFAIL expr-alt.rs.
2011-04-02Make join_results branch into the join block even when only one edge is live.Brian Anderson-6/+0
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-02Fail on non-exhaustive alt matchesBrian Anderson-3/+3
2011-04-02Terminate fail blocks by making their ends unreachable.Brian Anderson-3/+3
This will make implementing default alt arms simpler.
2011-04-01Write typarams for variants. Typecheck gets as far as ty.rs now.Graydon Hoare-2/+4
2011-04-01Encode ty_native ebml node for native types so typechecker has something to ↵Graydon Hoare-0/+1
work with.
2011-04-01Remove typestate_check reference to nonexistent ast.init node; rustc ↵Graydon Hoare-1/+0
compiling itself notices what rustboot did not :)
2011-04-01Re-enable typestate_check in build, was lost during merge. Sorry.Graydon Hoare-2/+3
2011-04-01Support for passing native types through metadata/creader.Graydon Hoare-1/+5
2011-04-01Comment out import for not-yet-compiling typestate_check.Graydon Hoare-1/+1
2011-04-01Guh. Actually commit the staged undo-of-indentation. Forgotten git staging ↵Graydon Hoare-56/+56
wins again.
2011-04-01Switch private linkage to local, re-indent trans.rs.Graydon Hoare-70/+70
2011-04-01rustc: Write symbols for native items into the crate metadataPatrick Walton-0/+1
2011-04-01rustc: Don't try to write symbols into the metadata for nullary tags. Puts ↵Patrick Walton-1/+3
out burning tinderbox.
2011-04-01rustc: Get tag variants from the crate metadataPatrick Walton-16/+78
2011-04-01rustc: Have tag_variants() return a new variant_info structure instead of an ↵Patrick Walton-37/+40
AST node
2011-04-01Started adding support for typestate checking.Tim Chevalier-235/+791
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-01rustc: Remove useless call to tag_variant_with_id()Patrick Walton-1/+0
2011-04-01Cleanup typos and newlinesBrian Anderson-1/+1
2011-03-31Initialize the alloca used to retrieve boxed block results to null.Brian Anderson-11/+19
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-31Only use allocas to hold expression results for boxed typesBrian Anderson-18/+3
2011-03-31Add more comments to trans_blockBrian Anderson-1/+2
2011-03-31Modify trans.rs to allow blocks to result in boxed valuesBrian Anderson-0/+59
2011-03-31Add block_to_str and expr_to_str methods to the pprust module.Brian Anderson-0/+18
Since pprust is authed impure these can be used for debug logging.
2011-03-31rustc: Add a type annotation to tag itemsPatrick Walton-36/+35
2011-03-31rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead ↵Patrick Walton-10/+6
of ty_params, and to check in external crates
2011-03-31rustc: Use the path index. Speeds up compilation a lot.Patrick Walton-91/+48
2011-03-31rustc: Write out a path index as wellPatrick Walton-67/+124
2011-03-31Couple minor bug fixes in creader, lib-bitv, int, rand, sort, sha1, uint and ↵Graydon Hoare-0/+8
vec all work.
2011-03-31rustc: Use the crate index to look up defsPatrick Walton-29/+26
2011-03-31More stuff to go with the new expr_call_self AST nodeLindsey Kuper-0/+75
2011-03-31More machinery for adding an expr_call_self AST node.Lindsey Kuper-1/+18
2011-03-31rustc: Index only the local part of definition IDsPatrick Walton-16/+21