Bug 150453

Summary: We don't properly optimize TDZ checks when we declare a let variable without an initializer
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, commit-queue, fpizlo, ggaren, gskachkov, keith_miller, mark.lam, msaboff, oliver, sukolsak, ysuzuki
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Saam Barati 2015-10-22 10:56:46 PDT
i.e:
```
let v;
return v;
```
has a TDZ check on the return value.

But, if we do:
```
let v = 20;
return v;
```
we optimize out the TDZ check.
Comment 1 Saam Barati 2016-03-26 11:53:24 PDT
This is probably a one line patch. I'm going to do it soon
Comment 2 Saam Barati 2016-03-29 12:45:57 PDT
Created attachment 275121 [details]
Patch
Comment 3 Mark Lam 2016-03-29 12:54:08 PDT
Comment on attachment 275121 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2016-03-29 15:11:23 PDT
Comment on attachment 275121 [details]
Patch

Clearing flags on attachment: 275121

Committed r198803: <http://trac.webkit.org/changeset/198803>
Comment 5 WebKit Commit Bot 2016-03-29 15:11:27 PDT
All reviewed patches have been landed.  Closing bug.