Title: [261728] trunk
Revision
261728
Author
drou...@apple.com
Date
2020-05-14 19:00:30 -0700 (Thu, 14 May 2020)

Log Message

[ESNext] enable logical assignment operators by default
https://bugs.webkit.org/show_bug.cgi?id=211921

Reviewed by Yusuke Suzuki.

JSTests:

* test262/config.yaml:
* stress/logical-assignment-operator-and.js:
* stress/logical-assignment-operator-coalesce.js:
* stress/logical-assignment-operator-or.js:

Source/_javascript_Core:

* runtime/OptionsList.h:
* parser/Lexer.cpp:
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
Remove `useLogicalAssignmentOperators` option.

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (261727 => 261728)


--- trunk/JSTests/ChangeLog	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/JSTests/ChangeLog	2020-05-15 02:00:30 UTC (rev 261728)
@@ -1,3 +1,15 @@
+2020-05-14  Devin Rousso  <drou...@apple.com>
+
+        [ESNext] enable logical assignment operators by default
+        https://bugs.webkit.org/show_bug.cgi?id=211921
+
+        Reviewed by Yusuke Suzuki.
+
+        * test262/config.yaml:
+        * stress/logical-assignment-operator-and.js:
+        * stress/logical-assignment-operator-coalesce.js:
+        * stress/logical-assignment-operator-or.js:
+
 2020-05-14  Keith Miller  <keith_mil...@apple.com>
 
         Undecided Arrays shouldn't need to be OriginalArray to covert to GetArrayLength

Modified: trunk/JSTests/stress/logical-assignment-operator-and.js (261727 => 261728)


--- trunk/JSTests/stress/logical-assignment-operator-and.js	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/JSTests/stress/logical-assignment-operator-and.js	2020-05-15 02:00:30 UTC (rev 261728)
@@ -1,5 +1,3 @@
-//@ runLogicalAssignmentOperatorsEnabled
-
 function shouldBe(func, expected) {
     let actual = func();
     if (typeof expected === "function" ? !(actual instanceof expected) : actual !== expected)

Modified: trunk/JSTests/stress/logical-assignment-operator-coalesce.js (261727 => 261728)


--- trunk/JSTests/stress/logical-assignment-operator-coalesce.js	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/JSTests/stress/logical-assignment-operator-coalesce.js	2020-05-15 02:00:30 UTC (rev 261728)
@@ -1,5 +1,3 @@
-//@ runLogicalAssignmentOperatorsEnabled
-
 function shouldBe(func, expected) {
     let actual = func();
     if (typeof expected === "function" ? !(actual instanceof expected) : actual !== expected)

Modified: trunk/JSTests/stress/logical-assignment-operator-or.js (261727 => 261728)


--- trunk/JSTests/stress/logical-assignment-operator-or.js	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/JSTests/stress/logical-assignment-operator-or.js	2020-05-15 02:00:30 UTC (rev 261728)
@@ -1,5 +1,3 @@
-//@ runLogicalAssignmentOperatorsEnabled
-
 function shouldBe(func, expected) {
     let actual = func();
     if (typeof expected === "function" ? !(actual instanceof expected) : actual !== expected)

Modified: trunk/JSTests/test262/config.yaml (261727 => 261728)


--- trunk/JSTests/test262/config.yaml	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/JSTests/test262/config.yaml	2020-05-15 02:00:30 UTC (rev 261728)
@@ -6,7 +6,6 @@
   Intl.RelativeTimeFormat: useIntlRelativeTimeFormat
   WeakRef: useWeakRefs
   class-fields-public: usePublicClassFields
-  logical-assignment-operators: useLogicalAssignmentOperators
 skip:
   features:
     - SharedArrayBuffer

Modified: trunk/Source/_javascript_Core/ChangeLog (261727 => 261728)


--- trunk/Source/_javascript_Core/ChangeLog	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-05-15 02:00:30 UTC (rev 261728)
@@ -1,3 +1,15 @@
+2020-05-14  Devin Rousso  <drou...@apple.com>
+
+        [ESNext] enable logical assignment operators by default
+        https://bugs.webkit.org/show_bug.cgi?id=211921
+
+        Reviewed by Yusuke Suzuki.
+
+        * runtime/OptionsList.h:
+        * parser/Lexer.cpp:
+        (JSC::Lexer<T>::lexWithoutClearingLineTerminator):
+        Remove `useLogicalAssignmentOperators` option.
+
 2020-05-14  Keith Miller  <keith_mil...@apple.com>
 
         Undecided Arrays shouldn't need to be OriginalArray to covert to GetArrayLength

Modified: trunk/Source/_javascript_Core/parser/Lexer.cpp (261727 => 261728)


--- trunk/Source/_javascript_Core/parser/Lexer.cpp	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/Source/_javascript_Core/parser/Lexer.cpp	2020-05-15 02:00:30 UTC (rev 261728)
@@ -2086,7 +2086,7 @@
         shift();
         if (m_current == '&') {
             shift();
-            if (UNLIKELY(Options::useLogicalAssignmentOperators() && m_current == '=')) {
+            if (m_current == '=') {
                 shift();
                 token = ANDEQUAL;
                 break;
@@ -2128,7 +2128,7 @@
         }
         if (m_current == '|') {
             shift();
-            if (UNLIKELY(Options::useLogicalAssignmentOperators() && m_current == '=')) {
+            if (m_current == '=') {
                 shift();
                 token = OREQUAL;
                 break;
@@ -2169,7 +2169,7 @@
         shift();
         if (m_current == '?') {
             shift();
-            if (UNLIKELY(Options::useLogicalAssignmentOperators() && m_current == '=')) {
+            if (m_current == '=') {
                 shift();
                 token = COALESCEEQUAL;
                 break;

Modified: trunk/Source/_javascript_Core/runtime/OptionsList.h (261727 => 261728)


--- trunk/Source/_javascript_Core/runtime/OptionsList.h	2020-05-15 01:21:20 UTC (rev 261727)
+++ trunk/Source/_javascript_Core/runtime/OptionsList.h	2020-05-15 02:00:30 UTC (rev 261728)
@@ -506,7 +506,6 @@
     v(Bool, forceOSRExitToLLInt, false, Normal, "If true, we always exit to the LLInt. If false, we exit to whatever is most convenient.") \
     v(Unsigned, getByValICMaxNumberOfIdentifiers, 4, Normal, "Number of identifiers we see in the LLInt that could cause us to bail on generating an IC for get_by_val.") \
     v(Bool, usePublicClassFields, true, Normal, "If true, the parser will understand public data fields inside classes.") \
-    v(Bool, useLogicalAssignmentOperators, false, Normal, "Enable support for \?\?=, ||=, and &&= logical assignment operators.") \
     v(Bool, useRandomizingExecutableIslandAllocation, false, Normal, "For the arm64 ExecutableAllocator, if true, select which region to use randomly. This is useful for testing that jump islands work.") \
 
 enum OptionEquivalence {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to