summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
AgeCommit message (Collapse)AuthorLines
2013-12-15libsyntax: Implement the new `box` syntax for unique pointers.Patrick Walton-7/+9
2013-12-11Separate strict/reserved keywords, derive bounds.Chris Morgan-11/+29
It's twenty lines longer, but makes for clearer separation of strict and reserved keywords (probably a good thing) and removes another moving part (the definitions of `(STRICT|RESERVED)_KEYWORD_(START|FINAL)`).
2013-12-11Remove the following unused special identifiers:Chris Morgan-107/+67
- underscore ("_") - unary ("unary") - not_fn ("!") - idx_fn ("[]") - unary_minus_fn ("unary-") - item ("item") - block ("block") - stmt ("stmt") - pat ("pat") - expr ("expr") - ty ("ty") - ident ("ident") - path ("path") - descrim ("descrim") - clownshoe_stack_shim ("__rust_stack_shim") - blk ("blk") - c_abi ("C") (And, of course, renumber everything to match.)
2013-12-11Deduplicate in syntax::parse::token with a macro.Chris Morgan-271/+183
I also renumbered things at the same time; ``in`` was shifted into its alphabetical position and the reserved keywords were reordered (a couple of them were out of order).
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-3/+3
critical enum sizes.
2013-11-28Register new snapshotsAlex Crichton-16/+16
2013-11-26auto merge of #10670 : eddyb/rust/node-u32, r=alexcrichtonbors-6/+6
### Rationale There is no reason to support more than 2³² nodes or names at this moment, as compiling something that big (even without considering the quadratic space usage of some analysis passes) would take at least **64GB**. Meanwhile, some can't (or barely can) compile rustc because it requires almost **1.5GB**. ### Potential problems Can someone confirm this doesn't affect metadata (de)serialization? I can't tell myself, I know nothing about it. ### Results Some structures have a size reduction of 25% to 50%: [before](https://gist.github.com/luqmana/3a82a51fa9c86d9191fa) - [after](https://gist.github.com/eddyb/5a75f8973d3d8018afd3). Sadly, there isn't a massive change in the memory used for compiling stage2 librustc (it doesn't go over **1.4GB** as [before](http://huonw.github.io/isrustfastyet/mem/), but I can barely see the difference). However, my own testcase (previously peaking at **1.6GB** in typeck) shows a reduction of **200**-**400MB**.
2013-11-27Shink NodeId, CrateNum, Name and Mrk down to 32 bits on x64.Eduard Burtescu-6/+6
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-2/+2
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-0/+2
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-19/+22
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-3/+3
Who doesn't like a massive renaming?
2013-10-09option: rewrite the API to use compositionDaniel Micay-1/+1
2013-10-08Register new snapshotsAlex Crichton-19/+0
2013-10-08Add bindings for start and ends of keyword ranges; use bindings in match arms.Felix S. Klock II-11/+40
2013-10-08add token::LIT_STR_RAW(ident, num of # symbols)Benjamin Herr-0/+7
Treat it as a synonym for LIT_STR for now.
2013-09-30syntax: Remove usage of fmt!Alex Crichton-6/+6
2013-09-26Add 'continue' as a synonym for 'loop'Brian Anderson-18/+21
2013-09-22Reserve the `alignof`, `offsetof`, and `sizeof` keywordsBirunthan Mohanathas-4/+14
Closes #9333.
2013-09-18Register new snapshotsAlex Crichton-2/+1
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-3/+3
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-06add test case, cleanupJohn Clements-2/+0
2013-09-06remove unneeded imports, clean up unused var warningsJohn Clements-5/+2
2013-09-06memoization for resolveJohn Clements-2/+2
2013-09-06uncomment mtwt_resolve callsJohn Clements-0/+20
2013-09-06commentsJohn Clements-8/+31
2013-09-06added gensym_copy mechanism to ensure sharing of pointers in the internerJohn Clements-40/+33
this makes comparisons constant-time, and enables spelling-comparison of identifiers, crucial in many parts of resolve.
2013-09-06added test for ptr_eq on fresh_name-generated identsJohn Clements-1/+32
2013-09-06re-add debug versionJohn Clements-0/+5
2013-09-06drop back to a simple gensym approach for fresh-name.John Clements-12/+3
this is necessary so that the new idents are connected to the original strings. this is important both for error messages, and so that top-level refs get connected to the right things.
2013-09-06adding test case to check marking/unmarkingJohn Clements-1/+6
2013-09-06add hygiene support fns, move them around.John Clements-7/+3
also adds test cases
2013-09-05Remove the __log function for __log_levelAlex Crichton-3/+3
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-04stop treating char as an integer typeDaniel Micay-2/+6
Closes #7609
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-22/+22
2013-09-02switch __field__ hack to <unnamed_field>Daniel Micay-1/+1
avoids conflict with fields actually named `__field__`
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-86/+86
2013-08-23Parse and reserve typeof keyword. #3228Ben Blum-2/+5
2013-08-16Reserve 'yield' keywordKevin Ballard-4/+7
Rename task::yield() to task::deschedule(). Fixes #8494.
2013-08-11syntax: Shrink enum Token and enum nonterminalblake2-ppc-4/+4
`enum Token` was 192 bytes (64-bit), as pointed out by pnkfelix; the only bloating variant being `INTERPOLATED(nonterminal)`. Updating `enum nonterminal` to use ~ where variants included big types, shrunk size_of(Token) to 32 bytes (64-bit). I am unsure if the `nt_ident` variant should have an indirection, with ast::ident being only 16 bytes (64-bit), but without this, enum Token would be 40 bytes. A dumb benchmark says that compilation time is unchanged, while peak memory usage for compiling std.rs is down 3% Before:: $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1 src/libstd/std.rs 19.00user 0.39system 0:19.41elapsed 99%CPU (0avgtext+0avgdata 627820maxresident)k 0inputs+28896outputs (0major+228665minor)pagefaults 0swaps $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc -O --cfg stage1 src/libstd/std.rs 31.64user 0.34system 0:32.02elapsed 99%CPU (0avgtext+0avgdata 629876maxresident)k 0inputs+22432outputs (0major+229411minor)pagefaults 0swaps After:: $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc --cfg stage1 src/libstd/std.rs 19.07user 0.45system 0:19.55elapsed 99%CPU (0avgtext+0avgdata 609384maxresident)k 0inputs+28896outputs (0major+221997minor)pagefaults 0swaps $ time ./x86_64-unknown-linux-gnu/stage1/bin/rustc -O --cfg stage1 src/libstd/std.rs 31.90user 0.34system 0:32.28elapsed 99%CPU (0avgtext+0avgdata 612080maxresident)k 0inputs+22432outputs (0major+223726minor)pagefaults 0swaps
2013-08-08Allow attributes to appear as macro argumentsNiko Matsakis-0/+3
Fixes #8393
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-1/+1
2013-08-03remove obsolete `foreach` keywordDaniel Micay-10/+7
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+0
2013-08-01convert `pure` to a reserved keywordDaniel Micay-31/+31
2013-08-01make `in` and `foreach` get treated as keywordsDaniel Micay-13/+13
2013-07-31remove `copy` as a keywordDaniel Micay-70/+68
2013-07-30syntax: add temporary 'foreach' keyword.Graydon Hoare-0/+3
2013-07-30syntax: add 'in' keywordGraydon Hoare-0/+3
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-2/+2