WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
224593
[JSC] Remove CodeBlock::RareData::m_catchProfiles
https://bugs.webkit.org/show_bug.cgi?id=224593
Summary
[JSC] Remove CodeBlock::RareData::m_catchProfiles
Yusuke Suzuki
Reported
2021-04-14 23:51:21 PDT
[JSC] Remove CodeBlock::RareData::m_catchProfiles
Attachments
Patch
(10.38 KB, patch)
2021-04-14 23:53 PDT
,
Yusuke Suzuki
mark.lam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yusuke Suzuki
Comment 1
2021-04-14 23:53:29 PDT
Created
attachment 426078
[details]
Patch
Mark Lam
Comment 2
2021-04-15 02:19:59 PDT
Comment on
attachment 426078
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=426078&action=review
Nice work. r=me
> Source/JavaScriptCore/ChangeLog:10 > + So we should just iterate metadata for that and destroy them in the destructor. Do not need to keep them separately.
/Do not need/No need/
> Source/JavaScriptCore/bytecode/ValueProfile.h:210 > + return bitwise_cast<ValueProfileAndVirtualRegister*>(bitwise_cast<uint8_t*>(this) + sizeof(ValueProfileAndVirtualRegisterBuffer));
Would the following work? It's shorter: return bitwise_cast<ValueProfileAndVirtualRegister*>(this + 1);
Yusuke Suzuki
Comment 3
2021-04-15 11:56:29 PDT
Comment on
attachment 426078
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=426078&action=review
>> Source/JavaScriptCore/ChangeLog:10 >> + So we should just iterate metadata for that and destroy them in the destructor. Do not need to keep them separately. > > /Do not need/No need/
Fixed.
>> Source/JavaScriptCore/bytecode/ValueProfile.h:210 >> + return bitwise_cast<ValueProfileAndVirtualRegister*>(bitwise_cast<uint8_t*>(this) + sizeof(ValueProfileAndVirtualRegisterBuffer)); > > Would the following work? It's shorter: > return bitwise_cast<ValueProfileAndVirtualRegister*>(this + 1);
It does not work since it is not guaranteed `sizeof(ValueProfileAndVirtualRegister)` == `alignof(ValueProfileAndVirtualRegisterBuffer)`.
Mark Lam
Comment 4
2021-04-15 11:58:20 PDT
Comment on
attachment 426078
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=426078&action=review
>>> Source/JavaScriptCore/bytecode/ValueProfile.h:210 >>> + return bitwise_cast<ValueProfileAndVirtualRegister*>(bitwise_cast<uint8_t*>(this) + sizeof(ValueProfileAndVirtualRegisterBuffer)); >> >> Would the following work? It's shorter: >> return bitwise_cast<ValueProfileAndVirtualRegister*>(this + 1); > > It does not work since it is not guaranteed `sizeof(ValueProfileAndVirtualRegister)` == `alignof(ValueProfileAndVirtualRegisterBuffer)`.
But `this` is a ValueProfileAndVirtualRegisterBuffer. Hence, this + 1 adds sizeof(ValueProfileAndVirtualRegisterBuffer), no?
Yusuke Suzuki
Comment 5
2021-04-15 18:28:47 PDT
Comment on
attachment 426078
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=426078&action=review
>>>> Source/JavaScriptCore/bytecode/ValueProfile.h:210 >>>> + return bitwise_cast<ValueProfileAndVirtualRegister*>(bitwise_cast<uint8_t*>(this) + sizeof(ValueProfileAndVirtualRegisterBuffer)); >>> >>> Would the following work? It's shorter: >>> return bitwise_cast<ValueProfileAndVirtualRegister*>(this + 1); >> >> It does not work since it is not guaranteed `sizeof(ValueProfileAndVirtualRegister)` == `alignof(ValueProfileAndVirtualRegisterBuffer)`. > > But `this` is a ValueProfileAndVirtualRegisterBuffer. Hence, this + 1 adds sizeof(ValueProfileAndVirtualRegisterBuffer), no?
Ah! Right. Changed.
Yusuke Suzuki
Comment 6
2021-04-15 18:37:53 PDT
Committed
r276102
(
236602@main
): <
https://commits.webkit.org/236602@main
>
Ryan Haddad
Comment 7
2021-04-19 22:01:02 PDT
rdar://76735679
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