diff options
author | Ben Smith <binjimin@gmail.com> | 2017-02-01 16:46:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 16:46:08 -0800 |
commit | 8c9e3047d943425b85db9bba7b8b7dfffdfb946f (patch) | |
tree | 642d92189cc9a84607cabbb912b39ca8a76cb417 /demo/demo.js | |
parent | 4fdbb4647c519a42f3e54ed7a858194780ca2ae4 (diff) | |
download | wabt-8c9e3047d943425b85db9bba7b8b7dfffdfb946f.tar.gz wabt-8c9e3047d943425b85db9bba7b8b7dfffdfb946f.tar.bz2 wabt-8c9e3047d943425b85db9bba7b8b7dfffdfb946f.zip |
Update emscripten build and demo (#300)
Diffstat (limited to 'demo/demo.js')
-rw-r--r-- | demo/demo.js | 9 |
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]); |