Fix multiple private methods bugs
Categories
(Core :: JavaScript Engine, defect, P2)
Tracking
()
People
(Reporter: anba, Assigned: anba)
References
Details
Attachments
(12 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
Details | Review |
Fix the following private method bugs:
- Disallow installing private brand multiple times.
- Make private static methods non-writable.
- Install private static
NoPrivateGetteron the constructor instead of the class prototype object. - Ensure private non-static methods always use the correct home-object.
Updated•5 years ago
|
| Assignee | ||
Comment 2•5 years ago
|
||
Similar to private fields, we must throw an error on attempts to install the
private brand multiple times.
| Assignee | ||
Comment 3•5 years ago
|
||
Drive-by change:
This method is no longer fallible, so we can change the return type to void.
Depends on D121735
| Assignee | ||
Comment 4•5 years ago
|
||
Split private names in preparation for the next parts.
Depends on D121736
| Assignee | ||
Comment 5•5 years ago
|
||
CTOR is always present when emitting classes.
Depends on D121737
| Assignee | ||
Comment 6•5 years ago
|
||
https://tc39.es/ecma262/#sec-privateset, step 4 requires to throw a TypeError.
Depends on D121738
| Assignee | ||
Comment 7•5 years ago
|
||
We could optimise this case by not popping CTOR from the stack in
emitPrivateStaticMethod, but that requires more changes in PropertyEmitter.
Depends on D121739
| Assignee | ||
Comment 8•5 years ago
|
||
This change is necessary to ensure the correct home-object can be found.
Depends on D121740
| Assignee | ||
Comment 9•5 years ago
|
||
Fix this TODO by adding a new opcode JSOp::NewPrivateName.
Depends on D121741
| Assignee | ||
Comment 10•5 years ago
|
||
Source positions used mozilla::Maybe<uint32_t> for BinAST, but with BinAST
removed, we can now change this back to use uint32_t.
Depends on D121742
| Assignee | ||
Comment 11•5 years ago
|
||
While removing unnecessary mozilla::Maybe in the last part, I've noticed that
this header has many unused or unnecessary includes.
Depends on D121743
| Assignee | ||
Comment 12•5 years ago
|
||
And remove some commented out debugging code.
Depends on D121745
| Assignee | ||
Comment 13•5 years ago
|
||
If isFieldInit() returns true, the first if-statement is taken, so it must
be false in the else block.
Depends on D121746
Comment 14•4 years ago
|
||
Comment 15•4 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0d2d24449e42
https://hg.mozilla.org/mozilla-central/rev/4036a68b398a
https://hg.mozilla.org/mozilla-central/rev/d8c484ec3902
https://hg.mozilla.org/mozilla-central/rev/6f8f34ed2aa5
https://hg.mozilla.org/mozilla-central/rev/9b7e03966d7f
https://hg.mozilla.org/mozilla-central/rev/4704eb55b46a
https://hg.mozilla.org/mozilla-central/rev/f49a1b1fbd9b
https://hg.mozilla.org/mozilla-central/rev/5e6d1848ce62
https://hg.mozilla.org/mozilla-central/rev/32bb1dfaf41b
https://hg.mozilla.org/mozilla-central/rev/e3f2042fa018
https://hg.mozilla.org/mozilla-central/rev/af96ac52d947
https://hg.mozilla.org/mozilla-central/rev/0ab8644c9e71
Updated•4 years ago
|
Description
•