summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js')
-rw-r--r--src/js/binaryen.js-post.js35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 6b5aab0fc..6b4a0ae16 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -39,7 +39,6 @@ Module['LoopId'] = Module['_BinaryenLoopId']();
Module['BreakId'] = Module['_BinaryenBreakId']();
Module['SwitchId'] = Module['_BinaryenSwitchId']();
Module['CallId'] = Module['_BinaryenCallId']();
-Module['CallImportId'] = Module['_BinaryenCallImportId']();
Module['CallIndirectId'] = Module['_BinaryenCallIndirectId']();
Module['GetLocalId'] = Module['_BinaryenGetLocalId']();
Module['SetLocalId'] = Module['_BinaryenSetLocalId']();
@@ -250,11 +249,6 @@ Module['Module'] = function(module) {
return Module['_BinaryenCall'](module, strToStack(name), i32sToStack(operands), operands.length, type);
});
};
- this['callImport'] = this['call_import'] = function(name, operands, type) {
- return preserveStack(function() {
- return Module['_BinaryenCallImport'](module, strToStack(name), i32sToStack(operands), operands.length, type);
- });
- };
this['callIndirect'] = this['call_indirect'] = function(target, operands, type) {
return preserveStack(function() {
return Module['_BinaryenCallIndirect'](module, target, i32sToStack(operands), operands.length, strToStack(type));
@@ -1072,7 +1066,6 @@ Module['Module'] = function(module) {
return Module['_BinaryenAddGlobal'](module, strToStack(name), type, mutable, init);
});
}
- this['addImport'] = // deprecated
this['addFunctionImport'] = function(internalName, externalModuleName, externalBaseName, functionType) {
return preserveStack(function() {
return Module['_BinaryenAddFunctionImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), functionType);
@@ -1093,11 +1086,6 @@ Module['Module'] = function(module) {
return Module['_BinaryenAddGlobalImport'](module, strToStack(internalName), strToStack(externalModuleName), strToStack(externalBaseName), globalType);
});
};
- this['removeImport'] = function(internalName) {
- return preserveStack(function() {
- return Module['_BinaryenRemoveImport'](module, strToStack(internalName));
- });
- };
this['addExport'] = // deprecated
this['addFunctionExport'] = function(internalName, externalName) {
return preserveStack(function() {
@@ -1332,13 +1320,6 @@ Module['getExpressionInfo'] = function(expr) {
'target': Pointer_stringify(Module['_BinaryenCallGetTarget'](expr)),
'operands': getAllNested(expr, Module[ '_BinaryenCallGetNumOperands'], Module['_BinaryenCallGetOperand'])
};
- case Module['CallImportId']:
- return {
- 'id': id,
- 'type': type,
- 'target': Pointer_stringify(Module['_BinaryenCallImportGetTarget'](expr)),
- 'operands': getAllNested(expr, Module['_BinaryenCallImportGetNumOperands'], Module['_BinaryenCallImportGetOperand']),
- };
case Module['CallIndirectId']:
return {
'id': id,
@@ -1513,6 +1494,8 @@ Module['getFunctionTypeInfo'] = function(func) {
Module['getFunctionInfo'] = function(func) {
return {
'name': Pointer_stringify(Module['_BinaryenFunctionGetName'](func)),
+ 'module': Pointer_stringify(Module['_BinaryenFunctionImportGetModule'](func)),
+ 'base': Pointer_stringify(Module['_BinaryenFunctionImportGetBase'](func)),
'type': Pointer_stringify(Module['_BinaryenFunctionGetType'](func)),
'params': getAllNested(func, Module['_BinaryenFunctionGetNumParams'], Module['_BinaryenFunctionGetParam']),
'result': Module['_BinaryenFunctionGetResult'](func),
@@ -1521,15 +1504,13 @@ Module['getFunctionInfo'] = function(func) {
};
};
-// Obtains information about an 'Import'
-Module['getImportInfo'] = function(import_) {
+// Obtains information about a 'Global'
+Module['getGlobalInfo'] = function(func) {
return {
- 'kind': Module['_BinaryenImportGetKind'](import_),
- 'module': Pointer_stringify(Module['_BinaryenImportGetModule'](import_)),
- 'base': Pointer_stringify(Module['_BinaryenImportGetBase'](import_)),
- 'name': Pointer_stringify(Module['_BinaryenImportGetName'](import_)),
- 'globalType': Module['_BinaryenImportGetGlobalType'](import_),
- 'functionType': Pointer_stringify(Module['_BinaryenImportGetFunctionType'](import_))
+ 'name': Pointer_stringify(Module['_BinaryenGlobalGetName'](func)),
+ 'module': Pointer_stringify(Module['_BinaryenGlobalImportGetModule'](func)),
+ 'base': Pointer_stringify(Module['_BinaryenGlobalImportGetBase'](func)),
+ 'type': Pointer_stringify(Module['_BinaryenGlobalGetType'](func))
};
};