about summary refs log tree commit diff
path: root/src/rustc/middle
AgeCommit message (Collapse)AuthorLines
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
2012-03-22Make cross-crate calls to class methods workTim Chevalier-1/+1
2012-03-22Add an LLVM-instruction-counting mode to trans.Graydon Hoare-22/+398
Pipe to xdu to see a trans call graph of generated insns.
2012-03-22make --enforce-mut-vars always on, add mut annotations to remaining filesNiko Matsakis-1/+1
2012-03-21add mut decls to rustc and make them mandatoryNiko Matsakis-616/+636
2012-03-21rustc: Use the right "nxt" function in unify_regionsPatrick Walton-3/+3
2012-03-21rustc: Long linesBrian Anderson-2/+4