-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JSC] Sort opcodes to remove padding from metadata table #9927
[JSC] Sort opcodes to remove padding from metadata table #9927
Conversation
EWS run on previous version of this PR (hash 05710ee) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with GCC fix.
#define JSC_ALIGNMENT_CHECK(size) static_assert(size <= UnlinkedMetadataTable::s_maxMetadataAlignment); | ||
static_assert((UnlinkedMetadataTable::s_maxMetadataAlignment >= | ||
#define JSC_ALIGNMENT_CHECK(size) size) && (size >= | ||
FOR_EACH_BYTECODE_METADATA_ALIGNMENT(JSC_ALIGNMENT_CHECK) | ||
#undef JSC_ALIGNMENT_CHECK | ||
1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like GCC is not happy with this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's probably because when computing the order I assumed that pointers were 8-byte aligned. I might just skip both new assertions on 32-bit since we will still align if necessary.
05710ee
to
4b30616
Compare
EWS run on current version of this PR (hash 4b30616) |
https://bugs.webkit.org/show_bug.cgi?id=252055 rdar://105276503 Reviewed by Yusuke Suzuki. Sort the opcodes by metadata alignment requirements. We start with 8-byte aligned, followed by 4-byte, etc. The memory savings are minimal (too small to measure with confidence), but they are also free. * Source/JavaScriptCore/bytecode/BytecodeList.rb: * Source/JavaScriptCore/bytecode/UnlinkedMetadataTable.cpp: (JSC::UnlinkedMetadataTable::finalize): Canonical link: https://commits.webkit.org/260193@main
4b30616
to
e2606b1
Compare
Committed 260193@main (e2606b1): https://commits.webkit.org/260193@main Reviewed commits have been landed. Closing PR #9927 and removing active labels. |
e2606b1
4b30616
π§ͺ ios-wk2π§ͺ mac-AS-debug-wk2π§ͺ jsc-armv7-tests