Title: [232658] trunk/Source/_javascript_Core
Revision
232658
Author
[email protected]
Date
2018-06-08 17:57:23 -0700 (Fri, 08 Jun 2018)

Log Message

jumpTrueOrFalse only takes the fast path for boolean false on 64bit LLInt
https://bugs.webkit.org/show_bug.cgi?id=186446
<rdar://problem/40949995>

Patch by Tadeu Zagallo <[email protected]> on 2018-06-08
Reviewed by Mark Lam.

On 64bit LLInt, jumpTrueOrFalse did a mask check to take the fast path for
boolean literals, but it would only work for false. Change it so that it
takes the fast path for true, false, null and undefined.

* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter64.asm:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (232657 => 232658)


--- trunk/Source/_javascript_Core/ChangeLog	2018-06-09 00:17:04 UTC (rev 232657)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-06-09 00:57:23 UTC (rev 232658)
@@ -1,3 +1,18 @@
+2018-06-08  Tadeu Zagallo  <[email protected]>
+
+        jumpTrueOrFalse only takes the fast path for boolean false on 64bit LLInt 
+        https://bugs.webkit.org/show_bug.cgi?id=186446
+        <rdar://problem/40949995>
+
+        Reviewed by Mark Lam.
+
+        On 64bit LLInt, jumpTrueOrFalse did a mask check to take the fast path for
+        boolean literals, but it would only work for false. Change it so that it
+        takes the fast path for true, false, null and undefined.
+
+        * llint/LowLevelInterpreter.asm:
+        * llint/LowLevelInterpreter64.asm:
+
 2018-06-08  Brian Burg  <[email protected]>
 
         [Cocoa] Web Automation: include browser name and version in listing for automation targets

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (232657 => 232658)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-06-09 00:17:04 UTC (rev 232657)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-06-09 00:57:23 UTC (rev 232658)
@@ -1583,7 +1583,7 @@
 _llint_op_jtrue:
     traceExecution()
     jumpTrueOrFalse(
-        macro (value, target) btinz value, target end,
+        macro (value, target) btinz value, 1, target end,
         _llint_slow_path_jtrue)
 
 
@@ -1590,7 +1590,7 @@
 _llint_op_jfalse:
     traceExecution()
     jumpTrueOrFalse(
-        macro (value, target) btiz value, target end,
+        macro (value, target) btiz value, 1, target end,
         _llint_slow_path_jfalse)
 
 

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (232657 => 232658)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2018-06-09 00:17:04 UTC (rev 232657)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm	2018-06-09 00:57:23 UTC (rev 232658)
@@ -1821,8 +1821,7 @@
 macro jumpTrueOrFalse(conditionOp, slow)
     loadisFromInstruction(1, t1)
     loadConstantOrVariable(t1, t0)
-    xorq ValueFalse, t0
-    btqnz t0, -1, .slow
+    btqnz t0, ~0xf, .slow
     conditionOp(t0, .target)
     dispatch(3)
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to