summary refs log tree commit diff
path: root/src/librustc/metadata/decoder.rs
AgeCommit message (Collapse)AuthorLines
2014-03-29auto merge of #13188 : FlaPer87/rust/master, r=alexcrichtonbors-14/+3
2014-03-28auto merge of #13170 : eddyb/rust/syntax-cleanup, r=alexcrichtonbors-24/+24
Removes all Cell's/RefCell's from lexer::Reader implementations and a couple @.
2014-03-29Register new snapshotFlavio Percoco-14/+3
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-1/+1
Closes #2569
2014-03-28De-@ IdentInterner.Eduard Burtescu-24/+24
2014-03-27serialize: use ResultSean McArthur-3/+14
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-26syntax: Permit visibility on tuple fieldsAlex Crichton-1/+2
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-22rustc: Fix fallout of removing get()Alex Crichton-2/+1
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-17De-@ ty::ctxt usage.Eduard Burtescu-20/+20
2014-03-12Alpha-rename `.ident` fields of type `Name` to `.name`.Felix S. Klock II-1/+1
2014-03-08librustc: Fix up fallout from the automatic conversion.Felix S. Klock II-4/+4
2014-03-08librustc: Automatically change uses of `~[T]` to `Vec<T>` in rustc.Patrick Walton-38/+38
2014-03-02Make visible types public in rustcSteven Fackler-1/+1
2014-03-02auto merge of #12637 : pcwalton/rust/devecing, r=alexcrichtonbors-1/+1
r? @alexcrichton
2014-03-01rustc: Better error when loading invalid librariesAlex Crichton-0/+14
When the metadata format changes, old libraries often cause librustc to abort when reading their metadata. This should all change with the introduction of SVH markers, but the loader for crates should gracefully handle libraries without SVH markers still. This commit adds support for tripping fewer assertions when loading libraries by using maybe_get_doc when initially parsing metadata. It's still possible for some libraries to fall through the cracks, but this should deal with a fairly large number of them up front.
2014-03-01librustc: Fix errors arising from the automated `~[T]` conversionPatrick Walton-1/+1
2014-02-28rustc: Add the concept of a Strict Version HashAlex Crichton-7/+8
This new SVH is used to uniquely identify all crates as a snapshot in time of their ABI/API/publicly reachable state. This current calculation is just a hash of the entire crate's AST. This is obviously incorrect, but it is currently the reality for today. This change threads through the new Svh structure which originates from crate dependencies. The concept of crate id hash is preserved to provide efficient matching on filenames for crate loading. The inspected hash once crate metadata is opened has been changed to use the new Svh. The goal of this hash is to identify when upstream crates have changed but downstream crates have not been recompiled. This will prevent the def-id drift problem where upstream crates were recompiled, thereby changing their metadata, but downstream crates were not recompiled. In the future this hash can be expanded to exclude contents of the AST like doc comments, but limitations in the compiler prevent this change from being made at this time. Closes #10207
2014-02-28rustc: Simplify crate loading constraintsAlex Crichton-24/+16
The previous code passed around a {name,version} pair everywhere, but this is better expressed as a CrateId. This patch changes these paths to store and pass around crate ids instead of these pairs of name/version. This also prepares the code to change the type of hash that is stored in crates.
2014-02-24Transition to new `Hash`, removing IterBytes and std::to_bytes.Huon Wilson-2/+3
2014-02-22auto merge of #12451 : edwardw/rust/ident-2-name, r=cmrbors-1/+1
Closes #7743.
2014-02-21std: rewrite Hash to make it more genericErick Tryzelaar-0/+1
This patch merges IterBytes and Hash traits, which clears up the confusion of using `#[deriving(IterBytes)]` to support hashing. Instead, it now is much easier to use the new `#[deriving(Hash)]` for making a type hashable with a stream hash. Furthermore, it supports custom non-stream-based hashers, such as if a value's hash was cached in a database. This does not yet replace the old IterBytes-hash with this new version.
2014-02-22Represent lifetimes as Names instead of IdentsEdward Wang-1/+1
Closes #7743.
2014-02-21Changed NonCamelCaseTypes lint to warn by defaultmr.Shu-1/+2
Added allow(non_camel_case_types) to librustc where necesary Tried to fix problems with non_camel_case_types outside rustc fixed failing tests Docs updated Moved #[allow(non_camel_case_types)] a level higher. markdown.rs reverted Fixed timer that was failing tests Fixed another timer
2014-02-20Mass rename if_ok! to try!Alex Crichton-6/+6
This "bubble up an error" macro was originally named if_ok! in order to get it landed, but after the fact it was discovered that this name is not exactly desirable. The name `if_ok!` isn't immediately clear that is has much to do with error handling, and it doesn't look fantastic in all contexts (if if_ok!(...) {}). In general, the agreed opinion about `if_ok!` is that is came in as subpar. The name `try!` is more invocative of error handling, it's shorter by 2 letters, and it looks fitting in almost all circumstances. One concern about the word `try!` is that it's too invocative of exceptions, but the belief is that this will be overcome with documentation and examples. Close #12037
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-68/+43
2014-02-13Replace `crate` usage with `krate`Flavio Percoco-14/+14
This patch replaces all `crate` usage with `krate` before introducing the new keyword. This ensures that after introducing the keyword, there won't be any compilation errors. krate might not be the most expressive substitution for crate but it's a very close abbreviation for it. `module` was already used in several places already.
2014-02-07Removed @self and @Trait.Eduard Burtescu-1/+0
2014-02-05pull extra::{serialize, ebml} into a separate libserialize crateJeff Olson-3/+3
- `extra::json` didn't make the cut, because of `extra::json` required dep on `extra::TreeMap`. If/when `extra::TreeMap` moves out of `extra`, then `extra::json` could move into `serialize` - `libextra`, `libsyntax` and `librustc` depend on the newly created `libserialize` - The extensions to various `extra` types like `DList`, `RingBuf`, `TreeMap` and `TreeSet` for `Encodable`/`Decodable` were moved into the respective modules in `extra` - There is some trickery, evident in `src/libextra/lib.rs` where a stub of `extra::serialize` is set up (in `src/libextra/serialize.rs`) for use in the stage0 build, where the snapshot rustc is still making deriving for `Encodable` and `Decodable` point at extra. Big props to @huonw for help working out the re-export solution for this extra: inline extra::serialize stub fix stuff clobbered in rebase + don't reexport serialize::serialize no more globs in libserialize syntax: fix import of libserialize traits librustc: fix bad imports in encoder/decoder add serialize dep to librustdoc fix failing run-pass tests w/ serialize dep adjust uuid dep more rebase de-clobbering for libserialize fixing tests, pushing libextra dep into cfg(test) fix doc code in extra::json adjust index.md links to serialize and uuid library
2014-02-03Fixing remaining warnings and errors throughoutAlex Crichton-6/+6
2014-02-03rustc: Remove io_error usageAlex Crichton-10/+11
2014-02-01auto merge of #11974 : huonw/rust/no-at-vec, r=pcwaltonbors-24/+29
This removes @[] from the parser as well as much of the handling of it (and `@str`) from the compiler as I can find. I've just rebased @pcwalton's (already reviewed) `@str` removal (and fixed the problems in a separate commit); the only new work is the trailing commits with my authorship. Closes #11967
2014-02-02rustc: remove use of @[].Huon Wilson-9/+9
2014-02-02librustc: Remove uses of `token::ident_to_str()` from librustcPatrick Walton-2/+7
2014-02-02librustc: Remove a bunch of `@str` from the compiler around metadataPatrick Walton-9/+9
handling
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-1/+1
2014-02-02libsyntax: Introduce an `InternedString` type to reduce `@str` in thePatrick Walton-3/+3
compiler and use it for attributes
2014-01-31Handle attributes on cross-crate tuple-structs correctlyDavid Manescu-0/+17
Fixes #11741
2014-01-27Demote self to an (almost) regular argument and remove the env param.Eduard Burtescu-14/+2
Fixes #10667 and closes #10259.
2014-01-23Redo exported macro serializationSteven Fackler-3/+2
The old method of serializing the AST gives totally bogus spans if the expansion of an imported macro causes compilation errors. The best solution seems to be to serialize the actual textual macro definition and load it the same way the std-macros are. I'm not totally confident that getting the source from the CodeMap will always do the right thing, but it seems to work in simple cases.
2014-01-16Load macros from external modulesSteven Fackler-0/+17
2014-01-12Removed remnants of `@mut` and `~mut` from comments and the type system.Eduard Burtescu-1/+1
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-65/+61
2014-01-01syntax::codemap: Add static DUMMY_SPklutzy-1/+1
It replaces `dummy_sp()`.
2013-12-29Rename PkgId to CrateIdLuis de Bethencourt-1/+1
2013-12-29Rename pkgid variablesLuis de Bethencourt-1/+1
2013-12-26librustc: De-`@mut` the `cnum_map`Patrick Walton-3/+9
2013-12-26librustc: De-`@mut` several instances of `io::Writer`.Patrick Walton-3/+3
There are a few more related to pretty printing.
2013-12-26librustc: De-`@mut` `Rib::bindings`Patrick Walton-0/+1