Title: [229509] tags/Safari-606.1.7.1/Source/_javascript_Core

Diff

Modified: tags/Safari-606.1.7.1/Source/_javascript_Core/ChangeLog (229508 => 229509)


--- tags/Safari-606.1.7.1/Source/_javascript_Core/ChangeLog	2018-03-10 21:37:37 UTC (rev 229508)
+++ tags/Safari-606.1.7.1/Source/_javascript_Core/ChangeLog	2018-03-10 21:43:19 UTC (rev 229509)
@@ -1,3 +1,19 @@
+2018-03-10  Jason Marcell  <[email protected]>
+
+        Cherry-pick r229506. rdar://problem/38316707
+
+    2018-03-09  Mark Lam  <[email protected]>
+
+            offlineasm should reset the Assembler's working state before doing another pass for a new target.
+            https://bugs.webkit.org/show_bug.cgi?id=183538
+            <rdar://problem/38325955>
+
+            Reviewed by Michael Saboff.
+
+            * llint/LowLevelInterpreter.cpp:
+            * offlineasm/asm.rb:
+            * offlineasm/cloop.rb:
+
 2018-03-06  Kocsen Chung  <[email protected]>
 
         Cherry-pick r229293. rdar://problem/38179753

Modified: tags/Safari-606.1.7.1/Source/_javascript_Core/llint/LowLevelInterpreter.cpp (229508 => 229509)


--- tags/Safari-606.1.7.1/Source/_javascript_Core/llint/LowLevelInterpreter.cpp	2018-03-10 21:37:37 UTC (rev 229508)
+++ tags/Safari-606.1.7.1/Source/_javascript_Core/llint/LowLevelInterpreter.cpp	2018-03-10 21:43:19 UTC (rev 229509)
@@ -30,6 +30,7 @@
 #include <wtf/InlineASM.h>
 
 #if !ENABLE(JIT)
+#include "Bytecodes.h"
 #include "CLoopStackInlines.h"
 #include "CodeBlock.h"
 #include "CommonSlowPaths.h"

Modified: tags/Safari-606.1.7.1/Source/_javascript_Core/offlineasm/asm.rb (229508 => 229509)


--- tags/Safari-606.1.7.1/Source/_javascript_Core/offlineasm/asm.rb	2018-03-10 21:37:37 UTC (rev 229508)
+++ tags/Safari-606.1.7.1/Source/_javascript_Core/offlineasm/asm.rb	2018-03-10 21:43:19 UTC (rev 229509)
@@ -39,6 +39,10 @@
     def initialize(outp)
         @outp = outp
         @state = :cpp
+        resetAsm
+    end
+
+    def resetAsm
         @commentState = :none
         @comment = nil
         @internalComment = nil
@@ -93,6 +97,7 @@
     end
     
     def inAsm
+        resetAsm
         enterAsm
         yield
         leaveAsm

Modified: tags/Safari-606.1.7.1/Source/_javascript_Core/offlineasm/cloop.rb (229508 => 229509)


--- tags/Safari-606.1.7.1/Source/_javascript_Core/offlineasm/cloop.rb	2018-03-10 21:37:37 UTC (rev 229508)
+++ tags/Safari-606.1.7.1/Source/_javascript_Core/offlineasm/cloop.rb	2018-03-10 21:43:19 UTC (rev 229509)
@@ -564,8 +564,6 @@
 end
 
 class Instruction
-    @@didReturnFromJSLabelCounter = 0
-
     def lowerC_LOOP
         case opcode
         when "addi"
@@ -1123,11 +1121,11 @@
         # use of the call instruction. Instead, we just implement JS calls
         # as an opcode dispatch.
         when "cloopCallJSFunction"
-            @@didReturnFromJSLabelCounter += 1
-            $asm.putc "lr.opcode = getOpcode(llint_cloop_did_return_from_js_#{@@didReturnFromJSLabelCounter});"
+            uid = $asm.newUID
+            $asm.putc "lr.opcode = getOpcode(llint_cloop_did_return_from_js_#{uid});"
             $asm.putc "opcode = #{operands[0].clValue(:opcode)};"
             $asm.putc "DISPATCH_OPCODE();"
-            $asm.putsLabel("llint_cloop_did_return_from_js_#{@@didReturnFromJSLabelCounter}", false)
+            $asm.putsLabel("llint_cloop_did_return_from_js_#{uid}", false)
 
         # We can't do generic function calls with an arbitrary set of args, but
         # fortunately we don't have to here. All native function calls always
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to