[JSC] Compact JITCodeMap by stroing BytecodeIndex and CodeLocation separately
Created attachment 390603 [details] Patch
Comment on attachment 390603 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390603&action=review > Source/JavaScriptCore/ChangeLog:3 > + [JSC] Compact JITCodeMap by stroing BytecodeIndex and CodeLocation separately /stroing/strong/
Created attachment 390605 [details] Patch
Comment on attachment 390603 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390603&action=review >> Source/JavaScriptCore/ChangeLog:3 >> + [JSC] Compact JITCodeMap by stroing BytecodeIndex and CodeLocation separately > > /stroing/strong/ Thanks, fixing.
Created attachment 390606 [details] Patch
Comment on attachment 390606 [details] Patch r=me
Committed r256498: <https://trac.webkit.org/changeset/256498>
<rdar://problem/59410018>
Comment on attachment 390606 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390606&action=review > Source/JavaScriptCore/jit/JITCodeMap.h:46 > + m_pointer = MallocPtr<uint8_t>::malloc(sizeof(CodeLocationLabel<JSEntryPtrTag>) * m_size + sizeof(BytecodeIndex) * m_size); Don't we need to insure some alignment minimum here ? (I would say alignof(CodeLocationLabel<JSEntryPtrTag>) > Source/JavaScriptCore/jit/JITCodeMap.h:56 > + return codeLocations()[index - indexes()]; I'm confused about this line. Can you explain why it is not just codeLocations()[index] ?
Comment on attachment 390606 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=390606&action=review >> Source/JavaScriptCore/jit/JITCodeMap.h:46 >> + m_pointer = MallocPtr<uint8_t>::malloc(sizeof(CodeLocationLabel<JSEntryPtrTag>) * m_size + sizeof(BytecodeIndex) * m_size); > > Don't we need to insure some alignment minimum here ? (I would say alignof(CodeLocationLabel<JSEntryPtrTag>) MallocPtr is just calling malloc. So we can assume usual alignment requirement for malloc here. >> Source/JavaScriptCore/jit/JITCodeMap.h:56 >> + return codeLocations()[index - indexes()]; > > I'm confused about this line. Can you explain why it is not just codeLocations()[index] ? index is `BytecodeIndex*` pointing the found entry (or nullptr). `index - indexes()` can calculate the offset.