aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle/trans.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix temporary-spilling logic in trans_args, uncomment most of lib-deque.rs ↵Graydon Hoare2011-04-131-1/+5
| | | | (which now passes on stage0).
* Enable alias analysis and the function attributes pass.Rafael Ávila de Espíndola2011-04-131-4/+5
| | | | | The C API extension is already upstream, we can drop the local copy once the bots are updated.
* rustc: Switch to indices for type parametersPatrick Walton2011-04-121-64/+52
|
* Make glue always pass-by-alias and rename "scalar_or_boxed" concept to ↵Graydon Hoare2011-04-121-48/+73
| | | | "immediate"
* Tighten up condition on use of opaque_tag, remove blunt hammer of alias ↵Graydon Hoare2011-04-121-5/+20
| | | | arg-casting in trans_args.
* Enable more optimizations.Rafael Ávila de Espíndola2011-04-121-6/+6
|
* Remove silly legacy glue-offset encoding, predicate runtime adjustments by ↵Graydon Hoare2011-04-091-42/+24
| | | | ABI. LLVM should inline most glue now.
* Move to single-uint file-position representation.Marijn Haverbeke2011-04-091-2/+3
| | | | | | | | This makes passing them around cheaper. There is now a table (see front/codemap.rs) that is needed to transform such an uint into an actual filename/line/col location. Also cleans up the span building in the parser a bit.
* Make block results work for generic typesBrian Anderson2011-04-071-14/+17
| | | | | | | I think just about every type can be used as a block result now. There's quite a proliferation of tests here, but they all test slightly different things and some are split out to remain XFAILed. The tests of generic vectors are still XFAILed because generic aliased boxes still don't work in general.
* rustc: Pointer cast when crossing a box boundary for statically-sized ↵Patrick Walton2011-04-071-0/+4
| | | | elements in trans_index()
* rustc: Pointer cast when autodereferencing boxed tag typesPatrick Walton2011-04-071-1/+13
|
* rustc: Use the name "opaque_tag", not "tag", for opaque tagsPatrick Walton2011-04-071-1/+1
|
* Support for self-calls that take arguments.Lindsey Kuper2011-04-071-9/+1
| | | | | | | Nicer parsing of self-calls (expr_self_method nodes inside expr_call nodes, rather than a separate expr_call_self) makes typechecking tractable. We can now write self-calls that take arguments and return values (see: test/run-pass/obj-self-*.rs).
* rustc: Remove useless call to type_of() in trans_rec()Patrick Walton2011-04-071-1/+0
|
* rustc: Allow dereference expressions to be used as lvalues. Add a test case.Patrick Walton2011-04-071-20/+26
|
* Add a -O option and change the Makefile to use it.Rafael Ávila de Espíndola2011-04-071-5/+5
|
* rustc: Reindent line. Puts out burning tinderbox.Patrick Walton2011-04-071-2/+2
|
* rustc: Link to external tag discriminants. Un-XFAIL test/run-pass/lib-option.rs.Patrick Walton2011-04-071-44/+52
|
* Merge branch 'master' of github.com:graydon/rustPatrick Walton2011-04-071-8/+69
|\
| * Run optimizations.Rafael Ávila de Espíndola2011-04-071-5/+66
| | | | | | | | | | 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.
| * Continued sketching out code for checking states against preconditions.Tim Chevalier2011-04-061-3/+3
| | | | | | | | | | | | | | | | | | 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.
* | Merge branch 'master' of github.com:graydon/rustPatrick Walton2011-04-061-118/+129
|\|
| * Brute force and ignorance workaround for tag-and-generic-obj; un-XFAIL it.Graydon Hoare2011-04-051-0/+3
| |
| * Last pieces of self-call support.Lindsey Kuper2011-04-051-5/+30
| | | | | | | | | | | | | | | | 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!).
| * Further on the path toward self-awareness.Lindsey Kuper2011-04-051-108/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | 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()
| * FIx native wrapper generation to handle more arg types.Graydon Hoare2011-04-051-3/+23
| |
| * Knocking out a quick fixme: pretty-printing exprs in error messages.Lindsey Kuper2011-04-051-2/+3
| |
| * Make box prefix operator and box type carry mutability flag.Graydon Hoare2011-04-041-5/+5
| |
* | rustc: Make type_of() return the type of the wrapper for native functions. ↵Patrick Walton2011-04-031-4/+4
|/ | | | lib-map now compiles, but fails to work properly.
* Begin comparing vectors from the correct addressBrian Anderson2011-04-031-1/+1
| | | | Start at the first element instead of the address of the vector.
* Change rust_vec to have a 16-byte header, to 16-byte-align vec-body data. ↵Graydon Hoare2011-04-021-0/+2
| | | | Major perf win.
* Add FIXMEs around type handling in trans_if, trans_altBrian Anderson2011-04-021-0/+2
|
* Join the results of alt arms so alt can be used as an expression.Brian Anderson2011-04-021-12/+18
| | | | Un-XFAIL expr-alt.rs.
* Make join_results branch into the join block even when only one edge is live.Brian Anderson2011-04-021-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.
* Fail on non-exhaustive alt matchesBrian Anderson2011-04-021-3/+3
|
* Terminate fail blocks by making their ends unreachable.Brian Anderson2011-04-021-3/+3
| | | | This will make implementing default alt arms simpler.
* Support for passing native types through metadata/creader.Graydon Hoare2011-04-011-1/+3
|
* Guh. Actually commit the staged undo-of-indentation. Forgotten git staging ↵Graydon Hoare2011-04-011-56/+56
| | | | wins again.
* Switch private linkage to local, re-indent trans.rs.Graydon Hoare2011-04-011-70/+70
|
* rustc: Get tag variants from the crate metadataPatrick Walton2011-04-011-1/+4
|
* rustc: Have tag_variants() return a new variant_info structure instead of an ↵Patrick Walton2011-04-011-37/+40
| | | | AST node
* Started adding support for typestate checking.Tim Chevalier2011-04-011-11/+12
| | | | | | | | | | | | | | | 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.
* rustc: Remove useless call to tag_variant_with_id()Patrick Walton2011-04-011-1/+0
|
* Cleanup typos and newlinesBrian Anderson2011-04-011-1/+1
|
* Initialize the alloca used to retrieve boxed block results to null.Brian Anderson2011-03-311-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.
* Only use allocas to hold expression results for boxed typesBrian Anderson2011-03-311-18/+3
|
* Add more comments to trans_blockBrian Anderson2011-03-311-1/+2
|
* Modify trans.rs to allow blocks to result in boxed valuesBrian Anderson2011-03-311-0/+59
|
* rustc: Add a type annotation to tag itemsPatrick Walton2011-03-311-7/+7
|
* rustc: Make tag_ty_params() and substitute_ty_params() take def ids instead ↵Patrick Walton2011-03-311-7/+3
| | | | of ty_params, and to check in external crates