Closed Bug 1793959 Opened 2 years ago Closed 2 years ago

Code generation for method decorators

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 2 obsolete files)

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

Severity: S3 → N/A
Blocks: 1781212
No longer depends on: 1781212
Assignee: nobody → dminor
Status: NEW → ASSIGNED

This adds a stub DecoratorEmitter to the build system.

We'll need to be able to throw a TypeError if the decorator returns something
other than a callable or undefined.

Depends on D162139

This is a basic implementation of applying a decorator to a method, leaving
many details to subsequent patches and bugs.

Depends on D162140

Attached file Bug 1793959 - Implement DecorationState; r=mgaudet! (obsolete) (deleted) —

This implements the DecorationState object. It is used with the addInitializer
function, which will be implemented in a follow up bug.

Depends on D162141

This implements the emitter for DecoratorContext objects. The implementations of
the DecoratorAccess object and addInitializer are postponed to follow up bugs.

Depends on D162142

Attachment #9303560 - Attachment is obsolete: true
Blocks: 1801386
Attached file Bug 1793959 - Add JSOp::IsCallable; r=mgaudet! (obsolete) (deleted) —

Depends on D162140

Attachment #9304176 - Attachment is obsolete: true
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b1336c4324c8 Add DecoratorEmitter; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/0c77dba9ef46 Add ThrowMsgKind::DecoratorInvalidReturnType; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/55eb595186b8 Add DecoratorEmitter::emitDecoratorCall; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/92f6495bff44 Implement DecoratorEmitter::emitCreateDecoratorContextObject; r=mgaudet
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: