| Summary: | [JSC] Remove CodeBlock::RareData::m_catchProfiles | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Yusuke Suzuki
2021-04-14 23:51:21 PDT
Created attachment 426078 [details]
Patch
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); 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)`. 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? 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. Committed r276102 (236602@main): <https://commits.webkit.org/236602@main> |