about summary refs log tree commit diff
path: root/src/rt/rust_kernel.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-06-05 13:10:45 -0700
committerbors <bors@rust-lang.org>2013-06-05 13:10:45 -0700
commit0409f8610612e8261a0139ec9c57396089cea060 (patch)
treeadb67739bc831dd5487911eb2f721613ecc0aa9f /src/rt/rust_kernel.cpp
parentc5fea4a6738cea28402c905cd81d6f2eb8d355ea (diff)
parent91b652695b97c5aef51fdc37c0111b0453ee584e (diff)
downloadrust-0409f8610612e8261a0139ec9c57396089cea060.tar.gz
rust-0409f8610612e8261a0139ec9c57396089cea060.zip
auto merge of #6938 : jbclements/rust/hygiene_fns_and_cleanup, r=jbclements
I'm close to flipping the switch on hygiene for let-bound identifiers.  This commit adds a bunch of support functions for that change... but also a huge amount of cleanup in syntax.rc. The most interesting of these are

- the use of TLS for the interners everywhere.  We had already breached the "no-global-state" dam by using TLS for encoding, and it saves a lot of code just to use it everywhere.
Also, there were many places where two or more interners were passed in attached to different structures, and the danger of having those diverge seemed greater that the danger of having a single one get big and heavy. If the interner size proves to be a problem, it should be quite simple to add a "parameterize"-like dynamic binding form--because we don't have interesting continuation operations (or tail calling, mostly) this should just be a case of a mutation followed by another later mutation. Again, this is only if the interner gets too big.

- I renamed the "repr" field of the identifier to "name". I can see the case for "repr" when there's only one field in the structure, but that's no longer the case; there's now a name and a context (both are uints).

- the interner now just maps between strings and uints, rather than between idents and uints. The former state made perfect sense when identifiers didn't have syntax contexts, but that's no longer the case.

I've run this patch against a fairly recent incoming, and it appears to pass all tests. Let's see if it can be merged....
Diffstat (limited to 'src/rt/rust_kernel.cpp')
0 files changed, 0 insertions, 0 deletions