Closed Bug 1587574 Opened 9 months ago Closed 8 months ago

Add test case for field initalizer lookup

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mgaudet, Assigned: mgaudet)

References

Details

Attachments

(1 file)

In BytecodeEmitter::findFieldInitializersForCall() if the field initializer isn't found in the current bytecode emitter stack, then we need to start looking on the scope chain.

It seems to me however that we needn't start searching at the innermost scope, but instead should start searching on the compilation enclosing scope, as anything from innermostScope until outermostScope ought to be found on the bytecode emitter search (as field initializers will always be on functionbox shared contexts for any containing functions in the current compilation, so we don't need to also search the corresponding scope).

Assignee: nobody → mgaudet

In BytecodeEmitter::findFieldInitializersForCall() if the field initializer
isn't found in the current bytecode emitter stack, then we need to start
looking on the scope chain.

We needn't start searching at the innermost scope, but instead should start
searching on the compilation enclosing scope, as anything from innermostScope
until outermostScope ought to be found on the bytecode emitter search (as field
initializers will always be on functionbox shared contexts for any containing
functions in the current compilation, so we don't need to also search the
corresponding scope).

Priority: -- → P1
Attachment #9099988 - Attachment description: Bug 1587574 - Start Field Initializer search on compilationEnclosingScope r?jorendorff → Bug 1587574 - Add test for fieldInitializers lookup r?jorendorff

Stealing this bug for test case after Jason disproved my approach; turns out compilationEnclosingScope is too specialized to use.

Summary: Start Field Initializer search on compilationEnclosingScope → Add test case for field initalizer lookup
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e9fdfcb12590
Add test for fieldInitializers lookup r=jorendorff
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
Regressions: 1598349
You need to log in before you can comment on or make changes to this bug.