We probably need to add some sort of data structure to represent this information, but as a proof of concept the current code appears to work. I'm still working out how to make sure the parser doesn't prematurely bind names and how to make name-binding use it where appropriate (and avoid it when we don't need it, because no matter how efficient we make it, it will still be relatively expensive).
Swift SVN r2112