Closed Bug 1793961 Opened 3 years ago Closed 3 years ago

Code generation for accessor decorators

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

(Blocks 2 open bugs)

Details

Attachments

(6 files)

Code generation for decorators is likely to be complicated, so we'll split it into multiple bugs. This bug covers code generation for accessor decorators.

Blocks: 1781212
No longer depends on: 1781212
Assignee: nobody → dminor
Status: NEW → ASSIGNED

Previously, we were associating the decorators with the new getter and setter that
were created for the accessor, but for code generation purposes, we want them to be
associated the underlying accessor storage.

The existing code had a bug where the static decorators were being used to
initialize static fields as though they were instance fields. This fixes that
bug and adds the code necessary to run the static decorators to add static
initializers.

Depends on D182080

We should only create an initializer if the private accessor is not static.

Depends on D182082

We need an IsObject test for the decorators implementation. We already
support this in the interpreter and in the jits, so adding the opcode
is straightforward.

Depends on D182083

Blocks: 1842771
Attachment #9343054 - Attachment description: Bug 1793961 - Add IsObject opcode; r=arai → Bug 1793961 - Add DecoratorReturn to CheckIsObjectKind enum; r=arai
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/246c79c06ccc Don't attach decorators to synthesized getter and setter for accessors; r=arai https://hg.mozilla.org/integration/autoland/rev/090f6bd36035 Fix applying decorators to static methods; r=arai https://hg.mozilla.org/integration/autoland/rev/cef773277d52 Add tests for static private field decorators; r=arai https://hg.mozilla.org/integration/autoland/rev/c275cb67393a Fix bug with private static accessors; r=arai https://hg.mozilla.org/integration/autoland/rev/787edb38b936 Add DecoratorReturn to CheckIsObjectKind enum; r=arai https://hg.mozilla.org/integration/autoland/rev/947a9303000e Implement code generation for accessor decorators; r=arai
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: