summary refs log tree commit diff
path: root/src/rustc/middle/tstate
AgeCommit message (Collapse)AuthorLines
2012-03-27Support an alternate for syntax that calls a higher-order functionMarijn Haverbeke-40/+8
The last argument of the call must be a block, and the type of this argument must a function returning bool. `break` and `cont` are supported in the body of the block, and return `false` or `true` from the function. When the end of the function is reached, `true` is implicitly returned. for vec::all([1, 2, 3]) {|elt| if elt == 2 { break; } log(error, elt); } Issue #1619
2012-03-26Bulk-edit mutable -> mut.Graydon Hoare-19/+19
2012-03-26rustc: Move eval_const_expr to its own modBrian Anderson-1/+1
2012-03-23Handle self correctly when translating classesTim Chevalier-1/+2
This change uses the same code for handling the "self" reference for classes as is already used for impls/ifaces. This allows removing the extra maybe_self_id argument (which was just for classes) to trans_closure that I added before. I also rewrote the translation for class ctors so that it doesn't generate new AST nodes (instead translating directly). Also changed visit so that it visits class ctors correctly with visit_fn, and changed typestate to not do return-checking when visiting a class ctor.
2012-03-21add mut decls to rustc and make them mandatoryNiko Matsakis-88/+87
2012-03-20Implement an initial version of placement new.Niko Matsakis-18/+24
2012-03-20Revert order of arguments to option::maybe and from_maybeMarijn Haverbeke-1/+1
Closes #2019
2012-03-15std: Follow conventions in bitvBrian Anderson-3/+3
2012-03-14std: Rename the hashmap constructors to conform to new standardsBrian Anderson-2/+2
Instead of using the new_ prefix just name them after their type
2012-03-13Overhaul constructor naming in libsBrian Anderson-3/+3
2012-03-10In typestate, consider infinite loops w/ conts to be infiniteTim Chevalier-1/+3
If a loop { } contains a cont, that doesn't affect whether the entire loop diverges. Only breaks affect that. Fix that in typestate.
2012-03-10Handle infinite-loop poststate correctly in typestateTim Chevalier-1/+1
If control passes an infinite loop (that doesn't have non-local exits), then everything is true.
2012-03-09Add an infinite loop constructTim Chevalier-3/+28
Add a loop {} construct for infinite loops, and use it in test cases. See #1906 for details.
2012-03-08rustc: Change the address-of operator to an explicit production so that we ↵Patrick Walton-0/+7
can parse the mutability
2012-03-08Rename last to last_opt, last_unsafe to lastTim Chevalier-2/+2
As per discussion on IRC. I am about to file an RFC for further discussion about the more general issue of whether to enforce invariants through types, typestate, or dynamic checks, but for now, removing the misleading name "last_unsafe".
2012-03-07stdlib: Stop incurring vtable dispatch costs when hashmaps are usedPatrick Walton-1/+6
This required changing almost all users of hashmaps to import the hashmap interface first. The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"Patrick Walton-6/+1
This reverts commit f0250a23d3fa2f8b4a4a4113ca89e41945a4cfed.
2012-03-07stdlib: Stop incurring vtable dispatch costs when hashmaps are usedPatrick Walton-1/+6
This required changing almost all users of hashmaps to import the hashmap interface first. The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-05rustc: Lower case error messagesBrian Anderson-18/+15
2012-03-04Translate simple classesTim Chevalier-1/+1
Programs using classes with fields only (no methods) compile and run, as long as nothing refers to a class in a different crate (todo). Also changed the AST representation of classes to have a separate record for constructor info (instead of inlining the fields in the item_class node), and fixed up spans and pretty-printing for classes.
2012-03-02Move src/comp to src/rustcGraydon Hoare-0/+3870