| Summary: | Refactor inline functions out of HashMapImpl.h into HashMapImplInlines.h. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | alecflett, annulen, beidson, darin, ews-watchlist, gyuyoung.kim, jsbell, keith_miller, mcatanzaro, msaboff, ryuan.choi, saam, sergio, tzagallo, webkit-bug-importer, ysuzuki | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=224644 | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 224610 | ||||||
| Attachments: |
|
||||||
|
Description
Mark Lam
2021-04-15 11:19:46 PDT
Created attachment 426121 [details]
proposed patch.
Comment on attachment 426121 [details]
proposed patch.
r=me
Comment on attachment 426121 [details]
proposed patch.
Never noticed when this first was introduced: Seems unfortunate that WTF has WTF::HashMap and JavaScriptCore has unrelated JSC::HashMapImpl. Might be worth thinking about future name changes to clarify the relationship/distinction
Thanks for the review. Landed in r276039: <http://trac.webkit.org/r276039>. New warnings:
[1215/5456] Building CXX object Source/JavaScriptCore/CMa...edSources/unified-sources/UnifiedSource-f0a787a9-11.cpp.o
In file included from ../../Source/JavaScriptCore/runtime/JSMap.h:28,
from ../../Source/JavaScriptCore/bytecode/SpeculatedType.cpp:39,
from JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f0a787a9-11.cpp:5:
../../Source/JavaScriptCore/runtime/HashMapImpl.h:233:27: warning: ‘bool JSC::areKeysEqual(JSC::JSGlobalObject*, JSC::JSValue, JSC::JSValue)’ declared ‘static’ but never defined [-Wunused-function]
233 | ALWAYS_INLINE static bool areKeysEqual(JSGlobalObject*, JSValue, JSValue);
| ^~~~~~~~~~~~
../../Source/JavaScriptCore/runtime/HashMapImpl.h:238:31: warning: ‘uint32_t JSC::wangsInt64Hash(uint64_t)’ declared ‘static’ but never defined [-Wunused-function]
238 | static ALWAYS_INLINE uint32_t wangsInt64Hash(uint64_t key);
|
I think we could simply remove the declarations of these functions from HashMapImpl.h. If they're needed, better include HashMapImplInlines.h, yes?
(In reply to Michael Catanzaro from comment #6) > New warnings: > > [1215/5456] Building CXX object > Source/JavaScriptCore/CMa...edSources/unified-sources/UnifiedSource-f0a787a9- > 11.cpp.o > In file included from ../../Source/JavaScriptCore/runtime/JSMap.h:28, > from > ../../Source/JavaScriptCore/bytecode/SpeculatedType.cpp:39, > from > JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f0a787a9-11.cpp: > 5: > ../../Source/JavaScriptCore/runtime/HashMapImpl.h:233:27: warning: ‘bool > JSC::areKeysEqual(JSC::JSGlobalObject*, JSC::JSValue, JSC::JSValue)’ > declared ‘static’ but never defined [-Wunused-function] > 233 | ALWAYS_INLINE static bool areKeysEqual(JSGlobalObject*, JSValue, > JSValue); > | ^~~~~~~~~~~~ > ../../Source/JavaScriptCore/runtime/HashMapImpl.h:238:31: warning: ‘uint32_t > JSC::wangsInt64Hash(uint64_t)’ declared ‘static’ but never defined > [-Wunused-function] > 238 | static ALWAYS_INLINE uint32_t wangsInt64Hash(uint64_t key); > | > > I think we could simply remove the declarations of these functions from > HashMapImpl.h. If they're needed, better include HashMapImplInlines.h, yes? Looking at this again, I think these 2 functions are only used by clients in HeapMapImplInlines.h. So, yes, I think we can simply remove these declarations from HashMapImpl.h. Committed r276217 (236699@main): <https://commits.webkit.org/236699@main> |