Add test case for field initalizer lookup
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
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 | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
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).
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Stealing this bug for test case after Jason disproved my approach; turns out compilationEnclosingScope
is too specialized to use.
Pushed by mgaudet@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e9fdfcb12590 Add test for fieldInitializers lookup r=jorendorff
Comment 4•4 years ago
|
||
bugherder |
Description
•