зеркало из https://github.com/mozilla/gecko-dev.git
Bug 776191 - Add missing case of 'with' deoptimization, r=dvander
This commit is contained in:
Родитель
497e7cd9bb
Коммит
e0de3d8739
|
@ -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);
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
(function() {
|
||||
let(a, b, c) {
|
||||
((function() {
|
||||
with({}) let(b) { ((function() { c = 0 })()) }
|
||||
})())
|
||||
}
|
||||
})()
|
Загрузка…
Ссылка в новой задаче