/** * Debug Interface * This expose some functions that can help with debugging wast */ // This is ASCII only function Uint8ArrayToString (input) { return String.fromCharCode.apply(null, input) } function Uint8ArrayToHexString (input) { var ret = '' for (var i = 0; i < input.length; i++) { ret += input[i].toString(16) } return ret } module.exports = class DebugInterface { setModule (mod) { this.module = mod } get exportTable () { return { 'print': function (offset = 0, length = 100) { console.log(``) }.bind(this), 'printHex': function (offset = 0, length = 100) { console.log(``) }.bind(this) } } }