On Sep 17, 2012, at 12:37 PM, Luke Hoban wrote:

> 
> These are good questions.  Paul will be attending the TC39 meeting this week, 
> and can likely talk to specific details.   High level though, we statically 
> eliminate the TDZ checks for references to 'let' within the same closure body 
> as the declaration. 
> 

The other major check that I would expect to be significant, is whether a inner 
function that references an outer TDZ binding is (potentially) called before 
initialization of the binding.  EG:

{
    function f(){return x}
    f();   //TDZ check of x in f can not be eliminated
    let x=1;
}

{
    function f(){return x}
    let x=1;  //TDZ check of x in f should be eliminated
    f();   
}

Allen


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to