diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-08-06 14:19:33 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-08-06 23:25:11 +0200 |
commit | c9442f12ee056fd50f314408052917cc5f359bb4 (patch) | |
tree | b3b813b7e1a1d1146a6977da4ee7b51f7067ebbd /source.c | |
parent | b6fd8a2f825ba3d38137bcfbf44ef7dd09161cd2 (diff) |
vm: introduce new I_DYNLOAD opcode
The I_DYNLOAD opcode is basically a bytecode level instruction for
uc_require() with semantics similar to I_IMPORT. It allows loading
a dynamic extension library at runtime and treating values from the
resulting module context object like exports from a compile time source
module.
For example the statement `import { readfile, writefile } from "fs"`
would import the readfile() and writefile() functions of fs.so as
readonly live bindings into the current file scope.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'source.c')
0 files changed, 0 insertions, 0 deletions