Title: [245409] branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler
Revision
245409
Author
[email protected]
Date
2019-05-16 15:47:52 -0700 (Thu, 16 May 2019)

Log Message

Revert "Apply patch. rdar://problem/50754976"

Modified Paths


Diff

Modified: branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp (245408 => 245409)


--- branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2019-05-16 22:25:01 UTC (rev 245408)
+++ branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler/BytecodeGenerator.cpp	2019-05-16 22:47:52 UTC (rev 245409)
@@ -1708,7 +1708,8 @@
     return srcDst;
 }
 
-bool BytecodeGenerator::emitEqualityOpImpl(RegisterID* dst, RegisterID* src1, RegisterID* src2)
+template<typename EqOp>
+RegisterID* BytecodeGenerator::emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2)
 {
     if (!canDoPeepholeOptimization())
         return false;
@@ -1723,47 +1724,48 @@
             if (value == "undefined") {
                 rewind();
                 OpIsUndefined::emit(this, dst, op.m_value);
-                return true;
+                return dst;
             }
             if (value == "boolean") {
                 rewind();
                 OpIsBoolean::emit(this, dst, op.m_value);
-                return true;
+                return dst;
             }
             if (value == "number") {
                 rewind();
                 OpIsNumber::emit(this, dst, op.m_value);
-                return true;
+                return dst;
             }
             if (value == "string") {
                 rewind();
                 OpIsCellWithType::emit(this, dst, op.m_value, StringType);
-                return true;
+                return dst;
             }
             if (value == "symbol") {
                 rewind();
                 OpIsCellWithType::emit(this, dst, op.m_value, SymbolType);
-                return true;
+                return dst;
             }
             if (Options::useBigInt() && value == "bigint") {
                 rewind();
                 OpIsCellWithType::emit(this, dst, op.m_value, BigIntType);
-                return true;
+                return dst;
             }
             if (value == "object") {
                 rewind();
                 OpIsObjectOrNull::emit(this, dst, op.m_value);
-                return true;
+                return dst;
             }
             if (value == "function") {
                 rewind();
                 OpIsFunction::emit(this, dst, op.m_value);
-                return true;
+                return dst;
             }
         }
     }
 
-    return false;
+    EqOp::emit(this, dst, src1, src2);
+    return dst;
 }
 
 void BytecodeGenerator::emitTypeProfilerExpressionInfo(const JSTextPosition& startDivot, const JSTextPosition& endDivot)

Modified: branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h (245408 => 245409)


--- branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2019-05-16 22:25:01 UTC (rev 245408)
+++ branches/safari-607.2.1.2-branch/Source/_javascript_Core/bytecompiler/BytecodeGenerator.h	2019-05-16 22:47:52 UTC (rev 245409)
@@ -711,15 +711,7 @@
         RegisterID* emitBinaryOp(OpcodeID, RegisterID* dst, RegisterID* src1, RegisterID* src2, OperandTypes);
 
         template<typename EqOp>
-        RegisterID* emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2)
-        {
-            if (!emitEqualityOpImpl(dst, src1, src2))
-                EqOp::emit(this, dst, src1, src2);
-            return dst;
-        }
-
-        bool emitEqualityOpImpl(RegisterID* dst, RegisterID* src1, RegisterID* src2);
-
+        RegisterID* emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2);
         RegisterID* emitCreateThis(RegisterID* dst);
         void emitTDZCheck(RegisterID* target);
         bool needsTDZCheck(const Variable&);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to