#include "vm_provider.hpp" #include "vm.hpp" using namespace sliger::rpc::vm_provider; auto VmProvider::load_and_run(std::vector instructions) -> void { auto vm = VM(instructions, { .flame_graph = true, .code_coverage = true, }); vm.run_until_done(); this->vm = vm; } auto VmProvider::flame_graph_json() -> std::optional { if (this->vm) { return this->vm->flame_graph_json(); } else { return {}; } } auto VmProvider::code_coverage_json() -> std::optional { if (this->vm) { return this->vm->code_coverage_json(); } else { return {}; } }