WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228962
Update ARM64EHash
https://bugs.webkit.org/show_bug.cgi?id=228962
Summary
Update ARM64EHash
Saam Barati
Reported
2021-08-10 11:36:18 PDT
...
Attachments
patch
(6.25 KB, patch)
2021-08-11 14:46 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
patch
(6.56 KB, patch)
2021-08-27 11:45 PDT
,
Saam Barati
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2021-08-10 11:36:54 PDT
<
rdar://79883337
>
Saam Barati
Comment 2
2021-08-11 14:46:27 PDT
Created
attachment 435377
[details]
patch
Mark Lam
Comment 3
2021-08-11 22:29:24 PDT
Comment on
attachment 435377
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435377&action=review
r=me with some comments.
> Source/JavaScriptCore/assembler/AssemblerBuffer.h:213 > + return static_cast<PtrTag>((static_cast<uint64_t>(namespaceTag) << 56) + ((index & 0xFFFFFF) << 32) + static_cast<uint64_t>(value));
I think the static_cast in `static_cast<uint64_t>(value)` is not needed. It will automatically be promoted.
> Source/JavaScriptCore/assembler/AssemblerBuffer.h:251 > + ARM64EHash(void* diversifier) > + { > + setUpdatedHash(0, 0, diversifier); > + }
nit: can you put this at the top of the class? Seems weird to have the constructor hidden in the middle of all the other methods. Also, all the methods above this constructor can be moved into the private section below. I think that makes it clearer that they are not part of the public interface.
> Source/JavaScriptCore/assembler/AssemblerBuffer.h:432 > WTF::unalignedStore<uint32_t>(m_hashes.buffer() + m_index, hash);
Funny: this only works because IntegralType == uint32_t because m_index is incremented in sizeof(IntegralType), and this buffer is incremented in sizeof(uint32_t). Anyway, it's not due to your patch, and in practice, IntegralType is always uint32_t here.
Mark Lam
Comment 4
2021-08-12 13:23:21 PDT
Comment on
attachment 435377
[details]
patch I think this patch is good on its own. Since Saam is away, I'll just land this as is and implement my nits as a follow up refactoring patch later.
EWS
Comment 5
2021-08-12 13:45:09 PDT
Committed
r280984
(
240484@main
): <
https://commits.webkit.org/240484@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 435377
[details]
.
Darin Adler
Comment 6
2021-08-12 14:04:29 PDT
Comment on
attachment 435377
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435377&action=review
> Source/JavaScriptCore/assembler/AssemblerBuffer.h:220 > + return static_cast<uint32_t>((a >> 39) ^ (b >> 23));
I’m surprised the static_cast to uint32_t here needed and valuable. Does it silence a truncation warning?
> Source/JavaScriptCore/assembler/AssemblerBuffer.h:225 > + return static_cast<uint32_t>(bitwise_cast<uintptr_t>(diversifier));
Ditto.
> Source/JavaScriptCore/assembler/AssemblerBuffer.h:236 > + return static_cast<uint32_t>(result);
Ditto.
Mark Lam
Comment 7
2021-08-12 14:43:32 PDT
Comment on
attachment 435377
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=435377&action=review
>> Source/JavaScriptCore/assembler/AssemblerBuffer.h:220 >> + return static_cast<uint32_t>((a >> 39) ^ (b >> 23)); > > I’m surprised the static_cast to uint32_t here needed and valuable. Does it silence a truncation warning?
These static_casts appear to not be needed in my local build test i.e. Clang does not complain. I'll remove them in my upcoming refactoring patch.
Mark Lam
Comment 8
2021-08-12 15:20:26 PDT
Will do refactoring change in
https://bugs.webkit.org/show_bug.cgi?id=229054
.
WebKit Commit Bot
Comment 9
2021-08-22 00:33:24 PDT
Re-opened since this is blocked by
bug 229384
Saam Barati
Comment 10
2021-08-27 11:45:03 PDT
Created
attachment 436649
[details]
patch
Mark Lam
Comment 11
2021-08-27 11:50:46 PDT
Comment on
attachment 436649
[details]
patch r=me
EWS
Comment 12
2021-08-27 12:53:19 PDT
Committed
r281717
(
241059@main
): <
https://commits.webkit.org/241059@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 436649
[details]
.
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