Michael Woerister
0cc70743d2
Made ast::blk not use spanned<T> anymore.
2013-07-17 08:21:46 +02:00
Huon Wilson
e4f7561bcd
Clean-up tests after debug!/std-macros change.
...
The entire testsuite is converted to using info! rather than debug!
because some depend on the code within the debug! being trans'd.
2013-07-17 03:10:13 +10:00
Huon Wilson
b48e37e8ee
syntax: make a macros-injection pass; conditionally define debug! to a noop based on cfg(debug).
...
Macros can be conditionally defined because stripping occurs before macro
expansion, but, the built-in macros were only added as part of the actual
expansion process and so couldn't be stripped to have definitions conditional
on cfg flags.
debug! is defined conditionally in terms of the debug config, expanding to
nothing unless the --cfg debug flag is passed (to be precise it expands to
`if false { normal_debug!(...) }` so that they are still type checked, and
to avoid unused variable lints).
2013-07-16 15:05:50 +10:00
Alex Crichton
9fd2ac7428
Make TLS keys actually take up space
...
If the TLS key is 0-sized, then the linux linker is apparently smart enough to
put everything at the same pointer. OSX on the other hand, will reserve some
space for all of them. To get around this, the TLS key now actuall consumes
space to ensure that it gets a unique pointer
2013-07-14 10:15:07 -07:00
Alex Crichton
e3211fa1f1
Purge the last remnants of the old TLS api
...
Closes #3273
2013-07-14 09:29:12 -07:00
Kevin Ballard
3b0258916d
Rename print!()/println!() to printf!()/printfln!()
...
The new names make it obvious that these generate formatted output.
Add a one-argument case that uses %? to format, just like the other
format-using macros (e.g. info!()).
2013-07-13 14:33:41 -07:00
Birunthan Mohanathas
948334f333
Add print! and println! macros. Closes #7653 .
2013-07-13 16:30:31 +03:00
Corey Richardson
8dc6445e38
Change the assert_eq message to be more verbose.
...
Closes #6221
2013-07-10 13:12:10 -04:00
Daniel Micay
641aec7407
remove some method resolve workarounds
2013-07-07 19:51:13 -04:00
James Miller
cd1b6c8979
De-managed ast::Path
2013-07-07 22:51:09 +12:00
Seo Sanghyeon
2e65782c17
Do not rely on newtype enum dereference
2013-07-05 13:03:04 +09:00
Huon Wilson
c437a16c5d
rustc: add a lint to enforce uppercase statics.
2013-07-01 17:52:57 +10:00
Philipp Brüschweiler
7295a6da92
Remove many shared pointers
...
Mostly just low-haning fruit, i.e. function arguments that were @ even
though & would work just as well.
Reduces librustc.so size by 200k when compiling without -O, by 100k when
compiling with -O.
2013-06-27 15:06:19 +02:00
Corey Richardson
0d471d310d
great renaming propagation: syntax
2013-06-25 16:15:07 -04:00
Daniel Micay
49c74524e2
vec: rm old_iter implementations, except BaseIter
...
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-21 03:20:22 -04:00
Daniel Micay
585f5f7f79
add IteratorUtil to the prelude
2013-06-14 23:15:42 -04:00
Huon Wilson
096f6f56a8
Use @str instead of @~str in libsyntax and librustc. Fixes #5048 .
...
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-13 10:20:52 +10:00
Felix S. Klock II
009a2fdc5e
Fix a test-predicated use of the visit.rs api.
2013-06-12 23:31:07 +02:00
Felix S. Klock II
91bced8ae8
Fix linebreak and whitespace issues to placate make tidy.
2013-06-12 19:16:30 +02:00
Felix S. Klock II
ecef9ad75a
Visitor refactoring: Step 1, couple (Env, vt<Env>) together in a tuple.
2013-06-12 13:04:37 +02:00
Daniel Micay
004816f4c6
option: remove redundant old_iter impls
2013-06-11 14:06:12 -04:00
Huon Wilson
98ba91f81b
remove unused import warnings
2013-06-09 02:22:23 +10:00
Huon Wilson
ed299af625
std: remove fold[lr] in favour of iterators
2013-06-09 02:22:23 +10:00
Michael Sullivan
8bbf83b62a
Clean up a handful of build warnings.
2013-06-06 12:14:41 -07:00
John Clements
91b652695b
moved TLS of sctable to ast_util, hid parameter in hygiene calls
2013-06-05 12:01:40 -07:00
John Clements
5a158f1d19
add hygiene support functions
2013-06-05 12:01:40 -07:00
John Clements
ecdb6e4722
remove unused get_ident_interner's
2013-06-05 12:01:40 -07:00
John Clements
c88f337fc9
remove unused cx's
2013-06-05 12:01:39 -07:00
John Clements
04a691a511
token_to_ident takes argument by reference
2013-06-05 12:01:38 -07:00
John Clements
3203595471
interner just uses uints, not idents with syntax context
2013-06-05 12:01:38 -07:00
John Clements
ae02bf70e0
removed some interner fields
2013-06-05 12:01:38 -07:00
John Clements
1537056982
just use TLS interner
2013-06-05 12:01:37 -07:00
John Clements
22d21ab4c2
rename repr to name
2013-06-05 12:01:37 -07:00
John Clements
d7638f9dba
change to newer macro escape mechanism, using uints in more places
2013-06-05 12:01:36 -07:00
John Clements
77c2c0900f
add renaming and sctable funs
2013-06-05 12:01:31 -07:00
Patrick Walton
8114d0e950
librustc: Disallow multiple patterns from appearing in a "let" declaration.
...
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04 21:45:42 -07:00
Patrick Walton
206ab89629
librustc: Stop reexporting the standard modules from prelude.
2013-05-29 19:04:53 -07:00
Patrick Walton
c10e0cb9c9
syntax: Change syntax extensions to expand to std::foo
instead of core::foo
2013-05-22 21:57:08 -07:00
Patrick Walton
f3723cf7c4
libextra: Rename the actual metadata names of libcore to libstd and libstd to libextra
2013-05-22 21:57:07 -07:00
Huon Wilson
4045da9f4f
syntax/ext: modernise ext_ctxt to be CamelCase and use new.
2013-05-22 00:04:10 +10:00
Alex Crichton
82fa0018c8
Remove all unnecessary allocations (as flagged by lint)
2013-05-20 16:10:40 -05:00
John Clements
999f692645
getting rid of interner_key! macro
2013-05-20 11:49:21 -07:00
John Clements
fc4f304ef9
hygiene infrastructure.
...
- added a hash table to memoize rename and mark operations.
- added rename, mark, and resolve fold fns
2013-05-20 11:49:21 -07:00
Brendan Zabarauskas
7e4a176dd3
Use parentheses for cond! macro instead of preceding pipes
...
This is temporary. Once the macro parser has improved or been re-written these can be removed.
2013-05-15 11:02:17 +10:00
Brendan Zabarauskas
b9824e18c2
Add Scheme-style cond!
macro to syntax::ext::expand
...
Addresses issue #6037
2013-05-15 07:02:43 +10:00
Alex Crichton
ffcc680f9c
Fix test fallout from removing vecs_implicitly_copyable
2013-05-14 12:25:19 -04:00
Marvin Löbel
04de8f852c
Fix cosmetics for fail!() calls
2013-05-14 16:36:24 +02:00
Björn Steinbrink
bdc182cc41
Use static string with fail!() and remove fail!(fmt!())
...
fail!() used to require owned strings but can handle static strings
now. Also, it can pass its arguments to fmt!() on its own, no need for
the caller to call fmt!() itself.
2013-05-14 16:36:23 +02:00
Tim Chevalier
ed41864464
Warning police
2013-05-11 20:36:44 -07:00
Alex Crichton
5eb6d19803
syntax: Use the new for
protocol
2013-05-10 02:46:18 -04:00