haikuwebkit/LayoutTests/workers/wasm-references.html

14 lines
274 B
HTML
Raw Permalink Normal View History

[WASM-References] Add extra tests for Wasm references + fix element parsing and subtyping bugs https://bugs.webkit.org/show_bug.cgi?id=199044 Reviewed by Saam Barati. JSTests: Add wasm references spec tests as well as a worker test. * wasm.yaml: * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Element): * wasm/js-api/element.js: (assert.throws.new.WebAssembly.Module.builder.WebAssembly): * wasm/references-spec-tests/ref_is_null.js: Added. (hostref): (is_hostref): (is_funcref): (eq_ref): (let.handler.get target): (register): (module): (instance): (call): (get instance): (exports): (run): (assert_malformed): (assert_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (try.f): (catch): (assert_exhaustion): (assert_return): (assert_return_canonical_nan): (assert_return_arithmetic_nan): (assert_return_ref): (assert_return_func): * wasm/references-spec-tests/ref_null.js: Added. (hostref): (is_hostref): (is_funcref): (eq_ref): (let.handler.get target): (register): (module): (instance): (call): (get instance): (exports): (run): (assert_malformed): (assert_invalid): (assert_unlinkable): (assert_uninstantiable): (assert_trap): (try.f): (catch): (assert_exhaustion): (assert_return): (assert_return_canonical_nan): (assert_return_arithmetic_nan): (assert_return_ref): (assert_return_func): * wasm/references/element_parsing.js: Added. (module): * wasm/references/func_ref.js: * wasm/references/multitable.js: * wasm/references/table_misc.js: (TableSize.0.End.End.WebAssembly): * wasm/references/validation.js: (assert.throws): Source/JavaScriptCore: Fix parsing table indices from the element section. The byte that we previously read as the table index actually tells us how to parse the table index. Fix some areas where we got the isSubtype check wrong, causing funcrefs to not be considred anyrefs. * wasm/WasmAirIRGenerator.cpp: (JSC::Wasm::AirIRGenerator::unify): * wasm/WasmSectionParser.cpp: (JSC::Wasm::SectionParser::parseElement): * wasm/WasmValidate.cpp: (JSC::Wasm::Validate::unify): LayoutTests: Add wasm references spec tests as well as a worker test. * workers/wasm-references.html: Added. * workers/wasm-references/test.js: Added. (const._fail): (const.isNotA.assert.isNotA): (const): (switch.typeof): (Builder): (Builder.prototype.setChecked): (Builder.prototype.setPreamble): (Builder.prototype._functionIndexSpaceKeyHash): (Builder.prototype._registerFunctionToIndexSpace): (Builder.prototype._getFunctionFromIndexSpace): (Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section): (Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.const.codeBuilder.End.switch.case.string_appeared_here.e): (Builder.prototype._registerSectionBuilders.this.Unknown): (done): (runTest.worker.onmessage): (runTest): (doGC): * workers/wasm-references/worker.js: Added. (const._fail): (const.isNotA.assert.isNotA): Canonical link: https://commits.webkit.org/213035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@246645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-06-20 19:42:48 +00:00
<html>
<head>
<script src="../resources/js-test-pre.js"></script>
</head>
<body>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
</script>
<script src="./wasm-references/test.js"></script>
<script src="../resources/js-test-post.js"></script>
</body>
</html>