about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
AgeCommit message (Collapse)AuthorLines
2013-08-11auto merge of #8455 : nikomatsakis/rust/issue-5762-objects-dralston-d, r=graydonbors-7/+7
Fix #5762 and various other aspects of object invocation. r? @graydon
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-7/+7
2013-08-11syntax: Shrink enum Token and enum nonterminalblake2-ppc-5/+5
`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/+2
Fixes #8393
2013-08-03remove obsolete `foreach` keywordDaniel Micay-7/+7
this has been replaced by `for`
2013-08-02replace `range` with an external iteratorDaniel Micay-3/+2
2013-08-01std: Change `Times` trait to use `do` instead of `for`blake2-ppc-1/+1
Change the former repetition:: for 5.times { } to:: do 5.times { } .times() cannot be broken with `break` or `return` anymore; for those cases, use a numerical range loop instead.
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-5/+5
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-7/+5
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-2/+2
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-4/+4
bootstrapping on Windows.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-33/+46
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-3/+4
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-3/+2
2013-07-07De-share trait_refJames Miller-1/+1
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-06-30Remove vec::{map, mapi, zip_map} and the methods, except for .map, since thisHuon Wilson-2/+1
is very common, and the replacement (.iter().transform().collect()) is very ugly.
2013-06-25great renaming propagation: syntaxCorey Richardson-13/+7
2013-06-23vec: remove BaseIter implementationDaniel Micay-4/+4
I removed the `static-method-test.rs` test because it was heavily based on `BaseIter` and there are plenty of other more complex uses of static methods anyway.
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-1/+1
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-14add IteratorUtil to the preludeDaniel Micay-2/+0
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-2/+3
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-9/+9
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-1/+0
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-2/+2
2013-06-11fix tests, remove some warningsHuon Wilson-3/+2
2013-06-10std: remove str::{connect,concat}*.Huon Wilson-1/+1
2013-06-09std: remove fold[lr] in favour of iteratorsHuon Wilson-8/+6
2013-06-08std: remove each[i]_mut functions, in favour of iterators.Huon Wilson-1/+2
2013-06-06Clean up a handful of build warnings.Michael Sullivan-2/+2
2013-06-05removed unused imports (and one unused argument)John Clements-3/+2
2013-06-05remove interner from tt_readerJohn Clements-8/+3
2013-06-05token_to_ident takes argument by referenceJohn Clements-8/+8
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-21/+22
2013-06-05just use TLS internerJohn Clements-19/+19
2013-05-30Remove copy bindings from patterns.Niko Matsakis-7/+7
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+6
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+6
to libextra
2013-05-22Fix ICE in macrosCorey Richardson-4/+7
2013-05-22syntax/ext: modernise ext_ctxt to be CamelCase and use new.Huon Wilson-4/+4
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-12/+12
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-34/+33
2013-05-11Warning policeTim Chevalier-2/+2
2013-05-11auto merge of #6389 : sonwow/rust/issue-3356, r=bstriebors-2/+2
Fix for #3356
2013-05-10renamed vec::from_slice to vec::to_ownedYoungsoo Son-2/+2
2013-05-09Use a specialized string interner to reduce the need for owned stringsBjörn Steinbrink-2/+2
&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-02Remove 'Local Variable' commentsBrendan Zabarauskas-8/+0
2013-04-27only use #[no_core] in libcoreDaniel Micay-6/+0
2013-04-24Remove needless FIXME. Fixes #2811.Niko Matsakis-2/+0
2013-04-19syntax: de-mode and prepare for de-modeing rustcAlex Crichton-14/+14
2013-04-03auto merge of #5696 : thestinger/rust/hashmap, r=sanxiynbors-10/+10
This naming is free now that `oldmap` has finally been removed, so this is a search-and-replace to take advantage of that. It might as well be called `HashMap` instead of being named after the specific implementation, since there's only one. SipHash distributes keys so well that I don't think there will ever be much need to use anything but a simple hash table with open addressing. If there *is* a better way to do it, it will probably be better in all cases and can just be the default implementation. A cuckoo-hashing implementation combining a weaker hash with SipHash could be useful, but that won't be as general purpose - you would need to write a separate fast hash function specialized for the type to really take advantage of it (like taking a page from libstdc++/libc++ and just using the integer value as the "hash"). I think a more specific naming for a truly alternative implementation like that would be fine, with the nice naming reserved for the general purpose container.