commit | 9fab88128c7e918ee3d543cff37b980b19e6cfc0 | [log] [tgz] |
---|---|---|
author | sbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Dec 14 01:31:43 2016 +0000 |
committer | sbarati@apple.com <sbarati@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Wed Dec 14 01:31:43 2016 +0000 |
tree | a959ec4912753a3e357bf4257098e05631351218 | |
parent | c4154a889d7421ead08548a81cf2743ca8cdf03f [diff] |
WebAssembly: implement the elements section https://bugs.webkit.org/show_bug.cgi?id=165715 Reviewed by Keith Miller. JSTests: * wasm/Builder.js: (export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section): (export.default.Builder.prototype._registerSectionBuilders.switch): * wasm/Builder_WebAssemblyBinary.js: (const.emitters.Element): * wasm/function-tests/basic-element.js: Added. * wasm/js-api/element.js: Added. (assertBadBinary): (assertBadBinary.badInstantiation): Source/JavaScriptCore: This is a straight forward implementation of the Element section in the Wasm spec: https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#element-section There are a few ambiguities I encountered when implementing this, so I've filed bugs against the Wasm design repo, and corresponding bugzilla bugs for us to address after they've been discussed by the various Wasm folks: - https://bugs.webkit.org/show_bug.cgi?id=165827 - https://bugs.webkit.org/show_bug.cgi?id=165826 - https://bugs.webkit.org/show_bug.cgi?id=165825 * wasm/WasmFormat.h: * wasm/WasmModuleParser.cpp: (JSC::Wasm::ModuleParser::parseElement): (JSC::Wasm::ModuleParser::parseInitExpr): (JSC::Wasm::ModuleParser::parseData): * wasm/WasmModuleParser.h: * wasm/js/WebAssemblyModuleRecord.cpp: (JSC::WebAssemblyModuleRecord::evaluate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209785 268f45cc-cd09-0410-ab3c-d52691b4dbfc