about summary refs log tree commit diff
path: root/src/librustc/metadata
AgeCommit message (Collapse)AuthorLines
2015-08-01Store and use crate-local paths to extern cratesmitaa-7/+39
2015-08-01Split off `LocalCrateReader` from `CrateReader`mitaa-123/+140
2015-07-28remove `get_ident` and `get_name`, make `as_str` soundOliver Schneider-38/+31
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-13/+15
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-25Fix error message spansJared Roesch-2/+4
2015-07-24Introduce ClosureSubsts rather than just having random fields in theNiko Matsakis-3/+3
TyClosure variant; thread this through wherever closure substitutions are expected, which leads to a net simplification. Simplify trans treatment of closures in particular.
2015-07-24introduce a Vec<Ty> to TyClosure for storing upvar typesNiko Matsakis-2/+11
2015-07-14Transition to the new object lifetime defaults, replacing the oldNiko Matsakis-10/+1
defaults completely.
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-1/+1
Fixes #26900
2015-07-12Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakisbors-10/+10
This PR modernizes some names in the type checker. The only remaining snake_case name in ty.rs is `ctxt` which should be resolved by @eddyb's pending refactor. We can bike shed over the names, it would just be nice to bring the type checker inline with modern Rust. r? @eddyb cc @nikomatsakis
2015-07-12Implement RFC 1058Simonas Kazlauskas-1/+1
2015-07-10Rename TypeWithMutability to TypeAndMutJared Roesch-3/+3
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-1/+1
2015-07-10trans: Use LLVM's writeArchive to modify archivesAlex Crichton-1/+2
We have previously always relied upon an external tool, `ar`, to modify archives that the compiler produces (staticlibs, rlibs, etc). This approach, however, has a number of downsides: * Spawning a process is relatively expensive for small compilations * Encoding arguments across process boundaries often incurs unnecessary overhead or lossiness. For example `ar` has a tough time dealing with files that have the same name in archives, and the compiler copies many files around to ensure they can be passed to `ar` in a reasonable fashion. * Most `ar` programs found do **not** have the ability to target arbitrary platforms, so this is an extra tool which needs to be found/specified when cross compiling. The LLVM project has had a tool called `llvm-ar` for quite some time now, but it wasn't available in the standard LLVM libraries (it was just a standalone program). Recently, however, in LLVM 3.7, this functionality has been moved to a library and is now accessible by consumers of LLVM via the `writeArchive` function. This commit migrates our archive bindings to no longer invoke `ar` by default but instead make a library call to LLVM to do various operations. This solves all of the downsides listed above: * Archive management is now much faster, for example creating a "hello world" staticlib is now 6x faster (50ms => 8ms). Linking dynamic libraries also recently started requiring modification of rlibs, and linking a hello world dynamic library is now 2x faster. * The compiler is now one step closer to "hassle free" cross compilation because no external tool is needed for managing archives, LLVM does the right thing! This commit does not remove support for calling a system `ar` utility currently. We will continue to maintain compatibility with LLVM 3.5 and 3.6 looking forward (so the system LLVM can be used wherever possible), and in these cases we must shell out to a system utility. All nightly builds of Rust, however, will stop needing a system `ar`.
2015-07-08trans: Link rlibs to dylibs with --whole-archiveAlex Crichton-5/+1
This commit starts passing the `--whole-archive` flag (`-force_load` on OSX) to the linker when linking rlibs into dylibs. The primary purpose of this commit is to ensure that the linker doesn't strip out objects from an archive when creating a dynamic library. Information on how this can go wrong can be found in issues #14344 and #25185. The unfortunate part about passing this flag to the linker is that we have to preprocess the rlib to remove the metadata and compressed bytecode found within. This means that creating a dylib will now take longer to link as we've got to copy around the input rlibs to a temporary location, modify them, and then invoke the linker. This isn't done for executables, however, so the "hello world" compile time is not affected. This fix was instigated because of the previous commit where rlibs may not contain multiple object files instead of one due to codegen units being greater than one. That change prevented the main distribution from being compiled with more than one codegen-unit and this commit fixes that. Closes #14344 Closes #25185
2015-07-08Remove snake_case names from ty.rsJared Roesch-10/+10
2015-07-03Add a boolean flag to ExistentialBounds tracking whether theNiko Matsakis-1/+10
region-bound is expected to change in Rust 1.3, but don't use it for anything in this commit. Note that this is not a "significant" part of the type (it's not part of the formal model) so we have to normalize this away or trans starts to get confused because two equal types wind up with distinct LLVM types.
2015-07-03Code up the new lifetime default rules, but leave them disabledNiko Matsakis-8/+8
for now.
2015-06-30Actually encode default associated typesAriel Ben-Yehuda-0/+4
Fixes #26636
2015-06-26rustc: switch most remaining middle::ty functions to methods.Eduard Burtescu-27/+24
2015-06-26rustc: make ty::mk_* constructors into methods on ty::ctxt.Eduard Burtescu-17/+17
2015-06-26rustc: combine type-flag-checking traits and fns and into one trait.Eduard Burtescu-2/+2
2015-06-25Rename AsPredicate to ToPredicate in order to match naming conventionsJared Roesch-6/+6
2015-06-23Remove the mostly unecessary ParamBounds structJared Roesch-86/+18
2015-06-19rustc: replace Repr/UserString impls with Debug/Display ones.Eduard Burtescu-1/+1
2015-06-12Split TyArray into TyArray and TySlice.Eli Friedman-5/+6
Arrays and slices are closely related, but not that closely; making the separation more explicit is generally more clear.
2015-06-12Cleanup: rename middle::ty::sty and its variants.Eli Friedman-24/+24
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-11Conver reborrows to .iter() calls where appropriateJoshua Landau-11/+11
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-16/+16
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-3/+3
2015-06-08Auto merge of #26044 - nagisa:canonicalize-metadata-loader, r=alexcrichtonbors-7/+8
This might fail when --extern library is a symlink to an invalid location. Instead just pretend it doesn’t exist at all. Fixes #26006
2015-06-08Tidying up, fix some minor linkage bugs, use ty flags to avoid caching ↵Nick Cameron-5/+9
closure types.
2015-06-07Don’t ICE if fs::canonicalise fails in meta-loadSimonas Kazlauskas-7/+8
This might fail when --extern library is a symlink to an invalid location. Instead just pretend it doesn’t exist at all.
2015-06-04Inline enum_variant_ids into its only caller.Ms2ger-25/+2
2015-06-03Remove unused get_enum_variant_defs functions.Ms2ger-25/+0
2015-06-01Return an iterator from enum_variant_ids.Ms2ger-8/+26
2015-05-29Auto merge of #25760 - Ms2ger:tagged_docs, r=Manishearthbors-258/+148
2015-05-28Return a TaggedDocsIterator from each_reexport.Ms2ger-15/+4
2015-05-26Implement defaults for associated typesAriel Ben-Yehuda-22/+36
2015-05-26Remove ObjectCastMapAriel Ben-Yehuda-1/+1
2015-05-26Use lookup_locally_or_in_crate_store more oftenAriel Ben-Yehuda-4/+3
2015-05-26Make caching in stability work. This improves stability check performanceAriel Ben-Yehuda-3/+16
by 90%.
2015-05-26Clean-up some junkAriel Ben-Yehuda-35/+0
2015-05-24Return TaggedDocsIterator from reader::tagged_docs.Ms2ger-251/+152
2015-05-24Auto merge of #25609 - nikomatsakis:const-fn, r=pnkfelixbors-4/+47
This is a port of @eddyb's `const-fn` branch. I rebased it, tweaked a few things, and added tests as well as a feature gate. The set of tests is still pretty rudimentary, I'd appreciate suggestions on new tests to write. Also, a double-check that the feature-gate covers all necessary cases. One question: currently, the feature-gate allows the *use* of const functions from stable code, just not the definition. This seems to fit our usual strategy, and implies that we might (perhaps) allow some constant functions in libstd someday, even before stabilizing const-fn, if we were willing to commit to the existence of const fns but found some details of their impl unsatisfactory. r? @pnkfelix
2015-05-22Lazy-load filemaps from external crates.Eduard Burtescu-9/+22
2015-05-21Make various fixes:Niko Matsakis-3/+2
- add feature gate - add basic tests - adjust parser to eliminate conflict between `const fn` and associated constants - allow `const fn` in traits/trait-impls, but forbid later in type check - correct some merge conflicts
2015-05-21rustc: const-qualify `const fn` function and method calls.Eduard Burtescu-3/+47
2015-05-21syntax: parse `const fn` for free functions and inherent methods.Eduard Burtescu-2/+2
2015-05-20Auto merge of #25596 - Ms2ger:rbml-docs, r=alexcrichtonbors-12/+5
This leads to more idiomatic code in the callers.