summaryrefslogtreecommitdiff
path: root/demo/demo.js
diff options
context:
space:
mode:
Diffstat (limited to 'demo/demo.js')
-rw-r--r--demo/demo.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/demo/demo.js b/demo/demo.js
index 9493182b..8b8c4967 100644
--- a/demo/demo.js
+++ b/demo/demo.js
@@ -94,12 +94,13 @@ function onInputKeyDown(e) {
}
function compile(text) {
- wasm.ready.then(function() {
+ wabt.ready.then(function() {
output.textContent = '';
try {
- var stackAllocator = new wasm.StackAllocator(wasm.LibcAllocator);
- var script = wasm.parseAst(stackAllocator.allocator, 'test.wast', text);
- script.check();
+ var stackAllocator = new wabt.StackAllocator(wabt.LibcAllocator);
+ var script = wabt.parseAst(stackAllocator.allocator, 'test.wast', text);
+ script.resolveNames();
+ script.validate();
var binaryOutput = script.toBinary({log: true});
output.textContent = binaryOutput.log;
var blob = new Blob([binaryOutput.buffer]);