Name analysis
The current name binding definition handles class names, labels, and local variable indices. You should extend this with name resolution for method and field names and with typical constraints.
Submitted by Guido Wachsmuth on 14 February 2014 at 12:37
Issue Log
Method and field names are now being resolved on my branch. But the AST is changed (desugared) for it to work nicely in NaBL, so that may break other things.
Don’t have warnings/errors yet. That’s still TODO.
This might work w/o desugaring, if you make the descriptor a property of a name and use this for references as well:
...: defines Method n of descriptor d ...: refers to Method n of descriptor d
Good idea. I didn’t remember how to add those kinds of contraints in NaBL, but using properties makes sense.
Ok, I tried the property constraint approach and it works. Thanks!
Done with the extra constraints. Only need pretty-printing to improve error messages.
Will wait for #5 to complete so pretty-printing can be used.
Ok, used the pretty-printing. A bug that cost a lot of time was that
<init>
(that’s a Jasmin special method name) would disappear from any error message. Eventually found out that Eclipse allows HTML in those tooltip messages for markup. So I had to HTML-escape some error messages…
I opened a pull-request on GitHub.
PR was merged
Log in to post comments