summary refs log tree commit diff
path: root/src/librustc/back
AgeCommit message (Collapse)AuthorLines
2013-07-01auto merge of #7488 : yichoi/rust/sanitize_utf8, r=huonwbors-3/+4
back::link::sanitize support escape_utf8 fix #7486
2013-07-01librustc: apply changes of char::escape_unicodeYoung-il Choi-1/+2
2013-07-01librustc: back::link::sanitize support esacpe_utf8Young-il Choi-3/+3
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-5/+3
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-29Great renaming: propagate throughout the rest of the codebaseCorey Richardson-37/+31
2013-06-28auto merge of #7466 : thestinger/rust/passes, r=cmrbors-68/+87
2013-06-28copy the optimization passes from clangDaniel Micay-68/+87
2013-06-28librustc: Remove the broken overloaded assign-ops from the language.Patrick Walton-14/+16
They evaluated the receiver twice. They should be added back with `AddAssign`, `SubAssign`, etc., traits.
2013-06-28Remove useless namegen thunkJames Miller-6/+8
2013-06-27Convert vec::[mut_]slice to methods, remove vec::const_slice.Huon Wilson-1/+1
2013-06-25Change finalize -> drop.Luqman Aden-1/+1
2013-06-23Remove unused TyDesc parameter from the glue functionsPhilipp Brüschweiler-13/+0
To remove the environment pointer, support for function pointers without an environment argument is needed (i.e. a fixed version of #6661).
2013-06-23Remove unused shape fields from typedescsPhilipp Brüschweiler-3/+1
2013-06-22auto merge of #7274 : thestinger/rust/size_hint, r=huonwbors-21/+23
I ran into a weird lifetime bug blocking updating the `collect` method to use `FromIterator`, but everything here works fine.
2013-06-23vec: remove BaseIter implementationDaniel Micay-21/+23
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-22Fix take glue of owned trait objectsPhilipp Brüschweiler-4/+2
This finishes the incomplete conversion of unique traits as two-word allocations started in 211d038abc05c77785f72a31840016517cf218c2. Fixes #5882, #6717, #7153, #7208.
2013-06-21auto merge of #7182 : Aatch/rust/trans-refactor-pt2, r=graydonbors-33/+28
This is another big refactoring of `trans` though this is unlikely to have much of an impact on code size or speed. The major change here is the implementation of a `Type` struct which is the new home for all your LLVM `TypeRef` needs. It's a simple wrapper struct, with static methods for constructing types, then regular methods for manipulating/interrogating them. The purpose of this is mostly to make the code surrounding them somewhat more ideomatic. A line like: `T_ptr(T_ptr(T_i8()))` is now `Type::i8().ptr_to().ptr_to()`,which is much more like regular Rust code. There are a variety of smaller changes here and there: * Remove address spaces. At least it doesn't generate them, I haven't spent much time looking for related code. * Use a macro for declaring the LLVM intrinsics, makes it look much nicer. * Make the type for a string slice actually create a named `str_slice` type in LLVM, this makes reading the appropriate code much easier. * Change the way struct and enum type names are generated. This just means that a struct like `struct Foo { a: int }` now produces the IR `%struct.Foo = type { i64 }`, which is much easier to read. Similarly, other structs are a bit tighter to make it easier to read. --- --- --- This PR did get away from me a little, as I occasionally got distracted or as I fixed up problems with unrelated code that were stopping me from continuing. One major thing is that this PR contains the work from #7168, since that would have conflicted with this and it was broken anyway. Sorry for bundling it like this. Fixes #3670 and #7063 --- --- --- EDIT: This no longer removes the llvm insn stats.
2013-06-22Finish up Type refactoringJames Miller-4/+4
2013-06-22More Type refactoringsJames Miller-33/+28
2013-06-21auto merge of #7219 : sstewartgallus/rust/cleanup, r=graydonbors-85/+73
2013-06-21Remove all #[cfg(stage0)]-protected codeJames Miller-13/+0
New snapshot means this can all go. Also removes places that have comments that say they are workarounds for stage0 errors.
2013-06-19rustc: Dispose of LLVM passes in test casesBrian Anderson-3/+12
2013-06-18Cleanup src/librustc/backSteven Stewart-Gallus-85/+73
2013-06-18replace #[inline(always)] with #[inline]. r=burningtree.Graydon Hoare-1/+1
2013-06-17Revert "stop using an absolute rpath"Brian Anderson-1/+26
This reverts commit 708395d65d689080cc96dd091adab3fc4c5c3f27.
2013-06-16remove unused importsHuon Wilson-3/+0
2013-06-15auto merge of #7132 : thestinger/rust/rpath, r=brsonbors-25/+1
This is a bad default, because the binaries will point at an absolute path regardless of where they are moved. This opens up a security issue for packages, because they will attempt to load libraries from a path that's often owned by a regular user. Every Rust binary is currently flagged by Debian, Fedora and Arch lint checkers as having dangerous rpaths. They don't meet the requirements to be placed in the repositories without manually stripping this from each binary. The relative rpath is still enough to keep the binaries working until they are moved relative to the crates they're linked against. http://wiki.debian.org/RpathIssue https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
2013-06-15stop using an absolute rpathDaniel Micay-25/+1
This is a bad default, because the binaries will point at an absolute path regardless of where they are moved. This opens up a security issue for packages, because they will attempt to load libraries from a path that's often owned by a regular user. Every Rust binary is currently flagged by Debian, Fedora and Arch lint checkers as having dangerous rpaths. They don't meet the requirements to be placed in the repositories without manually stripping this from each binary. The relative rpath is still enough to keep the binaries working until they are moved relative to the crates they're linked against. http://wiki.debian.org/RpathIssue https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
2013-06-16Remove @-fields from CrateContextJames Miller-8/+8
Remove all the explicit @mut-fields from CrateContext, though many fields are still @-ptrs. This required changing every single function call that explicitly took a @CrateContext, so I took advantage and changed as many as I could get away with to &-ptrs or &mut ptrs.
2013-06-16Move CrateContext into it's own fileJames Miller-1/+1
2013-06-15auto merge of #7125 : alexcrichton/rust/rusti-issues, r=brsonbors-51/+55
This un-reverts the reverts of the rusti commits made awhile back. These were reverted for an LLVM failure in rustpkg. I believe that this is not a problem with these commits, but rather that rustc is being used in parallel for rustpkg tests (in-process). This is not working yet (almost! see #7011), so I serialized all the tests to run one after another. @brson, I'm mainly just guessing as to the cause of the LLVM failures in rustpkg tests. I'm confident that running tests in parallel is more likely to be the problem than those commits I made. Additionally, this fixes two recently reported issues with rusti.
2013-06-14add IteratorUtil to the preludeDaniel Micay-1/+0
2013-06-13Don't run passes again on JIT codeAlex Crichton-35/+17
These passes are already run beforehand, no need to do them twice.
2013-06-13Revert "Revert "Have JIT execution take ownership of the LLVMContextRef""Alex Crichton-20/+42
This reverts commit 19adece68b00bd1873499cca6f1537750608d769.
2013-06-13Revert "Have JIT execution take ownership of the LLVMContextRef"Brian Anderson-42/+20
This reverts commit 5c5095d25e3652c434c8d4ec178e6844877e3c2d. Conflicts: src/librusti/rusti.rc
2013-06-13Remove unused importsSteven Stewart-Gallus-1/+1
I was able to remove unused imports, and fix the following warnings src/libstd/hashmap.rs:23:15: 23:23 warning: unused import [-W unused-imports (default)] src/libstd/task/spawn.rs:95:15: 95:23 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:42:0: 42:9 warning: unused import [-W unused-imports (default)] src/libstd/rt/uv/mod.rs:45:0: 45:9 warning: unused import [-W unused-imports (default)] src/librustc/middle/trans/meth.rs:26:0: 26:26 warning: unused import [-W unused-imports (default)] src/librustc/back/link.rs:210:20: 210:25 warning: unused import [-W unused-imports (default)] I was unable to fix the following unused import warnings. The code here was weird. src/libextra/std.rc:40:11: 40:14 warning: unused import [-W unused-imports (default)] src/libextra/std.rc:40:16: 40:24 warning: unused import [-W unused-imports (default)]
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-10/+10
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-2/+1
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert str::{*shift,pop}* to methods.Huon Wilson-1/+1
2013-06-10Have JIT execution take ownership of the LLVMContextRefAlex Crichton-20/+42
Also stop leaking the ExecutionEngine created for jit code by forcibly disposing of it after the JIT code has finished executing
2013-06-11std: replace str::{starts,ends}_with with the method.Huon Wilson-1/+1
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-3/+3
2013-06-10std: remove str::{len, slice, is_empty} in favour of methods.Huon Wilson-1/+1
2013-06-09std: remove each_char* fns and methods from str, replaced by iterators.Huon Wilson-1/+2
2013-06-05auto merge of #6956 : Blei/rust/fix-symbol-mangling, r=catamorphismbors-15/+26
Handle more characters that appear in types, most notably <>): were missing. Also the new scheme takes care that no two different input strings result in the same mangled string, which was not the case before. Fixes #6921
2013-06-05rustc::back::link: redo symbol manglingPhilipp Brüschweiler-15/+26
Handle more characters that appear in types, most notably <>): were missing. Also the new scheme takes care that no two different input strings result in the same mangled string, which was not the case before. Fixes #6921
2013-06-05rename repr to nameJohn Clements-1/+1
2013-06-01rustc: Call str::is_emptyTim Chevalier-1/+1
2013-06-02Better optimization pipelineJames Miller-10/+5
2013-05-31Remove the slow bb-vectorize passJames Miller-1/+0