Source code
Revision control
Copy as Markdown
Other Tools
(function struct_wast_js() {
// struct.wast:3
let $$1 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xc7\x80\x80\x80\x00\x08\x5f\x00\x5f\x00\x5f\x01\x78\x00\x5f\x04\x78\x00\x78\x00\x78\x00\x78\x00\x5f\x02\x7f\x00\x7f\x00\x5f\x0a\x78\x00\x77\x00\x7f\x00\x7e\x00\x7d\x00\x7c\x00\x6e\x00\x70\x00\x64\x00\x00\x63\x01\x00\x5f\x05\x7f\x00\x7e\x00\x78\x00\x6c\x00\x6e\x00\x5f\x04\x7f\x00\x7d\x00\x7c\x00\x7f\x00", "struct.wast:3");
// struct.wast:3
let $1 = instance($$1);
// struct.wast:15
assert_malformed("\x3c\x6d\x61\x6c\x66\x6f\x72\x6d\x65\x64\x20\x71\x75\x6f\x74\x65\x3e", "struct.wast:15");
// struct.wast:25
let $$2 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xa6\x80\x80\x80\x00\x03\x4e\x02\x5f\x04\x64\x00\x00\x64\x01\x00\x64\x00\x00\x64\x01\x00\x5f\x04\x64\x00\x00\x64\x01\x00\x64\x00\x00\x64\x01\x00\x5f\x00\x60\x01\x64\x02\x00\x03\x82\x80\x80\x80\x00\x01\x03\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b", "struct.wast:25");
// struct.wast:25
let $2 = instance($$2);
// struct.wast:36
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x5f\x01\x64\x01\x00", "struct.wast:36");
// struct.wast:40
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x5f\x01\x64\x01\x01", "struct.wast:40");
// struct.wast:48
let $$3 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xa5\x80\x80\x80\x00\x06\x5f\x01\x7f\x00\x5f\x02\x7f\x00\x7d\x00\x5f\x03\x7f\x00\x7f\x00\x7e\x00\x60\x01\x64\x00\x01\x7f\x60\x01\x64\x01\x01\x7d\x60\x01\x64\x02\x01\x7e\x03\x84\x80\x80\x80\x00\x03\x03\x04\x05\x0a\xa8\x80\x80\x80\x00\x03\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x00\x00\x0b\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x01\x01\x0b\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x02\x02\x0b", "struct.wast:48");
// struct.wast:48
let $3 = instance($$3);
// struct.wast:58
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8f\x80\x80\x80\x00\x03\x5f\x01\x7e\x00\x5f\x01\x7f\x00\x60\x01\x64\x00\x01\x7f\x03\x82\x80\x80\x80\x00\x01\x02\x0a\x8e\x80\x80\x80\x00\x01\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x00\x00\x0b", "struct.wast:58");
// struct.wast:70
let $$4 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xa3\x80\x80\x80\x00\x06\x5f\x03\x7d\x00\x7d\x01\x7d\x00\x60\x00\x01\x6e\x60\x01\x64\x00\x01\x7d\x60\x00\x01\x7d\x60\x02\x64\x00\x7d\x01\x7d\x60\x01\x7d\x01\x7d\x03\x8e\x80\x80\x80\x00\x0d\x01\x02\x03\x02\x03\x02\x03\x02\x03\x04\x05\x04\x05\x06\x9e\x80\x80\x80\x00\x02\x64\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x00\x40\x43\x00\x00\x40\x40\xfb\x00\x00\x0b\x64\x00\x00\xfb\x01\x00\x0b\x07\xcb\x80\x80\x80\x00\x07\x03\x6e\x65\x77\x00\x00\x07\x67\x65\x74\x5f\x30\x5f\x30\x00\x02\x09\x67\x65\x74\x5f\x76\x65\x63\x5f\x30\x00\x04\x07\x67\x65\x74\x5f\x30\x5f\x79\x00\x06\x09\x67\x65\x74\x5f\x76\x65\x63\x5f\x79\x00\x08\x09\x73\x65\x74\x5f\x67\x65\x74\x5f\x79\x00\x0a\x09\x73\x65\x74\x5f\x67\x65\x74\x5f\x31\x00\x0c\x0a\xb5\x81\x80\x80\x00\x0d\x85\x80\x80\x80\x00\x00\xfb\x01\x00\x0b\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x00\x00\x0b\x87\x80\x80\x80\x00\x00\xfb\x01\x00\x10\x01\x0b\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x00\x00\x0b\x87\x80\x80\x80\x00\x00\xfb\x01\x00\x10\x03\x0b\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x00\x01\x0b\x87\x80\x80\x80\x00\x00\xfb\x01\x00\x10\x05\x0b\x88\x80\x80\x80\x00\x00\x20\x00\xfb\x02\x00\x01\x0b\x87\x80\x80\x80\x00\x00\xfb\x01\x00\x10\x07\x0b\x90\x80\x80\x80\x00\x00\x20\x00\x20\x01\xfb\x05\x00\x01\x20\x00\xfb\x02\x00\x01\x0b\x89\x80\x80\x80\x00\x00\xfb\x01\x00\x20\x00\x10\x09\x0b\x90\x80\x80\x80\x00\x00\x20\x00\x20\x01\xfb\x05\x00\x01\x20\x00\xfb\x02\x00\x01\x0b\x89\x80\x80\x80\x00\x00\xfb\x01\x00\x20\x00\x10\x0b\x0b", "struct.wast:70");
// struct.wast:70
let $4 = instance($$4);
// struct.wast:122
assert_return(() => call($4, "new", []), "struct.wast:122", "ref.struct");
// struct.wast:124
run(() => 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\x00\x01\x7d\x02\xb7\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x07\x67\x65\x74\x5f\x30\x5f\x30\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\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x00\x00\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", "wrapper"), exports($4)), "run", []), "struct.wast:124"); // assert_return(() => call($4, "get_0_0", []), "struct.wast:124", 0.)
// struct.wast:125
run(() => 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\x00\x01\x7d\x02\xb9\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x09\x67\x65\x74\x5f\x76\x65\x63\x5f\x30\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\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x00\x00\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", "wrapper"), exports($4)), "run", []), "struct.wast:125"); // assert_return(() => call($4, "get_vec_0", []), "struct.wast:125", 0.)
// struct.wast:126
run(() => 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\x00\x01\x7d\x02\xb7\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x07\x67\x65\x74\x5f\x30\x5f\x79\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\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x00\x00\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", "wrapper"), exports($4)), "run", []), "struct.wast:126"); // assert_return(() => call($4, "get_0_y", []), "struct.wast:126", 0.)
// struct.wast:127
run(() => 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\x00\x01\x7d\x02\xb9\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x09\x67\x65\x74\x5f\x76\x65\x63\x5f\x79\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\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x00\x00\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", "wrapper"), exports($4)), "run", []), "struct.wast:127"); // assert_return(() => call($4, "get_vec_y", []), "struct.wast:127", 0.)
// struct.wast:129
run(() => call(instance(module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x94\x80\x80\x80\x00\x04\x60\x00\x00\x60\x01\x7f\x01\x6e\x60\x02\x6d\x6d\x01\x7f\x60\x01\x7d\x01\x7d\x02\xb9\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x09\x73\x65\x74\x5f\x67\x65\x74\x5f\x79\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\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x02\x40\x43\x00\x00\xe0\x40\x10\x00\xbc\x43\x00\x00\xe0\x40\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", "wrapper"), exports($4)), "run", []), "struct.wast:129"); // assert_return(() => call($4, "set_get_y", [7.]), "struct.wast:129", 7.)
// struct.wast:130
run(() => call(instance(module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x94\x80\x80\x80\x00\x04\x60\x00\x00\x60\x01\x7f\x01\x6e\x60\x02\x6d\x6d\x01\x7f\x60\x01\x7d\x01\x7d\x02\xb9\x80\x80\x80\x00\x03\x06\x6d\x6f\x64\x75\x6c\x65\x09\x73\x65\x74\x5f\x67\x65\x74\x5f\x31\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\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x02\x40\x43\x00\x00\xe0\x40\x10\x00\xbc\x43\x00\x00\xe0\x40\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", "wrapper"), exports($4)), "run", []), "struct.wast:130"); // assert_return(() => call($4, "set_get_1", [7.]), "struct.wast:130", 7.)
// struct.wast:132
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8a\x80\x80\x80\x00\x02\x5f\x01\x7e\x00\x60\x01\x64\x00\x00\x03\x82\x80\x80\x80\x00\x01\x01\x07\x98\x80\x80\x80\x00\x01\x14\x73\x74\x72\x75\x63\x74\x2e\x73\x65\x74\x2d\x69\x6d\x6d\x75\x74\x61\x62\x6c\x65\x00\x00\x0a\x90\x80\x80\x80\x00\x01\x8a\x80\x80\x80\x00\x00\x20\x00\x42\x01\xfb\x05\x00\x00\x0b", "struct.wast:132");
// struct.wast:145
let $$5 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8a\x80\x80\x80\x00\x02\x5f\x02\x7f\x00\x7f\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x01\x01\x07\xa5\x80\x80\x80\x00\x02\x0f\x73\x74\x72\x75\x63\x74\x2e\x67\x65\x74\x2d\x6e\x75\x6c\x6c\x00\x00\x0f\x73\x74\x72\x75\x63\x74\x2e\x73\x65\x74\x2d\x6e\x75\x6c\x6c\x00\x01\x0a\xa4\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x01\x01\x63\x00\x20\x00\xfb\x02\x00\x01\x1a\x0b\x8d\x80\x80\x80\x00\x01\x01\x63\x00\x20\x00\x41\x00\xfb\x05\x00\x01\x0b", "struct.wast:145");
// struct.wast:145
let $5 = instance($$5);
// struct.wast:155
assert_trap(() => call($5, "struct.get-null", []), "struct.wast:155");
// struct.wast:156
assert_trap(() => call($5, "struct.set-null", []), "struct.wast:156");
// struct.wast:160
let $$6 = module("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x96\x80\x80\x80\x00\x03\x5f\x04\x78\x00\x78\x01\x77\x00\x77\x01\x60\x00\x02\x7f\x7f\x60\x01\x7f\x02\x7f\x7f\x03\x8b\x80\x80\x80\x00\x0a\x01\x01\x01\x01\x01\x01\x01\x01\x02\x02\x06\xa5\x80\x80\x80\x00\x02\x64\x00\x00\x41\x00\x41\x01\x41\x02\x41\x03\xfb\x00\x00\x0b\x64\x00\x00\x41\xfe\x01\x41\xff\x01\x41\xfe\xff\x03\x41\xff\xff\x03\xfb\x00\x00\x0b\x07\xc7\x81\x80\x80\x00\x0c\x02\x67\x30\x03\x00\x02\x67\x31\x03\x01\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x30\x5f\x30\x00\x00\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x31\x5f\x30\x00\x01\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x30\x5f\x31\x00\x02\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x31\x5f\x31\x00\x03\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x30\x5f\x32\x00\x04\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x31\x5f\x32\x00\x05\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x30\x5f\x33\x00\x06\x0f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x31\x5f\x33\x00\x07\x13\x73\x65\x74\x5f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x30\x5f\x31\x00\x08\x13\x73\x65\x74\x5f\x67\x65\x74\x5f\x70\x61\x63\x6b\x65\x64\x5f\x67\x30\x5f\x33\x00\x09\x0a\xcf\x81\x80\x80\x00\x0a\x8e\x80\x80\x80\x00\x00\x23\x00\xfb\x03\x00\x00\x23\x00\xfb\x04\x00\x00\x0b\x8e\x80\x80\x80\x00\x00\x23\x01\xfb\x03\x00\x00\x23\x01\xfb\x04\x00\x00\x0b\x8e\x80\x80\x80\x00\x00\x23\x00\xfb\x03\x00\x01\x23\x00\xfb\x04\x00\x01\x0b\x8e\x80\x80\x80\x00\x00\x23\x01\xfb\x03\x00\x01\x23\x01\xfb\x04\x00\x01\x0b\x8e\x80\x80\x80\x00\x00\x23\x00\xfb\x03\x00\x02\x23\x00\xfb\x04\x00\x02\x0b\x8e\x80\x80\x80\x00\x00\x23\x01\xfb\x03\x00\x02\x23\x01\xfb\x04\x00\x02\x0b\x8e\x80\x80\x80\x00\x00\x23\x00\xfb\x03\x00\x03\x23\x00\xfb\x04\x00\x03\x0b\x8e\x80\x80\x80\x00\x00\x23\x01\xfb\x03\x00\x03\x23\x01\xfb\x04\x00\x03\x0b\x96\x80\x80\x80\x00\x00\x23\x00\x20\x00\xfb\x05\x00\x01\x23\x00\xfb\x03\x00\x01\x23\x00\xfb\x04\x00\x01\x0b\x96\x80\x80\x80\x00\x00\x23\x00\x20\x00\xfb\x05\x00\x03\x23\x00\xfb\x03\x00\x03\x23\x00\xfb\x04\x00\x03\x0b", "struct.wast:160");
// struct.wast:160
let $6 = instance($$6);
// struct.wast:219
assert_return(() => call($6, "get_packed_g0_0", []), "struct.wast:219", 0, 0);
// struct.wast:220
assert_return(() => call($6, "get_packed_g1_0", []), "struct.wast:220", -2, 254);
// struct.wast:221
assert_return(() => call($6, "get_packed_g0_1", []), "struct.wast:221", 1, 1);
// struct.wast:222
assert_return(() => call($6, "get_packed_g1_1", []), "struct.wast:222", -1, 255);
// struct.wast:223
assert_return(() => call($6, "get_packed_g0_2", []), "struct.wast:223", 2, 2);
// struct.wast:224
assert_return(() => call($6, "get_packed_g1_2", []), "struct.wast:224", -2, 65_534);
// struct.wast:225
assert_return(() => call($6, "get_packed_g0_3", []), "struct.wast:225", 3, 3);
// struct.wast:226
assert_return(() => call($6, "get_packed_g1_3", []), "struct.wast:226", -1, 65_535);
// struct.wast:228
assert_return(() => call($6, "set_get_packed_g0_1", [257]), "struct.wast:228", 1, 1);
// struct.wast:229
assert_return(() => call($6, "set_get_packed_g0_3", [257]), "struct.wast:229", 257, 257);
reinitializeRegistry();
})();