Bug 274723

Summary: Refactor LLInt::Data::performAssertions() into assertInvariants().
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Mark Lam
Reported 2024-05-25 20:51:48 PDT
The intent of LLInt::Data::performAssertions() was to assert some invariants that cannot be expressed as static_asserts, or did not have a convenient place to express the static_asserts because they are about constants used in the LLInt asm files. These asserts need only be executed once. At the time, I added a call to performAssertions() from the VM constructor. The better place to call it would be from JSC::initialize(), which is only executed once per process. Additionally, over time, we started using this function to assert other invariants. Hence, we should rename it and put it in a place not associated with the LLInt specifically. Lastly, replace all uses of the antiquated STATIC_ASSERT macro with static_assert.
Attachments
Radar WebKit Bug Importer
Comment 1 2024-05-25 20:52:07 PDT
Mark Lam
Comment 2 2024-05-25 21:00:17 PDT
EWS
Comment 3 2024-05-25 22:39:55 PDT
Committed 279327@main (491e7dba5234): <https://commits.webkit.org/279327@main> Reviewed commits have been landed. Closing PR #29121 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.