diff options
| author | John Clements <clements@racket-lang.org> | 2014-06-27 16:11:18 -0700 |
|---|---|---|
| committer | John Clements <clements@racket-lang.org> | 2014-06-27 22:14:22 -0700 |
| commit | 04ced031ad52cfa33f30dbd55f72aff1d95813a3 (patch) | |
| tree | 918dafeeff79d05d28e5e7d9b0f7fb09e725fbdc /src/libsyntax | |
| parent | e3361bcbc259cf25b21e9ae50701d9030ad1f513 (diff) | |
| download | rust-04ced031ad52cfa33f30dbd55f72aff1d95813a3.tar.gz rust-04ced031ad52cfa33f30dbd55f72aff1d95813a3.zip | |
comments only
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/ext/mtwt.rs | 3 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libsyntax/ext/mtwt.rs b/src/libsyntax/ext/mtwt.rs index 6f6eeb3debd..48895d34022 100644 --- a/src/libsyntax/ext/mtwt.rs +++ b/src/libsyntax/ext/mtwt.rs @@ -30,6 +30,7 @@ use std::collections::HashMap; // change the semantics--everything here is immutable--but // it should cut down on memory use *a lot*; applying a mark // to a tree containing 50 identifiers would otherwise generate +// 50 new contexts pub struct SCTable { table: RefCell<Vec<SyntaxContext_>>, mark_memo: RefCell<HashMap<(SyntaxContext,Mrk),SyntaxContext>>, @@ -160,7 +161,7 @@ fn with_resolve_table_mut<T>(op: |&mut ResolveTable| -> T) -> T { } // Resolve a syntax object to a name, per MTWT. -// adding memoization to possibly resolve 500+ seconds in resolve for librustc (!) +// adding memoization to resolve 500+ seconds in resolve for librustc (!) fn resolve_internal(id: Ident, table: &SCTable, resolve_table: &mut ResolveTable) -> Name { diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 9549d5b8389..a93e8270d98 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -114,6 +114,7 @@ pub enum Nonterminal { NtPat( Gc<ast::Pat>), NtExpr(Gc<ast::Expr>), NtTy( P<ast::Ty>), + // see IDENT, above, for meaning of bool in NtIdent: NtIdent(Box<ast::Ident>, bool), NtMeta(Gc<ast::MetaItem>), // stuff inside brackets for attributes NtPath(Box<ast::Path>), |
