Title: [269252] trunk/Source/_javascript_Core
- Revision
- 269252
- Author
- [email protected]
- Date
- 2020-11-02 10:35:19 -0800 (Mon, 02 Nov 2020)
Log Message
[JSC] Remove compiler warning in LLIntData.cpp
https://bugs.webkit.org/show_bug.cgi?id=218443
Patch by Xan Lopez <[email protected]> on 2020-11-02
Reviewed by Mark Lam.
Fix compiler warning by casting a scoped enum to its underlying
type. Not allowing implicit type conversions is the whole point of
scoped enums.
* interpreter/CallFrame.h: remove underlying type specifier, since
we are using the default anyway ('int').
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions): cast the scoped enum to its
underlying type.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (269251 => 269252)
--- trunk/Source/_javascript_Core/ChangeLog 2020-11-02 18:11:13 UTC (rev 269251)
+++ trunk/Source/_javascript_Core/ChangeLog 2020-11-02 18:35:19 UTC (rev 269252)
@@ -1,3 +1,20 @@
+2020-11-02 Xan Lopez <[email protected]>
+
+ [JSC] Remove compiler warning in LLIntData.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=218443
+
+ Reviewed by Mark Lam.
+
+ Fix compiler warning by casting a scoped enum to its underlying
+ type. Not allowing implicit type conversions is the whole point of
+ scoped enums.
+
+ * interpreter/CallFrame.h: remove underlying type specifier, since
+ we are using the default anyway ('int').
+ * llint/LLIntData.cpp:
+ (JSC::LLInt::Data::performAssertions): cast the scoped enum to its
+ underlying type.
+
2020-10-29 Jérôme Decoodt <[email protected]>
_javascript_Core should support multiple build variants
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.h (269251 => 269252)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.h 2020-11-02 18:11:13 UTC (rev 269251)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.h 2020-11-02 18:35:19 UTC (rev 269252)
@@ -89,7 +89,7 @@
};
static_assert(CallerFrameAndPC::sizeInRegisters == sizeof(CallerFrameAndPC) / sizeof(Register), "CallerFrameAndPC::sizeInRegisters is incorrect.");
- enum class CallFrameSlot : int {
+ enum class CallFrameSlot {
codeBlock = CallerFrameAndPC::sizeInRegisters,
callee = codeBlock + 1,
argumentCountIncludingThis = callee + 1,
Modified: trunk/Source/_javascript_Core/llint/LLIntData.cpp (269251 => 269252)
--- trunk/Source/_javascript_Core/llint/LLIntData.cpp 2020-11-02 18:11:13 UTC (rev 269251)
+++ trunk/Source/_javascript_Core/llint/LLIntData.cpp 2020-11-02 18:35:19 UTC (rev 269252)
@@ -97,7 +97,7 @@
ASSERT(!CallFrame::callerFrameOffset());
STATIC_ASSERT(CallerFrameAndPC::sizeInRegisters == (MachineRegisterSize * 2) / SlotSize);
ASSERT(CallFrame::returnPCOffset() == CallFrame::callerFrameOffset() + MachineRegisterSize);
- ASSERT(CallFrameSlot::codeBlock * sizeof(Register) == CallFrame::returnPCOffset() + MachineRegisterSize);
+ ASSERT(static_cast<std::underlying_type_t<CallFrameSlot>>(CallFrameSlot::codeBlock) * sizeof(Register) == CallFrame::returnPCOffset() + MachineRegisterSize);
STATIC_ASSERT(CallFrameSlot::callee * sizeof(Register) == CallFrameSlot::codeBlock * sizeof(Register) + SlotSize);
STATIC_ASSERT(CallFrameSlot::argumentCountIncludingThis * sizeof(Register) == CallFrameSlot::callee * sizeof(Register) + SlotSize);
STATIC_ASSERT(CallFrameSlot::thisArgument * sizeof(Register) == CallFrameSlot::argumentCountIncludingThis * sizeof(Register) + SlotSize);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes