WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
224616
Refactor inline functions out of HashMapImpl.h into HashMapImplInlines.h.
https://bugs.webkit.org/show_bug.cgi?id=224616
Summary
Refactor inline functions out of HashMapImpl.h into HashMapImplInlines.h.
Mark Lam
Reported
2021-04-15 11:19:46 PDT
Also do the same for clients of HashMapImpl that require similar refactoring. This fixes the #include of JSCJSValueInlines.h in HashMapImpl.h, as well as makes it easier to use other inline functions from other classes in the implementation of HashMapImpl's inline functions in the future.
Attachments
proposed patch.
(69.57 KB, patch)
2021-04-15 11:49 PDT
,
Mark Lam
ysuzuki
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-04-15 11:20:14 PDT
<
rdar://problem/76713709
>
Mark Lam
Comment 2
2021-04-15 11:49:18 PDT
Created
attachment 426121
[details]
proposed patch.
Yusuke Suzuki
Comment 3
2021-04-15 11:55:44 PDT
Comment on
attachment 426121
[details]
proposed patch. r=me
Darin Adler
Comment 4
2021-04-15 12:08:32 PDT
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
Mark Lam
Comment 5
2021-04-15 12:20:34 PDT
Thanks for the review. Landed in
r276039
: <
http://trac.webkit.org/r276039
>.
Michael Catanzaro
Comment 6
2021-04-16 14:42:25 PDT
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?
Mark Lam
Comment 7
2021-04-16 14:50:05 PDT
(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.
Yusuke Suzuki
Comment 8
2021-04-17 18:19:53 PDT
Committed
r276217
(
236699@main
): <
https://commits.webkit.org/236699@main
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug