summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/run-spec-wasm2c.py30
-rw-r--r--test/spec-wasm2c-prefix.c40
-rw-r--r--test/wasm2c/add.txt30
-rw-r--r--test/wasm2c/hello.txt78
-rw-r--r--test/wasm2c/minimal.txt16
5 files changed, 99 insertions, 95 deletions
diff --git a/test/run-spec-wasm2c.py b/test/run-spec-wasm2c.py
index e2a0cc91..4c3c1f1d 100755
--- a/test/run-spec-wasm2c.py
+++ b/test/run-spec-wasm2c.py
@@ -101,11 +101,19 @@ def MangleTypes(types):
def MangleName(s):
def Mangle(match):
s = match.group(0)
- return b'Z%02X' % s[0]
+ return b'0x%02X' % s[0]
- # NOTE(binji): Z is not allowed.
- pattern = b'([^_a-zA-Y0-9])'
- return 'Z_' + re.sub(pattern, Mangle, s.encode('utf-8')).decode('utf-8')
+ # escape underscores at beginning and end
+ s = re.sub(b'((^_)|(_$))', Mangle, s.encode('utf-8'))
+
+ # NOTE(keithw): forced escapes for '0x[hexdigit]' not implemented here
+ pattern = b'([^_a-zA-Z0-9])'
+ return re.sub(pattern, Mangle, s).decode('utf-8')
+
+
+def MangleModuleName(s):
+ # double underscores
+ return MangleName(re.sub('(_)', '__', s))
def IsModuleCommand(command):
@@ -169,7 +177,7 @@ class CWriter(object):
name = re.sub(r'[^a-zA-Z0-9_]', '_', name)
name = os.path.splitext(name)[0]
self.unmangled_names[idx] = name
- name = MangleName(name)
+ name = MangleModuleName(name)
self.module_prefix_map[idx] = name
@@ -180,7 +188,7 @@ class CWriter(object):
idx += 1
elif command['type'] == 'register':
- name = MangleName(command['as'])
+ name = MangleModuleName(command['as'])
if 'name' in command:
self.module_prefix_map[command['name']] = name
name_idx = self.module_name_to_idx[command['name']]
@@ -199,13 +207,13 @@ class CWriter(object):
for line in f:
if 'import: ' in line:
line_split = line.split()
- import_module_name = MangleName(line_split[2][1:-1])
+ import_module_name = MangleModuleName(line_split[2][1:-1])
imported_modules.add(import_module_name)
if uninstantiable:
self.out_file.write('ASSERT_TRAP(')
- self.out_file.write('%s_instantiate(&%s_instance' % (self.GetModulePrefix(), self.GetModulePrefix()))
+ self.out_file.write('wasm2c_%s_instantiate(&%s_instance' % (self.GetModulePrefix(), self.GetModulePrefix()))
for imported_module in sorted(imported_modules):
self.out_file.write(', &%s_instance' % imported_module)
self.out_file.write(')')
@@ -260,12 +268,12 @@ class CWriter(object):
idx = 0
for command in self.commands:
if IsModuleCommand(command):
- self.out_file.write('%s_instance_t %s;\n' % (self.GetModulePrefix(idx), self.GetModuleInstanceName(idx)))
+ self.out_file.write('w2c_%s %s;\n' % (self.GetModulePrefix(idx), self.GetModuleInstanceName(idx)))
idx += 1
def _WriteModuleCleanUps(self):
for idx in range(self.module_idx):
- self.out_file.write("%s_free(&%s_instance);\n" % (self.GetModulePrefix(idx), self.GetModulePrefix(idx)))
+ self.out_file.write("wasm2c_%s_free(&%s);\n" % (self.GetModulePrefix(idx), self.GetModuleInstanceName(idx)))
def _WriteAssertUninstantiableCommand(self, command):
self.module_idx += 1
@@ -422,7 +430,7 @@ class CWriter(object):
action = command['action']
type_ = action['type']
mangled_module_name = self.GetModulePrefix(action.get('module'))
- field = mangled_module_name + MangleName(action['field'])
+ field = "w2c_" + mangled_module_name + '_' + MangleName(action['field'])
if type_ == 'invoke':
args = self._ConstantList(action.get('args', []))
if len(args) == 0:
diff --git a/test/spec-wasm2c-prefix.c b/test/spec-wasm2c-prefix.c
index 99af49ab..c82a882d 100644
--- a/test/spec-wasm2c-prefix.c
+++ b/test/spec-wasm2c-prefix.c
@@ -277,77 +277,73 @@ static bool is_arithmetic_nan_f64(u64 x) {
return (x & 0x7ff8000000000000) == 0x7ff8000000000000;
}
-typedef struct Z_spectest_instance_t {
+typedef struct w2c_spectest {
wasm_rt_funcref_table_t spectest_table;
wasm_rt_memory_t spectest_memory;
uint32_t spectest_global_i32;
uint64_t spectest_global_i64;
float spectest_global_f32;
double spectest_global_f64;
-} Z_spectest_instance_t;
+} w2c_spectest;
-static Z_spectest_instance_t Z_spectest_instance;
+static w2c_spectest spectest_instance;
/*
* spectest implementations
*/
-void Z_spectestZ_print(Z_spectest_instance_t* instance) {
+void w2c_spectest_print(w2c_spectest* instance) {
printf("spectest.print()\n");
}
-void Z_spectestZ_print_i32(Z_spectest_instance_t* instance, uint32_t i) {
+void w2c_spectest_print_i32(w2c_spectest* instance, uint32_t i) {
printf("spectest.print_i32(%d)\n", i);
}
-void Z_spectestZ_print_i64(Z_spectest_instance_t* instance, uint64_t i) {
+void w2c_spectest_print_i64(w2c_spectest* instance, uint64_t i) {
printf("spectest.print_i64(%" PRIu64 ")\n", i);
}
-void Z_spectestZ_print_f32(Z_spectest_instance_t* instance, float f) {
+void w2c_spectest_print_f32(w2c_spectest* instance, float f) {
printf("spectest.print_f32(%g)\n", f);
}
-void Z_spectestZ_print_i32_f32(Z_spectest_instance_t* instance,
- uint32_t i,
- float f) {
+void w2c_spectest_print_i32_f32(w2c_spectest* instance, uint32_t i, float f) {
printf("spectest.print_i32_f32(%d %g)\n", i, f);
}
-void Z_spectestZ_print_f64(Z_spectest_instance_t* instance, double d) {
+void w2c_spectest_print_f64(w2c_spectest* instance, double d) {
printf("spectest.print_f64(%g)\n", d);
}
-void Z_spectestZ_print_f64_f64(Z_spectest_instance_t* instance,
- double d1,
- double d2) {
+void w2c_spectest_print_f64_f64(w2c_spectest* instance, double d1, double d2) {
printf("spectest.print_f64_f64(%g %g)\n", d1, d2);
}
-wasm_rt_funcref_table_t* Z_spectestZ_table(Z_spectest_instance_t* instance) {
+wasm_rt_funcref_table_t* w2c_spectest_table(w2c_spectest* instance) {
return &instance->spectest_table;
}
-wasm_rt_memory_t* Z_spectestZ_memory(Z_spectest_instance_t* instance) {
+wasm_rt_memory_t* w2c_spectest_memory(w2c_spectest* instance) {
return &instance->spectest_memory;
}
-uint32_t* Z_spectestZ_global_i32(Z_spectest_instance_t* instance) {
+uint32_t* w2c_spectest_global_i32(w2c_spectest* instance) {
return &instance->spectest_global_i32;
}
-uint64_t* Z_spectestZ_global_i64(Z_spectest_instance_t* instance) {
+uint64_t* w2c_spectest_global_i64(w2c_spectest* instance) {
return &instance->spectest_global_i64;
}
-float* Z_spectestZ_global_f32(Z_spectest_instance_t* instance) {
+float* w2c_spectest_global_f32(w2c_spectest* instance) {
return &instance->spectest_global_f32;
}
-double* Z_spectestZ_global_f64(Z_spectest_instance_t* instance) {
+double* w2c_spectest_global_f64(w2c_spectest* instance) {
return &instance->spectest_global_f64;
}
-static void init_spectest_module(Z_spectest_instance_t* instance) {
+static void init_spectest_module(w2c_spectest* instance) {
instance->spectest_global_i32 = 666;
instance->spectest_global_i64 = 666l;
wasm_rt_allocate_memory(&instance->spectest_memory, 1, 2, false);
@@ -356,7 +352,7 @@ static void init_spectest_module(Z_spectest_instance_t* instance) {
int main(int argc, char** argv) {
wasm_rt_init();
- init_spectest_module(&Z_spectest_instance);
+ init_spectest_module(&spectest_instance);
run_spec_tests();
printf("%u/%u tests passed.\n", g_tests_passed, g_tests_run);
wasm_rt_free();
diff --git a/test/wasm2c/add.txt b/test/wasm2c/add.txt
index 4cd3c835..125f3152 100644
--- a/test/wasm2c/add.txt
+++ b/test/wasm2c/add.txt
@@ -40,16 +40,16 @@ typedef simde_v128_t v128;
extern "C" {
#endif
-typedef struct Z_test_instance_t {
+typedef struct w2c_test {
char dummy_member;
-} Z_test_instance_t;
+} w2c_test;
-void Z_test_instantiate(Z_test_instance_t*);
-void Z_test_free(Z_test_instance_t*);
-wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_count, ...);
+void wasm2c_test_instantiate(w2c_test*);
+void wasm2c_test_free(w2c_test*);
+wasm_rt_func_type_t wasm2c_test_get_func_type(uint32_t param_count, uint32_t result_count, ...);
/* export: 'add' */
-u32 Z_testZ_add(Z_test_instance_t*, u32, u32);
+u32 w2c_test_add(w2c_test*, u32, u32);
#ifdef __cplusplus
}
@@ -782,11 +782,11 @@ DEFINE_TABLE_FILL(externref)
#define FUNC_TYPE_T(x) static const char x[]
#endif
-FUNC_TYPE_T(w2c_t0) = "\x92\xfb\x6a\xdf\x49\x07\x0a\x83\xbe\x08\x02\x68\xcd\xf6\x95\x27\x4a\xc2\xf3\xe5\xe4\x7d\x29\x49\xe8\xed\x42\x92\x6a\x9d\xda\xf0";
+FUNC_TYPE_T(w2c_test_t0) = "\x92\xfb\x6a\xdf\x49\x07\x0a\x83\xbe\x08\x02\x68\xcd\xf6\x95\x27\x4a\xc2\xf3\xe5\xe4\x7d\x29\x49\xe8\xed\x42\x92\x6a\x9d\xda\xf0";
-static u32 w2c_add(Z_test_instance_t*, u32, u32);
+static u32 w2c_test_add_0(w2c_test*, u32, u32);
-static u32 w2c_add(Z_test_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
+static u32 w2c_test_add_0(w2c_test* instance, u32 w2c_p0, u32 w2c_p1) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1;
w2c_i0 = w2c_p0;
@@ -797,25 +797,25 @@ static u32 w2c_add(Z_test_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
}
/* export: 'add' */
-u32 Z_testZ_add(Z_test_instance_t* instance, u32 w2c_p0, u32 w2c_p1) {
- return w2c_add(instance, w2c_p0, w2c_p1);
+u32 w2c_test_add(w2c_test* instance, u32 w2c_p0, u32 w2c_p1) {
+ return w2c_test_add_0(instance, w2c_p0, w2c_p1);
}
-void Z_test_instantiate(Z_test_instance_t* instance) {
+void wasm2c_test_instantiate(w2c_test* instance) {
assert(wasm_rt_is_initialized());
}
-void Z_test_free(Z_test_instance_t* instance) {
+void wasm2c_test_free(w2c_test* instance) {
}
-wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_count, ...) {
+wasm_rt_func_type_t wasm2c_test_get_func_type(uint32_t param_count, uint32_t result_count, ...) {
va_list args;
if (param_count == 2 && result_count == 1) {
va_start(args, result_count);
if (true && va_arg(args, wasm_rt_type_t) == WASM_RT_I32 && va_arg(args, wasm_rt_type_t) == WASM_RT_I32 && va_arg(args, wasm_rt_type_t) == WASM_RT_I32) {
va_end(args);
- return w2c_t0;
+ return w2c_test_t0;
}
va_end(args);
}
diff --git a/test/wasm2c/hello.txt b/test/wasm2c/hello.txt
index 4e756743..3eef2cc4 100644
--- a/test/wasm2c/hello.txt
+++ b/test/wasm2c/hello.txt
@@ -58,28 +58,28 @@ typedef simde_v128_t v128;
extern "C" {
#endif
-struct Z_wasi_snapshot_preview1_instance_t;
+struct w2c_wasi__snapshot__preview1;
-typedef struct Z_test_instance_t {
- struct Z_wasi_snapshot_preview1_instance_t* Z_wasi_snapshot_preview1_instance;
+typedef struct w2c_test {
+ struct w2c_wasi__snapshot__preview1* w2c_wasi__snapshot__preview1_instance;
wasm_rt_memory_t w2c_memory;
wasm_rt_funcref_table_t w2c_T0;
-} Z_test_instance_t;
+} w2c_test;
-void Z_test_instantiate(Z_test_instance_t*, struct Z_wasi_snapshot_preview1_instance_t*);
-void Z_test_free(Z_test_instance_t*);
-wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_count, ...);
+void wasm2c_test_instantiate(w2c_test*, struct w2c_wasi__snapshot__preview1*);
+void wasm2c_test_free(w2c_test*);
+wasm_rt_func_type_t wasm2c_test_get_func_type(uint32_t param_count, uint32_t result_count, ...);
/* import: 'wasi_snapshot_preview1' 'fd_write' */
-u32 Z_wasi_snapshot_preview1Z_fd_write(struct Z_wasi_snapshot_preview1_instance_t*, u32, u32, u32, u32);
+u32 w2c_wasi__snapshot__preview1_fd_write(struct w2c_wasi__snapshot__preview1*, u32, u32, u32, u32);
/* import: 'wasi_snapshot_preview1' 'proc_exit' */
-void Z_wasi_snapshot_preview1Z_proc_exit(struct Z_wasi_snapshot_preview1_instance_t*, u32);
+void w2c_wasi__snapshot__preview1_proc_exit(struct w2c_wasi__snapshot__preview1*, u32);
/* export: 'memory' */
-wasm_rt_memory_t* Z_testZ_memory(Z_test_instance_t* instance);
+wasm_rt_memory_t* w2c_test_memory(w2c_test* instance);
/* export: '_start' */
-void Z_testZ__start(Z_test_instance_t*);
+void w2c_test_0x5Fstart(w2c_test*);
#ifdef __cplusplus
}
@@ -812,37 +812,37 @@ DEFINE_TABLE_FILL(externref)
#define FUNC_TYPE_T(x) static const char x[]
#endif
-FUNC_TYPE_T(w2c_t0) = "\xf6\x98\x1b\xc6\x10\xda\xb7\xb2\x63\x37\xcd\xdc\x72\xca\xe9\x50\x00\x13\xba\x10\x6c\xde\x87\x27\x10\xf8\x86\x2f\xe3\xdb\x94\xe4";
-FUNC_TYPE_T(w2c_t1) = "\x89\x3a\x3d\x2c\x8f\x4d\x7f\x6d\x6c\x9d\x62\x67\x29\xaf\x3d\x44\x39\x8e\xc3\xf3\xe8\x51\xc1\x99\xb9\xdd\x9f\xd5\x3d\x1f\xd3\xe4";
-FUNC_TYPE_T(w2c_t2) = "\x36\xa9\xe7\xf1\xc9\x5b\x82\xff\xb9\x97\x43\xe0\xc5\xc4\xce\x95\xd8\x3c\x9a\x43\x0a\xac\x59\xf8\x4e\xf3\xcb\xfa\xb6\x14\x50\x68";
+FUNC_TYPE_T(w2c_test_t0) = "\xf6\x98\x1b\xc6\x10\xda\xb7\xb2\x63\x37\xcd\xdc\x72\xca\xe9\x50\x00\x13\xba\x10\x6c\xde\x87\x27\x10\xf8\x86\x2f\xe3\xdb\x94\xe4";
+FUNC_TYPE_T(w2c_test_t1) = "\x89\x3a\x3d\x2c\x8f\x4d\x7f\x6d\x6c\x9d\x62\x67\x29\xaf\x3d\x44\x39\x8e\xc3\xf3\xe8\x51\xc1\x99\xb9\xdd\x9f\xd5\x3d\x1f\xd3\xe4";
+FUNC_TYPE_T(w2c_test_t2) = "\x36\xa9\xe7\xf1\xc9\x5b\x82\xff\xb9\x97\x43\xe0\xc5\xc4\xce\x95\xd8\x3c\x9a\x43\x0a\xac\x59\xf8\x4e\xf3\xcb\xfa\xb6\x14\x50\x68";
-static void w2c__start(Z_test_instance_t*);
+static void w2c_test_0x5Fstart_0(w2c_test*);
-static const u8 data_segment_data_w2c_d0[] = {
+static const u8 data_segment_data_w2c_test_d0[] = {
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64,
0x2e, 0x0a,
};
-static void init_memories(Z_test_instance_t* instance) {
+static void init_memories(w2c_test* instance) {
wasm_rt_allocate_memory(&instance->w2c_memory, 1, 65536, 0);
- LOAD_DATA(instance->w2c_memory, 8u, data_segment_data_w2c_d0, 14);
+ LOAD_DATA(instance->w2c_memory, 8u, data_segment_data_w2c_test_d0, 14);
}
-static void init_data_instances(Z_test_instance_t *instance) {
+static void init_data_instances(w2c_test *instance) {
}
-static const wasm_elem_segment_expr_t elem_segment_exprs_w2c_e0[] = {
- {w2c_t0, (wasm_rt_function_ptr_t)Z_wasi_snapshot_preview1Z_fd_write, offsetof(Z_test_instance_t, Z_wasi_snapshot_preview1_instance)},
+static const wasm_elem_segment_expr_t elem_segment_exprs_w2c_test_e0[] = {
+ {w2c_test_t0, (wasm_rt_function_ptr_t)w2c_wasi__snapshot__preview1_fd_write, offsetof(w2c_test, w2c_wasi__snapshot__preview1_instance)},
};
-static void init_tables(Z_test_instance_t* instance) {
+static void init_tables(w2c_test* instance) {
wasm_rt_allocate_funcref_table(&instance->w2c_T0, 1, 1);
- funcref_table_init(&instance->w2c_T0, elem_segment_exprs_w2c_e0, 1, 0u, 0, 1, instance);
+ funcref_table_init(&instance->w2c_T0, elem_segment_exprs_w2c_test_e0, 1, 0u, 0, 1, instance);
}
-static void init_elem_instances(Z_test_instance_t *instance) {
+static void init_elem_instances(w2c_test *instance) {
}
-static void w2c__start(Z_test_instance_t* instance) {
+static void w2c_test_0x5Fstart_0(w2c_test* instance) {
FUNC_PROLOGUE;
u32 w2c_i0, w2c_i1, w2c_i2, w2c_i3, w2c_i4;
w2c_i0 = 0u;
@@ -856,47 +856,47 @@ static void w2c__start(Z_test_instance_t* instance) {
w2c_i2 = 1u;
w2c_i3 = 0u;
w2c_i4 = 0u;
- w2c_i0 = CALL_INDIRECT(instance->w2c_T0, u32 (*)(void*, u32, u32, u32, u32), w2c_t0, w2c_i4, instance->w2c_T0.data[w2c_i4].module_instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
- (*Z_wasi_snapshot_preview1Z_proc_exit)(instance->Z_wasi_snapshot_preview1_instance, w2c_i0);
+ w2c_i0 = CALL_INDIRECT(instance->w2c_T0, u32 (*)(void*, u32, u32, u32, u32), w2c_test_t0, w2c_i4, instance->w2c_T0.data[w2c_i4].module_instance, w2c_i0, w2c_i1, w2c_i2, w2c_i3);
+ (*w2c_wasi__snapshot__preview1_proc_exit)(instance->w2c_wasi__snapshot__preview1_instance, w2c_i0);
FUNC_EPILOGUE;
}
/* export: 'memory' */
-wasm_rt_memory_t* Z_testZ_memory(Z_test_instance_t* instance) {
+wasm_rt_memory_t* w2c_test_memory(w2c_test* instance) {
return &instance->w2c_memory;
}
/* export: '_start' */
-void Z_testZ__start(Z_test_instance_t* instance) {
- return w2c__start(instance);
+void w2c_test_0x5Fstart(w2c_test* instance) {
+ return w2c_test_0x5Fstart_0(instance);
}
-static void init_instance_import(Z_test_instance_t* instance, struct Z_wasi_snapshot_preview1_instance_t* Z_wasi_snapshot_preview1_instance){
- instance->Z_wasi_snapshot_preview1_instance = Z_wasi_snapshot_preview1_instance;
+static void init_instance_import(w2c_test* instance, struct w2c_wasi__snapshot__preview1* w2c_wasi__snapshot__preview1_instance){
+ instance->w2c_wasi__snapshot__preview1_instance = w2c_wasi__snapshot__preview1_instance;
}
-void Z_test_instantiate(Z_test_instance_t* instance, struct Z_wasi_snapshot_preview1_instance_t* Z_wasi_snapshot_preview1_instance) {
+void wasm2c_test_instantiate(w2c_test* instance, struct w2c_wasi__snapshot__preview1* w2c_wasi__snapshot__preview1_instance) {
assert(wasm_rt_is_initialized());
- init_instance_import(instance, Z_wasi_snapshot_preview1_instance);
+ init_instance_import(instance, w2c_wasi__snapshot__preview1_instance);
init_memories(instance);
init_tables(instance);
init_data_instances(instance);
init_elem_instances(instance);
}
-void Z_test_free(Z_test_instance_t* instance) {
+void wasm2c_test_free(w2c_test* instance) {
wasm_rt_free_funcref_table(&instance->w2c_T0);
wasm_rt_free_memory(&instance->w2c_memory);
}
-wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_count, ...) {
+wasm_rt_func_type_t wasm2c_test_get_func_type(uint32_t param_count, uint32_t result_count, ...) {
va_list args;
if (param_count == 4 && result_count == 1) {
va_start(args, result_count);
if (true && va_arg(args, wasm_rt_type_t) == WASM_RT_I32 && va_arg(args, wasm_rt_type_t) == WASM_RT_I32 && va_arg(args, wasm_rt_type_t) == WASM_RT_I32 && va_arg(args, wasm_rt_type_t) == WASM_RT_I32 && va_arg(args, wasm_rt_type_t) == WASM_RT_I32) {
va_end(args);
- return w2c_t0;
+ return w2c_test_t0;
}
va_end(args);
}
@@ -905,7 +905,7 @@ wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_c
va_start(args, result_count);
if (true && va_arg(args, wasm_rt_type_t) == WASM_RT_I32) {
va_end(args);
- return w2c_t1;
+ return w2c_test_t1;
}
va_end(args);
}
@@ -914,7 +914,7 @@ wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_c
va_start(args, result_count);
if (true) {
va_end(args);
- return w2c_t2;
+ return w2c_test_t2;
}
va_end(args);
}
diff --git a/test/wasm2c/minimal.txt b/test/wasm2c/minimal.txt
index bfee1a53..e56187f2 100644
--- a/test/wasm2c/minimal.txt
+++ b/test/wasm2c/minimal.txt
@@ -37,13 +37,13 @@ typedef simde_v128_t v128;
extern "C" {
#endif
-typedef struct Z_test_instance_t {
+typedef struct w2c_test {
char dummy_member;
-} Z_test_instance_t;
+} w2c_test;
-void Z_test_instantiate(Z_test_instance_t*);
-void Z_test_free(Z_test_instance_t*);
-wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_count, ...);
+void wasm2c_test_instantiate(w2c_test*);
+void wasm2c_test_free(w2c_test*);
+wasm_rt_func_type_t wasm2c_test_get_func_type(uint32_t param_count, uint32_t result_count, ...);
#ifdef __cplusplus
}
@@ -776,14 +776,14 @@ DEFINE_TABLE_FILL(externref)
#define FUNC_TYPE_T(x) static const char x[]
#endif
-void Z_test_instantiate(Z_test_instance_t* instance) {
+void wasm2c_test_instantiate(w2c_test* instance) {
assert(wasm_rt_is_initialized());
}
-void Z_test_free(Z_test_instance_t* instance) {
+void wasm2c_test_free(w2c_test* instance) {
}
-wasm_rt_func_type_t Z_test_get_func_type(uint32_t param_count, uint32_t result_count, ...) {
+wasm_rt_func_type_t wasm2c_test_get_func_type(uint32_t param_count, uint32_t result_count, ...) {
va_list args;
return NULL;