Skip to main content

run_chunk_on

Function run_chunk_on 

Source
pub fn run_chunk_on(chunk: Chunk) -> Result<Value, String>
Expand description

Register every node-js builtin + the numeric hook on a VM, then run it.

For a chunk that runs once — a module body, an eval — there is nothing to key a pool by, so this resets a spare VM with the caller’s chunk. Anything that runs repeatedly (a function body, a try block) goes through run_chunk_keyed instead and never copies its chunk twice.