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

Enable ES6IsConcatSpreadable under experimental #1198

Merged
merged 1 commit into from
Jun 28, 2016

Conversation

suwc
Copy link

@suwc suwc commented Jun 24, 2016

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.

BOOL result0, result1;

public:
IsConcatSpreadableCache() :
Copy link
Author

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.

@suwc
Copy link
Author

suwc commented Jun 24, 2016

@Microsoft/chakra-es any other questions or comments?

@pleath
Copy link
Contributor

pleath commented Jun 24, 2016

Did you respond to my comment about handling side-effects?

-- Paul


From: suwcmailto:notifications@github.com
Sent: ‎6/‎24/‎2016 2:05 PM
To: Microsoft/ChakraCoremailto:ChakraCore@noreply.github.com
Cc: Paul Leathersmailto:pleath@microsoft.com; Team mentionmailto:team_mention@noreply.github.com
Subject: Re: [Microsoft/ChakraCore] Enable ES6IsConcatSpreadable under experimental (#1198)

@Microsoft/chakra-eshttps://github.com/orgs/Microsoft/teams/chakra-es any more questions?


You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//pull/1198#issuecomment-228461732, or mute the threadhttps://github.com/notifications/unsubscribe/APF8RDQczxlFhxaxlrHQt8Lklh7wUcXmks5qPEaEgaJpZM4I-HTK.

@suwc
Copy link
Author

suwc commented Jun 24, 2016

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",
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in latest rev.


In reply to: 68466415 [](ancestors = 68466415)

@suwc suwc self-assigned this Jun 24, 2016
@@ -964,6 +964,72 @@ namespace Js
void Unregister(ScriptContext * scriptContext);
};

// Two-entry Type-indexed circular cache
Copy link
Contributor

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?

Copy link
Author

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)

Copy link
Contributor

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.
@suwc
Copy link
Author

suwc commented Jun 28, 2016

@agarwal-sandeep review the changes in ConfigFlagsList.h?

@agarwal-sandeep
Copy link
Collaborator

ConfigFlagsList.h change looks good.

@chakrabot chakrabot merged commit a03aa52 into chakra-core:master Jun 28, 2016
chakrabot pushed a commit that referenced this pull request Jun 28, 2016
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants