Closed Bug 1617146 Opened 4 years ago Closed 4 years ago

Don't unconditionally emit the extra-var scope for generators with default parameters

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: anba, Assigned: anba)

Details

Attachments

(1 file)

We're unconditionally emitting the extra-var scope in generators as soon as default parameters are present, cf. FunctionBox::needsExtraBodyVarEnvironmentRegardlessOfBindings(). This behaviour is present since the extra-var scope was initially implemented in https://hg.mozilla.org/mozilla-central/rev/cb6fc6d38f8df50e25502dc55ee1ed2dd3d7a304, but I don't immediately see why this is necessary. Removing the generator/async case from needsExtraBodyVarEnvironmentRegardlessOfBindings() looks good on try (https://treeherder.mozilla.org/#/jobs?repo=try&revision=8e46fecced409c62eaa536572727e79f95033a4a), so we may be able to omit the extra-var scope in this case.

Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5c2960e0d4d3
Don't unconditionally emit the extra-var scope for generators with default parameters. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: