Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
null_writer.hpp
Go to the documentation of this file.
1#pragma once
2
3namespace sysio { namespace vm {
4
5class null_writer {
6 public:
7 struct branch_t {};
8 struct label_t {};
9 explicit null_writer(growable_allocator& alloc, std::size_t source_bytes, module& mod) {}
11 void emit_nop() {}
12 label_t emit_end() { return {}; }
13 branch_t emit_return(uint32_t /*depth_change*/) { return {}; }
14 void emit_block() {}
15 label_t emit_loop() { return {}; }
16 branch_t emit_if() { return {}; }
17 branch_t emit_else(branch_t /*if_loc*/) { return {}; }
18 branch_t emit_br(uint32_t /*depth_change*/) { return {}; }
19 branch_t emit_br_if(uint32_t /*depth_change*/) { return {}; }
20 struct br_table_parser {
21 branch_t emit_case(uint32_t /*depth_change*/) { return {}; }
22 branch_t emit_default(uint32_t /*depth_change*/) { return {}; }
23 };
24 br_table_parser emit_br_table(uint32_t /*table_size*/) { return {}; }
25 void emit_call(const func_type& /*ft*/, uint32_t /*funcnum*/) {}
26 void emit_call_indirect(const func_type& /*ft*/, uint32_t /*functypeidx*/) {}
27
28 void emit_drop() {}
29 void emit_select() {}
30 void emit_get_local(uint32_t /*localidx*/) {}
31 void emit_set_local(uint32_t /*localidx*/) {}
32 void emit_tee_local(uint32_t /*localidx*/) {}
33 void emit_get_global(uint32_t /*localidx*/) {}
34 void emit_set_global(uint32_t /*localidx*/) {}
35
36 void emit_i32_load(uint32_t /*offset*/, uint32_t /*alignment*/) {}
37 void emit_i64_load(uint32_t /*offset*/, uint32_t /*alignment*/) {}
38 void emit_f32_load(uint32_t /*offset*/, uint32_t /*alignment*/) {}
39 void emit_f64_load(uint32_t /*offset*/, uint32_t /*alignment*/) {}
40 void emit_i32_load8_s(uint32_t /*offset*/, uint32_t /*alignment*/) {}
41 void emit_i32_load16_s(uint32_t /*offset*/, uint32_t /*alignment*/) {}
42 void emit_i32_load8_u(uint32_t /*offset*/, uint32_t /*alignment*/) {}
43 void emit_i32_load16_u(uint32_t /*offset*/, uint32_t /*alignment*/) {}
44 void emit_i64_load8_s(uint32_t /*offset*/, uint32_t /*alignment*/) {}
45 void emit_i64_load16_s(uint32_t /*offset*/, uint32_t /*alignment*/) {}
46 void emit_i64_load32_s(uint32_t /*offset*/, uint32_t /*alignment*/) {}
47 void emit_i64_load8_u(uint32_t /*offset*/, uint32_t /*alignment*/) {}
48 void emit_i64_load16_u(uint32_t /*offset*/, uint32_t /*alignment*/) {}
49 void emit_i64_load32_u(uint32_t /*offset*/, uint32_t /*alignment*/) {}
50
51 void emit_i32_store(uint32_t /*offset*/, uint32_t /*alignment*/) {}
52 void emit_i64_store(uint32_t /*offset*/, uint32_t /*alignment*/) {}
53 void emit_f32_store(uint32_t /*offset*/, uint32_t /*alignment*/) {}
54 void emit_f64_store(uint32_t /*offset*/, uint32_t /*alignment*/) {}
55 void emit_i32_store8(uint32_t /*offset*/, uint32_t /*alignment*/) {}
56 void emit_i32_store16(uint32_t /*offset*/, uint32_t /*alignment*/) {}
57 void emit_i64_store8(uint32_t /*offset*/, uint32_t /*alignment*/) {}
58 void emit_i64_store16(uint32_t /*offset*/, uint32_t /*alignment*/) {}
59 void emit_i64_store32(uint32_t /*offset*/, uint32_t /*alignment*/) {}
60
63 void emit_i32_const(uint32_t /*value*/) {}
64 void emit_i64_const(uint64_t /*value*/) {}
65 void emit_f32_const(float /*value*/) {}
66 void emit_f64_const(double /*value*/) {}
67
68 void emit_i32_eqz() {}
69 void emit_i32_eq() {}
70 void emit_i32_ne() {}
71 void emit_i32_lt_s() {}
72 void emit_i32_lt_u() {}
73 void emit_i32_gt_s() {}
74 void emit_i32_gt_u() {}
75 void emit_i32_le_s() {}
76 void emit_i32_le_u() {}
77 void emit_i32_ge_s() {}
78 void emit_i32_ge_u() {}
79
80 void emit_i64_eqz() {}
81 void emit_i64_eq() {}
82 void emit_i64_ne() {}
83 void emit_i64_lt_s() {}
84 void emit_i64_lt_u() {}
85 void emit_i64_gt_s() {}
86 void emit_i64_gt_u() {}
87 void emit_i64_le_s() {}
88 void emit_i64_le_u() {}
89 void emit_i64_ge_s() {}
90 void emit_i64_ge_u() {}
91
92 void emit_f32_eq() {}
93 void emit_f32_ne() {}
94 void emit_f32_lt() {}
95 void emit_f32_gt() {}
96 void emit_f32_le() {}
97 void emit_f32_ge() {}
98
99 void emit_f64_eq() {}
100 void emit_f64_ne() {}
101 void emit_f64_lt() {}
102 void emit_f64_gt() {}
103 void emit_f64_le() {}
104 void emit_f64_ge() {}
105
106 void emit_i32_clz() {}
107 void emit_i32_ctz() {}
109 void emit_i32_add() {}
110 void emit_i32_sub() {}
111 void emit_i32_mul() {}
116 void emit_i32_and() {}
117 void emit_i32_or() {}
118 void emit_i32_xor() {}
119 void emit_i32_shl() {}
124
125 void emit_i64_clz() {}
126 void emit_i64_ctz() {}
128 void emit_i64_add() {}
129 void emit_i64_sub() {}
130 void emit_i64_mul() {}
135 void emit_i64_and() {}
136 void emit_i64_or() {}
137 void emit_i64_xor() {}
138 void emit_i64_shl() {}
143
144 void emit_f32_abs() {}
145 void emit_f32_neg() {}
151 void emit_f32_add() {}
152 void emit_f32_sub() {}
153 void emit_f32_mul() {}
154 void emit_f32_div() {}
155 void emit_f32_min() {}
156 void emit_f32_max() {}
158
159 void emit_f64_abs() {}
160 void emit_f64_neg() {}
166 void emit_f64_add() {}
167 void emit_f64_sub() {}
168 void emit_f64_mul() {}
169 void emit_f64_div() {}
170 void emit_f64_min() {}
171 void emit_f64_max() {}
173
199
201 void emit_prologue(const func_type& /*ft*/, const guarded_vector<local_entry>& /*locals*/, uint32_t /*idx*/) {}
202 void emit_epilogue(const func_type& /*ft*/, const guarded_vector<local_entry>& /*locals*/, uint32_t /*idx*/) {}
203 void finalize(function_body& /*body*/) {}
204
205 const void* get_addr() const { return nullptr; }
206 const void* get_base_addr() const { return nullptr; }
207};
208
209}}
void emit_i64_store32(uint32_t, uint32_t)
void emit_get_local(uint32_t)
void emit_i32_load8_s(uint32_t, uint32_t)
void emit_i64_load8_u(uint32_t, uint32_t)
void emit_i64_store8(uint32_t, uint32_t)
const void * get_base_addr() const
void emit_i32_store8(uint32_t, uint32_t)
void emit_i64_load8_s(uint32_t, uint32_t)
void emit_f32_store(uint32_t, uint32_t)
void emit_i32_load8_u(uint32_t, uint32_t)
void emit_set_local(uint32_t)
branch_t emit_br(uint32_t)
void emit_i32_load(uint32_t, uint32_t)
void emit_i32_store(uint32_t, uint32_t)
void emit_f64_store(uint32_t, uint32_t)
void emit_prologue(const func_type &, const guarded_vector< local_entry > &, uint32_t)
null_writer(growable_allocator &alloc, std::size_t source_bytes, module &mod)
void fix_branch(branch_t, label_t)
void emit_i64_load32_u(uint32_t, uint32_t)
void emit_i64_load(uint32_t, uint32_t)
void emit_i64_store(uint32_t, uint32_t)
void emit_i32_const(uint32_t)
void emit_epilogue(const func_type &, const guarded_vector< local_entry > &, uint32_t)
void emit_f64_const(double)
void emit_call(const func_type &, uint32_t)
void emit_f64_load(uint32_t, uint32_t)
branch_t emit_br_if(uint32_t)
void emit_call_indirect(const func_type &, uint32_t)
void emit_tee_local(uint32_t)
br_table_parser emit_br_table(uint32_t)
void emit_i64_load16_s(uint32_t, uint32_t)
void emit_i32_load16_u(uint32_t, uint32_t)
void emit_f32_load(uint32_t, uint32_t)
void emit_i64_load16_u(uint32_t, uint32_t)
void emit_i32_load16_s(uint32_t, uint32_t)
void emit_get_global(uint32_t)
void emit_i32_store16(uint32_t, uint32_t)
void emit_set_global(uint32_t)
void emit_i64_load32_s(uint32_t, uint32_t)
branch_t emit_else(branch_t)
void emit_i64_const(uint64_t)
branch_t emit_return(uint32_t)
const void * get_addr() const
void finalize(function_body &)
void emit_i64_store16(uint32_t, uint32_t)
unsigned int uint32_t
Definition stdint.h:126
unsigned __int64 uint64_t
Definition stdint.h:136