about summary refs log tree commit diff
path: root/src/comp
AgeCommit message (Collapse)AuthorLines
2011-06-28Add some missing cases for ty_res in ty.rsMarijn Haverbeke-2/+28
2011-06-28Make it possible to use * to dereference a resourceMarijn Haverbeke-9/+16
2011-06-28'#simplext' -> '#macro'Paul Stansifer-1/+1
2011-06-28Add simple syntax extension (#simplext)Paul Stansifer-42/+202
2011-06-28Add AST fold.Paul Stansifer-0/+690
2011-06-28Properly guard resource values against double-dropMarijn Haverbeke-18/+51
Ths involved adding an extra field to their representation, so that there is something to check for zero.
2011-06-28Use "" in the native_name as an indication that no extra options have toRafael Ávila de Espíndola-9/+6
be passed to the "linker". Use that for libc.
2011-06-27rustc: Call cmp glue directly if we statically know itPatrick Walton-3/+11
2011-06-27rustc: Fix stack explosion on -O0 from Alloca() instead of alloca() in cmp gluePatrick Walton-1/+1
2011-06-27Tests for while loops that may invalidate constraintsTim Chevalier-96/+150
Wrote some small test cases that use while loops and moves, to make sure the poststate for the loop body gets propagated into the new prestate and deinitialization gets reflected. Along with that, rewrite the code for intersecting states. I still find it dodgy, but I guess I'll continue trying to add more tests. Also, I'll probably feel better about it once I start formalizing the algorithm.
2011-06-27pure_exp should set the state, not extend itTim Chevalier-2/+2
This fixes a bug where de-initializations were getting masked (and programs that used a variable that had been de-initialized snuck through).
2011-06-27Rename metadata::defs to metadata::tagsBrian Anderson-4/+4
2011-06-27Don't export some of the metadata modulesBrian Anderson-0/+5
2011-06-27Move what's left of metadata::cwriter into middle::transBrian Anderson-15/+17
2011-06-27Cleanup in metadata moduleBrian Anderson-2/+8
2011-06-27Extract metadata::decoder from metadata::creaderBrian Anderson-274/+295
2011-06-27Extract metadata::tydecode from metadata::creaderBrian Anderson-387/+400
2011-06-27Extract llvm-independent code from cwriter to metadata::encoderBrian Anderson-486/+485
2011-06-27Move metadata tag definition to metadata::defsBrian Anderson-92/+77
2011-06-27Limit exports from metadata::tyencodeBrian Anderson-0/+7
2011-06-27Move metadata::cwriter::encode to metadata::tyencodeBrian Anderson-245/+262
2011-06-27Rename middle::metadata to metadata::cwriter. Move creader to metadataBrian Anderson-50/+54
Preparation for a lot more metadata refactoring
2011-06-27Limit exports from middle::metadataBrian Anderson-0/+26
2011-06-27rustc: Directly emit calls to glue if possiblePatrick Walton-2/+27
2011-06-27Index obj and res ctor metadata by ctor id, not item idBrian Anderson-12/+16
Both the type and the ctor were trying to use the same id and this was making creader unable to find the ctor when running 'rustc --ls'
2011-06-27Record and link with used native libraries.Rafael Ávila de Espíndola-21/+66
2011-06-27removing log statement that snuck in thereTim Chevalier-1/+0
2011-06-27Implement move for scalar valuesTim Chevalier-1/+3
Before, something like: let int y = 42; let int x; x <- y; would cause an LLVM assertion failure. Fixed it.
2011-06-26Update README filesBrian Anderson-45/+44
2011-06-26Add a very simple map implementation for sequential integer keysBrian Anderson-1/+104
Use it for the ast_map. Cuts 40% off the time spent prior to LLVM.
2011-06-26Reformulate an assert in ty::tag_variantsBrian Anderson-2/+7
This was doing a redundant hashmap lookup. Removing the redundancy trims 5% (2.8s) off rustc's compile time
2011-06-25Fail typechecking for bad binop/type combinationsBrian Anderson-13/+117
Includes assignment operations. Add regression tests for lots of less useful, less used or unexpected combinations, as well as a selection of compile-fail tests. Closes #500 (again!)
2011-06-25Use single-bar or to make tstate/states.rs prettierMarijn Haverbeke-173/+89
Sorry. This is the kind of thing I do when I'm on a plane and too tired to manage anything that requires thinking.
2011-06-25Primitive support for non-copyable valuesMarijn Haverbeke-10/+25
2011-06-25Allow moving out of temporary valuesMarijn Haverbeke-15/+16
This will probably need more work, as moving doesn't appear to do quite the right thing yet in general, and we should also check somewhere that we're not, for example, moving out the content out of an immutable field (probably moving out of fields is not okay in general).
2011-06-25Partial implementation of resourcesMarijn Haverbeke-17/+198
Non-copyability is not enforced yet, and something is still flaky with dropping of the internal value, so don't actually use them yet. I'm merging this in so that I don't have to keep merging against new patches.
2011-06-25Remove variable name 'res' from test suiteMarijn Haverbeke-6/+6
2011-06-24Fix inexhaustive match in parserTim Chevalier-0/+7
2011-06-24Invalidate constraints correctly after an assignment expressionTim Chevalier-374/+400
Modified typestate to throw away any constraints mentioning a variable on the LHS of an assignment, recv, assign_op, or on either side of a swap. Some code cleanup as well.
2011-06-24Use visit_fn_{pre,post} to avoid going past lambdas during writeback instead ↵Michael Sullivan-10/+13
of explicitly casing.
2011-06-24Have walk call visit_fn_pre and visit_fn_post on fn expressions.Michael Sullivan-2/+1
As a side effect, this fixes a bug where typestate would not properly be checked inside of fn expressions.
2011-06-24Modify the fn vistors in walk so that they can handle functions without ↵Michael Sullivan-25/+42
names. Update the typestate code to understand this.
2011-06-24rustc: Increment by the unit size in iter_structural_ty when iterating over ↵Patrick Walton-2/+10
interior vectors if the unit size is dynamic
2011-06-24Sanitize use of ids for obj constructors.Marijn Haverbeke-14/+12
Typeck and trans used to, by historical coincidence, use the item_obj node id, which was used to identify the obj type by the rest of the system, for the constructor function. This is now identified by the ctor id stored in the tag throughout.
2011-06-24Remove uses of variable name 'res' from rustcMarijn Haverbeke-331/+321
This in preparation of making 'res' a keyword for defining resources. Please don't introduce too many new ones in the meantime...
2011-06-24Remove def_objMarijn Haverbeke-28/+7
Since obj constructors and types have different def_ids now, their def can simply be a def_fn and a def_ty.
2011-06-24rustc: If needed, duplicate types' heap parts recursively through structural ↵Patrick Walton-32/+65
types
2011-06-23rustc: Pretty-print ternary operatorBrian Anderson-0/+14
2011-06-23rustc: Cleanup trans_if, trans_altBrian Anderson-36/+6
2011-06-23rustc: Add ternary operator. Closes #565Brian Anderson-2/+64
The implementation is so simple it might be considered cheating: at almost every step the expr_ternary is just converted to expr_if.