about summary refs log tree commit diff
path: root/src/comp/middle/tstate/ck.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-201/+0
2012-02-09Remove some pointless importsMarijn Haverbeke-1/+0
2012-02-08Monomorphize resource and variant constructorsMarijn Haverbeke-4/+4
Issue #1736
2012-02-06Make ty::t type self-sufficientMarijn Haverbeke-1/+1
It is now no longer needed to have a ty::ctxt to get at the contents of a ty::t. The straight-forward approach of doing this, simply making ty::t a box type, unfortunately killed our compiler performance (~15% slower) through refcounting cost. Thus, this patch now represents ty::t as an unsafe pointer, assuming that the ty::ctxt, which holds these boxes alive, outlives any uses of the ty::t values. In the current compiler this trivially holds, but it is does of course add a new potential pitfall. ty::get takes a ty::t and returns a boxed representation of the type. I've changed calls to ty::struct(X) to do ty::get(X).struct. Type structs are full of vectors, and copying them every time we wanted to access them was a bit of a cost.
2012-01-12Make driver::session::session no longer an objectMarijn Haverbeke-0/+1
Rather, it is now a struct where properties like opts are accessed directly, and the error-reporting methods are part of a static impl (with the same name as the type).
2011-12-29split proto from fn_decl, as not all fn_decls know the proto.Niko Matsakis-11/+10
this will address the (crashing) new test added.
2011-12-23Go back to a single visit_fn function in visit.rsMarijn Haverbeke-6/+6
2011-12-22Register new snapshots, purge log_err and log_full in favour of log(...).Graydon Hoare-1/+1
2011-12-22Merge all 3 log syntaxes, tidy up residual misuses.Graydon Hoare-3/+3
2011-12-22Merge branch 'master' of github.com:graydon/rustGraydon Hoare-3/+1
2011-12-22Register snapshots and switch logging over to use of log_full or #error / ↵Graydon Hoare-1/+1
#debug.
2011-12-22Unify some data structures in syntax::ast that were doing the same thingMarijn Haverbeke-3/+1
As a preparation to removing some duplication in typeck.
2011-12-21Make { || ... } sugar for any type of closure, inferredNiko Matsakis-28/+36
2011-12-19integrate cap clause into type state, but not transNiko Matsakis-9/+7
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-8/+5
2011-10-21Drop support for iter, put, and for-eachMarijn Haverbeke-4/+3
Closes #1056
2011-10-20Make fn denote a bare function. Convert fn to fn@ as neededBrian Anderson-1/+2
2011-09-14Rename ast::controlflow to ast::ret_styleMarijn Haverbeke-2/+2
It will include information about returning by alias.
2011-09-12Factor imports mindlessly.Graydon Hoare-35/+9
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-10/+9
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-27/+20
2011-09-01Rename std::istr to std::str. Issue #855Brian Anderson-1/+1
2011-08-31Check all paths return properly in blocks. Closes #874.Michael Sullivan-1/+1
2011-08-27Convert rustc::driver::session to istrs. Issue #855Brian Anderson-12/+12
2011-08-27Convert pretty-printer to istrs. Issue #855Brian Anderson-5/+6
2011-08-27Convert the rest of rustc::middle to istrs. Issue #855Brian Anderson-14/+14
2011-08-27Convert ast::ident to istr. Issue #855Brian Anderson-5/+12
2011-08-22Move functions from syntax::ast to syntax::ast_utilBrian Anderson-1/+1
This leaves syntax::ast just defining the AST, which strikes me as somewhat nicer
2011-08-20ReformatBrian Anderson-8/+9
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-18Don't warn about unused vars whose name starts with _Marijn Haverbeke-2/+3
Closes #832
2011-08-16Port the compiler to the expr foo::<T> syntax.Erick Tryzelaar-2/+2
2011-08-16Port the compiler to the typaram foo<T> syntax.Erick Tryzelaar-3/+3
2011-08-15The wonky for...in... whitespace was bothering me. Sorry!Lindsey Kuper-1/+1
2011-08-15Fix bad argument type of pprust::print_typeMarijn Haverbeke-1/+1
AST types are boxed, there's no need for every caller to do the unboxing
2011-08-09Port the compiler to the ivec type [T] syntax.Erick Tryzelaar-3/+3
2011-08-01Handle bang functions correctly in typestateTim Chevalier-11/+10
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-07-27Reformat for new syntaxMarijn Haverbeke-55/+57
2011-07-19Beginnings of support for constrained typesTim Chevalier-5/+4
Programs with constrained types now parse and typecheck, but typestate doesn't check them specially, so the one relevant test case so far is XFAILed. Also rewrote all of the constraint-related data structures in the process (again), for some reason. I got rid of a superfluous data structure in the context that was mapping front-end constraints to resolved constraints, instead handling constraints in the same way in which everything else gets resolved.
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-1/+1
2011-07-12Add missing filesTim Chevalier-34/+24
git add didn't, so this actually has the changes that should have been in the previous commit
2011-07-07rustc: Change lots of AST nodes to use interior vectorsPatrick Walton-3/+3
2011-07-06rustc: Remove unused or seldom-used imports from ↵Patrick Walton-6/+0
middle::tstate::{bitvectors, ck}
2011-07-06rustc: Revert the conversion to interior vectors due to heap corruptionPatrick Walton-0/+6
2011-07-06rustc: Remove unused or seldom-used imports from ↵Patrick Walton-6/+0
middle::tstate::{bitvectors, ck}
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-22/+23
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-30Kill unused variablesTim Chevalier-1/+2
2011-06-30Warn for unused variablesTim Chevalier-22/+33
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-27Tests for while loops that may invalidate constraintsTim Chevalier-4/+4
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.