mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Issue #1691 - Part 4: Finish implementing call import. https://bugzilla.mozilla.org/show_bug.cgi?id=1499140
(cherry picked from commit 7bf7d64887944b127a72090dd62eb57f67c5089d)
This commit is contained in:
parent
3f4985ce6c
commit
7a6dab0b38
35 changed files with 533 additions and 24 deletions
|
|
@ -4708,3 +4708,28 @@ BaselineCompiler::emit_JSOP_IMPORTMETA()
|
|||
frame.push(ObjectValue(*metaObject));
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef JSObject* (*StartDynamicModuleImportFn)(JSContext*, HandleValue, HandleValue);
|
||||
static const VMFunction StartDynamicModuleImportInfo =
|
||||
FunctionInfo<StartDynamicModuleImportFn>(js::StartDynamicModuleImport,
|
||||
"StartDynamicModuleImport");
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_DYNAMIC_IMPORT()
|
||||
{
|
||||
RootedValue referencingPrivate(cx, FindScriptOrModulePrivateForScript(script));
|
||||
|
||||
// Put specifier value in R0.
|
||||
frame.popRegsAndSync(1);
|
||||
|
||||
prepareVMCall();
|
||||
pushArg(R0);
|
||||
pushArg(referencingPrivate);
|
||||
if (!callVM(StartDynamicModuleImportInfo)) {
|
||||
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