changeset 55998:41ba4a00fe34 fibers

Merge
author rpressler
date Fri, 19 Jul 2019 17:51:31 +0100
parents eefca691e5d9 ad0e04e37c56
children 95a20486260c
files src/java.base/share/classes/java/lang/Continuation.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Continuation.java	Fri Jul 19 15:10:26 2019 +0100
+++ b/src/java.base/share/classes/java/lang/Continuation.java	Fri Jul 19 17:51:31 2019 +0100
@@ -330,6 +330,7 @@
                     doContinue(); // intrinsic. Jumps into yield, as a return from doYield    
                 }
             } finally {
+                fence();
                 try {
                 if (TRACE) System.out.println("run (after) sp: " + sp + " refSP: " + refSP + " maxSize: " + maxSize);
 
@@ -677,12 +678,12 @@
     }
 
     void resizeStack(int newLength) {
-        if (DEBUG)
-            System.out.println("-- resizeStack0 length: " + stack.length + " sp: " + sp + " fp: " + fp + " newLength: " + newLength);
         int oldLength = stack.length;
         int offset = sp;
         int n = oldLength - offset;
         assert newLength >= n;
+        if (DEBUG)
+            System.out.println("-- resizeStack0 length: " + stack.length + " sp: " + sp + " newLength: " + newLength + " used: " + n);
         int[] newStack = new int[newLength];
         System.arraycopy(stack, offset, newStack, newLength - n, n);
         this.stack = newStack;