diff options
Diffstat (limited to 'test/run-spec-wasm2c.py')
-rwxr-xr-x | test/run-spec-wasm2c.py | 15 |
1 files changed, 1 insertions, 14 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': |