WebAssembly: miscellaneous spec fixes
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2017 02:02:06 +0000 (02:02 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 25 Feb 2017 02:02:06 +0000 (02:02 +0000)
commit6a2a4eaaed3d73084c03f17d2bb188240b7c41dd
treed2df371079968a25216eae1cf6ddddad400c4abe
parentf486200b7025acfef8c72881b3235e648271a219
WebAssembly: miscellaneous spec fixes
https://bugs.webkit.org/show_bug.cgi?id=168822

Reviewed by Saam Barati.

JSTests:

* wasm.yaml: mark some skip tests as normal, now that they pass
* wasm/Builder.js: error message was wrong, causing extra error if hit
* wasm/js-api/global-error.js: new tests
(assert.throws):
* wasm/spec-tests/call.wast.js: comment out stack check tests
* wasm/spec-tests/call_indirect.wast.js: comment out stack check tests
* wasm/spec-tests/fac.wast.js: comment out stack check tests
* wasm/spec-tests/float_exprs.wast.js: wabt is wrong, bug reported, we should update
* wasm/spec-tests/imports.wast.js: bug in old wabt, fixed in recent wabt
(assert_unlinkable):

Source/JavaScriptCore:

* wasm/WasmModuleParser.cpp: "unknown" sections are now called "custom" sections
* wasm/WasmSections.h:
(JSC::Wasm::validateOrder):
(JSC::Wasm::makeString): fix ASSERT_UNREACHABLE bug in printing
* wasm/js/WebAssemblyInstanceConstructor.cpp:
(JSC::constructJSWebAssemblyInstance): disallow i64 import
* wasm/js/WebAssemblyModuleRecord.cpp:
(JSC::WebAssemblyModuleRecord::link): disallow i64 export
(JSC::WebAssemblyModuleRecord::evaluate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212983 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
JSTests/ChangeLog
JSTests/wasm.yaml
JSTests/wasm/Builder.js
JSTests/wasm/js-api/global-error.js
JSTests/wasm/spec-tests/call.wast.js
JSTests/wasm/spec-tests/call_indirect.wast.js
JSTests/wasm/spec-tests/fac.wast.js
JSTests/wasm/spec-tests/float_exprs.wast.js
JSTests/wasm/spec-tests/imports.wast.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/WasmModuleParser.cpp
Source/JavaScriptCore/wasm/WasmSections.h
Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp