Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
memory_dump.hpp File Reference
#include <sysio/vm/opcodes.hpp>
#include <sysio/vm/variant.hpp>
#include <cstddef>
#include <cstdint>
#include <utility>
Include dependency graph for memory_dump.hpp:

Go to the source code of this file.

Classes

struct  sysio::vm::memory_dump_visitor< Stream >
 
class  sysio::vm::memory_dump< Opcode >
 

Namespaces

namespace  sysio
 
namespace  sysio::vm
 

Macros

#define MEMORY_DUMP_OP_VISIT(name, code)
 
#define MEMORY_DUMP_CONTROL_FLOW_VISIT(name, code)
 
#define MEMORY_DUMP_BR_TABLE_VISIT(name, code)
 
#define MEMORY_DUMP_CALL_VISIT(name, code)
 
#define MEMORY_DUMP_VARIABLE_ACCESS_VISIT(name, code)
 
#define MEMORY_DUMP_MEMORY_VISIT(name, code)
 
#define MEMORY_DUMP_CONST_VISIT(name, code)
 

Macro Definition Documentation

◆ MEMORY_DUMP_BR_TABLE_VISIT

#define MEMORY_DUMP_BR_TABLE_VISIT ( name,
code )
Value:
void operator()(const SYS_VM_OPCODE_T(name)& op) { \
stream << #name << " : { [ "; \
for (uint32_t i=0; i < op.size; i++) { \
stream << op.table[i].pc; \
if (i < op.size-1) { \
stream << ", "; \
} \
} \
stream << " ] }\n"; \
index += op.offset; \
}
std::string name
unsigned int uint32_t
Definition stdint.h:126
#define SYS_VM_OPCODE_T(name)

Definition at line 22 of file memory_dump.hpp.

22#define MEMORY_DUMP_BR_TABLE_VISIT(name, code) \
23 void operator()(const SYS_VM_OPCODE_T(name)& op) { \
24 stream << #name << " : { [ "; \
25 for (uint32_t i=0; i < op.size; i++) { \
26 stream << op.table[i].pc; \
27 if (i < op.size-1) { \
28 stream << ", "; \
29 } \
30 } \
31 stream << " ] }\n"; \
32 index += op.offset; \
33 }

◆ MEMORY_DUMP_CALL_VISIT

#define MEMORY_DUMP_CALL_VISIT ( name,
code )
Value:
void operator()(const name##_t& op) { \
stream << #name << " : { " << op.index << " }\n"; \
}

Definition at line 35 of file memory_dump.hpp.

35#define MEMORY_DUMP_CALL_VISIT(name, code) \
36 void operator()(const name##_t& op) { \
37 stream << #name << " : { " << op.index << " }\n"; \
38 }

◆ MEMORY_DUMP_CONST_VISIT

#define MEMORY_DUMP_CONST_VISIT ( name,
code )
Value:
void operator()(const name##_t& op) { \
stream << #name << " : { " << op.data.ui << " }\n"; \
}

Definition at line 50 of file memory_dump.hpp.

50#define MEMORY_DUMP_CONST_VISIT(name, code) \
51 void operator()(const name##_t& op) { \
52 stream << #name << " : { " << op.data.ui << " }\n"; \
53 }

◆ MEMORY_DUMP_CONTROL_FLOW_VISIT

#define MEMORY_DUMP_CONTROL_FLOW_VISIT ( name,
code )
Value:
void operator()(const SYS_VM_OPCODE_T(name)& op) { \
stream << #name << " : { " << op.data << ", " << op.pc << ", " << op.index << ", " << op.op_index << " }\n"; \
}

Definition at line 17 of file memory_dump.hpp.

17#define MEMORY_DUMP_CONTROL_FLOW_VISIT(name, code) \
18 void operator()(const SYS_VM_OPCODE_T(name)& op) { \
19 stream << #name << " : { " << op.data << ", " << op.pc << ", " << op.index << ", " << op.op_index << " }\n"; \
20 }

◆ MEMORY_DUMP_MEMORY_VISIT

#define MEMORY_DUMP_MEMORY_VISIT ( name,
code )
Value:
void operator()(const name##_t& op) { \
stream << #name << " : { " << op.flags_align << ", " << op.offset << " }\n"; \
}

Definition at line 45 of file memory_dump.hpp.

45#define MEMORY_DUMP_MEMORY_VISIT(name, code) \
46 void operator()(const name##_t& op) { \
47 stream << #name << " : { " << op.flags_align << ", " << op.offset << " }\n"; \
48 }

◆ MEMORY_DUMP_OP_VISIT

#define MEMORY_DUMP_OP_VISIT ( name,
code )
Value:
void operator()(const SYS_VM_OPCODE_T(name)& op) { \
stream << #name << "\n"; \
}

Definition at line 12 of file memory_dump.hpp.

12#define MEMORY_DUMP_OP_VISIT(name, code) \
13 void operator()(const SYS_VM_OPCODE_T(name)& op) { \
14 stream << #name << "\n"; \
15 }

◆ MEMORY_DUMP_VARIABLE_ACCESS_VISIT

#define MEMORY_DUMP_VARIABLE_ACCESS_VISIT ( name,
code )
Value:
void operator()(const name##_t& op) { \
stream << #name << " : { " << op.index << " }\n"; \
}

Definition at line 40 of file memory_dump.hpp.

40#define MEMORY_DUMP_VARIABLE_ACCESS_VISIT(name, code) \
41 void operator()(const name##_t& op) { \
42 stream << #name << " : { " << op.index << " }\n"; \
43 }