diff options
Diffstat (limited to 'editors/vscode/client/vmproc.js')
| -rw-r--r-- | editors/vscode/client/vmproc.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editors/vscode/client/vmproc.js b/editors/vscode/client/vmproc.js index 8ce8c52..6b57554 100644 --- a/editors/vscode/client/vmproc.js +++ b/editors/vscode/client/vmproc.js @@ -16,6 +16,7 @@ function vmProcess(dir, opts = {}) { const log = opts.log || (() => {}); const { TinyVM } = require(path.join(dir, 'tinyvm.js')); const image = require(path.join(dir, 'lsp.json')); + const words = require('fs').readFileSync(path.join(dir, 'lsp.bin')); const proc = new EventEmitter(); const out = new EventEmitter(); const err = new EventEmitter(); @@ -33,8 +34,8 @@ function vmProcess(dir, opts = {}) { err.emit('data', Buffer.from(m, 'utf8')); }, }); - vm.loadGenome(image.words, image.gorg); - log('message', 'loaded the image: ' + image.words.length + ' words, code at ' + image.gorg); + const loaded = vm.loadImage(words, image.gorg); + log('message', 'loaded the image: ' + loaded + ' words, code at ' + image.gorg); const flush = () => { if (pending.length) { |
