aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/vscode/client/extension.js2
-rw-r--r--editors/vscode/client/vmproc.js5
2 files changed, 4 insertions, 3 deletions
diff --git a/editors/vscode/client/extension.js b/editors/vscode/client/extension.js
index 3846eca..cd497d8 100644
--- a/editors/vscode/client/extension.js
+++ b/editors/vscode/client/extension.js
@@ -185,7 +185,7 @@ function shortKey(key) {
function serverStampFor(bin) {
if (bin) return fileStamp(bin);
const dir = path.join(__dirname, '..', 'server');
- return sha256(['lsp.wasm', 'lsp.json', 'tinyvm.js'].map(f => fileStamp(path.join(dir, f))).join(','));
+ return sha256(['lsp.wasm', 'lsp.json', 'lsp.bin', 'tinyvm.js'].map(f => fileStamp(path.join(dir, f))).join(','));
}
// the key of a document as it is now, and what it reads (for checking it again when one of those changes)
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) {