summary refs log tree commit diff
path: root/src/librustc/metadata
AgeCommit message (Collapse)AuthorLines
2014-03-31vec: convert `append` and `append_one` to methodsDaniel Micay-3/+1
These were only free functions on `~[T]` because taking self by-value used to be broken.
2014-03-30Removed deprecated functions `map` and `flat_map` for vectors and slices.Marvin Löbel-3/+3
2014-03-29auto merge of #13188 : FlaPer87/rust/master, r=alexcrichtonbors-19/+3
2014-03-28auto merge of #13170 : eddyb/rust/syntax-cleanup, r=alexcrichtonbors-40/+43
Removes all Cell's/RefCell's from lexer::Reader implementations and a couple @.
2014-03-29Register new snapshotFlavio Percoco-19/+3
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-11/+11
Closes #2569
2014-03-28De-@ IdentInterner.Eduard Burtescu-40/+43
2014-03-28Rename Pod into CopyFlavio Percoco-2/+2
Summary: So far, we've used the term POD "Plain Old Data" to refer to types that can be safely copied. However, this term is not consistent with the other built-in bounds that use verbs instead. This patch renames the Pod kind into Copy. RFC: 0003-opt-in-builtin-traits Test Plan: make check Reviewers: cmr Differential Revision: http://phabricator.octayn.net/D3
2014-03-27serialize: use ResultSean McArthur-65/+83
All of Decoder and Encoder's methods now return a Result. Encodable.encode() and Decodable.decode() return a Result as well. fixes #12292
2014-03-27auto merge of #13151 : brson/rust/dist, r=alexcrichton,brsonbors-10/+36
A variety of stuff here, mostly aimed at making `make install` work correctly with `--libdir` and `--mandir`. `make install` again goes through `install.sh`.
2014-03-26rustc: Fix detection of lib64 directoryBrian Anderson-1/+1
Instead of just looking for its presence we need to see if it actually contains rust stuffs.
2014-03-26syntax: Permit visibility on tuple fieldsAlex Crichton-5/+6
This change is in preparation for #8122. Nothing is currently done with these visibility qualifiers, they are just parsed and accepted by the compiler. RFC: 0004-private-fields
2014-03-25install: Support --libdir and --mandir correctlyBrian Anderson-10/+30
This adds a hack to rustc to make it find the library directory regardless of whether it is named lib/lib64/lib32.
2014-03-25rustc: Stop relying on CFG_LIBDIR_RELATIVEBrian Anderson-1/+7
This is not sufficient for finding the library directory for binary installs, but it does make the build more complex by requiring env vars be set to build rustc.
2014-03-25configure: Make rustlibdir non-configurableBrian Anderson-1/+1
Trying to reduce the complexity of installation
2014-03-23iter: remove `to_owned_vec`Daniel Micay-2/+2
This needs to be removed as part of removing `~[T]`. Partial type hints are now allowed, and will remove the need to add a version of this method for `Vec<T>`. For now, this involves a few workarounds for partial type hints not completely working.
2014-03-22auto merge of #13076 : FlaPer87/rust/remove-freeze, r=alexcrichtonbors-4/+0
This PR removes the `Freeze` kind and the `NoFreeze` marker completely. Fixes #12577 cc @nikomatsakis r?
2014-03-22rustc: Fix fallout of removing get()Alex Crichton-163/+92
2014-03-22rustc: Remove special treatment for Freeze and NoFreezeFlavio Percoco-4/+0
Fixes #12577
2014-03-22auto merge of #13052 : sfackler/rust/clean-refcell, r=alexcrichtonbors-5/+5
These are superfluous now that we have fixed rvalue lifetimes and Deref. I'd also like to kill off `get` and `set`, but that'll be a large change so I want to make sure that we actually want to do that first.
2014-03-22Migrate all users of opt_vec to owned_slice, delete opt_vec.Huon Wilson-2/+2
syntax::opt_vec is now entirely unused, and so can go.
2014-03-20Remove RefCell::{with, with_mut}Steven Fackler-5/+5
These are superfluous now that we have fixed rvalue lifetimes and Deref.
2014-03-21syntax: make OptVec immutable.Huon Wilson-2/+2
This is the first step to replacing OptVec with a new representation: remove all mutability. Any mutations have to go via `Vec` and then make to `OptVec`. Many of the uses of OptVec are unnecessary now that Vec has no-alloc emptiness (and have been converted to Vec): the only ones that really need it are the AST and sty's (and so on) where there are a *lot* of instances of them, and they're (mostly) immutable.
2014-03-20auto merge of #13020 : alexcrichton/rust/vec, r=brsonbors-9/+0
The commits have the details.
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-9/+0
It's now in the prelude.
2014-03-20auto merge of #13017 : alexcrichton/rust/issue-13010, r=huonwbors-19/+27
Previously, any library of the pattern `lib<name>-<hash>-<version>.so` was >considered a candidate (rightly so) for loading a crate. Sets are generated for each unique `<hash>`, and then from these sets a candidate is selected. If a set contained more than one element, then it immediately generated an error saying that multiple copies of the same dylib were found. This is incorrect because each candidate needs to be validated to actually contain a rust library (valid metadata). This commit alters the logic to filter each set of candidates for a hash to only libraries which are actually rust libraries. This means that if multiple false positives are found with the right name pattern, they're all ignored. Closes #13010
2014-03-20auto merge of #12686 : FlaPer87/rust/shared, r=nikomatsakisbors-0/+4
`Share` implies that all *reachable* content is *threadsafe*. Threadsafe is defined as "exposing no operation that permits a data race if multiple threads have access to a &T pointer simultaneously". (NB: the type system should guarantee that if you have access to memory via a &T pointer, the only other way to gain access to that memory is through another &T pointer)... Fixes #11781 cc #12577 What this PR will do ================ - [x] Add Share kind and - [x] Replace usages of Freeze with Share in bounds. - [x] Add Unsafe<T> #12577 - [x] Forbid taking the address of a immutable static item with `Unsafe<T>` interior What's left to do in a separate PR (after the snapshot)? =========================================== - Remove `Freeze` completely
2014-03-20Add a Share kindFlavio Percoco-0/+4
Fixes #11781
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-11/+11
Closes #12771
2014-03-19auto merge of #12772 : thestinger/rust/slice, r=alexcrichtonbors-3/+3
Closes #12702
2014-03-20rename std::vec -> std::sliceDaniel Micay-3/+3
Closes #12702
2014-03-19rustc: Prevent false positives in crate loadingAlex Crichton-19/+27
Previously, any library of the pattern `lib<name>-<hash>-<version>.so` was >considered a candidate (rightly so) for loading a crate. Sets are generated for each unique `<hash>`, and then from these sets a candidate is selected. If a set contained more than one element, then it immediately generated an error saying that multiple copies of the same dylib were found. This is incorrect because each candidate needs to be validated to actually contain a rust library (valid metadata). This commit alters the logic to filter each set of candidates for a hash to only libraries which are actually rust libraries. This means that if multiple false positives are found with the right name pattern, they're all ignored. Closes #13010
2014-03-19rustc: put ty_closure behind some indirection.Huon Wilson-1/+1
This reduces the size of sty from 112 to 96; like with the ty_trait variant, this variant of sty occurs rarely (~1%) so the benefits are large and the costs small.
2014-03-19rustc: put ty_trait behind some indirection.Huon Wilson-3/+3
This reduces ty::sty from 160 bytes to just 112, and some measurements eddyb made suggest that the ty_trait variant occurs very rarely (e.g. ~1% of all sty instances) hence this will result in a large memory saving, and the cost of the indirection is unlikely to be an issue.
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-12/+11
2014-03-17De-@ CStore uses.Eduard Burtescu-54/+47
2014-03-17De-@ filesearch.Eduard Burtescu-22/+13
2014-03-17De-@ tyencode::ctxt and related parts of astencode.Eduard Burtescu-21/+21
2014-03-17De-@ ty::ctxt usage.Eduard Burtescu-45/+45
2014-03-17De-@ Session usage.Eduard Burtescu-22/+13
2014-03-15Test fixes and rebase conflictsAlex Crichton-1/+1
This commit switches over the backtrace infrastructure from piggy-backing off the RUST_LOG environment variable to using the RUST_BACKTRACE environment variable (logging is now disabled in libstd).
2014-03-15rustc: Topographically sort rust dependenciesAlex Crichton-2/+30
This commit starts to topographically sort rust dependencies on the linker command line. The reason for this is that linkers use right-hand libraries to resolve left-hand libraries symbols, which is especially crucial for us because we're using --as-needed on linux.
2014-03-14extra: Put the nail in the coffin, delete libextraAlex Crichton-1/+1
This commit shreds all remnants of libextra from the compiler and standard distribution. Two modules, c_vec/tempfile, were moved into libstd after some cleanup, and the other modules were moved to separate crates as seen fit. Closes #8784 Closes #12413 Closes #12576
2014-03-12Alpha-rename `.ident` fields of type `Name` to `.name`.Felix S. Klock II-6/+6
2014-03-08auto merge of #12758 : rgawdzik/rust/master, r=alexcrichtonbors-17/+28
Refactored get_metadata_section to return a Result<MetadataBlob,~str> instead of a Option<MetadataBlob>. This provides more clarity to the user through the debug output when using --ls. This is kind of a continuation of my original closed pull request 2 months ago (#11544), but I think the time-span constitutes a new pull request.
2014-03-08Refactored get_metadata_section to return a Result<T,~str>, added error ↵Robert Gawdzik-17/+28
messages. Closes #6615.
2014-03-08librustc: Fix up fallout from the automatic conversion.Felix S. Klock II-16/+26
2014-03-08librustc: Automatically change uses of `~[T]` to `Vec<T>` in rustc.Patrick Walton-99/+99
2014-03-07rename ast::ViewItemExternMod to ast::ViewItemExternCrate, and ↵Liigo Zhuang-1/+1
clean::ExternMod to clean::ExternCrate
2014-03-06rustc: Move to FNV hashing for node/def idsAlex Crichton-5/+6
This leverages the new hashing framework and hashmap implementation to provide a much speedier hashing algorithm for node ids and def ids. The hash algorithm used is currentl FNV hashing, but it's quite easy to swap out. I originally implemented hashing as the identity function, but this actually ended up in slowing down rustc compiling libstd from 8s to 13s. I would suspect that this is a result of a large number of collisions. With FNV hashing, we get these timings (compiling with --no-trans, in seconds): | | before | after | |-----------|---------:|--------:| | libstd | 8.324 | 6.703 | | stdtest | 47.674 | 46.857 | | libsyntax | 9.918 | 8.400 |