Add dedicated hostcall for inner PVM module compilation#530
Conversation
|
There's no precedent on using multi-character subscripts in the $$\Omega$ formulations. I'd prefer to keep to single characters. |
|
I also wonder how bad it would be to have the two |
|
Sure, I'll change the subscripts to be single letter. I can also try to unify both If you'd like we could also unify |
|
I've merged the two hostcalls into one. I've also merged Also updated the PR description to describe the current state of the PR. |
|
Yeah, looks good. Needs resolving... |
|
Aligned with the newest changes on |
This PR adds a dedicated hostcall to compile inner PVM modules.
compilehostcall which can compile a new PVM module from outer PVM's memory, or directly from a preimage in the database (this avoids the need to first fetch and copy the module's bytecode into the outer PVM's memory; it's essentially ahistorical_lookup+ compiling from memory call merged into one)machinenow accepts a handle returned by thecompilehostcalls (this makes it much cheaper to instantiate multiple VMs provided they use the same module)expungehostcall can now also destroy a compiled module handle, and accepts an extra argument which determines the type of handle that was passedexpungedArguments to the
compilehostcall are as follows:m) -> mode of operation, with0being from memory and1from a preimagep) -> pointer to the blob (memory mode) or a hash of the blob (preimage mode)l) -> length of the blob (memory mode) or maximum length of the blob used (preimage mode)f) -> offset in the blob (preimage mode only)i) -> service ID (preimage mode only)Arguments to the
expungehostcall are:m) -> mode of operation, with0being an expunge of a VM instance, and1being an expunge of a program modulen) -> handle to expungeRendered PDF.