about summary refs log tree commit diff
path: root/src/comp/middle
AgeCommit message (Collapse)AuthorLines
2011-06-29rustc: Fix a leak that resulted from copying a structural interior type ↵Patrick Walton-12/+5
containing interior vectors. Add a test case.
2011-06-29rustc: Unbreak self assignmentPatrick Walton-6/+13
2011-06-29Extend visit to use visit_fn to visit fn expressions.Michael Sullivan-11/+12
2011-06-28Replace common::new_seq_hash with an adapter around std::smallintmapBrian Anderson-1/+69
It would be better to either convert ast_map to use smallintmap or make smallintmap and hashmap follow the same interface, but I don't feel up to it just now. Closes #585.
2011-06-28Comments and cleanup.Lindsey Kuper-4/+9
2011-06-28Comments and cleanup.Lindsey Kuper-34/+95
2011-06-28Support attaching attributes to modules via the crate file. Issue #487Brian Anderson-4/+4
2011-06-28rustc: Move duplicate_heap_parts to copy glue; add a test casePatrick Walton-10/+18
2011-06-28Remove outdated commentsTim Chevalier-2/+0
2011-06-28Require that both sides of a swap be lvals.Michael Sullivan-5/+12
2011-06-28Cleanup attribute code. Issue #487Brian Anderson-0/+1
2011-06-28rustc: Rename take glue to copy gluePatrick Walton-26/+26
2011-06-28Implement "claim"Tim Chevalier-7/+15
Implement "claim" (issue #14), which is a version of "check" that doesn't really do the check at runtime. It's an unsafe feature. The new flag --check-claims turns claims into checks automatically -- but it's off by default, so by default, the assertion in a claim doesn't execute at runtime.
2011-06-28Re-enabling some tests.Eric Holk-1/+1
2011-06-28Teach the parser and typechecker to understand port[int](). Closes #588Eric Holk-6/+14
2011-06-28Extract meta_item sorting from back::link to middle::attrBrian Anderson-0/+34
2011-06-28Add comments to middle::attr. Issue #487Brian Anderson-0/+3
2011-06-28Rework how linkage attributes are determinedBrian Anderson-1/+39
The meta items within a crate's link attribute are used in linkage: #[link(name = "std", vers = "1.0", custom = "whatever")]; Name and vers are treated specially, and everything else is hashed together into the crate meta hash. Issue #487
2011-06-28Add some helper functions for attributes. Issue #487Brian Anderson-0/+74
2011-06-28Handle lazy binops properly in typestateTim Chevalier-7/+26
The typestate analysis now reflects that the second operand of a logical and or or may not be evaluated.
2011-06-28rustc: Add a "type-owns-heap-mem" cache. 2x translation speedup.Patrick Walton-0/+10
2011-06-28rustc: Don't call cmp glue if the type is a simple scalarPatrick Walton-39/+60
2011-06-28Add test cases for resourcesMarijn Haverbeke-1/+1
2011-06-28Fix bug that prevented boxes-in-resources from being freedMarijn Haverbeke-1/+1
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-28Add simple syntax extension (#simplext)Paul Stansifer-2/+0
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-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-27Move what's left of metadata::cwriter into middle::transBrian Anderson-3/+17
2011-06-27Extract metadata::decoder from metadata::creaderBrian Anderson-7/+10
2011-06-27Move metadata::cwriter::encode to metadata::tyencodeBrian Anderson-4/+5
2011-06-27Rename middle::metadata to metadata::cwriter. Move creader to metadataBrian Anderson-825/+9
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-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-26Add a very simple map implementation for sequential integer keysBrian Anderson-1/+1
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/+9
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-12/+152
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-24Invalidate constraints correctly after an assignment expressionTim Chevalier-374/+397
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.