Bug 150453 - We don't properly optimize TDZ checks when we declare a let variable without an initializer
Summary: We don't properly optimize TDZ checks when we declare a let variable without ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-22 10:56 PDT by Saam Barati
Modified: 2016-03-29 15:11 PDT (History)
11 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2016-03-29 12:45 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.