summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/run-spec-wasm2c.py15
-rw-r--r--test/spec-wasm2c-prefix.c18
2 files changed, 9 insertions, 24 deletions
diff --git a/test/run-spec-wasm2c.py b/test/run-spec-wasm2c.py
index 7ecdc5f8..3e7f7574 100755
--- a/test/run-spec-wasm2c.py
+++ b/test/run-spec-wasm2c.py
@@ -311,24 +311,11 @@ class CWriter(object):
def _CompareList(self, consts):
return ' && '.join(self._Compare(num, const) for num, const in enumerate(consts))
- def _ActionSig(self, action, expected):
- type_ = action['type']
- result_types = [result['type'] for result in expected]
- arg_types = [arg['type'] for arg in action.get('args', [])]
- if type_ == 'invoke':
- return MangleTypes(result_types) + MangleTypes(arg_types)
- elif type_ == 'get':
- return MangleType(result_types[0])
- else:
- raise Error('Unexpected action type: %s' % type_)
-
def _Action(self, command):
action = command['action']
- expected = command['expected']
type_ = action['type']
mangled_module_name = self.GetModulePrefix(action.get('module'))
- field = (mangled_module_name + MangleName(action['field']) +
- MangleName(self._ActionSig(action, expected)))
+ field = mangled_module_name + MangleName(action['field'])
if type_ == 'invoke':
return '%s(%s)' % (field, self._ConstantList(action.get('args', [])))
elif type_ == 'get':
diff --git a/test/spec-wasm2c-prefix.c b/test/spec-wasm2c-prefix.c
index bad8f647..4415be6f 100644
--- a/test/spec-wasm2c-prefix.c
+++ b/test/spec-wasm2c-prefix.c
@@ -235,18 +235,16 @@ static wasm_rt_memory_t spectest_memory;
static uint32_t spectest_global_i32 = 666;
static uint64_t spectest_global_i64 = 666l;
-void (*Z_spectestZ_printZ_vv)(void) = &spectest_print;
-void (*Z_spectestZ_print_i32Z_vi)(uint32_t) = &spectest_print_i32;
-void (*Z_spectestZ_print_f32Z_vf)(float) = &spectest_print_f32;
-void (*Z_spectestZ_print_i32_f32Z_vif)(uint32_t,
- float) = &spectest_print_i32_f32;
-void (*Z_spectestZ_print_f64Z_vd)(double) = &spectest_print_f64;
-void (*Z_spectestZ_print_f64_f64Z_vdd)(double,
- double) = &spectest_print_f64_f64;
+void (*Z_spectestZ_print)(void) = &spectest_print;
+void (*Z_spectestZ_print_i32)(uint32_t) = &spectest_print_i32;
+void (*Z_spectestZ_print_f32)(float) = &spectest_print_f32;
+void (*Z_spectestZ_print_i32_f32)(uint32_t, float) = &spectest_print_i32_f32;
+void (*Z_spectestZ_print_f64)(double) = &spectest_print_f64;
+void (*Z_spectestZ_print_f64_f64)(double, double) = &spectest_print_f64_f64;
wasm_rt_table_t* Z_spectestZ_table = &spectest_table;
wasm_rt_memory_t* Z_spectestZ_memory = &spectest_memory;
-uint32_t* Z_spectestZ_global_i32Z_i = &spectest_global_i32;
-uint64_t* Z_spectestZ_global_i64Z_j = &spectest_global_i64;
+uint32_t* Z_spectestZ_global_i32 = &spectest_global_i32;
+uint64_t* Z_spectestZ_global_i64 = &spectest_global_i64;
static void init_spectest_module(void) {
wasm_rt_allocate_memory(&spectest_memory, 1, 2);