summary refs log tree commit diff
path: root/src/libsyntax/ext/expand.rs
AgeCommit message (Collapse)AuthorLines
2014-01-07Fixup the rest of the tests in the compilerAlex Crichton-0/+1
2014-01-06auto merge of #11332 : sfackler/rust/de-at-se, r=huonwbors-53/+52
This is necessary for #11151 to make sure dtors run before the libraries are unloaded.
2014-01-06Disowned the Visitor.Eduard Burtescu-1/+1
2014-01-05Use ~-objects instead of @-objects for syntax extsSteven Fackler-53/+52
This is necessary for #11151 to make sure dtors run before the libraries are unloaded.
2014-01-03libsyntax: Fix tests.Patrick Walton-9/+10
2014-01-03libsyntax: Remove unused `MultiRenamer`Patrick Walton-17/+3
2014-01-03libsyntax: De-`@mut` `ps::boxes`Patrick Walton-2/+3
2014-01-03libsyntax: Correctly de-`@mut` the pretty printer writerPatrick Walton-1/+1
2014-01-03libsyntax: De-`@mut` `SCTable::table`Patrick Walton-2/+6
2014-01-03librustc: De-`@mut` the parse sessionPatrick Walton-2/+2
2014-01-03auto merge of #11228 : sfackler/rust/syntaxenv, r=pcwaltonbors-69/+41
I'd really like to be able to do something like ```rust struct MapChain<'next, K, V> { info: BlockInfo, map: HashMap<K, V>, next: Option<&'next mut MapChain<'next, K, V> } ``` but I can't get the lifetimes to work out.
2014-01-01syntax::codemap: Add static DUMMY_SPklutzy-2/+2
It replaces `dummy_sp()`.
2013-12-30Rewrite SyntaxEnvSteven Fackler-69/+41
I'd really like to be able to do something like struct MapChain<'next, K, V> { info: BlockInfo, map: HashMap<K, V>, next: Option<&'next mut MapChain<'next, K, V> } but I can't get the lifetimes to work out.
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-3/+3
2013-12-29Make ast_fold take &mut selfSteven Fackler-33/+34
2013-12-28Stop passing duplicate parameters in expandSteven Fackler-125/+90
2013-12-28Stop using @ExtCtxtSteven Fackler-14/+14
2013-12-24green: Rip the bandaid off, introduce libgreenAlex Crichton-2/+2
This extracts everything related to green scheduling from libstd and introduces a new libgreen crate. This mostly involves deleting most of std::rt and moving it to libgreen. Along with the movement of code, this commit rearchitects many functions in the scheduler in order to adapt to the fact that Local::take now *only* works on a Task, not a scheduler. This mostly just involved threading the current green task through in a few locations, but there were one or two spots where things got hairy. There are a few repercussions of this commit: * tube/rc have been removed (the runtime implementation of rc) * There is no longer a "single threaded" spawning mode for tasks. This is now encompassed by 1:1 scheduling + communication. Convenience methods have been introduced that are specific to libgreen to assist in the spawning of pools of schedulers.
2013-12-08Add dead-code warning passKiet Tran-39/+3
2013-12-07syntax: print expansion info from #[attribute] macros in the correctHuon Wilson-1/+6
format. Previously, any attempt to use this information from inside something like #[deriving(Foo)] would result in it printing like `deriving(Foo)!`.
2013-12-02Add a macro to check if logging at a given label is enabledPhilipp Brüschweiler-0/+7
This is useful when the information that is needed to do useful logging is expensive to produce.
2013-12-01Box Block, fn_decl, variant and Ty in the AST, as they were inflating ↵Eduard Burtescu-26/+9
critical enum sizes.
2013-11-28Register new snapshotsAlex Crichton-6/+6
2013-11-26Clean up SmallVector use a bitSteven Fackler-19/+7
2013-11-26Support multiple item macrosSteven Fackler-58/+56
Closes #4375
2013-11-26libsyntax: Remove all non-`proc` `do` syntax.Patrick Walton-4/+4
2013-11-26Take &Pat in visit_patSeo Sanghyeon-1/+1
2013-11-17Forbid privacy in inner functionsAlex Crichton-1/+1
Closes #10111
2013-11-11Move std::rt::io to std::ioAlex Crichton-3/+3
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-78/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-08Generalize AST and ty::Generics to accept multiple lifetimes.Niko Matsakis-2/+2
2013-10-31Implement a concat!() format extensionAlex Crichton-1/+1
This extension can be used to concatenate string literals at compile time. C has this useful ability when placing string literals lexically next to one another, but this needs to be handled at the syntax extension level to recursively expand macros. The major use case for this is something like: macro_rules! mylog( ($fmt:expr $($arg:tt)*) => { error2!(concat!(file!(), ":", line!(), " - ", $fmt) $($arg)*); }) Where the mylog macro will automatically prepend the filename/line number to the beginning of every log message.
2013-10-30Prepared `std::sys` for removal, and made `begin_unwind` simplerMarvin Löbel-56/+48
- `begin_unwind` is now generic over any `T: Any + Send`. - Every value you fail with gets boxed as an `~Any`. - Because of implementation details, `&'static str` and `~str` are still handled specially behind the scenes. - Changed the big macro source string in libsyntax to a raw string literal, and enabled doc comments there.
2013-10-28syntax: remove dead @mut Visitor impl (only used in tests).Huon Wilson-63/+70
Also, move some code only uses in the tests into the test module, and replace some needless @mut ~[] with plain ~[].
2013-10-25libsyntax/librustc: Allow mut qualifier in patterns.Luqman Aden-8/+7
2013-10-24Remove even more of std::ioAlex Crichton-16/+17
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-22Remove the now-duplicate logging macrosAlex Crichton-8/+0
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-21/+21
Who doesn't like a massive renaming?
2013-10-20Don't allocate a string when calling printlnAlex Crichton-7/+2
Instead use format_args! to pass around a struct to pass along into std::fmt
2013-10-18Remove the fmt! syntax extensionAlex Crichton-52/+16
It lived a good life, but its time has come. The groundwork is set for the official transition after the next snapshot (removal of XXX2 macros)
2013-10-15Require module documentation with missing_docAlex Crichton-0/+1
Closes #9824
2013-10-14Remove unused abi attributes.Steve Klabnik-1/+0
They've been replaced by putting the name on the extern block. #[abi = "foo"] goes to extern "foo" { } Closes #9483.
2013-10-09option: rewrite the API to use compositionDaniel Micay-2/+2
2013-10-07Fix existing privacy/visibility violationsAlex Crichton-2/+4
This commit fixes all of the fallout of the previous commit which is an attempt to refine privacy. There were a few unfortunate leaks which now must be plugged, and the most horrible one is the current `shouldnt_be_public` module now inside `std::rt`. I think that this either needs a slight reorganization of the runtime, or otherwise it needs to just wait for the external users of these modules to get replaced with their `rt` implementations. Other fixes involve making things pub which should be pub, and otherwise updating error messages that now reference privacy instead of referencing an "unresolved name" (yay!).
2013-10-01Fix usage of the old debug! macrosAlex Crichton-1/+1
2013-10-01Fix typo with format migration: s/oldformat/oldfmt/.Huon Wilson-4/+4
2013-09-30syntax: Remove usage of fmt!Alex Crichton-46/+47
2013-09-30Prevent leakage of fmt! into the compilerAlex Crichton-48/+61
We're not outright removing fmt! just yet, but this prevents it from leaking into the compiler further (it's still turned on by default for all other code).
2013-09-29Remove all usage of @ast::CrateAlex Crichton-12/+12
2013-09-27auto merge of #9550 : alexcrichton/rust/remove-printf, r=thestingerbors-20/+0
The 0.8 release was cut, down with printf!