summary refs log tree commit diff
path: root/src/rustc/middle
AgeCommit message (Collapse)AuthorLines
2012-03-28rustc: Universally quantify regions when calling functions. Un-XFAIL ↵Patrick Walton-118/+106
regions-addr-of-ret.rs.
2012-03-28Allow references to "self" within classesTim Chevalier-31/+77
Allow writing self.f within a class that has a field f. Currently, the compiler accepts either self.f or f. In a future commit I'll require writing self.f and not f. Not sure whether self.f() works if f is a method (making sure that works next).
2012-03-28Make sure type_use.rs doesn't get lost in recursive enumsMarijn Haverbeke-7/+12
Closes #2059
2012-03-27Enforce mutability declarations in classes; correct shapes for classesTim Chevalier-28/+106
1. Enforce mutability declarations on class fields. Don't allow any mutation of class fields not declared as mutable (except inside the constructor). 2. Handle classes correctly in shape (treat classes like records).
2012-03-27make type_kind exhaustive, add an entry for type_self (in particular)Niko Matsakis-1/+3
2012-03-27Emergency safe-ref-checker maintenanceMarijn Haverbeke-82/+92
It still has some big problems, but at least it more or less understands block arguments now. Closes #1925
2012-03-27Move some code over to iterator-for to see how it performs.Marijn Haverbeke-130/+119
2012-03-27Support returning from loop blocksMarijn Haverbeke-51/+183
The code is somewhat invasive, but it seems hard to do this in a clean way, since the design itself involves a bunch of 'action at a distance'. Issue #1819
2012-03-27Support an alternate for syntax that calls a higher-order functionMarijn Haverbeke-63/+72
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-170/+170
2012-03-26rustc: Move eval_const_expr to its own modBrian Anderson-12/+179
2012-03-26rustc: Combine and unify regionsPatrick Walton-37/+88
2012-03-26rustc: Fix typo in inferPatrick Walton-1/+1
2012-03-26rustc: Remove obsolete FIXME in inferPatrick Walton-3/+0
2012-03-26rustc: Generalize resolve_var to work with regions tooPatrick Walton-15/+12
2012-03-26In typeck, don't call ty::store_iface_methods on private methodsTim Chevalier-2/+2
This was resulting in a different error message depending on whether the private method you were trying to call was in the same crate or a different one.
2012-03-26Improve type inference to compute LUB/GLBNiko Matsakis-134/+729
2012-03-26Enforce privacy declarations for class fields and methodsTim Chevalier-19/+42
2012-03-26Check in a forgotten new fileMarijn Haverbeke-0/+54
2012-03-26Disallow ret inside of block functionsMarijn Haverbeke-130/+129
Also adds proper checking for cont/break being inside a loop. Closes #1854 Issue #1619
2012-03-26Fix bug in generation of non-generic resource dtorsMarijn Haverbeke-1/+1
Issue #1944
2012-03-25repair the build---also, make try/commit work over both ty/region varsNiko Matsakis-17/+34
2012-03-24rustc: Generalize several parts of infer in preparation for using them for ↵Patrick Walton-94/+97
region bounds as well
2012-03-24Avoid unifying vars when possible; handle bot (more) correctlyNiko Matsakis-24/+48
2012-03-24rustc: Stub some region resolution stuff in inferPatrick Walton-3/+103
2012-03-24rustc: Add some simple region checking (no region vars yet)Patrick Walton-57/+39
Amazingly, this causes no test cases to fail!
2012-03-24prune unused unification code; leave region code that still needs to be portedNiko Matsakis-642/+50
2012-03-23Allow methods to call other methods in the same classTim Chevalier-2/+15
2012-03-23add a few measly comments, remove some dead codeNiko Matsakis-16/+19
2012-03-23xfail-test regions testsNiko Matsakis-21/+3
2012-03-23Implement new inference algorithm.Niko Matsakis-80/+851
2012-03-23Fix breakageTim Chevalier-5/+3
2012-03-23Handle self correctly when translating classesTim Chevalier-99/+90
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-23rustc: Remove `// */` sequence from trans/base.rs; it breaks vi syntax ↵Patrick Walton-1/+1
highlighting
2012-03-23rustc: Stub a table of borrowingsPatrick Walton-2/+10
2012-03-23rustc: Make region folding not descend into function typesPatrick Walton-7/+15
Since region parameters are always universally quantified at the function level, this would be incorrect.
2012-03-23rustc: Redo region inference to be a bit less brokenPatrick Walton-304/+377
2012-03-23Keep an explicit map of things that have to be spilledMarijn Haverbeke-8/+16
This prevents us from spilling locals more than once. Closes #2040
2012-03-23Remove last vestiges of old-style intrinsicsMarijn Haverbeke-110/+30
Closes #2048
2012-03-23Remove more needless context threading in transMarijn Haverbeke-177/+125
2012-03-23Revert resolve kludge that was working around #2049Marijn Haverbeke-12/+7
2012-03-23Revert removal of intrinsicsMarijn Haverbeke-30/+105
Oops. We can't do this yet until the next snapshot.
2012-03-23Clean up some confused shuffling of def_ids in resolve.rsMarijn Haverbeke-34/+31
2012-03-23Rename builtin back to intrinsicMarijn Haverbeke-17/+17
As per Graydon's request Issue #1981
2012-03-23Remove support for the old-style intrinsicsMarijn Haverbeke-90/+15
Closes #2042 Closes #1981
2012-03-23Kludge in resolve to be able to land builtinsMarijn Haverbeke-7/+12
Something strange is happening to hash maps. I'm still investigating but want to get my snapshot built in the meantime. (Problem only happened on OS X.)
2012-03-23Fix bug in function-instance reuseMarijn Haverbeke-1/+11
You can't safely reuse functions that pass a T by move, since they might zero it out, which will not end well when it doesn't know its precise size.
2012-03-23Change vector append to no longer rely on an intrinsicMarijn Haverbeke-13/+27
Issue #1981
2012-03-23Support [rust_stack] annotation on native functions (crudely)Marijn Haverbeke-17/+47
2012-03-23Implement built-in native modules as an alternative to intrinsicsMarijn Haverbeke-55/+174
Issue #1981