about summary refs log tree commit diff
path: root/src/comp/middle/tstate/annotate.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-75/+0
2012-02-22Stop normalizing patternsMarijn Haverbeke-6/+7
The check for whether a pat_ident is a variant or a binding is simple and fast. Normalizing patterns again and again is slow and error-prone (several places were forgetting to do it).
2012-02-09Remove some pointless importsMarijn Haverbeke-1/+0
2012-01-17Allow omission of the '.' after nullary tag patternsTim Chevalier-2/+2
This commit allows patterns like: alt x { some(_) { ... } none { } } without the '.' after none. The parser suspends judgment about whether a bare ident is a tag or a new bound variable; instead, the resolver disambiguates. This means that any code after resolution that pattern-matches on patterns needs to call pat_util::normalize_pat, which consults an environment to do this disambiguation. In addition, local variables are no longer allowed to shadow tag names, so this required changing some code (e.g. renaming variables named "mut", and renaming ast::sub to subtract). The parser currently accepts patterns with and without the '.'. Once the compiler and libraries are changed, it will no longer accept the '.'.
2012-01-05require a non-semi expr acting as a stmt to have unit return typeNiko Matsakis-7/+2
2011-12-29split proto from fn_decl, as not all fn_decls know the proto.Niko Matsakis-3/+3
this will address the (crashing) new test added.
2011-12-23Go back to a single visit_fn function in visit.rsMarijn Haverbeke-3/+3
2011-12-22Register new snapshots, purge log_err and log_full in favour of log(...).Graydon Hoare-3/+3
2011-12-22Register snapshots and switch logging over to use of log_full or #error / ↵Graydon Hoare-3/+3
#debug.
2011-12-21Make { || ... } sugar for any type of closure, inferredNiko Matsakis-12/+10
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-1/+1
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-10Cleanup unused importsHaitao Li-7/+3
2011-09-12Factor imports mindlessly.Graydon Hoare-19/+6
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-12/+12
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-02Reformat. Issue #855Brian Anderson-3/+3
2011-09-01Rename std::istr to std::str. Issue #855Brian Anderson-1/+1
2011-09-01Remove various istr conversions. Issue #855Brian Anderson-1/+1
2011-08-27Convert std::int to istrs. Issue #855Brian Anderson-3/+3
2011-08-27Convert std::uint to istrs. Issue #855Brian Anderson-1/+2
2011-08-22Move functions from syntax::ast to syntax::ast_utilBrian Anderson-0/+1
This leaves syntax::ast just defining the AST, which strikes me as somewhat nicer
2011-08-20ReformatBrian Anderson-7/+7
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-15The wonky for...in... whitespace was bothering me. Sorry!Lindsey Kuper-1/+1
2011-08-09Port the compiler to the ivec type [T] syntax.Erick Tryzelaar-10/+10
2011-08-03Make ast::pat_bindings an iteratorMarijn Haverbeke-3/+1
And use it to get rid of some repetetive code
2011-08-01Partially implement destructuring localsMarijn Haverbeke-1/+3
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-27Reformat for new syntaxMarijn Haverbeke-41/+38
2011-07-26Convert all code that uses walk.rs in the straightforward way to simple_visitMarijn Haverbeke-12/+12
Code that needs the keep_going functionality is still using walk. I will add an equivalent to visit.rs later.
2011-07-25Rename the block type to be blk also. Sorry.Michael Sullivan-1/+1
2011-07-12rustc: Remove some useless std::vec importsPatrick Walton-1/+0
2011-07-07rustc: Change lots of AST nodes to use interior vectorsPatrick Walton-3/+3
2011-07-06rustc: Move tstate::annotate over to interior vectorsPatrick Walton-12/+12
2011-07-06rustc: Revert the conversion to interior vectors due to heap corruptionPatrick Walton-12/+12
2011-07-06rustc: Move tstate::annotate over to interior vectorsPatrick Walton-12/+12
2011-07-06Remove temporary stdlib placeholders, use actual stdlib functionsMarijn Haverbeke-6/+6
(Possible now that a snapshot took place.)
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-5/+6
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-06-30Warn for unused variablesTim Chevalier-10/+10
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-24Modify the fn vistors in walk so that they can handle functions without ↵Michael Sullivan-4/+5
names. Update the typestate code to understand this.
2011-06-24Remove uses of variable name 'res' from rustcMarijn Haverbeke-14/+14
This in preparation of making 'res' a keyword for defining resources. Please don't introduce too many new ones in the meantime...
2011-06-21Move expr ids into the expr record typeMarijn Haverbeke-2/+1
This simplifies the tag variants a bit and makes expr_node_id obsolete.
2011-06-20Get rid of def_ids and anns in AST nodes, use single node_idMarijn Haverbeke-28/+28
This reduces some redundancy in the AST data structures and cruft in the code that works with them. To get a def_id from a node_id, apply ast::local_def, which adds the local crate_num to the given node_id. Most code only deals with crate-local node_ids, and won't have to create def_ids at all.
2011-06-15Reformat source tree (minus a couple tests that are still grumpy).Graydon Hoare-32/+27
2011-06-13Change decl to local in expr_for and expr_for_eachTim Chevalier-41/+4
Since the decl in a for or for-each loop must always be a local decl, I changed the AST to express this. Fewer potential match failures and "the impossible happened" error messages = yay!
2011-06-10Fix unsafe uses of mutable referencesMarijn Haverbeke-10/+10
2011-06-01Redo typestate-related data structures to support predicate constraints. No ↵Tim Chevalier-4/+4
actual support yet, just infrastructure.
2011-05-26Track spans for each local variable in typestateTim Chevalier-8/+10
This lets us print better messages in situations with name shadowing.
2011-05-24Just removing some unnecessary imports.Lindsey Kuper-37/+0
2011-05-20Change node_ann hash table to a vector in typestateTim Chevalier-6/+7
2011-05-19Add ann as an argument to visit_fnTim Chevalier-7/+8
2011-05-19Add ident as an argument to visit_fn (typestate wants it)Tim Chevalier-10/+8