about summary refs log tree commit diff
path: root/src/librustc/back
AgeCommit message (Collapse)AuthorLines
2013-08-20Fix LLVM compilation issues and use the new attrsAlex Crichton-1/+0
This implements #[no_split_stack] and also changes #[fast_ffi] to using the new "fixedstacksegment" string attribute instead of integer attribute.
2013-08-19Issue #3678: Remove wrappers and call foreign functions directlyNiko Matsakis-5/+0
2013-08-18Fixed -Z print-link-argsVadim Chugunov-0/+5
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-12/+12
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-12fix build with the new snapshot compilerDaniel Micay-13/+0
2013-08-11auto merge of #8410 : luqmana/rust/mcpu, r=sanxiynbors-13/+20
Adds `--target-cpu` flag which lets you choose a more specific target cpu instead of just passing the default, `generic`. It's more or less akin to `-mcpu`/`-mtune` in clang/gcc.
2013-08-11Add a field `borrow_offset` to the type descriptor indicatingNiko Matsakis-1/+2
what amount a T* pointer must be adjusted to reach the contents of the box. For `~T` types, this requires knowing the type `T`, which is not known in the case of objects.
2013-08-10rustc: Add --target-cpu flag to select a more specific processor instead of ↵Luqman Aden-13/+20
the default, 'generic'.
2013-08-10syntax and rustc: fix some warningsErick Tryzelaar-1/+1
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-3/+3
cc #5898
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-117/+32
remove-str-trailing-nulls
2013-08-09auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphismbors-117/+23
r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-117/+23
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-08env! syntax extension changesSteven Fackler-0/+9
env! aborts compilation of the specified environment variable is not defined and takes an optional second argument containing a custom error message. option_env! creates an Option<&'static str> containing the value of the environment variable. There are no run-pass tests that check the behavior when the environment variable is defined since the test framework doesn't support setting environment variables at compile time as opposed to runtime. However, both env! and option_env! are used inside of rustc itself, which should act as a sufficient test. Close #2248
2013-08-06Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-5/+5
remove-str-trailing-nulls
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-5/+5
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-25/+24
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-11/+15
2013-08-04Fix build issues once LLVM has been upgradedAlex Crichton-1/+0
* LLVM now has a C interface to LLVMBuildAtomicRMW * The exception handling support for the JIT seems to have been dropped * Various interfaces have been added or headers have changed
2013-08-03remove obsolete `foreach` keywordDaniel Micay-24/+24
this has been replaced by `for`
2013-08-02replace `range` with an external iteratorDaniel Micay-2/+1
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-23/+23
2013-07-24auto merge of #7996 : erickt/rust/cleanup-strs, r=ericktbors-17/+18
This is a cleanup pull request that does: * removes `os::as_c_charp` * moves `str::as_buf` and `str::as_c_str` into `StrSlice` * converts some functions from `StrSlice::as_buf` to `StrSlice::as_c_str` * renames `StrSlice::as_buf` to `StrSlice::as_imm_buf` (and adds `StrSlice::as_mut_buf` to match `vec.rs`. * renames `UniqueStr::as_bytes_with_null_consume` to `UniqueStr::to_bytes` * and other misc cleanups and minor optimizations
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-4/+4
2013-07-23std: move StrUtil::as_c_str into StrSliceErick Tryzelaar-17/+18
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-3/+3
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22new snapshotDaniel Micay-8/+0
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-18/+11
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-6/+6
2013-07-14Make TLS keys actually take up spaceAlex Crichton-3/+5
If the TLS key is 0-sized, then the linux linker is apparently smart enough to put everything at the same pointer. OSX on the other hand, will reserve some space for all of them. To get around this, the TLS key now actuall consumes space to ensure that it gets a unique pointer
2013-07-13Fix running code via '-Z jit'Alex Crichton-0/+4
2013-07-12Squirrel away the JIT contexts into TLS when doneAlex Crichton-16/+52
This prevents attempting to run deallocated code (which is no longer present always)
2013-07-09auto merge of #7117 : jensnockert/rust/freestanding, r=cmrbors-1/+2
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. This means that instead of having to know everywhere what the type is, like ~~~ f64::sin(x) ~~~ You can simply write code that uses the type-generic versions in num instead, this works for all types that implement the corresponding trait in num. ~~~ num::sin(x) ~~~ Note 1: If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note 2: If you were using a function that corresponds to an operator, use the operator instead. Note 3: This is just https://github.com/mozilla/rust/pull/7090 reopened against master.
2013-07-08Miscellaneous fixes and cleanupNiko Matsakis-3/+3
2013-07-08 Replaces the free-standing functions in f32, &c.Jens Nockert-1/+2
The free-standing functions in f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, float, int, and uint are replaced with generic functions in num instead. If you were previously using any of those functions, just replace them with the corresponding function with the same name in num. Note: If you were using a function that corresponds to an operator, use the operator instead.
2013-07-04Implement consuming iterators for ~[], remove vec::{consume, ↵Huon Wilson-1/+1
consume_reverse, map_consume}.
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