about summary refs log tree commit diff
path: root/src/librustc_codegen_utils
AgeCommit message (Collapse)AuthorLines
2019-02-09Rollup merge of #58259 - taiki-e:librustc_codegen_utils-2018, r=CentrilMazdak Farrokhzad-23/+18
librustc_codegen_utils => 2018 Transitions `librustc_codegen_utils` to Rust 2018; cc #58099 r? @Centril
2019-02-08librustc_codegen_utils => 2018Taiki Endo-23/+18
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-6/+2
2019-01-28SymbolPathBuffer shallow refactoringDenys Zariaiev-80/+76
2019-01-27Create `nvptx64-nvidia-cuda` target specificationDenys Zariaiev-15/+43
2019-01-24Remove quote_*! macros and associated APIsMark Simulacrum-1/+0
2019-01-15Querify entry_fnIgor Matuszewski-5/+4
2019-01-14Rollup merge of #57570 - Xanewok:querify-some, r=ZoxcMazdak Farrokhzad-3/+3
Querify local `plugin_registrar_fn` and `proc_macro_decls_static` Instead of calculating them as part of the `Session`, we do that in the query system. It's also nice that these queries are already defined for external crates - here, we provide the queries for the local crate. r? @nikomatsakis
2019-01-13Querify local plugin_registrar_fnIgor Matuszewski-2/+2
2019-01-13Querify local proc_macro_decls_staticIgor Matuszewski-1/+1
2019-01-09MetadataOnlyCodegenBackend: remove `is_inline` calllqd-1/+0
This function has no side effects, and its result is ignored.
2019-01-07Codegen: run the collector only oncelqd-13/+3
Use the `collect_and_partition_mono_items ` query to avoid calling the collector
2018-12-25Remove licensesMark Rousskov-50/+0
2018-12-08Auto merge of #56578 - alexreg:cosmetic-1, r=alexregbors-1/+1
Various minor/cosmetic improvements to code r? @Centril 😄
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-07Auto merge of #56258 - euclio:fs-read-write, r=eucliobors-9/+4
use top level `fs` functions where appropriate This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-12-07Auto merge of #56502 - Zoxc:hir-func, r=eddybbors-5/+5
Use a function to access the Hir map to be able to turn it into a query later r? @eddyb
2018-12-07use top level `fs` functions where appropriateAndy Russell-9/+4
This commit replaces many usages of `File::open` and reading or writing with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code complexity, and will improve performance for most reads, since the functions allocate the buffer to be the size of the file. I believe that this commit will not impact behavior in any way, so some matches will check the error kind in case the file was not valid UTF-8. Some of these cases may not actually care about the error.
2018-12-06codegen_utils, driver: fix clippy errorsljedrz-12/+9
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn KÃ¥re Alsaker-5/+5
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-12-02Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddybbors-2/+0
Refactor rustc_codegen_ssa cc #56108 (not all things are done yet) This removes an unsafe method from cg_ssa. r? @eddyb cc @sunfishcode
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-2/+2
(compiler front-ends).
2018-11-29Remove __build_diagnostic_array! from cg_utilsbjorn3-2/+0
2018-11-16[eddyb] rustc_codegen_utils: remove extraneous `#![allow(dead_code)]`.Eduard-Mihai Burtescu-1/+0
2018-11-16Separating the back folder between backend-agnostic and LLVM-specific codeDenis Merigoux-1689/+0
2018-11-16Beginning of moving all backend-agnostic code to rustc_codegen_ssaDenis Merigoux-307/+0
2018-11-16Moved Backend interface into rustc_codegen_utilsDenis Merigoux-16/+192
2018-11-16[eddyb/rebase cleanup] move type_{needs_drop,is_sized,is_freeze} to ↵Eduard-Mihai Burtescu-1/+16
rustc_codegen_utils
2018-11-16Moved common.rs enumsDenis Merigoux-0/+78
2018-11-16Starting to move backend-agnostic code into codegen_utilsDenis Merigoux-0/+23
IntPredicate moved
2018-11-15Rollup merge of #55901 - euclio:speling, r=petrochenkovPietro Albini-1/+1
fix various typos in doc comments
2018-11-14xLTO: Don't pass --plugin-opt=thin to LLD. That's not supported anymore.Michael Woerister-11/+0
2018-11-13fix various typos in doc commentsAndy Russell-1/+1
2018-11-11Fix typos.Bruce Mitchener-1/+1
2018-11-10codegen_llvm_back: use mem::replace instead of swap where more conciseljedrz-12/+5
2018-11-10codegen_llvm_back: use to_owned instead of to_string with string literalsljedrz-1/+1
2018-11-10codegen_llvm_back: improve common patternsljedrz-11/+7
2018-11-10codegen_llvm_back: whitespace & formatting fixesljedrz-12/+10
2018-11-10Auto merge of #55626 - nikic:update-emscripten, r=alexcrichtonbors-0/+10
Update emscripten This updates emscripten to 1.38.15, which is based on LLVM 6.0.1 and would allow us to drop code for handling LLVM 4. The main issue I ran into is that exporting statics through `EXPORTED_FUNCTIONS` no longer works. As far as I understand exporting non-functions doesn't really make sense under emscripten anyway, so I've modified the symbol export code to not even try. Closes #52323.
2018-11-07Rollup merge of #55734 - teresy:shorthand-fields, r=davidtwcokennytm-1/+1
refactor: use shorthand fields refactor: use shorthand for single fields everywhere (excluding tests).
2018-11-06refactor: use shorthand fieldsteresy-1/+1
2018-11-04Don't export non-function symbols with emscriptenNikita Popov-0/+10
Emscripten only provides an export mechanism for functions. Exporting statics does not make sense conceptually in this case, and will result in emcc undefined function errors.
2018-11-03Remove rustc_metadata_utils, which contains only one functionbjorn3-4/+3
2018-11-03Move cg_llvm::back::linker to cg_utilsbjorn3-0/+1719
2018-10-27Auto merge of #54183 - qnighy:by-value-object-safety, r=oli-obkbors-1/+12
Implement by-value object safety This PR implements **by-value object safety**, which is part of unsized rvalues #48055. That means, with `#![feature(unsized_locals)]`, you can call a method `fn foo(self, ...)` on trait objects. One aim of this is to enable `Box<FnOnce>` in the near future. The difficulty here is this: when constructing a vtable for a trait `Foo`, we can't just put the function `<T as Foo>::foo` into the table. If `T` is no larger than `usize`, `self` is usually passed directly. However, as the caller of the vtable doesn't know the concrete `Self` type, we want a variant of `<T as Foo>::foo` where `self` is always passed by reference. Therefore, when the compiler encounters such a method to be generated as a vtable entry, it produces a newly introduced instance called `InstanceDef::VtableShim(def_id)` (that wraps the original instance). the shim just derefs the receiver and calls the original method. We give different symbol names for the shims by appending `::{{vtable-shim}}` to the symbol path (and also adding vtable-shimness as an ingredient to the symbol hash). r? @eddyb
2018-10-26Remove redundant cloneShotaro Yamada-1/+1
2018-10-24Include InstanceDef's discriminant in the symbol hash.Masaki Hara-2/+4
2018-10-24Distinguish vtable shims in symbol paths.Masaki Hara-1/+10
2018-10-20Auto merge of #55014 - ljedrz:lazyboye_unwraps, r=matthewjasperbors-1/+1
Prefer unwrap_or_else to unwrap_or in case of function calls/allocations The contents of `unwrap_or` are evaluated eagerly, so it's not a good pick in case of function calls and allocations. This PR also changes a few `unwrap_or`s with `unwrap_or_default`. An added bonus is that in some cases this change also reveals if the object it's called on is an `Option` or a `Result` (based on whether the closure takes an argument).