Summary: | [WebAssembly] Move type conversion code of JSToWasm return type to JS wasm wrapper | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||
Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Yusuke Suzuki
2018-09-11 05:00:05 PDT
Created attachment 349390 [details]
Patch
Created attachment 349391 [details]
Patch
Eventually I would like to merge these code into wrapper side. Ping? Comment on attachment 349391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=349391&action=review r=me > Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:164 > + return rawResult; Is there any value in keeping the above code in some form for a debug assert? Comment on attachment 349391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=349391&action=review > Source/JavaScriptCore/wasm/js/JSToWasm.cpp:223 > + auto isNaN = jit.branchDouble(CCallHelpers::DoubleNotEqualOrUnordered, FPRInfo::returnValueFPR, FPRInfo::returnValueFPR); We should really just add something in AssemblyHelpers sometime in the future for branchIfNaN Comment on attachment 349391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=349391&action=review >> Source/JavaScriptCore/wasm/js/JSToWasm.cpp:223 >> + auto isNaN = jit.branchDouble(CCallHelpers::DoubleNotEqualOrUnordered, FPRInfo::returnValueFPR, FPRInfo::returnValueFPR); > > We should really just add something in AssemblyHelpers sometime in the future for branchIfNaN Sounds fine. I'll add this in a separate patch. >> Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:164 >> + return rawResult; > > Is there any value in keeping the above code in some form for a debug assert? Eventually, I would like to remove this entire function to merge this functionality into the generated code. So I think we should add assertions in the generated code instead of this function. Committed r236651: <https://trac.webkit.org/changeset/236651> |