Move GlobalScope from BytecodeCompiler to BytecodeEmitter. Bug 696953, part 2 of 4. r=Waldo.

This commit is contained in:
Jason Orendorff
2011-10-27 17:00:48 -05:00
parent 6e7c70bee5
commit c906a7ed47
5 changed files with 9 additions and 8 deletions

View File

@@ -55,7 +55,7 @@ using namespace js::frontend;
* Compile a top-level script.
*/
BytecodeCompiler::BytecodeCompiler(JSContext *cx, JSPrincipals *prin, StackFrame *cfp)
: parser(cx, prin, cfp), globalScope(NULL)
: parser(cx, prin, cfp)
{}
JSScript *
@@ -110,7 +110,7 @@ BytecodeCompiler::compileScript(JSContext *cx, JSObject *scopeChain, StackFrame
GlobalScope globalScope(cx, globalObj, &bce);
bce.flags |= tcflags;
bce.setScopeChain(scopeChain);
compiler.globalScope = &globalScope;
bce.globalScope = &globalScope;
if (!SetStaticLevel(&bce, staticLevel))
goto out;