Bug 488843 - Restore missing check for un-optimiziable frames. r=brendan
authorBlake Kaplan <mrbkap@gmail.com>
Mon, 20 Apr 2009 15:40:58 -0700
changeset 27573 77a2e94b0262cc9a7c21ee7d2f80580b025a9350
parent 27572 81ea33f9a7a71e0fc3517d5291ed31298cfff85f
child 27574 ed4ac8a1494e68dfbb4277b41c3170f1e25fe53a
push id6623
push userrsayre@mozilla.com
push dateTue, 21 Apr 2009 18:35:23 +0000
treeherdermozilla-central@30ac20416be4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbrendan
bugs488843
milestone1.9.2a1pre
Bug 488843 - Restore missing check for un-optimiziable frames. r=brendan
js/src/jsemit.cpp
--- a/js/src/jsemit.cpp
+++ b/js/src/jsemit.cpp
@@ -1852,17 +1852,17 @@ MakeUpvarForEval(JSParseNode *pn, JSCode
 
     uintN index;
     JSLocalKind localKind = js_LookupLocal(cx, fun, atom, &index);
     if (localKind == JSLOCAL_NONE)
         return true;
 
     uintN upvarLevel = fun->u.i.script->staticLevel;
     JS_ASSERT(cg->staticLevel > upvarLevel);
-    if (upvarLevel >= JS_DISPLAY_SIZE)
+    if (cg->staticLevel >= JS_DISPLAY_SIZE || upvarLevel >= JS_DISPLAY_SIZE)
         return true;
 
     JSAtomListElement *ale = cg->upvarList.lookup(atom);
     if (!ale) {
         if ((cg->flags & TCF_IN_FUNCTION) &&
             !js_AddLocal(cx, cg->fun, atom, JSLOCAL_UPVAR)) {
             return false;
         }