-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d065015
commit 4432ea5
Showing
14 changed files
with
242 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# TODO | ||
|
||
* Tests | ||
* Deal with duplicate bindings: | ||
* Hoisted sloppy functions - actually no need, because `isFunction` means both are frozen anyway | ||
* `for (let x of (() => x, [])) eval('x');` - done, but write test | ||
* `function (x, _ = eval('x')) { var x; return x; }` - done (apart from `arguments`), but write test | ||
* Tests for binding in higher scope which is shadowed still not being renamed | ||
e.g. `() => { let x = 1; { let x; eval('typeof a !== "undefined" && a = 2'); } return x; }` - make sure param `x` not renamed to `a` | ||
* Make sure this includes vars which are illegal to access inside `eval()` if `eval()` is strict mode. | ||
* Test for const violations with frozen vars when internal to function: | ||
|
||
```js | ||
module.exports = function(module, exports) { | ||
const x = 1; | ||
eval('x'); | ||
return () => { x = 2; }; | ||
}; | ||
``` | ||
|
||
Also where another binding which isn't frozen: | ||
|
||
```js | ||
module.exports = function(module, exports) { | ||
const x = 1; | ||
eval('x'); | ||
{ const x = 2; } | ||
return () => { x = 2; }; | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.