forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LibJS: Get
this
from execution context for non-arrow functions
Allows to skip function environment allocation for non-arrow functions if the only reason it is needed is to hold `this` binding. The parser is changed to do following: - If a function is an arrow function and uses `this` then all functions in a scope chain are marked to allocate function environment for `this` binding. - If a function uses `new.target` then all functions in a scope chain are marked to allocate function environment. `ordinary_call_bind_this()` is changed to put `this` value in execution context when function environment allocation is skipped. 35% improvement in Octane/typescript.js 50% improvement in Octane/deltablue.js 19% improvement in Octane/raytrace.js
- Loading branch information
1 parent
4d37b9e
commit 7ffe26b
Showing
4 changed files
with
31 additions
and
8 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
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