blob: 7102679a9d11a1be81308d617b97dac9aa7f30ee [file] [log] [blame]
import Builder from '../Builder.js'
import * as assert from '../assert.js'
{
const b = new Builder();
b.Type().End()
.Function().End()
.Exception().Signature({ params: []}).End()
.Export()
.Function("throw")
.Exception("tag", 0)
.End()
.Code()
.Function("throw", { params: [], ret: "void" })
.Try("void")
.Throw(0)
.Catch(0)
.End()
.End()
.End()
const bin = b.WebAssembly().get();
const module = new WebAssembly.Module(bin);
{
let inst = new WebAssembly.Instance(module);
inst.exports.throw();
}
{
let inst = new WebAssembly.Instance(module);
inst.exports.throw();
}
}