Closed Bug 1535166 Opened 7 years ago Closed 7 years ago

Implement computed field names

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: khyperia, Assigned: khyperia)

References

Details

Attachments

(1 file)

Currently, computed field names are not supported. Let's fix that.

class C {
    ["x"] = 2;
}

Also, implement some easier, half-related other cases, like:

class C {
    2 = 2;
    0b01 = 2;
    "hello" = 2;
}

Also, fix a related bug: we currently don't emit an initializer for this

class C {
    x;
}

which is incorrect, and especially apparent when there's a computed field with side effect as the field-without-an-initializer.

Pushed by ahauck@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b8c42577e24 Implement computed field names. r=jorendorff
Pushed by ahauck@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d96f98f974e0 Implement computed field names. r=jorendorff

Clearing NI - the build issue was super easy, the assertion failure less so. Pushed updated version with both fixed.

Flags: needinfo?(khyperia)
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: