commit | 7fbb1b2c085a9b1003310da1287aa0823623ccfa | [log] [tgz] |
---|---|---|
author | sbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Mon Dec 19 07:22:42 2016 +0000 |
committer | sbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Mon Dec 19 07:22:42 2016 +0000 |
tree | aee24599c5bd5ee875d69a5f97b653e47abb0300 | |
parent | 073946215ebdb84e0e846fd86bc55466c6621458 [diff] |
WebAssembly: Implement the WebAssembly.compile and WebAssembly.validate https://bugs.webkit.org/show_bug.cgi?id=165936 Reviewed by Mark Lam. JSTests: * wasm/js-api/Module-compile.js: Added. (async.testPromiseAPI): * wasm/js-api/test_basic_api.js: (const.c.in.constructorProperties.switch): * wasm/js-api/validate.js: Added. (assert.truthy.WebAssembly.validate.builder.WebAssembly): Source/JavaScriptCore: The APIs are documented here: - https://github.com/WebAssembly/design/blob/master/JS.md#webassemblycompile - https://github.com/WebAssembly/design/blob/master/JS.md#webassemblyvalidate * wasm/JSWebAssembly.cpp: (JSC::webAssemblyCompileFunc): (JSC::webAssemblyValidateFunc): (JSC::JSWebAssembly::finishCreation): * wasm/WasmPlan.cpp: (JSC::Wasm::Plan::parseAndValidateModule): (JSC::Wasm::Plan::run): * wasm/WasmPlan.h: * wasm/js/JSWebAssemblyHelpers.h: (JSC::getWasmBufferFromValue): * wasm/js/WebAssemblyModuleConstructor.cpp: (JSC::constructJSWebAssemblyModule): (JSC::callJSWebAssemblyModule): (JSC::WebAssemblyModuleConstructor::createModule): * wasm/js/WebAssemblyModuleConstructor.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209979 268f45cc-cd09-0410-ab3c-d52691b4dbfc