about summary refs log tree commit diff
path: root/src/comp/middle/tstate
AgeCommit message (Collapse)AuthorLines
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-41/+41
2011-07-12rustc: Remove a few scattered uses of exterior vectors from typestatePatrick Walton-18/+6
2011-07-12rustc: Remove some useless std::vec importsPatrick Walton-2/+0
2011-07-12rustc: Remove some interior vectors from typestate and some useless ↵Patrick Walton-11/+4
vec-related imports
2011-07-12rustc: Simplify tritv::copy; shaves a couple of seconds off typestate.Patrick Walton-17/+4
2011-07-12Add missing filesTim Chevalier-111/+44
git add didn't, so this actually has the changes that should have been in the previous commit
2011-07-11Add elipses, reorganize the macro components into their own AST node.Paul Stansifer-2/+2
2011-07-11Move macro expansion to a separate phase, change macro syntax, and add ↵Paul Stansifer-5/+4
parse_sess to session.
2011-07-11Move visit to newtype-style nominal typeMarijn Haverbeke-6/+5
This makes getting the function fields out of the visitor less cumbersome and more efficient (no take/drop).
2011-07-08Propagate constraints through copy, move, and swapTim Chevalier-133/+442
Assignments and moves with a simple local variable reference on the RHS now propagate any typestate constraints the RHS was involved in to the LHS. Swaps where both sides are local variables exchange the constraints. This was a pain in the butt and I'm still not proud of the resulting code. Needs refactoring like whoa.
2011-07-08Minor refactoringTim Chevalier-3/+11
2011-07-07rustc: Change lots of AST nodes to use interior vectorsPatrick Walton-62/+66
2011-07-06rustc: Make AST paths use interior vectorsPatrick Walton-2/+2
2011-07-06rustc: Move middle::tstate::collect_locals over to interior vectorsPatrick Walton-9/+9
2011-07-06rustc: Remove unused or seldom-used imports from ↵Patrick Walton-8/+1
middle::tstate::{bitvectors, ck}
2011-07-06rustc: Remove some unused references to std::vec from tstate::ann and ↵Patrick Walton-6/+1
tstate::auxiliary
2011-07-06rustc: Move middle::tstate::auxiliary and middle::tstate::bitvectors over to ↵Patrick Walton-123/+131
interior vectors
2011-07-06rustc: Move tstate::annotate over to interior vectorsPatrick Walton-12/+12
2011-07-06rustc: Make the various constraint-related types in middle::ty use interior ↵Patrick Walton-4/+24
vectors
2011-07-06rustc: Change constraints in types to use interior vectorsPatrick Walton-2/+2
2011-07-06Simplify AST for expr_anon_obj.Lindsey Kuper-2/+2
2011-07-06rustc: Revert the conversion to interior vectors due to heap corruptionPatrick Walton-178/+162
2011-07-06rustc: Make AST paths use interior vectorsPatrick Walton-2/+2
2011-07-06rustc: Move middle::tstate::collect_locals over to interior vectorsPatrick Walton-9/+9
2011-07-06rustc: Remove unused or seldom-used imports from ↵Patrick Walton-8/+1
middle::tstate::{bitvectors, ck}
2011-07-06rustc: Remove some unused references to std::vec from tstate::ann and ↵Patrick Walton-6/+1
tstate::auxiliary
2011-07-06rustc: Move middle::tstate::auxiliary and middle::tstate::bitvectors over to ↵Patrick Walton-123/+131
interior vectors
2011-07-06rustc: Move tstate::annotate over to interior vectorsPatrick Walton-12/+12
2011-07-06rustc: Make the various constraint-related types in middle::ty use interior ↵Patrick Walton-4/+24
vectors
2011-07-06rustc: Change constraints in types to use interior vectorsPatrick Walton-2/+2
2011-07-06Remove temporary stdlib placeholders, use actual stdlib functionsMarijn Haverbeke-23/+23
(Possible now that a snapshot took place.)
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-71/+69
src/comp/syntax is currently just a sub-module of rustc, but it will, in the near future, be its own crate. This includes: - The AST data structure - The parser - The pretty-printer - Visit, walk, and fold - The syntax extension system - Some utility stuff that should be in the stdlib* *) Stdlib extensions currently require a snapshot before they can be used, and the win build is very broken right now. This is temporary and will be cleaned up when one of those problems goes away. A lot of code was moved by this patch, mostly towards a more organized layout. Some package paths did get longer, and I guess the new layout will take some getting used to. Sorry about that! Please try not to re-introduce any dependencies in syntax/ on any of the other src/comp/ subdirs.
2011-07-02Allow any string expression to be used with fail.Josh Matthews-4/+18
2011-06-30Don't warn about unused for-loop index variablesTim Chevalier-0/+4
2011-06-30Kill unused variablesTim Chevalier-14/+5
2011-06-30Warn for unused variablesTim Chevalier-48/+98
Modify typestate to check for unused variables and emit warnings where relevant. This exposed a (previously harmless) bug in collect_locals where outer functions had bit-vector entries for init constraints for variables declared in their inner nested functions. Fixing that required changing collect_locals to use visit instead of walk -- probably a good thing anyway.
2011-06-29Re-enable tidy (it was broken) and fix various non-tidy things.Graydon Hoare-1/+1
2011-06-29Remove workaround for a compiler bug that, I guess, got fixedTim Chevalier-14/+3
2011-06-28Remove outdated commentsTim Chevalier-2/+0
2011-06-28Implement "claim"Tim Chevalier-3/+3
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-28Teach the parser and typechecker to understand port[int](). Closes #588Eric Holk-2/+2
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-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-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-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-1/+8
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.
2011-06-24Modify the fn vistors in walk so that they can handle functions without ↵Michael Sullivan-15/+22
names. Update the typestate code to understand this.