summary refs log tree commit diff
path: root/src/libsyntax_pos
AgeCommit message (Collapse)AuthorLines
2019-05-20Auto merge of #60815 - nnethercote:use-Symbol-more-2, r=petrochenkovbors-2/+20
Use `Symbol` even more These patches simplify the code a bit (fewer conversions) and also speed things up a bit (fewer `with_interner` calls). r? @petrochenkov
2019-05-20Introduce `LocalInternedString::intern`.Nicholas Nethercote-1/+12
`LocalInternedString::intern(x)` is preferable to `Symbol::intern(x).as_str()`, because the former involves one call to `with_interner` while the latter involves two.
2019-05-20Introduce `InternedString::intern`.Nicholas Nethercote-1/+8
`InternedString::intern(x)` is preferable to `Symbol::intern(x).as_interned_str()`, because the former involves one call to `with_interner` while the latter involves two. The case within InternedString::decode() is particularly hot, and this change reduces the number of `with_interner` calls by up to 13%.
2019-05-19Stop using gensyms in HIR loweringMatthew Jasper-0/+7
These names aren't ever handled by resolve, so there's no reason to make them gensyms.
2019-05-17Avoid unnecessary interning in `DefPathData::as_interned_str()`.Nicholas Nethercote-0/+7
2019-05-17Avoid unnecessary interning in `Ident::from_str()` calls.Nicholas Nethercote-0/+2
A lot of these static symbols are pre-interned.
2019-05-17Change `rustc::util::common::FN_OUTPUT_NAME` to a `Symbol`.Nicholas Nethercote-0/+1
2019-05-15Move `box` from the stable keyword to unstable keywords listPulkit Goyal-1/+1
Fixes #60849
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-10/+5
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-2/+2
2019-05-13Rename `syntax::symbol::symbols` as `syntax::symbol::sym`.Nicholas Nethercote-4/+5
Because it's going to be used a lot.
2019-05-13Add lots of static `Symbols`.Nicholas Nethercote-4/+384
These will be used in the subsequent commits. Many of them are attributes. The commit also adds the ability to handle symbols that aren't identifiers (e.g. "proc-macro").
2019-05-11Auto merge of #60700 - petrochenkov:preintern, r=nnethercotebors-9/+10
syntax_pos: Optimize symbol interner pre-filling slightly r? @nnethercote
2019-05-10Auto merge of #59288 - Centril:hir-if-to-match, r=oli-obkbors-0/+5
[let_chains, 1/6] Remove hir::ExprKind::If Per https://github.com/rust-lang/rust/issues/53667#issuecomment-471583239. r? @oli-obk
2019-05-10Remove hir::ExprKind::If and replace it with lowering to hir::ExprKind::Match.Mazdak Farrokhzad-0/+5
2019-05-10syntax_pos: Optimize symbol interner pre-filling slightlyVadim Petrochenkov-9/+10
2019-05-10Reduce `Symbol`'s interface slightly.Nicholas Nethercote-5/+1
2019-05-10Remove the `From<InternedString> for String` impl.Nicholas Nethercote-6/+0
It's not used.
2019-05-10Add various comments.Nicholas Nethercote-9/+43
Lots of details I wish I'd known when I first looked at this code.
2019-05-10Avoid recursion in de-gensym functions.Nicholas Nethercote-2/+5
2019-05-10Add `InternedString::with2`.Nicholas Nethercote-2/+11
This lets comparisons occur with a single access to the interner, instead of two.
2019-05-07Implement built-in await syntaxTaylor Cramer-0/+3
Adds support for .await under the existing async_await feature gate. Moves macro-like await! syntax to the await_macro feature gate. Removes support for `await` as a non-keyword under the `async_await` feature.
2019-04-22Promote rust comments to rustdocAlexey Shmalko-3/+3
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-15Preallocate BUILTIN_ATTRIBUTES symbols and use a hash map instead of loopingJohn Kåre Alsaker-10/+121
2019-04-15Use colon for keyword defsJohn Kåre Alsaker-61/+61
2019-04-15Move modules outside the proc macroJohn Kåre Alsaker-0/+28
2019-04-15Make check_name genericJohn Kåre Alsaker-1/+2
2019-04-15Use a proc macro to declare preallocated symbolsJohn Kåre Alsaker-125/+91
2019-04-14Add missing backtick to Symbol documentation.krk-1/+1
2019-04-14Auto merge of #59693 - nnethercote:64-bit-Spans, r=petrochenkovbors-101/+88
Increase `Span` from 4 bytes to 8 bytes. This increases the size of some important types, such as `ast::Expr` and `mir::Statement`. However, it drastically reduces how much the interner is used, and the fields are more natural sizes that don't require bit operations to extract. As a result, instruction counts drop across a range of workloads, by as much as 10% for `script-servo` incremental builds. Peak memory usage goes up a little for some cases, but down by more for some other cases -- as much as 18% for non-incremental builds of `packed-simd`. The commit also: - removes the `repr(packed)`, because it has negligible effect, but can cause undefined behaviour; - replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.) with derived ones. r? @petrochenkov
2019-04-14Rollup merge of #59735 - matklad:deadcode, r=sanxiynMazdak Farrokhzad-12/+1
remove lookup_char_pos_adj It is now exactly equivalent to lookup_char_pos.
2019-04-11Auto merge of #59227 - Zoxc:fix-get, r=eddybbors-1/+5
Fix lifetime on LocalInternedString::get function cc @eddyb @nnethercote
2019-04-05remove lookup_char_pos_adjAleksey Kladov-12/+1
It is now exactly equivalent to lookup_char_pos.
2019-04-05Increase `Span` from 4 bytes to 8 bytes.Nicholas Nethercote-101/+88
This increases the size of some important types, such as `ast::Expr` and `mir::Statement`. However, it drastically reduces how much the interner is used, and the fields are more natural sizes that don't require bit operations to extract. As a result, instruction counts drop across a range of workloads, by as much as 12% for incremental "check" builds of `script-servo`. Peak memory usage goes up a little for some cases, but down by more for some other cases -- as much as 18% for non-incremental builds of `packed-simd`. The commit also: - removes the `repr(packed)`, because it has negligible effect, but can cause undefined behaviour; - replaces explicit impls of common traits (`Copy`, `PartialEq`, etc.) with derived ones.
2019-04-03Deny internal lints on non conflicting cratesflip1995-0/+1
- libarena - librustc_allocator - librustc_borrowck - librustc_codegen_ssa - librustc_codegen_utils - librustc_driver - librustc_errors - librustc_incremental - librustc_metadata - librustc_passes - librustc_privacy - librustc_resolve - librustc_save_analysis - librustc_target - librustc_traits - libsyntax - libsyntax_ext - libsyntax_pos
2019-04-03Tweak `Span` encoding.Nicholas Nethercote-3/+3
Failing to fit `base` is more common than failing to fit `len`.
2019-03-31Fix lifetime on LocalInternedString::get functionJohn Kåre Alsaker-1/+5
2019-03-26bump bootstrap; adjust stage0 uses in libsyntax_posMazdak Farrokhzad-1/+0
2019-03-19Do not encode gensymed imports in metadataVadim Petrochenkov-0/+4
2019-03-16syntax: Introduce `Ident::can_be_raw`Vadim Petrochenkov-4/+9
2019-02-26update scoped_tls to 1.0Marcel Hellwig-1/+1
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-31/+31
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-12Auto merge of #58098 - oli-obk:maybe_allow_internal_unstable, r=petrochenkovbors-5/+10
Require a list of features in `#[allow_internal_unstable]` The blanket-permission slip is not great and will likely give us trouble some point down the road.
2019-02-11Parallel rustc needs synchronizing smart pointer cloningOliver Scherer-2/+2
2019-02-11Use `Rc<[Symbol]>` instead of `Vec<Symbol>` to reduce # of allocsOliver Scherer-3/+5
2019-02-11Ease the transition to requiring features by just warning if there's no ↵Oliver Scherer-1/+4
feature list while we could make this change (it's all unstable after all), there are crates.io crates that use the feature and that the compiler depends upon. We can instead roll out this feature while still supporting the old way.
2019-02-11Require a list of features to allow in `allow_internal_unstable`Oliver Scherer-5/+5
2019-02-10rustc: doc commentsAlexander Regueiro-31/+31
2019-02-10Revert removed #![feature(nll)]Taiki Endo-0/+1