On 2015/05/18 13:38:13, Dmitry Lomov (chromium) wrote:
On 2015/05/18 13:19:52, wingo wrote:
> > So e.g. function foo() { var {x,x} = {} } should signal an early error,
even
> if
> > foo() is never run and only parsed by the preparser.
>
> I meant function foo() { let {x,x} = {} } of course.

Hmm, I see no difference between:
    function foo() { let {x,x} = {x:5} }
and
   function foo() {
     let x = 5;
     let x = 5;
   }
Pre spec, both are early errors.
In our implementation we will report both at foo's _compile time_ (whenever
that
occurs)
So far in V8, delaying early errors until compile time has been a fair game,
the
only requirement being that the errors we report are the same regardless of
when
compilation occurs
(whether we compile eagerly or lazily you are going to get the same error in
'foo').

I see!  This means also that we should defer duplicate argument detection to
compile-time as well, methinks.  Great.

https://codereview.chromium.org/1146683002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to