mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Issue #1691 - Part 5: Don't pre-create module metadata object when compiling. https://bugzilla.mozilla.org/show_bug.cgi?id=1489477
(cherry picked from commit d83bad49f6b03894548fbf85fc18ad7e8cc19a93)
This commit is contained in:
parent
7a6dab0b38
commit
c965fbdd10
11 changed files with 81 additions and 11 deletions
|
|
@ -4695,17 +4695,27 @@ BaselineCompiler::emit_JSOP_JUMPTARGET()
|
|||
return true;
|
||||
}
|
||||
|
||||
typedef JSObject* (*GetOrCreateModuleMetaObjectFn)(JSContext*, HandleObject);
|
||||
static const VMFunction GetOrCreateModuleMetaObjectInfo =
|
||||
FunctionInfo<GetOrCreateModuleMetaObjectFn>(js::GetOrCreateModuleMetaObject,
|
||||
"GetOrCreateModuleMetaObject");
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_IMPORTMETA()
|
||||
{
|
||||
RootedModuleObject module(cx, GetModuleObjectForScript(script));
|
||||
MOZ_ASSERT(module);
|
||||
|
||||
JSObject* metaObject = GetOrCreateModuleMetaObject(cx, module);
|
||||
if (!metaObject)
|
||||
return false;
|
||||
frame.syncStack(0);
|
||||
|
||||
frame.push(ObjectValue(*metaObject));
|
||||
prepareVMCall();
|
||||
pushArg(ImmGCPtr(module));
|
||||
if (!callVM(GetOrCreateModuleMetaObjectInfo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
masm.tagValue(JSVAL_TYPE_OBJECT, ReturnReg, R0);
|
||||
frame.push(R0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue