Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add TDZ taint to references #17

Open
michaelficarra opened this issue Jan 8, 2015 · 4 comments
Open

add TDZ taint to references #17

michaelficarra opened this issue Jan 8, 2015 · 4 comments
Assignees

Comments

@michaelficarra
Copy link
Member

It'd be nice if a reference to a block-scope variable let you know if that reference is in the temporal dead zone or not.

@ikarienator
Copy link
Contributor

@michaelficarra define temporal dead zone.

@michaelficarra
Copy link
Member Author

A reference to a block-scoped variable that would be evaluated before its declaration is in the temporal dead zone.

@michaelficarra michaelficarra assigned bakkot and unassigned ikarienator Jan 16, 2016
@bakkot
Copy link
Member

bakkot commented Jan 16, 2016

This is not a static property, so I don't think it's suitable for static analysis:

let f = () => x;
f(); // TDZ violation
let x;
f(); // not a TDZ violation

@michaelficarra
Copy link
Member Author

Well the static property is "definitely", "possibly", or "definitely not". It relies on control flow analysis, which is some effort on its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants