Title: [272961] branches/safari-611-branch/Source/_javascript_Core
Revision
272961
Author
repst...@apple.com
Date
2021-02-16 17:19:21 -0800 (Tue, 16 Feb 2021)

Log Message

Cherry-pick r272685. rdar://problem/74410538

    We should not static_assert on an ENABLE() macro.
    https://bugs.webkit.org/show_bug.cgi?id=221714
    rdar://74197896

    Reviewed by Yusuke Suzuki.

    This is because the ENABLE() macro reduces to a macro _expression_
    `(defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)` which is not a C++
    _expression_ that a static_assert can evaluate.

    * llint/LLIntData.cpp:
    * llint/LLIntData.h:
    (JSC::LLInt::getCodePtr):
    (JSC::LLInt::getWide16CodePtr):
    (JSC::LLInt::getWide32CodePtr):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272685 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-611-branch/Source/_javascript_Core/ChangeLog (272960 => 272961)


--- branches/safari-611-branch/Source/_javascript_Core/ChangeLog	2021-02-17 01:19:15 UTC (rev 272960)
+++ branches/safari-611-branch/Source/_javascript_Core/ChangeLog	2021-02-17 01:19:21 UTC (rev 272961)
@@ -1,5 +1,47 @@
 2021-02-16  Ruben Turcios  <rubent...@apple.com>
 
+        Cherry-pick r272685. rdar://problem/74410538
+
+    We should not static_assert on an ENABLE() macro.
+    https://bugs.webkit.org/show_bug.cgi?id=221714
+    rdar://74197896
+    
+    Reviewed by Yusuke Suzuki.
+    
+    This is because the ENABLE() macro reduces to a macro _expression_
+    `(defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)` which is not a C++
+    _expression_ that a static_assert can evaluate.
+    
+    * llint/LLIntData.cpp:
+    * llint/LLIntData.h:
+    (JSC::LLInt::getCodePtr):
+    (JSC::LLInt::getWide16CodePtr):
+    (JSC::LLInt::getWide32CodePtr):
+    
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-02-10  Mark Lam  <mark....@apple.com>
+
+            We should not static_assert on an ENABLE() macro.
+            https://bugs.webkit.org/show_bug.cgi?id=221714
+            rdar://74197896
+
+            Reviewed by Yusuke Suzuki.
+
+            This is because the ENABLE() macro reduces to a macro _expression_
+            `(defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)` which is not a C++
+            _expression_ that a static_assert can evaluate.
+
+            * llint/LLIntData.cpp:
+            * llint/LLIntData.h:
+            (JSC::LLInt::getCodePtr):
+            (JSC::LLInt::getWide16CodePtr):
+            (JSC::LLInt::getWide32CodePtr):
+
+2021-02-16  Ruben Turcios  <rubent...@apple.com>
+
         Cherry-pick r272663. rdar://problem/74409155
 
     Don't crash when reparsing an arrow function and the parsing invariant is broken

Modified: branches/safari-611-branch/Source/_javascript_Core/llint/LLIntData.h (272960 => 272961)


--- branches/safari-611-branch/Source/_javascript_Core/llint/LLIntData.h	2021-02-17 01:19:15 UTC (rev 272960)
+++ branches/safari-611-branch/Source/_javascript_Core/llint/LLIntData.h	2021-02-17 01:19:21 UTC (rev 272961)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2021 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -155,6 +155,10 @@
     return MacroAssemblerCodePtr<tag>::createFromExecutableAddress(retaggedOpcode);
 }
 
+#if ENABLE(ARM64E) && !ENABLE(COMPUTED_GOTO_OPCODES)
+#error ENABLE(ARM64E) requires ENABLE(COMPUTED_GOTO_OPCODES) for getCodePtr (and its variants).
+#endif
+
 template<PtrTag tag>
 ALWAYS_INLINE MacroAssemblerCodePtr<tag> getCodePtr(OpcodeID opcodeID)
 {
@@ -162,7 +166,6 @@
     const Opcode* opcode = getOpcodeAddress(opcodeID);
     return getCodePtrImpl<tag>(*opcode, opcode);
 #else
-    static_assert(!ENABLE(ARM64E));
     return getCodePtrImpl<tag>(getOpcode(opcodeID), nullptr);
 #endif
 }
@@ -174,7 +177,6 @@
     const Opcode* opcode = getOpcodeWide16Address(opcodeID);
     return getCodePtrImpl<tag>(*opcode, opcode);
 #else
-    static_assert(!ENABLE(ARM64E));
     return getCodePtrImpl<tag>(getOpcodeWide16(opcodeID), nullptr);
 #endif
 }
@@ -186,7 +188,6 @@
     const Opcode* opcode = getOpcodeWide32Address(opcodeID);
     return getCodePtrImpl<tag>(*opcode, opcode);
 #else
-    static_assert(!ENABLE(ARM64E));
     return getCodePtrImpl<tag>(getOpcodeWide32(opcodeID), nullptr);
 #endif
 }
@@ -295,7 +296,6 @@
     const Opcode* opcode = getOpcodeAddress(opcodeID);
     return getCodePtrImpl<tag>(*opcode, opcode);
 #else
-    static_assert(!ENABLE(ARM64E));
     return getCodePtrImpl<tag>(getOpcode(opcodeID), nullptr);
 #endif
 }
@@ -307,7 +307,6 @@
     const Opcode* opcode = getOpcodeWide16Address(opcodeID);
     return getCodePtrImpl<tag>(*opcode, opcode);
 #else
-    static_assert(!ENABLE(ARM64E));
     return getCodePtrImpl<tag>(getOpcodeWide16(opcodeID), nullptr);
 #endif
 }
@@ -319,7 +318,6 @@
     const Opcode* opcode = getOpcodeWide32Address(opcodeID);
     return getCodePtrImpl<tag>(*opcode, opcode);
 #else
-    static_assert(!ENABLE(ARM64E));
     return getCodePtrImpl<tag>(getOpcodeWide32(opcodeID), nullptr);
 #endif
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to