about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-05-28Move checking for moves and initialization of local variables and patterns intoNiko Matsakis-18/+13
borrow checker and generalize what moves are allowed. Fixes a nasty bug or two in the pattern move checking code. Unifies dataflow code used for initialization and other things. First step towards once fns. Everybody wins. Fixes #4384. Fixes #4715. cc once fns (#2202), optimizing local moves (#5016).
2013-05-27Prevent refcount cycles during lintingAlex Crichton-43/+66
Shaves off ~600MB of memory while compiling rustc
2013-05-28Remove unnecessary allocations flagged by lintSeo Sanghyeon-42/+42
2013-05-25auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=brsonbors-34/+1
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date. Closes #4219.
2013-05-25Use an enum for keywords and intern them to improve parser performanceBjörn Steinbrink-245/+280
Currently, keywords are stored in hashsets that are recreated for every Parser instance, which is quite expensive since macro expansion creates lots of them. Additionally, the parser functions that look for a keyword currently accept a string and have a runtime check to validate that they actually received a keyword. By creating an enum for the keywords and inserting them into the ident interner, we can avoid the creation of the hashsets and get static checks for the keywords. For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
2013-05-24Remove the #[merge] hack from the parserAlex Crichton-34/+1
2013-05-24auto merge of #6680 : ben0x539/rust/slashslashslash, r=graydonbors-2/+9
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes, ///////////// // like so // ///////////// Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input. I figure the best plan here is to just declare that a comment that is exactly `///` is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.
2013-05-23cleanup warnings from libsyntaxErick Tryzelaar-7/+4
2013-05-23core: remove iter_bytes helper functionsErick Tryzelaar-11/+25
2013-05-22libsyntax: Fix more merge fallout.Patrick Walton-2/+2
2013-05-22libstd: Fix merge fallout.Patrick Walton-0/+2
2013-05-22syntax: Change syntax extensions to expand to `std::foo` instead of `core::foo`Patrick Walton-53/+56
2013-05-22librustc: Change `std` to `extra` throughout libsyntax and librustcPatrick Walton-27/+29
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-2/+111
to libextra
2013-05-22auto merge of #6686 : cmr/rust/fix-6596, r=catamorphismbors-4/+7
The error message is extremely unideal.
2013-05-22Fix ICE in macrosCorey Richardson-4/+7
2013-05-22declare that "///" is still a doc comment, just not "////+" (fixes #5838)Benjamin Herr-2/+9
2013-05-22Fix #6342Jihyun Yu-4/+9
2013-05-21auto merge of #6658 : sanxiyn/rust/static-string-2, r=thestingerbors-11/+11
2013-05-22Use static stringsSeo Sanghyeon-9/+9
2013-05-21auto merge of #6611 : huonw/rust/syntax-ext-no-dup, r=jbclementsbors-2242/+1659
Fixes https://github.com/mozilla/rust/issues/6578 by merging the 3 different ways to build an AST into a single `AstBuilder` trait, creating a more uniform and briefer interface. Also, converts the `ext_ctxt` trait-object to be a plain struct, as well as renaming it to `ExtCtxt`. Seems to make expansion slightly faster for the normal case (e.g. `libcore` and `libstd`), but slower for `librustc` (slightly) and `libsyntax` (0.3s -> 0.8s! I'm investigating this, but I'd prefer this patch to land relatively quickly.). `git blame` suggests maybe @graydon or @erickt are familiar with this area of the code. r?
2013-05-22Take string slicesSeo Sanghyeon-2/+2
2013-05-22syntax/ext: convert all AstBuilder methods to a uniform syntax.Huon Wilson-1686/+998
2013-05-22syntax/ext: migrate build.rs functions to AstBuilder methods.Huon Wilson-925/+1126
2013-05-22syntax/ext: collect the ast building traits into a single trait.Huon Wilson-493/+420
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-324/+323
2013-05-22syntax/ext: Remove the trait-object indirection of the ext_ctxt object.Huon Wilson-106/+82
2013-05-21syntax/ext: remove the ~str dependence of the deriving code.Huon Wilson-79/+81
2013-05-21Correct span for expr_vecSeo Sanghyeon-1/+1
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-303/+298
2013-05-20Implement a lint mode to detect unnecessary allocationsAlex Crichton-3/+3
2013-05-20getting rid of interner_key! macroJohn Clements-113/+54
2013-05-20hygiene infrastructure.John Clements-110/+194
- added a hash table to memoize rename and mark operations. - added rename, mark, and resolve fold fns
2013-05-20detect unused attrs in one more place, allow parsing to continue for allJohn Clements-24/+53
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
2013-05-20parser commentJohn Clements-0/+1
2013-05-20refactoring test functionsJohn Clements-70/+105
2013-05-20auto merge of #6635 : brson/rust/snapshot, r=brsonbors-249/+0
2013-05-19Register snapshotsBrian Anderson-249/+0
2013-05-19Fix many warnings.Steve Klabnik-3/+2
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-7/+7
2013-05-18auto merge of #6603 : thestinger/rust/whitespace, r=thestingerbors-1/+0
2013-05-19reduce the usage of explicit version markersDaniel Micay-1/+1
2013-05-18minor automated whitespace fixesDaniel Micay-1/+0
2013-05-18Made bytes!() accept a list of string, integer or char literalsMarvin Löbel-5/+50
2013-05-17Re-implement lint with less emphasis on item idsAlex Crichton-7/+13
This way it's much easier to add lints throughout compilation correctly, and functions on impls can alter the way lints are emitted.
2013-05-16Add BuiltinBounds to closure type: parse and handle subtyping,Niko Matsakis-11/+16
but do not integrate with kindck etc (requires a snapshot first)
2013-05-16auto merge of #6530 : huonw/rust/deriving-deepclone, r=bstriebors-7/+43
2013-05-16syntax: use fmt! over + in deriving/cloneHuon Wilson-6/+6
2013-05-16auto merge of #6531 : sammykim/rust/bytes, r=luqmanabors-0/+31
Fix #4334.
2013-05-16syntax: implement #[deriving(DeepClone)]. Fixes #6514.Huon Wilson-6/+42