mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-25 16:47:29 +09:00
parent
748c69d7fd
commit
34fe54e4e8
2 changed files with 15 additions and 14 deletions
|
|
@ -336,10 +336,10 @@ BytecodeCompiler::compileScript(HandleObject environment, SharedContext* sc)
|
||||||
if (!deoptimizeArgumentsInEnclosingScripts(cx->asJSContext(), environment))
|
if (!deoptimizeArgumentsInEnclosingScripts(cx->asJSContext(), environment))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (!NameFunctions(cx, pn))
|
|
||||||
return nullptr;
|
|
||||||
if (!emitter->emitScript(pn))
|
if (!emitter->emitScript(pn))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
if (!NameFunctions(cx, pn))
|
||||||
|
return nullptr;
|
||||||
parser->handler.freeTree(pn);
|
parser->handler.freeTree(pn);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -397,15 +397,15 @@ BytecodeCompiler::compileModule()
|
||||||
if (!pn)
|
if (!pn)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!NameFunctions(cx, pn))
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
Maybe<BytecodeEmitter> emitter;
|
Maybe<BytecodeEmitter> emitter;
|
||||||
if (!emplaceEmitter(emitter, &modulesc))
|
if (!emplaceEmitter(emitter, &modulesc))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (!emitter->emitScript(pn->pn_body))
|
if (!emitter->emitScript(pn->pn_body))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
if (!NameFunctions(cx, pn))
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
parser->handler.freeTree(pn);
|
parser->handler.freeTree(pn);
|
||||||
|
|
||||||
if (!builder.initModule())
|
if (!builder.initModule())
|
||||||
|
|
@ -453,9 +453,6 @@ BytecodeCompiler::compileStandaloneFunction(MutableHandleFunction fun,
|
||||||
return false;
|
return false;
|
||||||
} while (!fn);
|
} while (!fn);
|
||||||
|
|
||||||
if (!NameFunctions(cx, fn))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (fn->pn_funbox->function()->isInterpreted()) {
|
if (fn->pn_funbox->function()->isInterpreted()) {
|
||||||
MOZ_ASSERT(fun == fn->pn_funbox->function());
|
MOZ_ASSERT(fun == fn->pn_funbox->function());
|
||||||
|
|
||||||
|
|
@ -472,6 +469,9 @@ BytecodeCompiler::compileStandaloneFunction(MutableHandleFunction fun,
|
||||||
MOZ_ASSERT(IsAsmJSModule(fun));
|
MOZ_ASSERT(IsAsmJSModule(fun));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!NameFunctions(cx, fn))
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!maybeCompleteCompressSource())
|
if (!maybeCompleteCompressSource())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -646,9 +646,6 @@ frontend::CompileLazyFunction(JSContext* cx, Handle<LazyScript*> lazy, const cha
|
||||||
if (!pn)
|
if (!pn)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!NameFunctions(cx, pn))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
RootedScriptSource sourceObject(cx, lazy->sourceObject());
|
RootedScriptSource sourceObject(cx, lazy->sourceObject());
|
||||||
MOZ_ASSERT(sourceObject);
|
MOZ_ASSERT(sourceObject);
|
||||||
|
|
||||||
|
|
@ -667,7 +664,13 @@ frontend::CompileLazyFunction(JSContext* cx, Handle<LazyScript*> lazy, const cha
|
||||||
if (!bce.init())
|
if (!bce.init())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return bce.emitFunctionScript(pn->pn_body);
|
if (!bce.emitFunctionScript(pn->pn_body))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!NameFunctions(cx, pn))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
|
||||||
|
|
@ -4539,8 +4539,6 @@ BytecodeEmitter::setOrEmitSetFunName(ParseNode* maybeFun, HandleAtom name,
|
||||||
RootedAtom funName(cx, NameToFunctionName(cx, name, prefixKind));
|
RootedAtom funName(cx, NameToFunctionName(cx, name, prefixKind));
|
||||||
if (!funName)
|
if (!funName)
|
||||||
return false;
|
return false;
|
||||||
if (fun->hasGuessedAtom())
|
|
||||||
fun->clearGuessedAtom();
|
|
||||||
fun->setCompileTimeName(name);
|
fun->setCompileTimeName(name);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue