Basic Private Fields Support
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
Details
Attachments
(17 files, 1 obsolete file)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
This bug will be used to land patches implementing basic private field support:
This means basic private field test cases will work, however, we won't pass everything on test262, nor will it include enabling all the JIT compilers. That will be left for another bug.
Assignee | ||
Comment 1•5 years ago
|
||
Matthew Gaudet- Added illegal-in-class-context to ensure that field syntax
only works inside of classes if fields are enabled.
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Matthew Gaudet: Add test for double declaration of private name
Assignee | ||
Comment 4•5 years ago
|
||
Matthew Gaudet - Added comment
Assignee | ||
Comment 5•5 years ago
|
||
Matthew Gaudet: Use NoteUsedName inside of fieldInitializerOpt rather than allocating a new PrivateName node.
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D74474
Assignee | ||
Comment 7•5 years ago
|
||
This code was previously unexercised, and so recent changes revealed this bug.
Depends on D77922
Assignee | ||
Comment 8•5 years ago
|
||
This patch allows access to private fields. Adds three new opcodes,
InitPrivateElem, GetPrivateElem, SetPrivateElem, specialized to the
requirements of private names (all three throw in some circumstances where
their non-private bretheren would proceed apace.)
This supports -no- compilers, which means that the test must be run with
--no-blinterp to avoid crashes. The partial support inserted in
BaselineCodeGen is purely for making this compile, but is the shape we need for
later.
Inline cache support for blinterp and baseline comes later.
Depends on D77923
Assignee | ||
Comment 9•5 years ago
|
||
Since modulo exception behaviour, the PrivateElem ops act the same as their
non-private cousins, we can recycle their IC implementations so long as we
ensure that these stubs don't attach before a throw occurs.
PrivateElements are explictly excluded from IonCompilation in this patch,
but it's worth noting that there is an approaching footgun when Ion
is enabled, caused by hoisting of idempotent caches.
The check added in IsCacheableNoProperty is insufficient to prevent
an idempotent cache from getting attached for a GetPrivateElem that is
hoisted -- as pc
is nullptr in that case.
I have added a test case here that is aimed at preventing this from
becoming an issue.
Depends on D77925
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D77927
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D77928
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D77929
Assignee | ||
Comment 13•5 years ago
|
||
Depends on D77930
Assignee | ||
Comment 14•5 years ago
|
||
Depends on D77931
Assignee | ||
Comment 15•5 years ago
|
||
Depends on D77932
Assignee | ||
Comment 16•5 years ago
|
||
This is implemented by reusing our pre-existing lexical name tracker, the UsedNameTracker.
This particular version of the patch issues positionless errors. It is a followup
item to provide positions for errors.
Ted is a reviewer for this patch due to the interaction between the Parse world
and VM world when checking for possibly lexically-defined private names on the
scope chain.
Depends on D77933
Updated•5 years ago
|
Assignee | ||
Comment 17•5 years ago
|
||
This patch only covers the non-eval case.
Depends on D77934
Updated•5 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Assignee | ||
Comment 19•4 years ago
|
||
Comment 20•4 years ago
|
||
Comment 21•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eb7361d2c45e
https://hg.mozilla.org/mozilla-central/rev/84c891f10d90
https://hg.mozilla.org/mozilla-central/rev/022d942943c1
https://hg.mozilla.org/mozilla-central/rev/5d046b313708
https://hg.mozilla.org/mozilla-central/rev/3b9f08b0ba80
https://hg.mozilla.org/mozilla-central/rev/9a4f3aa0719c
https://hg.mozilla.org/mozilla-central/rev/510b8fa45789
https://hg.mozilla.org/mozilla-central/rev/937d4dcd8867
https://hg.mozilla.org/mozilla-central/rev/0f884e42cf48
https://hg.mozilla.org/mozilla-central/rev/75c34fed9983
https://hg.mozilla.org/mozilla-central/rev/8e545f2246fa
https://hg.mozilla.org/mozilla-central/rev/7e30b11a3624
https://hg.mozilla.org/mozilla-central/rev/6cc4a63ec7f0
https://hg.mozilla.org/mozilla-central/rev/0072a71143dc
https://hg.mozilla.org/mozilla-central/rev/c1e5dd3607ac
https://hg.mozilla.org/mozilla-central/rev/d2498e0b9cf6
https://hg.mozilla.org/mozilla-central/rev/f139a2259e4c
Description
•