Bug 787866 (part 3) - Remove SharedContext::fun_. r=luke.

This commit is contained in:
Nicholas Nethercote
2012-09-04 18:09:31 -07:00
parent 94d9838129
commit fe9ae875f2
8 changed files with 54 additions and 51 deletions

View File

@@ -100,7 +100,7 @@ frontend::CompileScript(JSContext *cx, HandleObject scopeChain, StackFrame *call
return NULL;
parser.sct = &sct;
SharedContext sc(cx, scopeChain, /* fun = */ NULL, /* funbox = */ NULL, StrictModeFromContext(cx));
SharedContext sc(cx, scopeChain, /* funbox = */ NULL, StrictModeFromContext(cx));
ParseContext pc(&parser, &sc, staticLevel, /* bodyid = */ 0);
if (!pc.init())
@@ -275,8 +275,11 @@ frontend::CompileFunctionBody(JSContext *cx, HandleFunction fun, CompileOptions
parser.sct = &sct;
JS_ASSERT(fun);
SharedContext funsc(cx, /* scopeChain = */ NULL, fun, /* funbox = */ NULL,
StrictModeFromContext(cx));
StrictMode sms = StrictModeFromContext(cx);
FunctionBox *funbox = parser.newFunctionBox(fun, /* outerpc = */ NULL, sms);
SharedContext funsc(cx, /* scopeChain = */ NULL, funbox, sms);
fun->setArgCount(formals.length());
unsigned staticLevel = 0;