mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out last cset.
This commit is contained in:
parent
4c1b058a32
commit
9fcdf01e99
@ -1847,26 +1847,10 @@ MakeUpvarForEval(JSParseNode *pn, JSCodeGenerator *cg)
|
||||
uintN upvarLevel = fun->u.i.script->staticLevel;
|
||||
|
||||
JSFunctionBox *funbox = cg->funbox;
|
||||
if (funbox) {
|
||||
/*
|
||||
* Treat top-level function definitions as escaping (i.e., as funargs),
|
||||
* required since we compile each such top level function or statement
|
||||
* and throw away the AST, so we can't yet see all funarg uses of this
|
||||
* function being compiled (cg->funbox->object). See bug 493177.
|
||||
*/
|
||||
if (funbox->level == fun->u.i.script->staticLevel + 1U &&
|
||||
!(((JSFunction *) funbox->object)->flags & JSFUN_LAMBDA)) {
|
||||
JS_ASSERT(((JSFunction *) funbox->object)->atom);
|
||||
while (funbox && funbox->level >= upvarLevel) {
|
||||
if (funbox->node->pn_dflags & PND_FUNARG)
|
||||
return true;
|
||||
}
|
||||
|
||||
while (funbox->level >= upvarLevel) {
|
||||
if (funbox->node->pn_dflags & PND_FUNARG)
|
||||
return true;
|
||||
funbox = funbox->parent;
|
||||
if (!funbox)
|
||||
break;
|
||||
}
|
||||
funbox = funbox->parent;
|
||||
}
|
||||
|
||||
JSContext *cx = cg->compiler->context;
|
||||
|
Loading…
Reference in New Issue
Block a user