Bug 753249 (part 1) - Remove TCF_IN_FUNCTION from TreeContextFlags. r=luke.

This commit is contained in:
Nicholas Nethercote
2012-05-14 21:38:35 -07:00
parent 336cf2ae5e
commit f79a992122
8 changed files with 68 additions and 71 deletions

View File

@@ -125,7 +125,7 @@ frontend::CompileScript(JSContext *cx, JSObject *scopeChain, StackFrame *callerF
TokenStream &tokenStream = parser.tokenStream;
SharedContext sc(cx);
SharedContext sc(cx, /* inFunction = */ false);
TreeContext tc(&parser, &sc);
if (!tc.init(cx))
@@ -298,7 +298,7 @@ frontend::CompileFunctionBody(JSContext *cx, JSFunction *fun,
TokenStream &tokenStream = parser.tokenStream;
SharedContext funsc(cx);
SharedContext funsc(cx, /* inFunction = */ true);
TreeContext funtc(&parser, &funsc);
if (!funtc.init(cx))
@@ -309,7 +309,6 @@ frontend::CompileFunctionBody(JSContext *cx, JSFunction *fun,
if (!funbce.init())
return false;
funsc.flags |= TCF_IN_FUNCTION;
funsc.setFunction(fun);
funsc.bindings.transfer(cx, bindings);
fun->setArgCount(funsc.bindings.numArgs());