public class com.oracle.truffle.js.test.threading.ConcurrentAccess
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: com.oracle.truffle.js.test.threading.ConcurrentAccess
  super_class: java.lang.Object
{
  public void <init>();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
         0: .line 58
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lcom/oracle/truffle/js/test/threading/ConcurrentAccess;

  public void concurrentEvalsTwoContexts();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=10, args_size=1
        start local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
         0: .line 67
            aconst_null
            astore 1
            aconst_null
            astore 2
         1: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.threading.TestUtil.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 3 /* cx1 */
        start local 3 // org.graalvm.polyglot.Context cx1
         2: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.threading.TestUtil.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* cx2 */
        start local 4 // org.graalvm.polyglot.Context cx2
         3: .line 68
            aload 3 /* cx1 */
            ldc "js"
            ldc "(function(x,y) { return JSON.stringify({x:x,y:y}); })"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* json1 */
        start local 5 // org.graalvm.polyglot.Value json1
         4: .line 69
            aload 4 /* cx2 */
            ldc "js"
            ldc "(function(x,y) { return JSON.stringify({x:x,y:y}); })"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 6 /* json2 */
        start local 6 // org.graalvm.polyglot.Value json2
         5: .line 71
            new java.lang.Thread
            dup
            aload 5 /* json1 */
            invokedynamic run(Lorg/graalvm/polyglot/Value;)Ljava/lang/Runnable;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  ()V
                  com/oracle/truffle/js/test/threading/ConcurrentAccess.lambda$0(Lorg/graalvm/polyglot/Value;)V (6)
                  ()V
            invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
            astore 7 /* thread */
        start local 7 // java.lang.Thread thread
         6: .line 78
            aload 7 /* thread */
            invokevirtual java.lang.Thread.start:()V
         7: .line 79
            iconst_0
            istore 8 /* i */
        start local 8 // int i
         8: goto 12
         9: .line 80
      StackMap locals: com.oracle.truffle.js.test.threading.ConcurrentAccess java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Context org.graalvm.polyglot.Value org.graalvm.polyglot.Value java.lang.Thread int
      StackMap stack:
            aload 6 /* json2 */
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            bipush 42
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            bipush 43
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
            astore 9 /* encoded */
        start local 9 // java.lang.String encoded
        10: .line 81
            ldc "{\"x\":42,\"y\":43}"
            aload 9 /* encoded */
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 9 // java.lang.String encoded
        11: .line 79
            iinc 8 /* i */ 1
      StackMap locals:
      StackMap stack:
        12: iload 8 /* i */
            sipush 1000
            if_icmplt 9
        end local 8 // int i
        13: .line 83
            aload 7 /* thread */
            invokevirtual java.lang.Thread.join:()V
        end local 7 // java.lang.Thread thread
        end local 6 // org.graalvm.polyglot.Value json2
        end local 5 // org.graalvm.polyglot.Value json1
        14: .line 84
            aload 4 /* cx2 */
            ifnull 17
            aload 4 /* cx2 */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 17
      StackMap locals: com.oracle.truffle.js.test.threading.ConcurrentAccess java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        15: astore 1
            aload 4 /* cx2 */
            ifnull 16
            aload 4 /* cx2 */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context cx2
      StackMap locals:
      StackMap stack:
        16: aload 1
            athrow
      StackMap locals:
      StackMap stack:
        17: aload 3 /* cx1 */
            ifnull 25
            aload 3 /* cx1 */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 25
      StackMap locals:
      StackMap stack: java.lang.Throwable
        18: astore 2
            aload 1
            ifnonnull 19
            aload 2
            astore 1
            goto 20
      StackMap locals:
      StackMap stack:
        19: aload 1
            aload 2
            if_acmpeq 20
            aload 1
            aload 2
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        20: aload 3 /* cx1 */
            ifnull 21
            aload 3 /* cx1 */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 3 // org.graalvm.polyglot.Context cx1
      StackMap locals:
      StackMap stack:
        21: aload 1
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        22: astore 2
            aload 1
            ifnonnull 23
            aload 2
            astore 1
            goto 24
      StackMap locals:
      StackMap stack:
        23: aload 1
            aload 2
            if_acmpeq 24
            aload 1
            aload 2
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        24: aload 1
            athrow
        25: .line 85
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   26     0     this  Lcom/oracle/truffle/js/test/threading/ConcurrentAccess;
            2   21     3      cx1  Lorg/graalvm/polyglot/Context;
            3   16     4      cx2  Lorg/graalvm/polyglot/Context;
            4   14     5    json1  Lorg/graalvm/polyglot/Value;
            5   14     6    json2  Lorg/graalvm/polyglot/Value;
            6   14     7   thread  Ljava/lang/Thread;
            8   13     8        i  I
           10   11     9  encoded  Ljava/lang/String;
      Exception table:
        from    to  target  type
           3    14      15  any
           2    17      18  any
           1    22      22  any
    Exceptions:
      throws java.lang.InterruptedException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void javaInteropThread();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
         0: .line 92
            new java.util.concurrent.CountDownLatch
            dup
            iconst_1
            invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
            astore 1 /* endGate */
        start local 1 // java.util.concurrent.CountDownLatch endGate
         1: .line 93
            new java.util.concurrent.atomic.AtomicReference
            dup
            aconst_null
            invokespecial java.util.concurrent.atomic.AtomicReference.<init>:(Ljava/lang/Object;)V
            astore 2 /* exception */
        start local 2 // java.util.concurrent.atomic.AtomicReference exception
         2: .line 94
            iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.threading.TestUtil.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            getstatic org.graalvm.polyglot.HostAccess.ALL:Lorg/graalvm/polyglot/HostAccess;
            invokevirtual org.graalvm.polyglot.Context$Builder.allowHostAccess:(Lorg/graalvm/polyglot/HostAccess;)Lorg/graalvm/polyglot/Context$Builder;
            invokedynamic test()Ljava/util/function/Predicate;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  (Ljava/lang/Object;)Z
                  com/oracle/truffle/js/test/threading/ConcurrentAccess.lambda$1(Ljava/lang/String;)Z (6)
                  (Ljava/lang/String;)Z
            invokevirtual org.graalvm.polyglot.Context$Builder.allowHostClassLookup:(Ljava/util/function/Predicate;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 3 /* context */
        start local 3 // org.graalvm.polyglot.Context context
         3: .line 96
            aload 3 /* context */
            ldc "js"
            invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
            ldc "onThreadException"
            aload 2 /* exception */
            aload 1 /* endGate */
            invokedynamic uncaughtException(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/CountDownLatch;)Ljava/lang/Thread$UncaughtExceptionHandler;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  (Ljava/lang/Thread;Ljava/lang/Throwable;)V
                  com/oracle/truffle/js/test/threading/ConcurrentAccess.lambda$2(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/CountDownLatch;Ljava/lang/Thread;Ljava/lang/Throwable;)V (6)
                  (Ljava/lang/Thread;Ljava/lang/Throwable;)V
            invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
         4: .line 109
            aload 3 /* context */
            ldc "js"
            ldc "var Thread = Java.type('java.lang.Thread');var t = new Thread(function() {    console.log('hello from another thread');});t.setUncaughtExceptionHandler(onThreadException);t.start();t.join();"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            pop
         5: .line 111
            aload 1 /* endGate */
            invokevirtual java.util.concurrent.CountDownLatch.await:()V
         6: .line 112
            aload 2 /* exception */
            invokevirtual java.util.concurrent.atomic.AtomicReference.get:()Ljava/lang/Object;
            checkcast java.lang.Throwable
            astore 4 /* throwable */
        start local 4 // java.lang.Throwable throwable
         7: .line 113
            aload 4 /* throwable */
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
         8: .line 114
            aload 4 /* throwable */
            instanceof java.lang.IllegalStateException
            invokestatic org.junit.Assert.assertTrue:(Z)V
        end local 4 // java.lang.Throwable throwable
         9: .line 115
            goto 13
      StackMap locals: com.oracle.truffle.js.test.threading.ConcurrentAccess java.util.concurrent.CountDownLatch java.util.concurrent.atomic.AtomicReference org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        10: astore 5
        11: .line 116
            aload 3 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        12: .line 117
            aload 5
            athrow
        13: .line 116
      StackMap locals:
      StackMap stack:
            aload 3 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        14: .line 118
            return
        end local 3 // org.graalvm.polyglot.Context context
        end local 2 // java.util.concurrent.atomic.AtomicReference exception
        end local 1 // java.util.concurrent.CountDownLatch endGate
        end local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   15     0       this  Lcom/oracle/truffle/js/test/threading/ConcurrentAccess;
            1   15     1    endGate  Ljava/util/concurrent/CountDownLatch;
            2   15     2  exception  Ljava/util/concurrent/atomic/AtomicReference<Ljava/lang/Throwable;>;
            3   15     3    context  Lorg/graalvm/polyglot/Context;
            7    9     4  throwable  Ljava/lang/Throwable;
      Exception table:
        from    to  target  type
           4    10      10  any
    Exceptions:
      throws java.lang.InterruptedException
    RuntimeVisibleAnnotations: 
      org.junit.Test(timeout = 30000)

  public void concurrentEvalsNoEnter();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=6, locals=9, args_size=1
        start local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
         0: .line 126
            new java.util.concurrent.CountDownLatch
            dup
            iconst_1
            invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
            astore 1 /* startGate */
        start local 1 // java.util.concurrent.CountDownLatch startGate
         1: .line 127
            new java.util.concurrent.CountDownLatch
            dup
            iconst_1
            invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
            astore 2 /* endGate */
        start local 2 // java.util.concurrent.CountDownLatch endGate
         2: .line 128
            new java.util.concurrent.atomic.AtomicBoolean
            dup
            iconst_0
            invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:(Z)V
            astore 3 /* hadException */
        start local 3 // java.util.concurrent.atomic.AtomicBoolean hadException
         3: .line 130
            iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.threading.TestUtil.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* cx */
        start local 4 // org.graalvm.polyglot.Context cx
         4: .line 132
            aload 4 /* cx */
            ldc "js"
            ldc "(function(x,y) { return JSON.stringify({x:x,y:y}); })"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* json */
        start local 5 // org.graalvm.polyglot.Value json
         5: .line 134
            new java.lang.Thread
            dup
            aload 1 /* startGate */
            aload 2 /* endGate */
            aload 3 /* hadException */
            aload 5 /* json */
            invokedynamic run(Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/atomic/AtomicBoolean;Lorg/graalvm/polyglot/Value;)Ljava/lang/Runnable;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  ()V
                  com/oracle/truffle/js/test/threading/ConcurrentAccess.lambda$3(Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/atomic/AtomicBoolean;Lorg/graalvm/polyglot/Value;)V (6)
                  ()V
            invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
            astore 6 /* t */
        start local 6 // java.lang.Thread t
         6: .line 154
            aload 6 /* t */
            invokevirtual java.lang.Thread.start:()V
         7: .line 155
            aload 1 /* startGate */
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
         8: .line 156
            goto 14
         9: .line 158
      StackMap locals: com.oracle.truffle.js.test.threading.ConcurrentAccess java.util.concurrent.CountDownLatch java.util.concurrent.CountDownLatch java.util.concurrent.atomic.AtomicBoolean org.graalvm.polyglot.Context org.graalvm.polyglot.Value java.lang.Thread
      StackMap stack:
            aload 5 /* json */
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            bipush 42
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            bipush 43
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
            astore 7 /* encoded */
        start local 7 // java.lang.String encoded
        10: .line 159
            ldc "{\"x\":42,\"y\":43}"
            aload 7 /* encoded */
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 7 // java.lang.String encoded
        11: .line 160
            goto 14
      StackMap locals:
      StackMap stack: java.lang.IllegalStateException
        12: pop
        13: .line 161
            aload 3 /* hadException */
            iconst_1
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
        14: .line 156
      StackMap locals:
      StackMap stack:
            aload 3 /* hadException */
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
            ifeq 9
        15: .line 164
            aload 2 /* endGate */
            invokevirtual java.util.concurrent.CountDownLatch.await:()V
        16: .line 165
            aload 6 /* t */
            ldc 10000
            invokevirtual java.lang.Thread.join:(J)V
        17: .line 166
            goto 23
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        18: astore 7 /* e */
        start local 7 // java.lang.InterruptedException e
        19: .line 167
            new java.lang.AssertionError
            dup
            aload 7 /* e */
            invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
            athrow
        end local 7 // java.lang.InterruptedException e
        20: .line 168
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 8
        21: .line 169
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        22: .line 170
            aload 8
            athrow
        23: .line 169
      StackMap locals:
      StackMap stack:
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        24: .line 171
            return
        end local 6 // java.lang.Thread t
        end local 5 // org.graalvm.polyglot.Value json
        end local 4 // org.graalvm.polyglot.Context cx
        end local 3 // java.util.concurrent.atomic.AtomicBoolean hadException
        end local 2 // java.util.concurrent.CountDownLatch endGate
        end local 1 // java.util.concurrent.CountDownLatch startGate
        end local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
      LocalVariableTable:
        Start  End  Slot          Name  Signature
            0   25     0          this  Lcom/oracle/truffle/js/test/threading/ConcurrentAccess;
            1   25     1     startGate  Ljava/util/concurrent/CountDownLatch;
            2   25     2       endGate  Ljava/util/concurrent/CountDownLatch;
            3   25     3  hadException  Ljava/util/concurrent/atomic/AtomicBoolean;
            4   25     4            cx  Lorg/graalvm/polyglot/Context;
            5   25     5          json  Lorg/graalvm/polyglot/Value;
            6   25     6             t  Ljava/lang/Thread;
           10   11     7       encoded  Ljava/lang/String;
           19   20     7             e  Ljava/lang/InterruptedException;
      Exception table:
        from    to  target  type
           9    11      12  Class java.lang.IllegalStateException
           6    17      18  Class java.lang.InterruptedException
           6    20      20  any
    RuntimeVisibleAnnotations: 
      org.junit.Test(timeout = 30000)

  public void concurrentEvalsWithEnter();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=8, locals=12, args_size=1
        start local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
         0: .line 179
            new java.util.concurrent.CountDownLatch
            dup
            iconst_1
            invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
            astore 1 /* startGate */
        start local 1 // java.util.concurrent.CountDownLatch startGate
         1: .line 180
            new java.util.concurrent.CountDownLatch
            dup
            iconst_1
            invokespecial java.util.concurrent.CountDownLatch.<init>:(I)V
            astore 2 /* endGate */
        start local 2 // java.util.concurrent.CountDownLatch endGate
         2: .line 181
            new java.util.concurrent.atomic.AtomicBoolean
            dup
            iconst_0
            invokespecial java.util.concurrent.atomic.AtomicBoolean.<init>:(Z)V
            astore 3 /* hadException */
        start local 3 // java.util.concurrent.atomic.AtomicBoolean hadException
         3: .line 183
            iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.threading.TestUtil.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* cx */
        start local 4 // org.graalvm.polyglot.Context cx
         4: .line 184
            new java.util.concurrent.locks.ReentrantLock
            dup
            invokespecial java.util.concurrent.locks.ReentrantLock.<init>:()V
            astore 5 /* contextLock */
        start local 5 // java.util.concurrent.locks.ReentrantLock contextLock
         5: .line 186
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.enter:()V
         6: .line 187
            aload 4 /* cx */
            ldc "js"
            ldc "(function(x,y) { return JSON.stringify({x:x,y:y}); })"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 6 /* json */
        start local 6 // org.graalvm.polyglot.Value json
         7: .line 188
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.leave:()V
         8: .line 190
            new java.lang.Thread
            dup
            aload 1 /* startGate */
            aload 2 /* endGate */
            aload 4 /* cx */
            aload 5 /* contextLock */
            aload 6 /* json */
            aload 3 /* hadException */
            invokedynamic run(Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/CountDownLatch;Lorg/graalvm/polyglot/Context;Ljava/util/concurrent/locks/ReentrantLock;Lorg/graalvm/polyglot/Value;Ljava/util/concurrent/atomic/AtomicBoolean;)Ljava/lang/Runnable;
              Bootstrap: invokestatic java.lang.invoke.LambdaMetafactory.metafactory:(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
                Method arguments:
                  ()V
                  com/oracle/truffle/js/test/threading/ConcurrentAccess.lambda$4(Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/CountDownLatch;Lorg/graalvm/polyglot/Context;Ljava/util/concurrent/locks/ReentrantLock;Lorg/graalvm/polyglot/Value;Ljava/util/concurrent/atomic/AtomicBoolean;)V (6)
                  ()V
            invokespecial java.lang.Thread.<init>:(Ljava/lang/Runnable;)V
            astore 7 /* t */
        start local 7 // java.lang.Thread t
         9: .line 217
            aload 7 /* t */
            invokevirtual java.lang.Thread.start:()V
        10: .line 218
            aload 1 /* startGate */
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
        11: .line 219
            iconst_0
            istore 8 /* it */
        start local 8 // int it
        12: goto 24
        13: .line 221
      StackMap locals: com.oracle.truffle.js.test.threading.ConcurrentAccess java.util.concurrent.CountDownLatch java.util.concurrent.CountDownLatch java.util.concurrent.atomic.AtomicBoolean org.graalvm.polyglot.Context java.util.concurrent.locks.ReentrantLock org.graalvm.polyglot.Value java.lang.Thread int
      StackMap stack:
            aload 5 /* contextLock */
            invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
        14: .line 222
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.enter:()V
        15: .line 223
            aload 6 /* json */
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            bipush 42
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            bipush 43
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
            astore 9 /* encoded */
        start local 9 // java.lang.String encoded
        16: .line 224
            ldc "{\"x\":42,\"y\":43}"
            aload 9 /* encoded */
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        17: .line 225
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.leave:()V
        end local 9 // java.lang.String encoded
        18: .line 226
            goto 22
      StackMap locals:
      StackMap stack: java.lang.Throwable
        19: astore 10
        20: .line 227
            aload 5 /* contextLock */
            invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
        21: .line 228
            aload 10
            athrow
        22: .line 227
      StackMap locals:
      StackMap stack:
            aload 5 /* contextLock */
            invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
        23: .line 219
            iinc 8 /* it */ 1
      StackMap locals:
      StackMap stack:
        24: iload 8 /* it */
            ldc 100000
            if_icmplt 13
        end local 8 // int it
        25: .line 230
            aload 2 /* endGate */
            invokevirtual java.util.concurrent.CountDownLatch.await:()V
        26: .line 231
            aload 7 /* t */
            ldc 10000
            invokevirtual java.lang.Thread.join:(J)V
        27: .line 232
            goto 33
      StackMap locals: com.oracle.truffle.js.test.threading.ConcurrentAccess java.util.concurrent.CountDownLatch java.util.concurrent.CountDownLatch java.util.concurrent.atomic.AtomicBoolean org.graalvm.polyglot.Context java.util.concurrent.locks.ReentrantLock org.graalvm.polyglot.Value java.lang.Thread
      StackMap stack: java.lang.InterruptedException
        28: astore 8 /* e */
        start local 8 // java.lang.InterruptedException e
        29: .line 233
            new java.lang.AssertionError
            dup
            aload 8 /* e */
            invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
            athrow
        end local 8 // java.lang.InterruptedException e
        30: .line 234
      StackMap locals:
      StackMap stack: java.lang.Throwable
            astore 11
        31: .line 235
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        32: .line 236
            aload 11
            athrow
        33: .line 235
      StackMap locals:
      StackMap stack:
            aload 4 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        34: .line 237
            aload 3 /* hadException */
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
            invokestatic org.junit.Assert.assertFalse:(Z)V
        35: .line 238
            return
        end local 7 // java.lang.Thread t
        end local 6 // org.graalvm.polyglot.Value json
        end local 5 // java.util.concurrent.locks.ReentrantLock contextLock
        end local 4 // org.graalvm.polyglot.Context cx
        end local 3 // java.util.concurrent.atomic.AtomicBoolean hadException
        end local 2 // java.util.concurrent.CountDownLatch endGate
        end local 1 // java.util.concurrent.CountDownLatch startGate
        end local 0 // com.oracle.truffle.js.test.threading.ConcurrentAccess this
      LocalVariableTable:
        Start  End  Slot          Name  Signature
            0   36     0          this  Lcom/oracle/truffle/js/test/threading/ConcurrentAccess;
            1   36     1     startGate  Ljava/util/concurrent/CountDownLatch;
            2   36     2       endGate  Ljava/util/concurrent/CountDownLatch;
            3   36     3  hadException  Ljava/util/concurrent/atomic/AtomicBoolean;
            4   36     4            cx  Lorg/graalvm/polyglot/Context;
            5   36     5   contextLock  Ljava/util/concurrent/locks/ReentrantLock;
            7   36     6          json  Lorg/graalvm/polyglot/Value;
            9   36     7             t  Ljava/lang/Thread;
           12   25     8            it  I
           16   18     9       encoded  Ljava/lang/String;
           29   30     8             e  Ljava/lang/InterruptedException;
      Exception table:
        from    to  target  type
          13    19      19  any
           9    27      28  Class java.lang.InterruptedException
           9    30      30  any
    RuntimeVisibleAnnotations: 
      org.junit.Test(timeout = 30000)

  private static void lambda$0(org.graalvm.polyglot.Value);
    descriptor: (Lorg/graalvm/polyglot/Value;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=5, locals=3, args_size=1
         0: .line 72
            iconst_0
            istore 1 /* i */
        start local 1 // int i
         1: goto 5
         2: .line 73
      StackMap locals: int
      StackMap stack:
            aload 0
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            bipush 42
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            bipush 43
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
            astore 2 /* encoded */
        start local 2 // java.lang.String encoded
         3: .line 74
            ldc "{\"x\":42,\"y\":43}"
            aload 2 /* encoded */
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 2 // java.lang.String encoded
         4: .line 72
            iinc 1 /* i */ 1
      StackMap locals:
      StackMap stack:
         5: iload 1 /* i */
            sipush 1000
            if_icmplt 2
        end local 1 // int i
         6: .line 76
            return
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            1    6     1        i  I
            3    4     2  encoded  Ljava/lang/String;

  private static boolean lambda$1(java.lang.String);
    descriptor: (Ljava/lang/String;)Z
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // java.lang.String s
         0: .line 94
            iconst_1
            ireturn
        end local 0 // java.lang.String s
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0     s  Ljava/lang/String;

  private static void lambda$2(java.util.concurrent.atomic.AtomicReference, java.util.concurrent.CountDownLatch, java.lang.Thread, java.lang.Throwable);
    descriptor: (Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/CountDownLatch;Ljava/lang/Thread;Ljava/lang/Throwable;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=4, args_size=4
        start local 2 // java.lang.Thread t
        start local 3 // java.lang.Throwable e
         0: .line 97
            aload 0
            aload 3 /* e */
            invokevirtual java.util.concurrent.atomic.AtomicReference.set:(Ljava/lang/Object;)V
         1: .line 98
            aload 1
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
         2: .line 99
            return
        end local 3 // java.lang.Throwable e
        end local 2 // java.lang.Thread t
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     2     t  Ljava/lang/Thread;
            0    3     3     e  Ljava/lang/Throwable;

  private static void lambda$3(java.util.concurrent.CountDownLatch, java.util.concurrent.CountDownLatch, java.util.concurrent.atomic.AtomicBoolean, org.graalvm.polyglot.Value);
    descriptor: (Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/atomic/AtomicBoolean;Lorg/graalvm/polyglot/Value;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=5, locals=6, args_size=4
         0: .line 136
            aload 0
            invokevirtual java.util.concurrent.CountDownLatch.await:()V
         1: .line 138
            goto 7
         2: .line 140
      StackMap locals:
      StackMap stack:
            aload 3
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            bipush 42
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            bipush 43
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
            astore 4 /* encoded */
        start local 4 // java.lang.String encoded
         3: .line 141
            ldc "{\"x\":42,\"y\":43}"
            aload 4 /* encoded */
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 4 // java.lang.String encoded
         4: .line 142
            goto 7
      StackMap locals:
      StackMap stack: java.lang.IllegalStateException
         5: pop
         6: .line 143
            aload 2
            iconst_1
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
         7: .line 138
      StackMap locals:
      StackMap stack:
            aload 2
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.get:()Z
            ifeq 2
         8: .line 146
            goto 12
      StackMap locals:
      StackMap stack: java.lang.Throwable
         9: astore 5
        10: .line 147
            aload 1
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
        11: .line 148
            aload 5
            athrow
        12: .line 147
      StackMap locals:
      StackMap stack:
            aload 1
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
        13: .line 149
            goto 15
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        14: pop
        15: .line 151
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            3    4     4  encoded  Ljava/lang/String;
      Exception table:
        from    to  target  type
           2     4       5  Class java.lang.IllegalStateException
           1     9       9  any
           0    13      14  Class java.lang.InterruptedException

  private static void lambda$4(java.util.concurrent.CountDownLatch, java.util.concurrent.CountDownLatch, org.graalvm.polyglot.Context, java.util.concurrent.locks.ReentrantLock, org.graalvm.polyglot.Value, java.util.concurrent.atomic.AtomicBoolean);
    descriptor: (Ljava/util/concurrent/CountDownLatch;Ljava/util/concurrent/CountDownLatch;Lorg/graalvm/polyglot/Context;Ljava/util/concurrent/locks/ReentrantLock;Lorg/graalvm/polyglot/Value;Ljava/util/concurrent/atomic/AtomicBoolean;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=5, locals=10, args_size=6
         0: .line 192
            aload 0
            invokevirtual java.util.concurrent.CountDownLatch.await:()V
         1: .line 194
            iconst_0
            istore 6 /* it */
        start local 6 // int it
         2: goto 18
         3: .line 197
      StackMap locals: int
      StackMap stack:
            aload 3
            invokevirtual java.util.concurrent.locks.ReentrantLock.lock:()V
         4: .line 198
            aload 2
            invokevirtual org.graalvm.polyglot.Context.enter:()V
         5: .line 199
            aload 4
            iconst_2
            anewarray java.lang.Object
            dup
            iconst_0
            bipush 42
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            dup
            iconst_1
            bipush 43
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
            astore 7 /* encoded */
        start local 7 // java.lang.String encoded
         6: .line 200
            ldc "{\"x\":42,\"y\":43}"
            aload 7 /* encoded */
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 7 // java.lang.String encoded
         7: .line 201
            goto 12
      StackMap locals:
      StackMap stack: java.lang.Throwable
         8: astore 8
         9: .line 202
            aload 2
            invokevirtual org.graalvm.polyglot.Context.leave:()V
        10: .line 203
            aload 3
            invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
        11: .line 204
            aload 8
            athrow
        12: .line 202
      StackMap locals:
      StackMap stack:
            aload 2
            invokevirtual org.graalvm.polyglot.Context.leave:()V
        13: .line 203
            aload 3
            invokevirtual java.util.concurrent.locks.ReentrantLock.unlock:()V
        14: .line 205
            goto 17
      StackMap locals:
      StackMap stack: java.lang.IllegalStateException
        15: pop
        16: .line 206
            aload 5
            iconst_1
            invokevirtual java.util.concurrent.atomic.AtomicBoolean.set:(Z)V
        17: .line 194
      StackMap locals:
      StackMap stack:
            iinc 6 /* it */ 1
      StackMap locals:
      StackMap stack:
        18: iload 6 /* it */
            ldc 100000
            if_icmplt 3
        end local 6 // int it
        19: .line 209
            goto 23
      StackMap locals: java.util.concurrent.CountDownLatch java.util.concurrent.CountDownLatch org.graalvm.polyglot.Context java.util.concurrent.locks.ReentrantLock org.graalvm.polyglot.Value java.util.concurrent.atomic.AtomicBoolean
      StackMap stack: java.lang.Throwable
        20: astore 9
        21: .line 210
            aload 1
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
        22: .line 211
            aload 9
            athrow
        23: .line 210
      StackMap locals:
      StackMap stack:
            aload 1
            invokevirtual java.util.concurrent.CountDownLatch.countDown:()V
        24: .line 212
            goto 26
      StackMap locals:
      StackMap stack: java.lang.InterruptedException
        25: pop
        26: .line 214
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            2   19     6       it  I
            6    7     7  encoded  Ljava/lang/String;
      Exception table:
        from    to  target  type
           3     8       8  any
           3    14      15  Class java.lang.IllegalStateException
           1    20      20  any
           0    24      25  Class java.lang.InterruptedException
}
SourceFile: "ConcurrentAccess.java"
InnerClasses:
  public final Lookup = java.lang.invoke.MethodHandles$Lookup of java.lang.invoke.MethodHandles
  public final Builder = org.graalvm.polyglot.Context$Builder of org.graalvm.polyglot.Context