Closed Bug 1783738 Opened 3 years ago Closed 3 years ago

Support decorator expressions in Parser

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: dminor, Assigned: dminor)

References

(Blocks 1 open bug)

Details

Attachments

(5 files)

A first step to implementing the decorators proposal is to add support in the parser for decorator expressions.

This is necessary to be able to skip tests when we haven't built with support
for decorators.

This should be a contextual keyword to avoid conflicting with existing
uses of the identifier. It's inserted out of alphabetical order to
avoid having to make the range conditional on whether ENABLE_DECORATORS
is defined.

Depends on D154187

This adds support for decorator expressions inside classes for methods
and fields. Support for class declarations and expressions is added in
the next commit.

Depends on D154188

This adds decorator support to class definitions and expressions

Depends on D154189

Attachment #9289161 - Attachment description: Bug 1783738 - Add enable-decorators to build configuration; r=mgaudet! → Bug 1783738 - Add decorators to build configuration; r=mgaudet!
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3ca5e3471c04 Add decorators to build configuration; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/9d7f488a2cd9 Make 'accessor' a contextual keyword; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/6cd01666a991 Support decorator expressions on methods and fields; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/a10f3d51daad Support decorator expressions on classes; r=mgaudet

Backed out for causing reftest failures with getBuildConfiguration

Flags: needinfo?(dminor)

I'm going to move the new tests to jit-test, it looks like getBuildConfiguration is normally only used with them, although this did pass locally and on some try runs 🤔

Flags: needinfo?(dminor)

This moves the decorator tests to jit-test because getBuildConfiguration()
doesn't seem to be consistently available while running jstests.
This also fixes two tests that were not passing with decorators enabled.

Depends on D154190

Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/64f08575ffaa Add decorators to build configuration; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/28f32492d905 Make 'accessor' a contextual keyword; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/9cfb9c8223e2 Support decorator expressions on methods and fields; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/b985565ad43a Support decorator expressions on classes; r=mgaudet https://hg.mozilla.org/integration/autoland/rev/6b7c23368488 Move decorator tests to jit-test; r=mgaudet
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: