Bug 784608 (part 5) - Rename some FunctionBox method args. r=luke.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 22 Aug 2012 20:12:44 -0700
changeset 105541 45ac09b4bcb4a279eda0828cc50d84eff0bc5402
parent 105540 12cca7e45cce0bf1c3de730d4e4a8c9e1de6d94c
child 105542 878eb7f978b676c9e2887355e2ee41057358953f
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewersluke
bugs784608
milestone17.0a1
Bug 784608 (part 5) - Rename some FunctionBox method args. r=luke.
js/src/frontend/Parser.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -382,63 +382,63 @@ Parser::newObjectBox(JSObject *obj)
         return NULL;
     }
 
     traceListHead = objbox;
 
     return objbox;
 }
 
-FunctionBox::FunctionBox(ObjectBox* traceListHead, JSObject *obj, ParseContext *pc,
+FunctionBox::FunctionBox(ObjectBox* traceListHead, JSObject *obj, ParseContext *outerpc,
                          StrictMode::StrictModeState sms)
   : ObjectBox(traceListHead, obj),
-    siblings(pc->functionList),
+    siblings(outerpc->functionList),
     kids(NULL),
-    parent(pc->sc->inFunction() ? pc->sc->funbox() : NULL),
+    parent(outerpc->sc->inFunction() ? outerpc->sc->funbox() : NULL),
     bindings(),
     bufStart(0),
     bufEnd(0),
     ndefaults(0),
     strictModeState(sms),
-    inWith(!!pc->innermostWith),
+    inWith(!!outerpc->innermostWith),
     inGenexpLambda(false),
-    cxFlags(pc->sc->context)     // the cxFlags are set in LeaveFunction
+    cxFlags(outerpc->sc->context)     // the cxFlags are set in LeaveFunction
 {
     isFunctionBox = true;
-    if (!pc->sc->inFunction()) {
-        JSObject *scope = pc->sc->scopeChain();
+    if (!outerpc->sc->inFunction()) {
+        JSObject *scope = outerpc->sc->scopeChain();
         while (scope) {
             if (scope->isWith())
                 inWith = true;
             scope = scope->enclosingScope();
         }
     }
 }
 
 FunctionBox *
-Parser::newFunctionBox(JSObject *obj, ParseContext *pc, StrictMode::StrictModeState sms)
+Parser::newFunctionBox(JSObject *obj, ParseContext *outerpc, StrictMode::StrictModeState sms)
 {
     JS_ASSERT(obj && !IsPoisonedPtr(obj));
     JS_ASSERT(obj->isFunction());
 
     /*
      * We use JSContext.tempLifoAlloc to allocate parsed objects and place them
      * on a list in this Parser to ensure GC safety. Thus the tempLifoAlloc
      * arenas containing the entries must be alive until we are done with
      * scanning, parsing and code generation for the whole script or top-level
      * function.
      */
     FunctionBox *funbox =
-        context->tempLifoAlloc().new_<FunctionBox>(traceListHead, obj, pc, sms);
+        context->tempLifoAlloc().new_<FunctionBox>(traceListHead, obj, outerpc, sms);
     if (!funbox) {
         js_ReportOutOfMemory(context);
         return NULL;
     }
 
-    traceListHead = pc->functionList = funbox;
+    traceListHead = outerpc->functionList = funbox;
 
     return funbox;
 }
 
 void
 Parser::trace(JSTracer *trc)
 {
     ObjectBox *objbox = traceListHead;