Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[JSC] Use emitPutProperty / emitGetPropertyValue consistently to hand…
…le private names in edge cases https://bugs.webkit.org/show_bug.cgi?id=234794 Reviewed by Alexey Shvayka. JSTests: * test262/expectations.yaml: Source/JavaScriptCore: This patch consistently uses emitPutProperty / emitGetPropertyValue so that we handle private names in edge cases. * bytecompiler/NodesCodegen.cpp: (JSC::TaggedTemplateNode::emitBytecode): (JSC::ForInNode::emitLoopHeader): (JSC::ForOfNode::emitBytecode): (JSC::AssignmentElementNode::bindValue const): Canonical link: https://commits.webkit.org/245666@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
3fdb4c0
commit c4fb57efeaf88e9c6d67f2b49cb296175d292759
Showing
8 changed files
with
54 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
function shouldBe(actual, expected) { | ||
if (actual !== expected) | ||
throw new Error('bad value: ' + actual); | ||
} | ||
|
||
class C { | ||
#field; | ||
|
||
m(object) { | ||
object.#field ??= 44; | ||
return this.#field; | ||
} | ||
} | ||
|
||
let c = new C(); | ||
shouldBe(c.m(c), 44); |
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