about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
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
2011-08-01Handle bang functions correctly in typestateTim Chevalier-59/+113
The logic for how the "returns" constraint was handled was always dodgy, for reasons explained in the comments I added to auxiliary::fn_info in this commit. Fixed it by adding distinct "returns" and "diverges" constraints for each function, which are both handled positively (that is: for a ! function, the "diverges" constraint must be true on every exit path; for any other function, the "returns" constraint must be true on every exit path). Closes #779
2011-08-01Fix incorrect uses of str::buf()Paul Stansifer-11/+18
2011-08-01Fix closures over dynamically-sized polymorphic values.Michael Sullivan-17/+44
2011-08-01Fix closures over known-size polymorphic values.Michael Sullivan-15/+15
2011-08-01Add a GEPi function that wraps GEP with integer arguments.Michael Sullivan-12/+22
2011-08-01Add check for irrefutable patterns in destructuring localsMarijn Haverbeke-4/+35
2011-08-01Partially implement destructuring localsMarijn Haverbeke-249/+307
You can now say let {bcx, val} = some_result_returner(); Similar for loop variables. Assigning to such variables is not safe yet. Function arguments also remain a TODO.
2011-07-31Get rid of walk.rsMarijn Haverbeke-463/+0
And we're down to a single AST walker again
2011-07-31Remove unused importsTim Chevalier-2/+0
2011-07-31Change bitvectors::relax_precond_block to use visit instead of walkTim Chevalier-24/+28
2011-07-29Fix bug in typechecker counting occurrences of typarams in instantiation ↵Graydon Hoare-6/+6
rather than checking formals list.
2011-07-29Enable kind checking on typarams, fix kind constraints in library and comp.Graydon Hoare-15/+38
2011-07-29Switch the heap build and load environment functions to use GEP_tup_like.Michael Sullivan-25/+29
2011-07-29Initial trans of lambdas. Doesn't work with polymorphism yet.Michael Sullivan-8/+61
2011-07-29Refactor typestate code involving stmt_declsTim Chevalier-94/+129
To handle multiple-LHS declarations with initializers properly, I changed seq_states to take a list of expressions paired with optional names, not just a list of expressions. Then, the same logic that handles ordered lists of subexpressions everywhere else can handle multi- declarations.
2011-07-29Encode, decode, and thread through typechecking all the param kinds, not ↵Graydon Hoare-104/+143
just the counts.
2011-07-29Do some cleanup in load_environment.Michael Sullivan-30/+23
2011-07-29Add in some missing cases for typestate with closures.Michael Sullivan-2/+5
2011-07-29Don't confuse backwards and forwards.Lindsey Kuper-3/+7
Oops. If we already have a backwarding vtable, that means that we are currently building a forwarding fn. (Progress toward issue #702.)
2011-07-29Comments and cleanup, in preparation for more work on issue #702.Lindsey Kuper-19/+56
2011-07-29Get rid of an obsolete comment now that obj dtors are gone.Lindsey Kuper-3/+0
2011-07-29Disallow overloading a method with one of different type. Closes #703.Lindsey Kuper-7/+12
2011-07-29Turn on kind propagation for typarams. Annotate a bunch of typarams in rustc ↵Graydon Hoare-5/+2
and libstd.
2011-07-29Remove unreachable statementsMarijn Haverbeke-33/+25
2011-07-29Track failures in typeck, assign proper type to failing blocksMarijn Haverbeke-90/+126
(and warn for unreachable statements) Closes #727
2011-07-29Typechecking bugfix for anon objs. Removes duplicate methods in outerLindsey Kuper-0/+20
object types.
2011-07-29Formatting tweaks.Lindsey Kuper-8/+5
2011-07-29Parse anonymous objs in statement positionMarijn Haverbeke-32/+21
Closes #761