about summary refs log tree commit diff
path: root/src/libsyntax/ext/auto_encode.rs
AgeCommit message (Collapse)AuthorLines
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-2/+2
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-2/+2
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-1481/+5
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-15auto merge of #6487 : recrack/rust/vec_len, r=thestingerbors-2/+2
Rename vec::len(var) to var.len() ``` libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax test/auxiliary test/bench test/run-pass ```
2013-05-14rustc: rename ast::self_ty and related fields to explicit_selfErick Tryzelaar-2/+2
2013-05-15Rename vec::len(var) to var.len()Youngmin Yoo-2/+2
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-2/+2
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-3/+3
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-13/+11
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-72/+72
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
2013-05-08librustc: Remove mutable fields from the language.Patrick Walton-8/+4
They're still parsed though, to get through bootstrapping.
2013-05-02librustc: Update the serializer to work properly with INHTWAMA, removing ↵Patrick Walton-104/+200
mutable fields in the process
2013-04-29librustc: Forbid type implementations on typedefs.Patrick Walton-1/+44
2013-04-29librustc: Remove the concept of modes from the compiler.Patrick Walton-15/+15
This commit does not remove `ty::arg`, although that should be possible to do now.
2013-04-27only use #[no_core] in libcoreDaniel Micay-4/+0
2013-04-25Made fail! and assert! accept both &'static str and ~str, as well as a fmt! ↵Marvin Löbel-1/+1
like format list. Unwinding through macros now happens as a call to the trait function `FailWithCause::fail_with()`, which consumes self, allowing to use a more generic failure object in the future.
2013-04-19syntax: de-mode and prepare for de-modeing rustcAlex Crichton-45/+45
2013-04-10syntax: add {read,emit}_enum_struct_variant{,_field}Erick Tryzelaar-0/+8
2013-04-10std: add serialize {read,emit}_tuple{,_arg,_struct,_struct_arg}Erick Tryzelaar-0/+14
2013-04-10std: rename {read,emit}_field to {read,emit}_struct_fieldErick Tryzelaar-5/+5
2013-04-10std: clean up the order of {De,En}codable methodsErick Tryzelaar-7/+7
2013-04-10path -> PathJohn Clements-10/+10
2013-04-05Fix various warnings, NOTEs, etcNiko Matsakis-1/+1
2013-04-05Refactor so that references to traits are not represented using a type with aNiko Matsakis-8/+6
bare function store (which is not in fact a kind of value) but rather ty::TraitRef. Removes many uses of fail!() and other telltale signs of type-semantic mismatch. cc #4183 (not a fix, but related)
2013-03-30syntax: fix auto_encode test.Erick Tryzelaar-4/+4
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-3/+3
2013-03-29std: add Encoder::emit_map and Decoder::read_mapErick Tryzelaar-0/+10
2013-03-29std: remove Encoder::read_rec and Decoder::emit_recErick Tryzelaar-3/+0
2013-03-29std: remove Encoder::emit_tup{,_elt} and Decoder::read_tup{,_elt}Erick Tryzelaar-7/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_vec and ↵Erick Tryzelaar-9/+2
Decoder::read_{owned,managed}_vec
2013-03-29std: remove Encoder::emit_{owned,managed} and Decoder::read_{owned,managed}Erick Tryzelaar-4/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_str and ↵Erick Tryzelaar-4/+1
Decoder::read_{owned,managed}_str
2013-03-28librustc: Remove common fields and nested enums from the languagePatrick Walton-4/+0
2013-03-27std: Decode::read_enum_variant should pass in the variant namesErick Tryzelaar-3/+14
Because the json::Decoder uses the string variant name, we need a way to correlate the string to the enum index. This passes in a static &[&str] to read_enum_variant, which allows the json::Decoder to know which branch it's trying to process.
2013-03-27std: add option type directly to serialize::{En,De}codeErick Tryzelaar-9/+70
2013-03-26Rip out old code that still structured method calls as aNiko Matsakis-67/+44
expr_call(expr_field(...)) rather than an expr_method_call. There is probably more such code in trans that should be removed.
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-2/+2
2013-03-22syntax: replace uses of old deriving attribute with new oneAndrew Paseltiner-1/+1
2013-03-20change some uses of fail_unless to assert_eqJohn Clements-2/+1
2013-03-18Make &self permit explicit lifetimes, but don't really use themNiko Matsakis-2/+4
(this will be needed for snapshotting at some point).
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-16/+16
2013-03-11libsyntax: Remove newtype enums from libsyntax. rs=deenumPatrick Walton-12/+0
2013-03-11librustc: Replace all uses of `fn()` with `&fn()`. rs=defunPatrick Walton-16/+16
2013-03-09Remove @ast::Region and replace with @ast::Lifetime.Niko Matsakis-8/+2
Modify pretty-printer to emit lifetimes and fix a few minor parser bugs that this uncovered.
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-7/+0
2013-03-04Remove unused imports throughout src/Alex Crichton-2/+0
2013-03-03libsyntax: add &self to extensionsErick Tryzelaar-16/+26
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-2/+2
2013-03-01Avoid calling to_vec() unnecessarily in parser.Niko Matsakis-2/+2
Also, rename the OptVec-to-vector conversion method to opt_vec::take_vec() and convert from a method into a fn because I fear strange bugs.
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-5/+4