Summary: | WebAssembly JS API: implement start function | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | JF Bastien <jfbastien> | ||||||||||||||||
Component: | JavaScriptCore | Assignee: | JF Bastien <jfbastien> | ||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||
Severity: | Normal | CC: | commit-queue, jfbastien, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer | ||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||
Bug Depends on: | |||||||||||||||||||
Bug Blocks: | 161709, 165658, 165714 | ||||||||||||||||||
Attachments: |
|
Description
JF Bastien
2016-11-29 12:00:00 PST
Created attachment 296641 [details]
WIP
I've started implementing this. Here are basic JSON tests.
Created attachment 296643 [details]
patch
Feed the JSON tests from the Builder. I still have some checking to do, then the binary side.
Created attachment 296698 [details]
patch
Patch for landing.
Comment on attachment 296698 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=296698&action=review > JSTests/wasm/js-api/test_Start.js:14 > + const instance = new WebAssembly.Instance(module); Please add a test that proves that this ran. Maybe by writing to memory. > Source/JavaScriptCore/wasm/WasmFormat.h:128 > + std::optional<uint32_t> startFunctionIndexSpace; Why not just call this "startFunctionIndex"? > Source/JavaScriptCore/wasm/WasmModuleParser.cpp:397 > + || startFunctionIndex >= m_functionIndexSpace.size()) Please add a test for this. > Source/JavaScriptCore/wasm/WasmModuleParser.cpp:401 > + if (signature->arguments.size() != 0 > + || signature->returnType != Void) Please add a test for this. > > Source/JavaScriptCore/wasm/WasmFormat.h:128
> > + std::optional<uint32_t> startFunctionIndexSpace;
>
> Why not just call this "startFunctionIndex"?
Because the value we receive in the function index space, so it can include imports for now. Once we resolve the spec issue we'll have to change things, but it's still important to note that it isn't just the internal function index.
Created attachment 296705 [details]
patch
Address comments.
Comment on attachment 296705 [details] patch Rejecting attachment 296705 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 296705, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: unk #4 succeeded at 461 (offset 25 lines). patching file Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp Hunk #1 succeeded at 102 with fuzz 1 (offset 12 lines). patching file Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h patching file Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp patching file Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.h Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.webkit.org/results/2681933 Created attachment 296709 [details]
patch
Fix merge conflict.
Created attachment 296713 [details]
patch
Another merge issue.
Comment on attachment 296713 [details] patch Rejecting attachment 296713 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: t -o /Volumes/Data/EWS/WebKit/WebKitBuild/Release/jsc Undefined symbols for architecture x86_64: "JSC::Wasm::ModuleInformation::~ModuleInformation()", referenced from: functionTestWasmModuleFunctions(JSC::ExecState*) in jsc.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ** BUILD FAILED ** The following build commands failed: Ld /Volumes/Data/EWS/WebKit/WebKitBuild/Release/jsc normal x86_64 (1 failure) Full output: http://webkit-queues.webkit.org/results/2682613 Created attachment 296731 [details]
patch
Fix bot build issue which doesn't occur on local cmake build.
Comment on attachment 296731 [details] patch Clearing flags on attachment: 296731 Committed r209642: <http://trac.webkit.org/changeset/209642> All reviewed patches have been landed. Closing bug. |