WebAssembly: implement Module imports/exports
authorjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 18:41:53 +0000 (18:41 +0000)
committerjfbastien@apple.com <jfbastien@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Mar 2017 18:41:53 +0000 (18:41 +0000)
commitde631db54091a70ffc47b5f91c39cdb357b5bd58
treeb7d5b21a5a37d3efa8cb922635f0efde89530c96
parent080c5663acd69e21bd536486f36f134accf37c9f
WebAssembly: implement Module imports/exports
https://bugs.webkit.org/show_bug.cgi?id=166982

Reviewed by Saam Barati.

JSTests:

* wasm/js-api/Module.exports.js: Added.
(assert.throws.WebAssembly.Module.prototype.exports):
(assert.eq):
* wasm/js-api/Module.imports.js: Added.
(assert.throws.WebAssembly.Module.prototype.imports):
(assert.eq):

Source/JavaScriptCore:

As defined in: https://github.com/WebAssembly/design/commit/18cbacb90cd3584dd5c9aa3d392e4e55f66af6ab

* wasm/WasmFormat.h:
(JSC::Wasm::makeString): use uppercase instead, it was only used
for diagnostic but is now used for the expected JS property's
capitalization
* wasm/js/WebAssemblyModulePrototype.cpp:
(JSC::webAssemblyModuleProtoImports):
(JSC::webAssemblyModuleProtoExports):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/wasm/js-api/Module.exports.js [new file with mode: 0644]
JSTests/wasm/js-api/Module.imports.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/WasmFormat.h
Source/JavaScriptCore/wasm/js/WebAssemblyModulePrototype.cpp