Disable partial flat closures pending scope chain reconstruction on trace (554572, r=jorendorff; CLOSED TREE push ok'ed by sayrer).

This commit is contained in:
Brendan Eich 2010-03-24 13:26:28 -07:00
parent 679de812a5
commit c1024a0693

View File

@ -2413,7 +2413,8 @@ JSCompiler::setFunctionKinds(JSFunctionBox *funbox, uint32& tcflags)
if (nupvars == 0) {
FUN_METER(onlyfreevar);
FUN_SET_KIND(fun, JSFUN_NULL_CLOSURE);
} else if (nflattened != 0) {
} else if (nflattened == nupvars) {
/* FIXME bug 545759: to test nflattened != 0 */
/*
* We made it all the way through the upvar loop, so it's
* safe to optimize to a flat closure.