On Wed, May 30, 2012 at 11:35 PM, Nicholas Nethercote <[email protected]> wrote: > On Mon, May 28, 2012 at 6:03 PM, Nicholas Nethercote > >> No bugs in the present code AFAIK. > > Well... there are numerous places where we use script->filename and > script->lineno as a pair, in a fashion which suggests that the author > thought (not unreasonably!) that they have similar semantics. For > example, a simple search which catches a subset of these cases:
Here's a more radical thought: can we just get rid of //@line support altogether? I see three reasons for this. - In general, //@line is under-specified -- it's not clear (or documented!) how it's supposed to work. The line numbering works fairly well, but if you specify more than one file only the last one will be used. And see https://bugzilla.mozilla.org/show_bug.cgi?id=663934 for an old bug about the filenames. The unclear semantics means it's hard to clean up the related code. - Within Mozilla code, AFAICT it's only used in cases where it doesn't add much. For example, from browser/components/nsBrowserGlue.js we generate dist/bin/webapprt/chrome/webapprt/content/webapp.js, which is the same except it has a few #ifdef-y things stripped out, and the line number remapping provides very little value. - JS has source maps now, which are much more powerful and official. Thoughts? Nick _______________________________________________ dev-tech-js-engine-internals mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

