With the update of pylovm2 on pypi, it is now time to aggregate a little changelog…

Changelog

  • By default, lovm2 will now append the modules name to the imported function to avoid namespace collisions. It will call the Vms import hook to determine the correct name.
let namespaced = false;
// if namespaced is false, don't call `import_hook` for name determination.
vm.add_module(global_module, namespaced);

// set this module as entry point
vm.add_main_module(module);
  • There is a new instruction LCall for calling functions in the same module.

  • The Vm will now preallocate space for the stack.

  • The signature of Rust functions for implementing interrupts changed:

// old signature
fn run(&self, ctx: &mut Context) -> Lovm2Result<()>;

// new signature
fn run(&self, vm: &mut Vm) -> Lovm2Result<()>;
  • HIR building: Changed .push(hir_element) to .step(hir_element).