3#include <sysio/vm/interpret_visitor.hpp>
4#include <sysio/vm/opcodes.hpp>
8#define DBG_VISIT(name, code) \
9 void operator()(const SYS_VM_OPCODE_T(name)& op) { \
10 std::cout << "Found " << #name << " at " << get_context().get_pc() << "\n"; \
11 interpret_visitor<ExecutionCTX>::operator()(op); \
12 get_context().print_stack(); \
15#define DBG2_VISIT(name, code) \
16 void operator()(const SYS_VM_OPCODE_T(name)& op) { std::cout << "Found " << #name << "\n"; }
18namespace sysio {
namespace vm {
20template <
typename ExecutionCTX>
21struct debug_visitor :
public interpret_visitor<ExecutionCTX> {
44struct debug_visitor2 {
ExecutionCTX & get_context()
debug_visitor(ExecutionCTX &ctx)
interpret_visitor(ExecutionCTX &ec)
ExecutionContext & get_context()
#define DBG2_VISIT(name, code)
#define DBG_VISIT(name, code)
#define SYS_VM_F64_CONSTANT_OPS(opcode_macro)
#define SYS_VM_RETURN_OP(opcode_macro)
#define SYS_VM_EXIT_OP(opcode_macro)
#define SYS_VM_COMPARISON_OPS(opcode_macro)
#define SYS_VM_MEMORY_OPS(opcode_macro)
#define SYS_VM_I64_CONSTANT_OPS(opcode_macro)
#define SYS_VM_I32_CONSTANT_OPS(opcode_macro)
#define SYS_VM_CALL_OPS(opcode_macro)
#define SYS_VM_NUMERIC_OPS(opcode_macro)
#define SYS_VM_CONVERSION_OPS(opcode_macro)
#define SYS_VM_VARIABLE_ACCESS_OPS(opcode_macro)
#define SYS_VM_CALL_IMM_OPS(opcode_macro)
#define SYS_VM_CONTROL_FLOW_OPS(opcode_macro)
#define SYS_VM_ERROR_OPS(opcode_macro)
#define SYS_VM_PARAMETRIC_OPS(opcode_macro)
#define SYS_VM_F32_CONSTANT_OPS(opcode_macro)
#define SYS_VM_BR_TABLE_OP(opcode_macro)