mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 776191 - Add missing case of 'with' deoptimization, r=dvander
This commit is contained in:
parent
de30491499
commit
9c56bfaed4
@ -1132,11 +1132,8 @@ LeaveFunction(ParseNode *fn, Parser *parser, PropertyName *funName = NULL,
|
||||
* by eval and function statements (which both flag the function as
|
||||
* having an extensible scope) or any enclosing 'with'.
|
||||
*/
|
||||
if (funtc->sc->funHasExtensibleScope() ||
|
||||
(outer_dn && tc->innermostWith &&
|
||||
outer_dn->pn_pos < tc->innermostWith->pn_pos)) {
|
||||
if (funtc->sc->funHasExtensibleScope() || tc->innermostWith)
|
||||
DeoptimizeUsesWithin(dn, fn->pn_pos);
|
||||
}
|
||||
|
||||
if (!outer_dn) {
|
||||
AtomDefnAddPtr p = tc->lexdeps->lookupForAdd(atom);
|
||||
|
7
js/src/jit-test/tests/basic/testBug776191.js
Normal file
7
js/src/jit-test/tests/basic/testBug776191.js
Normal file
@ -0,0 +1,7 @@
|
||||
(function() {
|
||||
let(a, b, c) {
|
||||
((function() {
|
||||
with({}) let(b) { ((function() { c = 0 })()) }
|
||||
})())
|
||||
}
|
||||
})()
|
Loading…
Reference in New Issue
Block a user