Bug 220009

Summary: [WASM-References] Add declared function indexes set to check from what functions we can create refs
Product: WebKit Reporter: Dmitry <dbezhetskov>
Component: WebAssemblyAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: chi187, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch none

Description Dmitry 2020-12-18 00:10:57 PST
[WASM-References] Add declared function indexes set to check from what functions we can create refs
Comment 1 Dmitry 2020-12-18 00:17:50 PST
Created attachment 416501 [details]
Patch
Comment 2 Dmitry 2020-12-18 00:32:41 PST
Created attachment 416503 [details]
Patch
Comment 3 Sergey Rubanov 2020-12-18 01:18:54 PST
Comment on attachment 416503 [details]
Patch

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

> Source/JavaScriptCore/wasm/WasmModuleInformation.h:78
> +    void addDeclaredFunction(uint32_t index) { m_declaredFunctions.set(index); }

It could be a constant member function too probably?
Comment 4 Yusuke Suzuki 2020-12-18 02:22:54 PST
Comment on attachment 416503 [details]
Patch

r=me
Comment 5 Radar WebKit Bug Importer 2020-12-25 00:11:14 PST
<rdar://problem/72669430>
Comment 6 Dmitry 2020-12-26 20:02:28 PST
Created attachment 416795 [details]
Patch
Comment 7 Dmitry 2020-12-26 20:04:48 PST
Comment on attachment 416503 [details]
Patch

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

>> Source/JavaScriptCore/wasm/WasmModuleInformation.h:78
>> +    void addDeclaredFunction(uint32_t index) { m_declaredFunctions.set(index); }
> 
> It could be a constant member function too probably?

yes, but I don't truly understand why we need to declare this as const? It is a part of ModuleInfo that we change.
btw, don't understand why addReferencedFunction is const too, do you know why it is written like that?
Comment 8 Dmitry 2020-12-26 20:04:56 PST
View in context: https://bugs.webkit.org/attachment.cgi?id=416503&action=review

>> Source/JavaScriptCore/wasm/WasmModuleInformation.h:78
>> +    void addDeclaredFunction(uint32_t index) { m_declaredFunctions.set(index); }
> 
> It could be a constant member function too probably?

yes, but I don't truly understand why we need to declare this as const? It is a part of ModuleInfo that we change.
btw, don't understand why addReferencedFunction is const too, do you know why it is written like that?
Comment 9 Yusuke Suzuki 2020-12-26 20:37:39 PST
Comment on attachment 416795 [details]
Patch

r=me if EWS gets green :)
Comment 10 EWS 2020-12-27 15:35:55 PST
Committed r271097: <https://trac.webkit.org/changeset/271097>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 416795 [details].