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 |
|
Will need re-resolving again:) @koute |
|
Done. Should aligned with what's on |
zdave-parity
left a comment
There was a problem hiding this comment.
LGTM, few trivial nits.
| %%%%%%%%%%%% | ||
| % PVM-SPECIFIC ITEMS | ||
|
|
||
| \newcommand*{\pvm¬instance}{\mathbb{I}} |
There was a problem hiding this comment.
pvm¬instance should stay where it was? The pattern in the "Named types" section is that you have the "named type" (eg pvm¬instance) followed by the names of the type's fields (for pvm¬instance these are pg¬code, pg¬ram, etc).
There was a problem hiding this comment.
Hm, well, \pvm¬instance (\mathbb{I}) is the type of the instance, and \pvm¬module (\mathbb{B}) is the type of the module. To me it makes sense to keep them together? I can split them, but that seems to be somewhat confusing, considering they're inherently related (you create an instance from a module).
There was a problem hiding this comment.
I guess as \pvm¬module is a type it makes sense in the "Named types" section, but I found it confusing placed between the definition of \pvm¬instance and its fields. Anyway it doesn't really matter that much so I'll shut up now!
There was a problem hiding this comment.
Heh, okay, well, in general I'm fine with whatever you prefer. (:
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.