Throwing errors on mutating immutable bindings

Till Schneidereit till at
Wed Oct 1 09:02:13 PDT 2014

On Wed, Oct 1, 2014 at 5:39 PM, Mark S. Miller <erights at> wrote:

> On Wed, Oct 1, 2014 at 8:20 AM, Oliver Hunt <oliver at> wrote:
>> JSC does lazy parsing of nested functions and we have no problem
>> reporting static errors, so i’m not sure what you believe is the problem
>> here.
> Hi Oliver,
> First, I agree with you. This shouldn't be a problem.
> However, both JSC and v8 cause confusion when they use the term "lazy
> parsing". There are plenty of static errors that could not be reported with
> a truly lazy parser, i.e., one which actually postpones parsing. v8 for
> example uses a lightweight but accurate parser that is supposed to catch
> early errors early, but, afaik, doesn't construct an actual ast.

SpiderMonkey in some places uses the term "lazy parsing", too, somewhat
unfortunately. Mostly, though, we refer to bytecode-less functions as lazy,
and call the initial parsing "syntax parsing". Which should be more
indicative of what it actually does.

Also, I'm pretty sure that we correctly report these static errors even
when they occur in syntax-only parsed functions (modulo bugs in the WIP
implementation in bug 611388[1]).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list