Source code
Revision control
Copy as Markdown
Other Tools
(function throw_wast_js() {
// throw.wast:3
let $$1 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xa3\x80\x80\x80\x00\x08\x60\x00\x00\x60\x01\x7f\x00\x60\x01\x7d\x00\x60\x01\x7e\x00\x60\x01\x7c\x00\x60\x02\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x60\x00\x02\x7f\x7f\x03\x89\x80\x80\x80\x00\x08\x06\x02\x03\x04\x00\x00\x00\x00\x0d\x8d\x80\x80\x80\x00\x06\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x07\x81\x81\x80\x80\x00\x07\x08\x74\x68\x72\x6f\x77\x2d\x69\x66\x00\x00\x0f\x74\x68\x72\x6f\x77\x2d\x70\x61\x72\x61\x6d\x2d\x66\x33\x32\x00\x01\x0f\x74\x68\x72\x6f\x77\x2d\x70\x61\x72\x61\x6d\x2d\x69\x36\x34\x00\x02\x0f\x74\x68\x72\x6f\x77\x2d\x70\x61\x72\x61\x6d\x2d\x66\x36\x34\x00\x03\x11\x74\x68\x72\x6f\x77\x2d\x70\x6f\x6c\x79\x6d\x6f\x72\x70\x68\x69\x63\x00\x04\x17\x74\x68\x72\x6f\x77\x2d\x70\x6f\x6c\x79\x6d\x6f\x72\x70\x68\x69\x63\x2d\x62\x6c\x6f\x63\x6b\x00\x05\x0e\x74\x65\x73\x74\x2d\x74\x68\x72\x6f\x77\x2d\x31\x2d\x32\x00\x07\x0a\xfd\x80\x80\x80\x00\x08\x8e\x80\x80\x80\x00\x00\x20\x00\x41\x00\x47\x04\x40\x08\x00\x0b\x41\x00\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x08\x02\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x08\x03\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x08\x04\x0b\x86\x80\x80\x80\x00\x00\x08\x00\x08\x01\x0b\x89\x80\x80\x80\x00\x00\x02\x7f\x08\x00\x0b\x08\x01\x0b\x88\x80\x80\x80\x00\x00\x41\x01\x41\x02\x08\x05\x0b\x9d\x80\x80\x80\x00\x00\x02\x07\x1f\x40\x01\x00\x05\x00\x10\x06\x0b\x0f\x0b\x41\x02\x47\x04\x40\x00\x0b\x41\x01\x47\x04\x40\x00\x0b\x0b", "throw.wast:3");
// throw.wast:3
let $1 = instance($$1);
// throw.wast:38
assert_return(() => call($1, "throw-if", [0]), "throw.wast:38", 0);
// throw.wast:39
assert_exception(() => call($1, "throw-if", [10]), "throw.wast:39");
// throw.wast:40
assert_exception(() => call($1, "throw-if", [-1]), "throw.wast:40");
// throw.wast:42
assert_exception(() => call(instance(module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x93\x80\x80\x80\x00\x04\x60\x00\x00\x60\x01\x7f\x01\x6e\x60\x02\x6d\x6d\x01\x7f\x60\x01\x7d\x00\x02\xbf\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x0f\x74\x68\x72\x6f\x77\x2d\x70\x61\x72\x61\x6d\x2d\x66\x33\x32\x00\x03\x08\x73\x70\x65\x63\x74\x65\x73\x74\x07\x68\x6f\x73\x74\x72\x65\x66\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x06\x65\x71\x5f\x72\x65\x66\x00\x02\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x03\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x02\x40\x43\x00\x00\xa0\x40\x10\x00\x0f\x0b\x00\x0b", "wrapper"), exports($1)), "run", []), "throw.wast:42"); // assert_exception(() => call($1, "throw-param-f32", [5.]), "throw.wast:42")
// throw.wast:43
assert_exception(() => call($1, "throw-param-i64", [5n]), "throw.wast:43");
// throw.wast:44
assert_exception(() => call(instance(module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x93\x80\x80\x80\x00\x04\x60\x00\x00\x60\x01\x7f\x01\x6e\x60\x02\x6d\x6d\x01\x7f\x60\x01\x7c\x00\x02\xbf\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x0f\x74\x68\x72\x6f\x77\x2d\x70\x61\x72\x61\x6d\x2d\x66\x36\x34\x00\x03\x08\x73\x70\x65\x63\x74\x65\x73\x74\x07\x68\x6f\x73\x74\x72\x65\x66\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x06\x65\x71\x5f\x72\x65\x66\x00\x02\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x03\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x44\x00\x00\x00\x00\x00\x00\x14\x40\x10\x00\x0f\x0b\x00\x0b", "wrapper"), exports($1)), "run", []), "throw.wast:44"); // assert_exception(() => call($1, "throw-param-f64", [5.]), "throw.wast:44")
// throw.wast:46
assert_exception(() => call($1, "throw-polymorphic", []), "throw.wast:46");
// throw.wast:47
assert_exception(() => call($1, "throw-polymorphic-block", []), "throw.wast:47");
// throw.wast:49
assert_return(() => call($1, "test-throw-1-2", []), "throw.wast:49");
// throw.wast:51
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x08\x00\x0b", "throw.wast:51");
// throw.wast:52
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x01\x7f\x00\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x01\x0d\x83\x80\x80\x80\x00\x01\x00\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x08\x00\x0b", "throw.wast:52");
// throw.wast:54
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x01\x7f\x00\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x01\x0d\x83\x80\x80\x80\x00\x01\x00\x00\x0a\x8c\x80\x80\x80\x00\x01\x86\x80\x80\x80\x00\x00\x42\x05\x08\x00\x0b", "throw.wast:54");
reinitializeRegistry();
})();