Bug 235201 - Link Wasm code on the same thread that JITs
Summary: Link Wasm code on the same thread that JITs
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks: 235192
  Show dependency treegraph
 
Reported: 2022-01-13 13:46 PST by Saam Barati
Modified: 2022-01-13 18:42 PST (History)
7 users (show)

See Also:


Attachments
patch (10.17 KB, patch)
2022-01-13 14:42 PST, Saam Barati
ysuzuki: review+
Details | Formatted Diff | Diff
patch for landing (10.12 KB, patch)
2022-01-13 15:14 PST, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2022-01-13 13:46:29 PST
...
Comment 1 Yusuke Suzuki 2022-01-13 14:04:56 PST
THAT IS AWESOME!!!!!!!
Comment 2 Saam Barati 2022-01-13 14:42:20 PST
Created attachment 449114 [details]
patch
Comment 3 Yusuke Suzuki 2022-01-13 14:56:00 PST
Comment on attachment 449114 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=449114&action=review

r=me

> Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:201
> +        auto result = m_embedderToWasmInternalFunctions.add(functionIndex, std::pair<std::unique_ptr<LinkBuffer>, std::unique_ptr<InternalFunction>> { WTFMove(linkBuffer), WTFMove(embedderToWasmInternalFunction) });

I think you can use `std::pair { ... }` instead of `std::pair<std::unique_ptr<LinkBuffer>, std::unique_ptr<InternalFunction>>`.
Comment 4 Mark Lam 2022-01-13 14:59:06 PST
Comment on attachment 449114 [details]
patch

r=me too.
Comment 5 Saam Barati 2022-01-13 15:14:23 PST
Comment on attachment 449114 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=449114&action=review

>> Source/JavaScriptCore/wasm/WasmBBQPlan.cpp:201
>> +        auto result = m_embedderToWasmInternalFunctions.add(functionIndex, std::pair<std::unique_ptr<LinkBuffer>, std::unique_ptr<InternalFunction>> { WTFMove(linkBuffer), WTFMove(embedderToWasmInternalFunction) });
> 
> I think you can use `std::pair { ... }` instead of `std::pair<std::unique_ptr<LinkBuffer>, std::unique_ptr<InternalFunction>>`.

Nice. I didn't know that. I first tried just "{ ... }", but that failed, so I went with the full type declaration. Will fix.
Comment 6 Saam Barati 2022-01-13 15:14:56 PST
Created attachment 449118 [details]
patch for landing
Comment 7 EWS 2022-01-13 18:41:16 PST
Committed r288002 (246028@main): <https://commits.webkit.org/246028@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 449118 [details].
Comment 8 Radar WebKit Bug Importer 2022-01-13 18:42:16 PST
<rdar://problem/87582343>