Bug 274723 - Refactor LLInt::Data::performAssertions() into assertInvariants().
Summary: Refactor LLInt::Data::performAssertions() into assertInvariants().
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-05-25 20:51 PDT by Mark Lam
Modified: 2024-05-25 22:39 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 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.
Comment 1 Radar WebKit Bug Importer 2024-05-25 20:52:07 PDT
<rdar://problem/128746336>
Comment 2 Mark Lam 2024-05-25 21:00:17 PDT
Pull request: https://github.com/WebKit/WebKit/pull/29121
Comment 3 EWS 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.