summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/js/binaryen.js-post.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 1bbf7f48e..1eef5757e 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -1909,7 +1909,7 @@ function wrapModule(module, self) {
buffer.set(HEAPU8.subarray(binaryPtr, binaryPtr + binaryBytes));
return typeof sourceMapUrl === 'undefined'
? buffer
- : { 'binary': buffer, 'sourceMap': Pointer_stringify(sourceMapPtr) };
+ : { 'binary': buffer, 'sourceMap': UTF8ToString(sourceMapPtr) };
} finally {
_free(binaryPtr);
if (sourceMapPtr) _free(sourceMapPtr);
@@ -1925,7 +1925,7 @@ function wrapModule(module, self) {
});
};
self['getDebugInfoFileName'] = function(index) {
- return Pointer_stringify(Module['_BinaryenModuleGetDebugInfoFileName'](module, index));
+ return UTF8ToString(Module['_BinaryenModuleGetDebugInfoFileName'](module, index));
};
self['setDebugLocation'] = function(func, expr, fileIndex, lineNumber, columnNumber) {
return Module['_BinaryenFunctionSetDebugLocation'](func, expr, fileIndex, lineNumber, columnNumber);
@@ -1986,7 +1986,7 @@ Module['getExpressionInfo'] = function(expr) {
return {
'id': id,
'type': type,
- 'name': Pointer_stringify(Module['_BinaryenBlockGetName'](expr)),
+ 'name': UTF8ToString(Module['_BinaryenBlockGetName'](expr)),
'children': getAllNested(expr, Module['_BinaryenBlockGetNumChildren'], Module['_BinaryenBlockGetChild'])
};
case Module['IfId']:
@@ -2001,14 +2001,14 @@ Module['getExpressionInfo'] = function(expr) {
return {
'id': id,
'type': type,
- 'name': Pointer_stringify(Module['_BinaryenLoopGetName'](expr)),
+ 'name': UTF8ToString(Module['_BinaryenLoopGetName'](expr)),
'body': Module['_BinaryenLoopGetBody'](expr)
};
case Module['BreakId']:
return {
'id': id,
'type': type,
- 'name': Pointer_stringify(Module['_BinaryenBreakGetName'](expr)),
+ 'name': UTF8ToString(Module['_BinaryenBreakGetName'](expr)),
'condition': Module['_BinaryenBreakGetCondition'](expr),
'value': Module['_BinaryenBreakGetValue'](expr)
};
@@ -2017,7 +2017,7 @@ Module['getExpressionInfo'] = function(expr) {
'id': id,
'type': type,
'names': getAllNested(expr, Module['_BinaryenSwitchGetNumNames'], Module['_BinaryenSwitchGetName']).map(Pointer_stringify),
- 'defaultName': Pointer_stringify(Module['_BinaryenSwitchGetDefaultName'](expr)),
+ 'defaultName': UTF8ToString(Module['_BinaryenSwitchGetDefaultName'](expr)),
'condition': Module['_BinaryenSwitchGetCondition'](expr),
'value': Module['_BinaryenSwitchGetValue'](expr)
};
@@ -2025,7 +2025,7 @@ Module['getExpressionInfo'] = function(expr) {
return {
'id': id,
'type': type,
- 'target': Pointer_stringify(Module['_BinaryenCallGetTarget'](expr)),
+ 'target': UTF8ToString(Module['_BinaryenCallGetTarget'](expr)),
'operands': getAllNested(expr, Module[ '_BinaryenCallGetNumOperands'], Module['_BinaryenCallGetOperand'])
};
case Module['CallIndirectId']:
@@ -2053,13 +2053,13 @@ Module['getExpressionInfo'] = function(expr) {
return {
'id': id,
'type': type,
- 'name': Pointer_stringify(Module['_BinaryenGetGlobalGetName'](expr))
+ 'name': UTF8ToString(Module['_BinaryenGetGlobalGetName'](expr))
};
case Module['SetGlobalId']:
return {
'id': id,
'type': type,
- 'name': Pointer_stringify(Module['_BinaryenSetGlobalGetName'](expr)),
+ 'name': UTF8ToString(Module['_BinaryenSetGlobalGetName'](expr)),
'value': Module['_BinaryenSetGlobalGetValue'](expr)
};
case Module['LoadId']:
@@ -2145,7 +2145,7 @@ Module['getExpressionInfo'] = function(expr) {
'id': id,
'type': type,
'op': Module['_BinaryenHostGetOp'](expr),
- 'nameOperand': Pointer_stringify(Module['_BinaryenHostGetNameOperand'](expr)),
+ 'nameOperand': UTF8ToString(Module['_BinaryenHostGetNameOperand'](expr)),
'operands': getAllNested(expr, Module['_BinaryenHostGetNumOperands'], Module['_BinaryenHostGetOperand'])
};
case Module['AtomicRMWId']:
@@ -2269,7 +2269,7 @@ Module['getExpressionInfo'] = function(expr) {
// Obtains information about a 'FunctionType'
Module['getFunctionTypeInfo'] = function(func) {
return {
- 'name': Pointer_stringify(Module['_BinaryenFunctionTypeGetName'](func)),
+ 'name': UTF8ToString(Module['_BinaryenFunctionTypeGetName'](func)),
'params': getAllNested(func, Module['_BinaryenFunctionTypeGetNumParams'], Module['_BinaryenFunctionTypeGetParam']),
'result': Module['_BinaryenFunctionTypeGetResult'](func)
};
@@ -2278,10 +2278,10 @@ Module['getFunctionTypeInfo'] = function(func) {
// Obtains information about a 'Function'
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)),
+ 'name': UTF8ToString(Module['_BinaryenFunctionGetName'](func)),
+ 'module': UTF8ToString(Module['_BinaryenFunctionImportGetModule'](func)),
+ 'base': UTF8ToString(Module['_BinaryenFunctionImportGetBase'](func)),
+ 'type': UTF8ToString(Module['_BinaryenFunctionGetType'](func)),
'params': getAllNested(func, Module['_BinaryenFunctionGetNumParams'], Module['_BinaryenFunctionGetParam']),
'result': Module['_BinaryenFunctionGetResult'](func),
'vars': getAllNested(func, Module['_BinaryenFunctionGetNumVars'], Module['_BinaryenFunctionGetVar']),
@@ -2292,10 +2292,10 @@ Module['getFunctionInfo'] = function(func) {
// Obtains information about a 'Global'
Module['getGlobalInfo'] = function(func) {
return {
- 'name': Pointer_stringify(Module['_BinaryenGlobalGetName'](func)),
- 'module': Pointer_stringify(Module['_BinaryenGlobalImportGetModule'](func)),
- 'base': Pointer_stringify(Module['_BinaryenGlobalImportGetBase'](func)),
- 'type': Pointer_stringify(Module['_BinaryenGlobalGetType'](func))
+ 'name': UTF8ToString(Module['_BinaryenGlobalGetName'](func)),
+ 'module': UTF8ToString(Module['_BinaryenGlobalImportGetModule'](func)),
+ 'base': UTF8ToString(Module['_BinaryenGlobalImportGetBase'](func)),
+ 'type': UTF8ToString(Module['_BinaryenGlobalGetType'](func))
};
};
@@ -2303,8 +2303,8 @@ Module['getGlobalInfo'] = function(func) {
Module['getExportInfo'] = function(export_) {
return {
'kind': Module['_BinaryenExportGetKind'](export_),
- 'name': Pointer_stringify(Module['_BinaryenExportGetName'](export_)),
- 'value': Pointer_stringify(Module['_BinaryenExportGetValue'](export_))
+ 'name': UTF8ToString(Module['_BinaryenExportGetName'](export_)),
+ 'value': UTF8ToString(Module['_BinaryenExportGetValue'](export_))
};
};