summaryrefslogtreecommitdiff
path: root/js/src/jit/CodeGenerator.cpp
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2023-04-09 03:06:39 -0500
committerBrian Smith <brian@dbsoft.org>2023-04-27 13:33:00 -0500
commit130d9f4d91f666f6bd44a3e227808030225ef56b (patch)
tree548674f5366dc49ec7f784b82b4ae9861a4fc672 /js/src/jit/CodeGenerator.cpp
parent6eecfad57c57c4c305149d1f5634628e80b0cca6 (diff)
downloaduxp-130d9f4d91f666f6bd44a3e227808030225ef56b.tar.gz
Issue #1691 - Part 4: Finish implementing call import.
https://bugzilla.mozilla.org/show_bug.cgi?id=1499140 (cherry picked from commit 7bf7d64887944b127a72090dd62eb57f67c5089d)
Diffstat (limited to 'js/src/jit/CodeGenerator.cpp')
-rw-r--r--js/src/jit/CodeGenerator.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
index 78d39bfc52..9aa97be31c 100644
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -2402,6 +2402,19 @@ CodeGenerator::visitNullarySharedStub(LNullarySharedStub* lir)
}
}
+typedef JSObject* (*StartDynamicModuleImportFn)(JSContext*, HandleValue, HandleValue);
+static const VMFunction StartDynamicModuleImportInfo =
+ FunctionInfo<StartDynamicModuleImportFn>(js::StartDynamicModuleImport,
+ "StartDynamicModuleImport");
+
+void
+CodeGenerator::visitDynamicImport(LDynamicImport* lir)
+{
+ pushArg(ToValue(lir, LDynamicImport::SpecifierIndex));
+ pushArg(ToValue(lir, LDynamicImport::ReferencingPrivateIndex));
+ callVM(StartDynamicModuleImportInfo, lir);
+}
+
typedef JSObject* (*LambdaFn)(JSContext*, HandleFunction, HandleObject);
static const VMFunction LambdaInfo = FunctionInfo<LambdaFn>(js::Lambda, "Lambda");