[webkit-changes] [WebKit/WebKit] 491e7d: Refactor LLInt::Data::performAssertions() into ass...
Commit Queue
noreply at github.com
Sat May 25 22:40:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 491e7dba5234d228eebfcb6b2286bbeaf6620b4a
https://github.com/WebKit/WebKit/commit/491e7dba5234d228eebfcb6b2286bbeaf6620b4a
Author: Mark Lam <mark.lam at apple.com>
Date: 2024-05-25 (Sat, 25 May 2024)
Changed paths:
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/Sources.txt
M Source/JavaScriptCore/interpreter/CallFrame.h
M Source/JavaScriptCore/llint/LLIntData.cpp
M Source/JavaScriptCore/llint/LLIntData.h
A Source/JavaScriptCore/runtime/AssertInvariants.cpp
A Source/JavaScriptCore/runtime/AssertInvariants.h
M Source/JavaScriptCore/runtime/InitializeThreading.cpp
M Source/JavaScriptCore/runtime/VM.cpp
Log Message:
-----------
Refactor LLInt::Data::performAssertions() into assertInvariants().
https://bugs.webkit.org/show_bug.cgi?id=274723
rdar://128746336
Reviewed by Yusuke Suzuki.
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.
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/interpreter/CallFrame.h:
(JSC::CallFrame::argumentOffset):
(JSC::CallFrame::argumentOffsetIncludingThis):
* Source/JavaScriptCore/llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions): Deleted.
* Source/JavaScriptCore/llint/LLIntData.h:
* Source/JavaScriptCore/runtime/AssertInvariants.cpp: Added.
(JSC::assertInvariants):
* Source/JavaScriptCore/runtime/AssertInvariants.h: Added.
* Source/JavaScriptCore/runtime/InitializeThreading.cpp:
(JSC::initialize):
* Source/JavaScriptCore/runtime/VM.cpp:
(JSC::VM::VM):
Canonical link: https://commits.webkit.org/279327@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list