Skip to content

ES6hasInstance - #1063

Merged
chakrabot merged 1 commit into
chakra-core:masterfrom
suwc:build/suwc/buddy
Jun 9, 2016
Merged

ES6hasInstance#1063
chakrabot merged 1 commit into
chakra-core:masterfrom
suwc:build/suwc/buddy

Conversation

@suwc

@suwc suwc commented May 29, 2016

Copy link
Copy Markdown

Recuperate perf loss from existing ES6hasInstance implementation.
Perf-neutral with vs. without -es6hasinstance switch.
Add inline-cache-invalidation for user-defined Symbol.hasInstance property in function constructor.
Revamp unit tests for ES6hasInstance.

Related ECMA262 spec sections:
6.1.5.1 Well-Known Symbols
7.3.19 OrdinaryHasInstance (C, O)
12.10.4 Runtime Semantics: InstanceofOperator(O, C)
19.2.3.6 Function.prototype @@hasInstance

@suwc

suwc commented May 29, 2016

Copy link
Copy Markdown
Author

@Microsoft/chakra-es could you take a look pls?

@abchatra

Copy link
Copy Markdown
Contributor
    if (scriptContext->GetConfig()->IsES6HasInstanceEnabled())

Add Symbol.hasInstance as part of experimental flags.


Refers to: lib/Runtime/Library/JavascriptLibrary.cpp:2544 in 79f7012. [](commit_id = 79f7012, deletion_comment = False)

var x = proxy.bind();
print((x) instanceof proxy);
}
testRunner.runTests(tests, { verbose: WScript.Arguments[0] != "summary" });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please run test262 to see if there any additional failures in Symbol.hasInstance

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Confirmed no test262 or perf regressions.


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

@abchatra

Copy link
Copy Markdown
Contributor

:shipit:

@suwc suwc self-assigned this Jun 8, 2016
@suwc

suwc commented Jun 9, 2016

Copy link
Copy Markdown
Author
    if (scriptContext->GetConfig()->IsES6HasInstanceEnabled())

Done.


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


Refers to: lib/Runtime/Library/JavascriptLibrary.cpp:2544 in 79f7012. [](commit_id = 79f7012, deletion_comment = False)

Recuperate perf loss from existing ES6hasInstance implementation.
Perf-neutral with vs. without -es6hasinstance switch.
Add inline-cache-invalidation for user-defined Symbol.hasInstance property in function constructor.
Revamp unit tests for ES6hasInstance.

Related ECMA262 spec sections:
6.1.5.1 Well-Known Symbols
7.3.19 OrdinaryHasInstance (C, O)
12.10.4 Runtime Semantics: InstanceofOperator(O, C)
19.2.3.6 Function.prototype [ @@hasInstance ] ( V )
@chakrabot
chakrabot merged commit 49fdae3 into chakra-core:master Jun 9, 2016
chakrabot pushed a commit that referenced this pull request Jun 9, 2016
Merge pull request #1063 from suwc:build/suwc/buddy
Recuperate perf loss from existing ES6hasInstance implementation.
Perf-neutral with vs. without -es6hasinstance switch.
Add inline-cache-invalidation for user-defined Symbol.hasInstance property in function constructor.
Revamp unit tests for ES6hasInstance.

Related ECMA262 spec sections:
6.1.5.1 Well-Known Symbols
7.3.19 OrdinaryHasInstance (C, O)
12.10.4 Runtime Semantics: InstanceofOperator(O, C)
19.2.3.6 Function.prototype [ @@hasInstance ] ( V )
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.

4 participants