Okay, then what should a language-independent debugger do with the names
field, since it doesn't know anything about the source language? Do we want
the name to appear in stack traces as a function name? If so, that
constrains what compilers should put there, at least for those JavaScript
ranges that cover executable code where a breakpoint could be set.
A related issue is how a debugger decides whether a breakpoint can be set
at a particular source line. I believe in Chrome, any source line that maps
to a JavaScript range is assumed to be a valid place to put a breakpoint.
If the compiler doesn't want debuggers to allow a source-level breakpoint
there, the only influence the compiler has is to not map that range.
GWT currently doesn't do a great job of this (breakpoints can be set in
weird places and can be jump around). We could clean things up for Chrome
but other browsers should work similarly. So it seems like the spec could
be a good place to say how to communicate effectively with debuggers.
- Brian