git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 8bb4a56dbe5e93628a52ae3c5ca8036755aea00f

add lazy defaults for debug functions

wanderer committed on 8/5/2016, 4:31:59 PM
Parent: bea202f2fdf8d657062f28fac0fbd23060d6fad3

Files changed

debugInterface.jschanged
debugInterface.jsView
@@ -22,13 +22,13 @@
2222 }
2323
2424 get exportTable () {
2525 return {
26- 'print': function (offset, length) {
26+ 'print': function (offset = 0, length = 100) {
2727 console.log(`<DEBUG(str): ${Uint8ArrayToString(new Uint8Array(this.module.exports.memory, offset, length))}>`)
2828 }.bind(this),
2929
30- 'printHex': function (offset, length) {
30+ 'printHex': function (offset = 0, length = 100) {
3131 console.log(`<DEBUG(hex): ${Uint8ArrayToHexString(new Uint8Array(this.module.exports.memory, offset, length))}>`)
3232 }.bind(this)
3333 }
3434 }

Built with git-ssb-web