From 5ea69a28925542eecc0fa78bef383cb7cc0f4d84 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 22 Aug 2012 17:25:53 -0700 Subject: [PATCH] Bug 784608 (part 2) - Remove FunctionBox::level. r=jimb. --HG-- extra : rebase_source : 0e887c586df02cf84f16816457a6f22e004b34bf --- js/src/frontend/Parser.cpp | 10 +--------- js/src/frontend/SharedContext.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/js/src/frontend/Parser.cpp b/js/src/frontend/Parser.cpp index 27f828f18b7..69e1bde81a3 100644 --- a/js/src/frontend/Parser.cpp +++ b/js/src/frontend/Parser.cpp @@ -397,7 +397,6 @@ FunctionBox::FunctionBox(ObjectBox* traceListHead, JSObject *obj, ParseNode *fn, bindings(), bufStart(0), bufEnd(0), - level(pc->staticLevel), ndefaults(0), strictModeState(sms), inWith(!!pc->innermostWith), @@ -4902,16 +4901,10 @@ CompExprTransplanter::transplant(ParseNode *pn) /* * Only the first level of transplant recursion through functions needs * to reparent the funbox, since all descendant functions are correctly - * linked under the top-most funbox. But every visit to this case needs - * to update funbox->level. - * - * Recall that funbox->level is the static level of the code containing - * the definition or expression of the function and not the static level - * of the function's body. + * linked under the top-most funbox. */ FunctionBox *funbox = pn->pn_funbox; - funbox->level = pc->staticLevel + funcLevel; if (++funcLevel == 1 && genexp) { FunctionBox *parent = pc->sc->funbox(); @@ -4923,7 +4916,6 @@ CompExprTransplanter::transplant(ParseNode *pn) funbox->parent = parent; funbox->siblings = parent->kids; parent->kids = funbox; - funbox->level = pc->staticLevel; } /* FALL THROUGH */ } diff --git a/js/src/frontend/SharedContext.h b/js/src/frontend/SharedContext.h index 74a7010634e..ae1955e6998 100644 --- a/js/src/frontend/SharedContext.h +++ b/js/src/frontend/SharedContext.h @@ -298,7 +298,6 @@ struct FunctionBox : public ObjectBox Bindings bindings; /* bindings for this function */ size_t bufStart; size_t bufEnd; - uint16_t level; uint16_t ndefaults; StrictMode::StrictModeState strictModeState; bool inWith:1; /* some enclosing scope is a with-statement