about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-08-04Use lambdas in gather_locals in typeck.Michael Sullivan-57/+36
2011-08-04Use lambdas in the freevars pass.Michael Sullivan-64/+50
2011-08-04rustc: Use memmove in copy_ty. 45% LLVM codegen speed improvement.Patrick Walton-2/+7
2011-08-04Handle alt on a _|_ - typed valueTim Chevalier-1/+1
Return the result of the discriminant from trans_alt, rather than nil, in the _|_ case. This was breaking the enclosed test case (alt-bot-2) when optimization was disabled. Closes #769
2011-08-04Add a fast path in ty::occurs_check_failsTim Chevalier-1/+5
Use type_contains_vars in occurs_check_fails to avoid doing any work most of the time. This fixes a performance regression. (No one else noticed yet that typechecking just got 4x slower, right? Well, now it isn't anymore. :-})
2011-08-04Implement the occurs checkTim Chevalier-14/+78
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-04trans_args no longer needs llobj argument.Lindsey Kuper-3/+2
2011-08-04rustc: Actually emit shapesPatrick Walton-51/+59
2011-08-04rustc: Generate shapesPatrick Walton-19/+625
2011-08-03Killing an obsolete comment.Lindsey Kuper-1/+0
2011-08-03Pointer-ifying llenv. Step 1 of 2 steps to object system sanity.Lindsey Kuper-38/+8
2011-08-03Put comments on trans contexts back where they belong. :(Lindsey Kuper-108/+114
2011-08-03Fix trans_put to properly return (). Closes #773.Michael Sullivan-1/+2
2011-08-03Make the pretty printer put trailing newlines at the end of files.Michael Sullivan-0/+3
2011-08-03Clean up how we deal with dynamic size function arguments/returns.Michael Sullivan-57/+24
2011-08-03Have trans_bind_thunk handle polymorphic but statically sized return values.Michael Sullivan-1/+3
Closes #775.
2011-08-03Revert "Revert "Handle conditionals on _|_ - typed values correctly""Tim Chevalier-0/+12
This reverts commit ea81c03960264bf590cd99ed2b662243e3db7a7c. 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-03Add #concat_idents[] and #ident_to_str[]Paul Stansifer-9/+57
2011-08-03Reject programs that do a put outside of iterators.Michael Sullivan-4/+7
Closes #774.
2011-08-03Do a bunch more typechecking for iters and for each loops.Michael Sullivan-31/+62
Closes #771. Closes #772. Closes #796.
2011-08-03Code cleanup in check_expr.Michael Sullivan-163/+149
2011-08-03Fix typechecking when spawning something type inferred.Michael Sullivan-8/+10
Of course, we still don't *translate* it. Closes #757.
2011-08-03parse_crate_from_source_str takes a parse_sess, not codemapBrian Anderson-3/+2
This was causing problems when reading from stdin for subsequent passes that needed to generate node ids.
2011-08-03Fix pretty-printer to read from files againBrian Anderson-1/+5
I accidentally made the pretty-printer always read from stdin
2011-08-03Pretty-print kinds of type paramsBrian Anderson-0/+9
2011-08-03Disambiguate unop statements in pretty-printer. Closes #674Brian Anderson-1/+44
2011-08-03Revert "Handle conditionals on _|_ - typed values correctly"Brian Anderson-12/+0
This reverts commit 13f8b3f2a67a4e3a7a26b0e238e1b6ce9e1f3573. run-pass/if-ret.rs does not translate correctly when unoptimized. Issue #797
2011-08-03Make ast::pat_bindings an iteratorMarijn Haverbeke-74/+48
And use it to get rid of some repetetive code
2011-08-02Handle _|_ - typed discriminants in alts correctlyTim Chevalier-1/+12
Stop me, won't you, if you've heard this one before? Closes #794
2011-08-02Handle conditionals on _|_ - typed values correctlyTim Chevalier-0/+12
Closes #776
2011-08-02Make _|_ type binopableTim Chevalier-18/+20
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-02Pretty-print fn constraints more correctishBrian Anderson-5/+27
2011-08-02Don't pp extra lines after block open when preserving whitespace. Closes #759Brian Anderson-1/+15
2011-08-02 In trans, don't assume both sides of a binop have the same typeTim Chevalier-18/+39
This was at least partially responsible for Issue 777. The only solution I can think of is for trans to just not generate code for a comparison if one or both sides has type _|_. Since that means evaluating that subexpression diverges, it should be ok to never do the comparison. Actually generating code for the comparison would trip an LLVM assertion failure.
2011-08-02Refactor: a backwarding vtable can only have one kind of method.Lindsey Kuper-18/+7
2011-08-02Comment tweaks and re-flows.Lindsey Kuper-30/+24
2011-08-02Consolidate environment building/loading between closure types.Michael Sullivan-153/+102
2011-08-02Track the node_id of the function in trans_common::fn_ctxt.Michael Sullivan-31/+25
2011-08-02Use GEPi a bunch.Michael Sullivan-28/+14
2011-08-02Allow patterns of the form `[a, b, c ...] to be matched and transcribed.Paul Stansifer-62/+80
2011-08-02Use or-patterns in trans::trans_compare, eliminating a FIXMETim Chevalier-14/+7
2011-08-02Use ioivec::read_whole_file_str in a few placesBrian Anderson-4/+2
2011-08-02Add a --no-trans command line optionBrian Anderson-5/+16
Runs all passes before translation. This will be used for pretty-printing tests to verify that the results are still probably valid Rust code.
2011-08-02Compiler accepts input from stdin when source file is called "-"Brian Anderson-17/+66
2011-08-02Assign collection element ty to loop local tvar when checking loopsMarijn Haverbeke-2/+5
This makes the type declarationg for the loop variable optional in most cases. Closes #790
2011-08-02Do not try to save block result when the block is an iter bodyMarijn Haverbeke-1/+2
Closes #791
2011-08-02Be a little more clever about picking columns to match on in trans_altMarijn Haverbeke-4/+34
This should result in slightly more efficient matching of 'complex' patterns with multiple discriminants in them.
2011-08-02Copy locals created by destructuring on the content of a boxMarijn Haverbeke-8/+19
This is required so that assigning to these locals doesn't clobber the content of the box. (A possible optimization would be to only do this copying for locals that actually are assigned to.)
2011-08-02Move ppaux::ty_to_str to new record syntaxMarijn Haverbeke-2/+2
2011-08-02Improve handling of bottom type in alt armsMarijn Haverbeke-0/+1