Commit Graph

299 Commits

Author SHA1 Message Date
Alex Crichton
af3b132285 syntax: Remove usage of fmt! 2013-09-30 23:21:19 -07:00
John Clements
0322832763 renumbered due to bug shuffling 2013-09-24 14:48:04 -07:00
Patrick Walton
6ecbd75843 librustc: Change the ID visitor to use traits instead of garbage-collected functions. 2013-09-23 18:23:20 -07:00
Patrick Walton
3e5de06135 librustc: Change fold to use traits instead of @fn. 2013-09-23 18:23:17 -07:00
Alex Crichton
817576ee70 Register new snapshots 2013-09-18 11:07:22 -07:00
bors
b05dccacae auto merge of #9187 : lkuper/rust/no-simplevisitor, r=catamorphism
We don't seem to be using `SimpleVisitor` anywhere in rustc.  Is there any reason to keep it around?

r? anyone
2013-09-16 00:15:52 -07:00
Lindsey Kuper
653ffa845d Kill off method impls made redundant by default methods. 2013-09-14 19:38:22 -04:00
Lindsey Kuper
940a86b760 Get rid of unused SimpleVisitor stuff. 2013-09-14 02:00:04 -04:00
SiegeLord
8c5402fd36 Properly encode/decode structural variants. 2013-09-11 14:49:09 -04:00
bors
753d8c226c auto merge of #9088 : nikomatsakis/rust/issue-6304-AST-tree-not-DAG, r=catamorphism
Ensures that each AST node has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two
representative tests.

Fixes #7971
Fixes #6304
Fixes #8367
Fixes #8754
Fixes #8852
Fixes #2543
Fixes #7654
2013-09-10 03:10:59 -07:00
Niko Matsakis
a5ad4c3794 Delay assignment of node ids until after expansion. Ensures that each AST node
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two
representative tests.

Fixes #7971
Fixes #6304
Fixes #8367
Fixes #8754
Fixes #8852
Fixes #2543
Fixes #7654
2013-09-10 05:45:12 -04:00
Tim Chevalier
02a0fb94ee rustpkg: Use workcache
rustpkg now uses the workcache library to avoid recompilation.
Hooray!
2013-09-08 20:05:12 -07:00
John Clements
fe1d21caec add display_sctable fn to ast_util 2013-09-06 13:35:13 -07:00
John Clements
fddc815ada WIP: adding mark-cancelling for macro_rules 2013-09-06 13:35:13 -07:00
John Clements
7b548e7180 expose mtwt_marksof for testing 2013-09-06 13:35:12 -07:00
John Clements
60562ac9f8 whitespace, reindentation, and comments only 2013-09-06 13:35:12 -07:00
John Clements
ec0a64def5 memoization for resolve 2013-09-06 13:35:12 -07:00
John Clements
0954e66442 uncomment mtwt_resolve calls 2013-09-06 13:35:11 -07:00
John Clements
9ab2cfdae6 added utility function 2013-09-06 13:35:11 -07:00
John Clements
98a6cbdba3 comments only 2013-09-06 13:35:08 -07:00
John Clements
fa6c981606 add hygiene support fns, move them around.
also adds test cases
2013-09-06 13:35:06 -07:00
John Clements
e1734f6d38 rename resolve to mtwt_resolve 2013-09-06 13:35:06 -07:00
Daniel Micay
62a3434529 stop treating char as an integer type
Closes #7609
2013-09-04 08:07:56 -04:00
Marvin Löbel
7419085337 Modernized a few more types in syntax::ast 2013-09-03 14:45:06 +02:00
Marvin Löbel
857f867320 Renamed syntax::ast::ident -> Ident 2013-09-02 02:51:21 +02:00
Marvin Löbel
539f37925c Modernized a few type names in rustc and syntax 2013-09-01 14:43:26 +02:00
Patrick Walton
3b6314c39b librustc: Add support for type parameters in the middle of paths.
For example, `foo::<T>::bar::<U>`.

This doesn't enforce that the type parameters are in the right
positions, however.
2013-08-27 18:46:51 -07:00
Niko Matsakis
8c09865b66 Remove remnants of implicit self 2013-08-27 16:49:06 -04:00
Felix S. Klock II
3d83010648 Switch to new <V:Visitor> visitor (rather than @Visitor).
Alpha-renamed top-level visit_* functions to walk_*.
(Motivation: Distinguish visit action and recursive traversal.)

Abstract over `&mut self` rather than over `@mut self`.

This required some acrobatics, notably the

  `impl<E> Visitor<E> for @mut Visitor<E>`

and corresponding introduction of `@mut Visitor` and some local `let
mut` bindings.

Remove oldvisit reference.

Added default implementations for all of the Visitor trait methods.

Note that both `visit_expr_post` and `visit_ty` are no-op's by
default, just like they are in `oldvisit::default_visitor`.

Refactoring: extract logic to ease swapping visit for oldvisit (hopefully).
2013-08-15 04:06:17 +02:00
Alex Crichton
930885d5e5 Forbid pub/priv where it has no effect
Closes #5495
2013-08-12 23:20:46 -07:00
Niko Matsakis
96254b4090 libsyntax: Update from @Object to @mut Object as required 2013-08-11 13:23:40 -04:00
Erick Tryzelaar
fad7857c7b Mass rename of .consume{,_iter}() to .move_iter()
cc #7887
2013-08-10 07:01:07 -07:00
Tim Chevalier
96fd606ddd std/rustc/rustpkg/syntax: Support the extern mod = ... form
This commit allows you to write:

 extern mod x = "a/b/c";

which means rustc will search in the RUST_PATH for a package with
ID a/b/c, and bind it to the name `x` if it's found.

Incidentally, move get_relative_to from back::rpath into std::path
2013-08-09 14:11:50 -07:00
Erick Tryzelaar
1e490813b0 core: option.map_consume -> option.map_move 2013-08-07 08:52:09 -07:00
Michael Sullivan
a20081666b Fix an unused variable warning and clean up some dead code/names. 2013-08-05 11:41:06 -07:00
Daniel Micay
1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Patrick Walton
887c656970 librustc: Introduce a new visitor type based on traits and port syntax to it.
This is preparation for removing `@fn`.

This does *not* use default methods yet, because I don't know
whether they work. If they do, a forthcoming PR will use them.

This also changes the precedence of `as`.
2013-08-02 21:57:58 -07:00
Daniel Micay
1fc4db2d08 migrate many for loops to foreach 2013-08-01 05:34:55 -04:00
Michael Woerister
8a329770b6 New naming convention for ast::{node_id, local_crate, crate_node_id, blk_check_mode, ty_field, ty_method} 2013-07-29 16:16:48 +02:00
Michael Woerister
4bd1424622 Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.
`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-22 15:35:28 +02:00
Daniel Micay
ed67cdb73c new snapshot 2013-07-22 01:09:48 -04:00
Felix S. Klock II
3b158b3e42 Silence various warnings in bootstrap build. 2013-07-18 09:35:12 +02:00
Patrick Walton
2dbb3c3887 test: Fix tests. 2013-07-17 14:57:54 -07:00
Patrick Walton
e20549ff19 librustc: Remove all uses of the Copy bound. 2013-07-17 14:57:53 -07:00
Patrick Walton
99b33f7219 librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
Patrick Walton
b4e674f6e6 librustc: Add a lint mode for unnecessary copy and remove a bunch of them. 2013-07-17 14:56:42 -07:00
Michael Woerister
0cc70743d2 Made ast::blk not use spanned<T> anymore. 2013-07-17 08:21:46 +02: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
bors
1ee54a8617 auto merge of #7725 : msullivan/rust/default-methods, r=pcwalton
r?
2013-07-12 17:28:28 -07:00