summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-318/+360
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-10auto merge of #9090 : jbclements/rust/let-var-hygiene, r=luqmanabors-13/+2
This appears to fix issue #9049. It also re-enables the ICE check on comparing idents for equality; it appears that ICEs are better than seg faults.
2013-09-10Remove oldvisit.rs (yay!); part of #7081 refactoring.Felix S. Klock II-780/+0
2013-09-09auto merge of #9062 : blake2-ppc/rust/vec-iterator, r=alexcrichtonbors-1/+1
Visit the free functions of std::vec and reimplement or remove some. Most prominently, remove `each_permutation` and replace with two iterators, ElementSwaps and Permutations. Replace unzip, unzip_slice with an updated `unzip` that works with an iterator argument. Replace each_permutation with a Permutation iterator. The new permutation iterator is more efficient since it uses an algorithm that produces permutations in an order where each is only one element swap apart, including swapping back to the original state with one swap at the end. Unify the seldomly used functions `build`, `build_sized`, `build_sized_opt` into just one function `build`. Remove `equal_sizes`
2013-09-09undo cowardly hiding of eq-checkJohn Clements-13/+2
I've reversed my thinking on this restrictive definition of eq after two separate bugs were hidden by commenting it out; it's better to get ICEs than SIGSEGV's, any day. RE-ENABLING ICE MACHINE!
2013-09-10std::at_vec and vec: Unify build_sized, build_sized_opt into buildblake2-ppc-1/+1
These functions have very few users since they are mostly replaced by iterator-based constructions. Convert a few remaining users in-tree, and reduce the number of functions by basically renaming build_sized_opt to build, and removing the other two. This for both the vec and the at_vec versions.
2013-09-09auto merge of #9034 : catamorphism/rust/rustpkg-workcache, r=metajackbors-78/+9
r? @metajack or @brson - This pull request makes rustpkg use the workcache library to avoid recompilation.
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-83/+49
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-08rustpkg: Use workcacheTim Chevalier-78/+9
rustpkg now uses the workcache library to avoid recompilation. Hooray!
2013-09-08Fix pretty-printing of empty impl itemsJakub-1/+3
2013-09-08syntax: aesthetic improvements to the `for` desugaring.Huon Wilson-130/+38
2013-09-08syntax: implement labelled breaks for `for`.Huon Wilson-15/+25
`for` desugars to `loop` so it is trivial to just desugar to `loop` while retaining any label.
2013-09-08auto merge of #9035 : alexcrichton/rust/fewer-clownshoes, r=huonwbors-23/+23
This removes another large chunk of this odd 'clownshoes' identifier showing up in symbol names. These all originated from external crates because the encoded items were encoded independently of the paths calculated in ast_map. The encoding of these paths now uses the helper function in ast_map to calculate the "pretty name" for an impl block. Unfortunately there is still no information about generics in the symbol name, but it's certainly vastly better than before hash::__extensions__::write::_version::v0.8 becomes hash::Writer$SipState::write::hversion::v0.8 This also fixes bugs in which lots of methods would show up as `meth_XXX`, they now only show up as `meth` and throw some extra characters onto the version string.
2013-09-06Remove even more usage of clownshoes in symbolsAlex Crichton-23/+23
This removes another large chunk of this odd 'clownshoes' identifier showing up in symbol names. These all originated from external crates because the encoded items were encoded independently of the paths calculated in ast_map. The encoding of these paths now uses the helper function in ast_map to calculate the "pretty name" for an impl block. Unfortunately there is still no information about generics in the symbol name, but it's certainly vastly better than before hash::__extensions__::write::_version::v0.8 becomes hash::Writer$SipState::write::hversion::v0.8 This also fixes bugs in which lots of methods would show up as `meth_XXX`, they now only show up as `meth` and throw some extra characters onto the version string.
2013-09-06added index to test cases, more debugging outputJohn Clements-4/+11
2013-09-06quote_* macros no longer need to be capturingJohn Clements-91/+19
This is actually almost a problem, because those were my poster-child macros for "here's how to implement a capturing macro." Following this change, there will be no macros that use capturing; this will probably make life unpleasant for the first person that wants to implement a capturing macro. I should probably create a dummy_capturing macro, just to show how it works.
2013-09-06comment fixJohn Clements-1/+1
2013-09-06add test case, cleanupJohn Clements-17/+14
2013-09-06add display_sctable fn to ast_utilJohn Clements-0/+9
2013-09-06fixed a bug that caused double-expand-traversal of macros that expand into ↵John Clements-19/+10
modules.
2013-09-06WIP: adding mark-cancelling for macro_rulesJohn Clements-7/+57
2013-09-06added string_to_ttsJohn Clements-0/+6
2013-09-06commentsJohn Clements-0/+9
2013-09-06comment on hygienic context extension train fnsJohn Clements-0/+11
2013-09-06awesome new bug! added test caseJohn Clements-13/+68
2013-09-06expose mtwt_marksof for testingJohn Clements-0/+5
2013-09-06ident->nameJohn Clements-2/+2
2013-09-06remove unneeded imports, clean up unused var warningsJohn Clements-16/+15
2013-09-06whitespace, reindentation, and comments onlyJohn Clements-24/+37
2013-09-06memoization for resolveJohn Clements-40/+93
2013-09-06uncomment mtwt_resolve callsJohn Clements-19/+43
2013-09-06added utility functionJohn Clements-0/+37
2013-09-06fix one remaining token comparison, refactor token comparison to avoid == checkJohn Clements-11/+10
2013-09-06remove dead codeJohn Clements-15/+0
2013-09-06capturing macros now implementedJohn Clements-85/+222
2013-09-06add fold_mac clause to fun_to_ctxt_folderJohn Clements-5/+12
2013-09-06add fold_mac field to fold.rsJohn Clements-24/+38
2013-09-06WIP: adding context to macrosJohn Clements-10/+16
2013-09-06rework fold so that fold_tts takes an ast_fold rather than a thunk, stop ↵John Clements-51/+69
using closures in ident traversal
2013-09-06add temporarily unused ctxt field to mac_invoc_ttJohn Clements-13/+14
2013-09-06commentsJohn Clements-8/+31
2013-09-06add test case for macro token comparisonJohn Clements-0/+4
2013-09-06marking on both input and output from macros. nice shiny new test case frameworkJohn Clements-29/+275
2013-09-06added gensym_copy mechanism to ensure sharing of pointers in the internerJohn Clements-48/+88
this makes comparisons constant-time, and enables spelling-comparison of identifiers, crucial in many parts of resolve.
2013-09-06added test for ptr_eq on fresh_name-generated identsJohn Clements-1/+32
2013-09-06fixed bug in fold's traversal of cast exprsJohn Clements-1/+1
2013-09-06new test that uncovers bug in foldJohn Clements-0/+11
2013-09-06test case support fns, remove debugging test caseJohn Clements-3/+7
2013-09-06test case workJohn Clements-4/+2
2013-09-06re-add lost call to expand_block_eltsJohn Clements-1/+2