From e773dfd026ff939e9f4cb91816863bdc5292ff4e Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 21 Jun 2021 21:24:11 -0700 Subject: [EH] Make tag's attribute encoding detail (#3947) This removes `attribute` field from `Tag` class, making the reserved and unused field known only to binary encoder and decoder. This also removes the `attribute` parameter from `makeTag` and `addTag` methods in wasm-builder.h, C API, and Binaryen JS API. Suggested in https://github.com/WebAssembly/binaryen/pull/3946#pullrequestreview-687756523. --- src/js/binaryen.js-post.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/js/binaryen.js-post.js') diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index c33916734..d86cb07af 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -2396,8 +2396,8 @@ function wrapModule(module, self = {}) { self['removeElementSegment'] = function(name) { return preserveStack(() => Module['_BinaryenRemoveElementSegment'](module, strToStack(name))); }; - self['addTag'] = function(name, attribute, params, results) { - return preserveStack(() => Module['_BinaryenAddTag'](module, strToStack(name), attribute, params, results)); + self['addTag'] = function(name, params, results) { + return preserveStack(() => Module['_BinaryenAddTag'](module, strToStack(name), params, results)); }; self['getTag'] = function(name) { return preserveStack(() => Module['_BinaryenGetTag'](module, strToStack(name))); @@ -2425,9 +2425,9 @@ function wrapModule(module, self = {}) { Module['_BinaryenAddGlobalImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), globalType, mutable) ); }; - self['addTagImport'] = function(internalName, externalModuleName, externalBaseName, attribute, params, results) { + self['addTagImport'] = function(internalName, externalModuleName, externalBaseName, params, results) { return preserveStack(() => - Module['_BinaryenAddTagImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), attribute, params, results) + Module['_BinaryenAddTagImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), params, results) ); }; self['addExport'] = // deprecated @@ -3212,7 +3212,6 @@ Module['getTagInfo'] = function(tag) { 'name': UTF8ToString(Module['_BinaryenTagGetName'](tag)), 'module': UTF8ToString(Module['_BinaryenTagImportGetModule'](tag)), 'base': UTF8ToString(Module['_BinaryenTagImportGetBase'](tag)), - 'attribute': Module['_BinaryenTagGetAttribute'](tag), 'params': Module['_BinaryenTagGetParams'](tag), 'results': Module['_BinaryenTagGetResults'](tag) }; -- cgit v1.2.3