This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chakrashim: Improve AddLocal codepath
`HandleScope` was simulated in chakrashim by saving references in `JavascriptArray` which involved calling `JsSetIndexedProperty` API. Although this API is not slow, but there is an overhead of calling JSRT APIs. It regress performance if `AddLocal` is called often. To avoid that, gathered elements in `_locals` stack and then bulk pushed them to array. * Earlier we called `JsCreateArray` with length 1 to create the above array. This creates an array of head segment size 4 (rounding) but since we are pushing `kOnStackLocals`, we would fill up the head segment and allocate newer segment. Instead if we pass length 0 to `JsCreateArray` it creates a head segment of size 16 and we don't have to initialize another segment till count reaches 16. * Also, I converted `Object::GetPropertyAttributes` to javascript function which should save 6 JSRT calls. I have also added `CHAKRA-TODO` comments for functions that should be easily converted to javascript functions. PR-URL: #101 Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
- Loading branch information
1 parent
581e929
commit acb4225
Showing
12 changed files
with
76 additions
and
184 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
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.