WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
141362
Use a PairHash for DFGByteCodeParser's ConstantBufferKey
https://bugs.webkit.org/show_bug.cgi?id=141362
Summary
Use a PairHash for DFGByteCodeParser's ConstantBufferKey
Benjamin Poulain
Reported
2015-02-07 14:35:52 PST
Use a PairHash for DFGByteCodeParser's ConstantBufferKey
Attachments
Patch
(2.62 KB, patch)
2015-02-07 14:37 PST
,
Benjamin Poulain
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Benjamin Poulain
Comment 1
2015-02-07 14:37:22 PST
Created
attachment 246218
[details]
Patch
Darin Adler
Comment 2
2015-02-07 15:49:14 PST
Comment on
attachment 246218
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=246218&action=review
> Source/JavaScriptCore/ChangeLog:10 > + Use nullptr for pointers when possible.
Seems like we’d also want to use member initialization rather than initializing in each constructor. Makes it harder to accidentally leave m_codeBlock uninitialized.
> Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:84 > + return WTF::pairIntHash(PtrHash<CodeBlock*>::hash(m_codeBlock), IntHash<unsigned>::hash(m_index));
Doesn’t pairIntHash already do enough hashing that we don’t need the IntHash<unsigned>::hash here? Also, that could just be WTF::intHash(m_index). I’m also not sure why HashFunctions.h doesn’t do using WTF::intHash and WTF::pairIntHash. No reason for us to be inconsistent about things like that.
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