about summary refs log tree commit diff
path: root/src/librustc/metadata/decoder.rs
AgeCommit message (Collapse)AuthorLines
2015-11-26split the metadata code into rustc_metadataAriel Ben-Yehuda-1567/+0
tests & rustdoc still broken
2015-11-26make CrateStore a trait objectAriel Ben-Yehuda-43/+6
rustdoc still broken
2015-11-06Preserve public static items across LTOarcnmx-0/+8
2015-10-07use the struct's ctor-id as its variant def-idAriel Ben-Yehuda-4/+1
this makes the code cleaner, and is a complement to the cleanup on the HIR side.
2015-10-03Auto merge of #28521 - arielb1:metadiet, r=eddybbors-53/+65
libcore.rlib reduced from 19121 kiB to 15934 kiB - 20% win. The librustc encoded AST is 9013500 bytes long - for the record, librustc consists of about 2254126 characters. Might be worth looking at. r? @eddyb
2015-10-02unify the 2 impl indexesAriel Ben-Yehuda-12/+7
2015-10-02Merge branch 'master' into metadietAriel Ben-Yehuda-100/+156
rlib sizes: 1445222 liballoc_jemalloc-bb943c5a.rlib 10664 liballoc_system-bb943c5a.rlib 143592 libarena-bb943c5a.rlib 3639102 libcollections-bb943c5a.rlib 16316910 libcore-bb943c5a.rlib 214154 libflate-bb943c5a.rlib 231440 libfmt_macros-bb943c5a.rlib 536976 libgetopts-bb943c5a.rlib 209672 libgraphviz-bb943c5a.rlib 408008 liblibc-bb943c5a.rlib 189610 liblog-bb943c5a.rlib 662184 librand-bb943c5a.rlib 605112 librbml-bb943c5a.rlib 1397820 librustc_back-bb943c5a.rlib 38383772 librustc-bb943c5a.rlib 12842 librustc_bitflags-bb943c5a.rlib 2297822 librustc_borrowck-bb943c5a.rlib 571064 librustc_data_structures-bb943c5a.rlib 9356542 librustc_driver-bb943c5a.rlib 9477226 librustc_front-bb943c5a.rlib 1605698 librustc_lint-bb943c5a.rlib 77111720 librustc_llvm-bb943c5a.rlib 4783848 librustc_mir-bb943c5a.rlib 3534256 librustc_platform_intrinsics-bb943c5a.rlib 593038 librustc_privacy-bb943c5a.rlib 3122202 librustc_resolve-bb943c5a.rlib 14185212 librustc_trans-bb943c5a.rlib 11940328 librustc_typeck-bb943c5a.rlib 1634264 librustc_unicode-bb943c5a.rlib 15564160 librustdoc-bb943c5a.rlib 8153964 libstd-bb943c5a.rlib 30589338 libsyntax-bb943c5a.rlib 897110 libterm-bb943c5a.rlib 1360662 libtest-bb943c5a.rlib
2015-10-02Auto merge of #28793 - Ms2ger:AttrStyle, r=alexcrichtonbors-1/+1
2015-10-01don't store method_ftyAriel Ben-Yehuda-9/+7
It is redundant with the item type. This is not much of a win, as there are really not *that* many methods, but it makes the code uglier.
2015-10-01Stop re-exporting AttrStyle's variants and rename them.Ms2ger-1/+1
2015-10-01share stored predicatesAriel Ben-Yehuda-11/+24
while most of the duplication in predicates was caused by stubs, this is still a 5% win on libcore. 567924 liballoc-bb943c5a.rlib 1425564 liballoc_jemalloc-bb943c5a.rlib 10520 liballoc_system-bb943c5a.rlib 154842 libarena-bb943c5a.rlib 4113790 libcollections-bb943c5a.rlib 18513674 libcore-bb943c5a.rlib 199466 libflate-bb943c5a.rlib 249548 libfmt_macros-bb943c5a.rlib 560488 libgetopts-bb943c5a.rlib 226772 libgraphviz-bb943c5a.rlib 442966 liblibc-bb943c5a.rlib 189884 liblog-bb943c5a.rlib 736764 librand-bb943c5a.rlib 609874 librbml-bb943c5a.rlib 1411678 librustc_back-bb943c5a.rlib 38770354 librustc-bb943c5a.rlib 12868 librustc_bitflags-bb943c5a.rlib 2327196 librustc_borrowck-bb943c5a.rlib 582178 librustc_data_structures-bb943c5a.rlib 9379344 librustc_driver-bb943c5a.rlib 9540324 librustc_front-bb943c5a.rlib 1614996 librustc_lint-bb943c5a.rlib 79217876 librustc_llvm-bb943c5a.rlib 4833518 librustc_mir-bb943c5a.rlib 3535794 librustc_platform_intrinsics-bb943c5a.rlib 603190 librustc_privacy-bb943c5a.rlib 3158032 librustc_resolve-bb943c5a.rlib 14300126 librustc_trans-bb943c5a.rlib 12024054 librustc_typeck-bb943c5a.rlib 1834852 librustc_unicode-bb943c5a.rlib 15611582 librustdoc-bb943c5a.rlib 2926594 libserialize-bb943c5a.rlib 8780060 libstd-bb943c5a.rlib 30772000 libsyntax-bb943c5a.rlib 917984 libterm-bb943c5a.rlib 1369754 libtest-bb943c5a.rlib
2015-10-01add a cross-reference indexAriel Ben-Yehuda-0/+5
it still does not *do* anything
2015-10-01remove unneeded tags from metadataAriel Ben-Yehuda-12/+0
stage1 release rlib sizes: 580890 liballoc-bb943c5a.rlib 1425558 liballoc_jemalloc-bb943c5a.rlib 10514 liballoc_system-bb943c5a.rlib 157192 libarena-bb943c5a.rlib 4316234 libcollections-bb943c5a.rlib 19580128 libcore-bb943c5a.rlib 199498 libflate-bb943c5a.rlib 249328 libfmt_macros-bb943c5a.rlib 560406 libgetopts-bb943c5a.rlib 233620 libgraphviz-bb943c5a.rlib 442964 liblibc-bb943c5a.rlib 190178 liblog-bb943c5a.rlib 778488 librand-bb943c5a.rlib 621972 librbml-bb943c5a.rlib 1415040 librustc_back-bb943c5a.rlib 38849082 librustc-bb943c5a.rlib 12862 librustc_bitflags-bb943c5a.rlib 2331690 librustc_borrowck-bb943c5a.rlib 616880 librustc_data_structures-bb943c5a.rlib 9386582 librustc_driver-bb943c5a.rlib 9600440 librustc_front-bb943c5a.rlib 1615058 librustc_lint-bb943c5a.rlib 79218480 librustc_llvm-bb943c5a.rlib 5020974 librustc_mir-bb943c5a.rlib 3535448 librustc_platform_intrinsics-bb943c5a.rlib 603640 librustc_privacy-bb943c5a.rlib 3163628 librustc_resolve-bb943c5a.rlib 14326646 librustc_trans-bb943c5a.rlib 12033174 librustc_typeck-bb943c5a.rlib 1838202 librustc_unicode-bb943c5a.rlib 15611582 librustdoc-bb943c5a.rlib 3056280 libserialize-bb943c5a.rlib 8954312 libstd-bb943c5a.rlib 30906736 libsyntax-bb943c5a.rlib 925480 libterm-bb943c5a.rlib 1377952 libtest-bb943c5a.rlib
2015-10-01Convert DefId to use DefIndex, which is an index into a list ofNiko Matsakis-90/+132
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
2015-10-01rename ast_map to hir_mapNiko Matsakis-7/+7
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-25/+25
they are being used as an opaque "position identifier"
2015-10-01move LOCAL_CRATE to cstoreNiko Matsakis-1/+2
2015-10-01kill the fake provided method stubsAriel Ben-Yehuda-30/+25
this simplifies the code while reducing the size of libcore.rlib by 3.3 MiB (~1M of which is bloat a separate patch of mine removes too), while reducing rustc memory usage on small crates by 18MiB. This also simplifies the code considerably.
2015-09-29store the rustc version in metadata and check itAriel Ben-Yehuda-0/+5
This prevents ICEs when old crates are used with a new version of rustc. Currently, the linking of crates compiled with different versions of rustc is completely unsupported. Fixes #28700
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-10/+10
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-14split ty::util and ty::adjustmentAriel Ben-Yehuda-3/+5
2015-09-03rewrite metadata indexingAriel Ben-Yehuda-114/+73
this improves the compilation time for small crates by ~20%
2015-09-03Add an intital HIR and lowering stepNick Cameron-39/+42
2015-08-24convert to use `is_local` instead of `== LOCAL_CRATE`Niko Matsakis-1/+1
2015-08-24fallout from moving def-idNiko Matsakis-26/+27
2015-08-16Auto merge of #27643 - mitaa:get_item_, r=arielb1bors-0/+4
(this incidentally fixes an error message where the paths separator is " " instead of "::")
2015-08-16Auto merge of #27851 - nikomatsakis:cleanup-ty-decoder, r=eddybbors-19/+26
Just a little code cleanup I was doing as part of another refactoring (which may turn out not to be needed). The main thrust of this is to cleanup the interface to `tydecode.rs` to be less ridiculously repetitive. I also purged the generic "def-id conversion" parameter in favor of a trait object, just to reduce code duplication a bit and make the signatures a bit less messy. I measured the bootstrapping time to build stage2 with these changes, it was identical. (But it'd be easy enough to restore the unboxed closure if we wanted it.)
2015-08-15remove the last remnants of old interfaceNiko Matsakis-18/+24
2015-08-14move InlinedItem into librustc, where it belongsNiko Matsakis-1/+2
2015-08-14rustc: Allow changing the default allocatorAlex Crichton-3/+7
This commit is an implementation of [RFC 1183][rfc] which allows swapping out the default allocator on nightly Rust. No new stable surface area should be added as a part of this commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1183 Two new attributes have been added to the compiler: * `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to indicate that it requires an allocator crate to be in scope. * `#![allocator]` - this is a indicator that the crate is an allocator which can satisfy the `needs_allocator` attribute above. The ABI of the allocator crate is defined to be a set of symbols that implement the standard Rust allocation/deallocation functions. The symbols are not currently checked for exhaustiveness or typechecked. There are also a number of restrictions on these crates: * An allocator crate cannot transitively depend on a crate that is flagged as needing an allocator (e.g. allocator crates can't depend on liballoc). * There can only be one explicitly linked allocator in a final image. * If no allocator is explicitly requested one will be injected on behalf of the compiler. Binaries and Rust dylibs will use jemalloc by default where available and staticlibs/other dylibs will use the system allocator by default. Two allocators are provided by the distribution by default, `alloc_system` and `alloc_jemalloc` which operate as advertised. Closes #27389
2015-08-12Replace get_item_path[-1] with get_item_namemitaa-0/+4
2015-08-10trans: Stop informing LLVM about dllexportAlex Crichton-3/+22
Rust's current compilation model makes it impossible on Windows to generate one object file with a complete and final set of dllexport annotations. This is because when an object is generated the compiler doesn't actually know if it will later be included in a dynamic library or not. The compiler works around this today by flagging *everything* as dllexport, but this has the drawback of exposing too much. Thankfully there are alternate methods of specifying the exported surface area of a dll on Windows, one of which is passing a `*.def` file to the linker which lists all public symbols of the dynamic library. This commit removes all locations that add `dllexport` to LLVM variables and instead dynamically generates a `*.def` file which is passed to the linker. This file will include all the public symbols of the current object file as well as all upstream libraries, and the crucial aspect is that it's only used when generating a dynamic library. When generating an executable this file isn't generated, so all the symbols aren't exported from an executable. To ensure that statically included native libraries are reexported correctly, the previously added support for the `#[linked_from]` attribute is used to determine the set of FFI symbols that are exported from a dynamic library, and this is required to get the compiler to link correctly.
2015-08-07rename ADTDef to AdtDef etc.Ariel Ben-Yehuda-15/+15
2015-08-07stop using skip_binderAriel Ben-Yehuda-2/+8
2015-08-06remove ty::{VariantInfo, FieldTy}Ariel Ben-Yehuda-78/+6
2015-08-06create VariantDef-s (but don't actually use them)Ariel Ben-Yehuda-5/+104
2015-08-06add variant info to ADTDef, but don't actually use itAriel Ben-Yehuda-1/+2
2015-08-06introduce an ADTDef struct for struct/enum definitionsAriel Ben-Yehuda-0/+7
2015-08-04rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer.Eduard Burtescu-21/+2
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-4/+4
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-12Auto merge of #26895 - jroesch:modernize-typeck-names, r=nikomatsakisbors-3/+3
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-08Remove snake_case names from ty.rsJared Roesch-3/+3
2015-06-12Cleanup: rename middle::ty::sty and its variants.Eli Friedman-1/+1
Use camel-case naming, and use names which actually make sense in modern Rust.
2015-06-10syntax: move ast_map to librustc.Eduard Burtescu-1/+1
2015-06-04Inline enum_variant_ids into its only caller.Ms2ger-25/+2
2015-06-03Remove unused get_enum_variant_defs functions.Ms2ger-18/+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