-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enable ES6IsConcatSpreadable under experimental #1198
Conversation
BOOL result0, result1; | ||
|
||
public: | ||
IsConcatSpreadableCache() : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialized these as initialization list.
@Microsoft/chakra-es any other questions or comments? |
Did you respond to my comment about handling side-effects? -- Paul From: suwcmailto:notifications@github.com @Microsoft/chakra-eshttps://github.com/orgs/Microsoft/teams/chakra-es any more questions? — |
Quote "I don't see the part of the change that clears the cache if there are side-effects of reading isConcatSpreadable. Is that coming later? Or did I miss it?" To address functionality gap (namely two variable of same Type; search for “two arrays that may share the same type” in new unit tests) found with caching, the condition for caching isConcatSpreadable result has been narrowed down to: No user-defined [@@isConcatSpreadable] property Therefore there is no longer need to check if there are side-effects. In reply to: 228463392 [](ancestors = 228463392) |
} | ||
}, | ||
{ | ||
name: "[@@isConcatSpreadable] getter altering binding", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a test which alters the length when you access the isConcatSpreadable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -964,6 +964,72 @@ namespace Js | |||
void Unregister(ScriptContext * scriptContext); | |||
}; | |||
|
|||
// Two-entry Type-indexed circular cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you do any experimentation with different cache sizes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Tried 1-, 2-, and 3-entry caches. From 1 to 2 saw significant perf gain; from 2 to 3 no gain. Therefore chose 2-entry for simplicity.
In reply to: 68804491 [](ancestors = 68804491)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, good to know.
Enable ES6IsConcatSpreadable under experimental flag. Optimize fastpath for cases where [@@isConcatSpreadable] is undefined by caching in ThreadContext. Add cache invalidations when users add [@@isConcatSpreadable] properties. Add unit tests to cover more extended usage scenarios.
@agarwal-sandeep review the changes in ConfigFlagsList.h? |
ConfigFlagsList.h change looks good. |
Merge pull request #1198 from suwc:build/suwc/buddy Enable ES6IsConcatSpreadable under experimental flag. Optimize fastpath for cases where [@@isConcatSpreadable] is undefined by caching in ThreadContext. Add cache invalidations when users add [@@isConcatSpreadable] properties. Add unit tests to cover more extended usage scenarios.
Enable ES6IsConcatSpreadable under experimental flag.
Optimize fastpath for cases where [@@isConcatSpreadable] is undefined by caching in ThreadContext.
Add cache invalidations when users add [@@isConcatSpreadable] properties.
Add unit tests to cover more extended usage scenarios.