summary refs log tree commit diff
path: root/src/rustc/middle/trans
AgeCommit message (Collapse)AuthorLines
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-9/+36
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-27Emergency safe-ref-checker maintenanceMarijn Haverbeke-1/+1
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-28/+138
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-16/+32
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-66/+66
2012-03-26rustc: Move eval_const_expr to its own modBrian Anderson-3/+3
2012-03-26Enforce privacy declarations for class fields and methodsTim Chevalier-1/+2
2012-03-26Disallow ret inside of block functionsMarijn Haverbeke-30/+27
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-23Allow methods to call other methods in the same classTim Chevalier-2/+15
2012-03-23Fix breakageTim Chevalier-5/+3
2012-03-23Handle self correctly when translating classesTim Chevalier-97/+86
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-23Keep an explicit map of things that have to be spilledMarijn Haverbeke-2/+3
This prevents us from spilling locals more than once. Closes #2040
2012-03-23Remove last vestiges of old-style intrinsicsMarijn Haverbeke-102/+22
Closes #2048
2012-03-23Remove more needless context threading in transMarijn Haverbeke-177/+125
2012-03-23Revert removal of intrinsicsMarijn Haverbeke-22/+97
Oops. We can't do this yet until the next snapshot.
2012-03-23Rename builtin back to intrinsicMarijn Haverbeke-9/+9
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-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-52/+118
Issue #1981
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-21add mut decls to rustc and make them mandatoryNiko Matsakis-300/+322
2012-03-21rustc: Long linesBrian Anderson-2/+4
2012-03-21Avoid mangling names differently in debug builds to work around a build ↵Josh Matthews-40/+47
error. Fix up file name and path debug information, and build one compilation unit for a crate instead of one per source file.
2012-03-21methods workTim Chevalier-1/+4
Cross-crate method calls don't work yet. Added run-pass/class-method-cross-crate to test that, but it's xfailed References to fields within methods don't work yet. Added run-pass/class-methods to test that, but it's also xfailed
2012-03-20Implement an initial version of placement new.Niko Matsakis-37/+93
2012-03-20Class methods WIPTim Chevalier-17/+10
In particular, use the ast::method type to represent a class method, and try to reuse as much iface code as possible. (This makes sense now since I'll be allowing polymorphic class methods.)
2012-03-20core: Rename unsafe::leak to unsafe::forget. Closes #2031Brian Anderson-1/+1
2012-03-20Remove unused "flav" parameter from function registration paths.Graydon Hoare-17/+15
2012-03-20Fix naughty mangling-breakage from stringifying a node ID. Close #1344.Graydon Hoare-1/+1
2012-03-20Work on fixing name mangling.Graydon Hoare-32/+17
2012-03-20make native and crust functions conform to x86-64 ABIJyun-Yan You-35/+564
2012-03-20Only make symbols external when they are actually externally accessibleMarijn Haverbeke-25/+33
Closes #2030
2012-03-20Move external-reachability checker to transMarijn Haverbeke-0/+147
Preparation for a fix for issue #2020
2012-03-19Send string concatenation to specialized upcall, shave 17s off librustc ↵Graydon Hoare-5/+6
compile time.
2012-03-18core: Rename vec::position_elt to position_elemBrian Anderson-1/+1
2012-03-16Encode both private and public class fields in metadataTim Chevalier-1/+1
This is necessary to calculate the correct offsets for field references. Simple cross-crate class tests (still with fields only) now pass.
2012-03-16Don't break -g in the presence of monomorphization.Josh Matthews-0/+1
2012-03-16Classes WIPTim Chevalier-11/+10
Cross-crate metadata for classes works well enough that programs with classes in other crates compile successfully, but output wrong results. Checking in work so far to avoid merge hassles. (Tests are xfailed.)
2012-03-16Forbid boxed ifaces with self types or generic methods in bounded paramsMarijn Haverbeke-9/+12
They are a soundness hole. Closes #1994
2012-03-16Remove shared tydescsMarijn Haverbeke-50/+10
All tydescs are static now, there's no need to worry about marshalling them between threads anymore.
2012-03-16Support binding of methods off boxed iface valuesMarijn Haverbeke-11/+24
Closes #435
2012-03-15Fix bug in vtable builderMarijn Haverbeke-1/+8
Closes #1947 , which I completely misdiagnosed.
2012-03-15Reuse monomorphized functions more aggressivelyMarijn Haverbeke-26/+322
Adds a trans::type_use pass that, given a function body, detects how dependant that function is on properties of its type parameters.
2012-03-15Remove support for dynamically-sized types from translation codeMarijn Haverbeke-525/+146