public class com.oracle.truffle.js.test.interop.InteropByteBufferTest
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: com.oracle.truffle.js.test.interop.InteropByteBufferTest
  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.interop.InteropByteBufferTest this
         0: .line 56
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;

  public void testJavaBufferToTypedArray();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 60
            iconst_3
            newarray 8
            dup
            iconst_0
            iconst_1
            bastore
            dup
            iconst_1
            iconst_2
            bastore
            dup
            iconst_2
            iconst_3
            bastore
            invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
            astore 1 /* buffer */
        start local 1 // java.nio.ByteBuffer buffer
         1: .line 61
            aconst_null
            astore 2
            aconst_null
            astore 3
         2: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* context */
        start local 4 // org.graalvm.polyglot.Context context
         3: .line 62
            aload 4 /* context */
            ldc "js"
            invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
            ldc "buffer"
            aload 1 /* buffer */
            invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
         4: .line 63
            aload 4 /* context */
            ldc "js"
            ldc "new Int8Array(new ArrayBuffer(buffer));"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* jsBuffer */
        start local 5 // org.graalvm.polyglot.Value jsBuffer
         5: .line 64
            aload 5 /* jsBuffer */
            invokevirtual org.graalvm.polyglot.Value.getArraySize:()J
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         6: .line 65
            aload 5 /* jsBuffer */
            lconst_0
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            lconst_1
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         7: .line 66
            aload 5 /* jsBuffer */
            lconst_1
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 2
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         8: .line 67
            aload 5 /* jsBuffer */
            ldc 2
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 5 // org.graalvm.polyglot.Value jsBuffer
         9: .line 68
            aload 4 /* context */
            ifnull 15
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 15
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.nio.ByteBuffer java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        10: astore 2
            aload 4 /* context */
            ifnull 11
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        11: aload 2
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        12: astore 3
            aload 2
            ifnonnull 13
            aload 3
            astore 2
            goto 14
      StackMap locals:
      StackMap stack:
        13: aload 2
            aload 3
            if_acmpeq 14
            aload 2
            aload 3
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        14: aload 2
            athrow
        15: .line 69
      StackMap locals:
      StackMap stack:
            return
        end local 1 // java.nio.ByteBuffer buffer
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   16     0      this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            1   16     1    buffer  Ljava/nio/ByteBuffer;
            3   11     4   context  Lorg/graalvm/polyglot/Context;
            5    9     5  jsBuffer  Lorg/graalvm/polyglot/Value;
      Exception table:
        from    to  target  type
           3     9      10  any
           2    12      12  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testDirectBufferToTypedArray();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 73
            iconst_3
            invokestatic java.nio.ByteBuffer.allocateDirect:(I)Ljava/nio/ByteBuffer;
            astore 1 /* buffer */
        start local 1 // java.nio.ByteBuffer buffer
         1: .line 74
            aload 1 /* buffer */
            iconst_3
            newarray 8
            dup
            iconst_0
            iconst_1
            bastore
            dup
            iconst_1
            iconst_2
            bastore
            dup
            iconst_2
            iconst_3
            bastore
            invokevirtual java.nio.ByteBuffer.put:([B)Ljava/nio/ByteBuffer;
            pop
         2: .line 75
            aload 1 /* buffer */
            iconst_0
            invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/ByteBuffer;
            pop
         3: .line 76
            aconst_null
            astore 2
            aconst_null
            astore 3
         4: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* context */
        start local 4 // org.graalvm.polyglot.Context context
         5: .line 77
            aload 4 /* context */
            ldc "js"
            invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
            ldc "buffer"
            aload 1 /* buffer */
            invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
         6: .line 78
            aload 4 /* context */
            ldc "js"
            ldc "new Int8Array(new ArrayBuffer(buffer));"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* jsBuffer */
        start local 5 // org.graalvm.polyglot.Value jsBuffer
         7: .line 79
            aload 5 /* jsBuffer */
            invokevirtual org.graalvm.polyglot.Value.getArraySize:()J
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         8: .line 80
            aload 5 /* jsBuffer */
            lconst_0
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            lconst_1
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         9: .line 81
            aload 5 /* jsBuffer */
            lconst_1
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 2
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        10: .line 82
            aload 5 /* jsBuffer */
            ldc 2
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 5 // org.graalvm.polyglot.Value jsBuffer
        11: .line 83
            aload 4 /* context */
            ifnull 17
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 17
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.nio.ByteBuffer java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        12: astore 2
            aload 4 /* context */
            ifnull 13
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        13: aload 2
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        14: astore 3
            aload 2
            ifnonnull 15
            aload 3
            astore 2
            goto 16
      StackMap locals:
      StackMap stack:
        15: aload 2
            aload 3
            if_acmpeq 16
            aload 2
            aload 3
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        16: aload 2
            athrow
        17: .line 84
      StackMap locals:
      StackMap stack:
            return
        end local 1 // java.nio.ByteBuffer buffer
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   18     0      this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            1   18     1    buffer  Ljava/nio/ByteBuffer;
            5   13     4   context  Lorg/graalvm/polyglot/Context;
            7   11     5  jsBuffer  Lorg/graalvm/polyglot/Value;
      Exception table:
        from    to  target  type
           5    11      12  any
           4    14      14  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testJavaScriptCanWrite();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 88
            iconst_3
            newarray 8
            dup
            iconst_0
            iconst_1
            bastore
            dup
            iconst_1
            iconst_2
            bastore
            dup
            iconst_2
            iconst_3
            bastore
            invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
            astore 1 /* buffer */
        start local 1 // java.nio.ByteBuffer buffer
         1: .line 89
            aconst_null
            astore 2
            aconst_null
            astore 3
         2: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* context */
        start local 4 // org.graalvm.polyglot.Context context
         3: .line 90
            aload 4 /* context */
            ldc "js"
            invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
            ldc "buffer"
            aload 1 /* buffer */
            invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
         4: .line 91
            aload 4 /* context */
            ldc "js"
            ldc "(new Int8Array(new ArrayBuffer(buffer))).map(x => 42);"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* jsBuffer */
        start local 5 // org.graalvm.polyglot.Value jsBuffer
         5: .line 92
            aload 5 /* jsBuffer */
            invokevirtual org.graalvm.polyglot.Value.getArraySize:()J
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         6: .line 93
            aload 5 /* jsBuffer */
            lconst_0
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 42
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         7: .line 94
            aload 5 /* jsBuffer */
            lconst_1
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 42
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         8: .line 95
            aload 5 /* jsBuffer */
            ldc 2
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            ldc 42
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 5 // org.graalvm.polyglot.Value jsBuffer
         9: .line 96
            aload 4 /* context */
            ifnull 15
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 15
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.nio.ByteBuffer java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        10: astore 2
            aload 4 /* context */
            ifnull 11
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        11: aload 2
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        12: astore 3
            aload 2
            ifnonnull 13
            aload 3
            astore 2
            goto 14
      StackMap locals:
      StackMap stack:
        13: aload 2
            aload 3
            if_acmpeq 14
            aload 2
            aload 3
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        14: aload 2
            athrow
        15: .line 97
      StackMap locals:
      StackMap stack:
            return
        end local 1 // java.nio.ByteBuffer buffer
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   16     0      this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            1   16     1    buffer  Ljava/nio/ByteBuffer;
            3   11     4   context  Lorg/graalvm/polyglot/Context;
            5    9     5  jsBuffer  Lorg/graalvm/polyglot/Value;
      Exception table:
        from    to  target  type
           3     9      10  any
           2    12      12  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testSameBuffer();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 101
            iconst_3
            newarray 8
            dup
            iconst_0
            iconst_1
            bastore
            dup
            iconst_1
            iconst_2
            bastore
            dup
            iconst_2
            iconst_3
            bastore
            invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
            astore 1 /* buffer */
        start local 1 // java.nio.ByteBuffer buffer
         1: .line 102
            aconst_null
            astore 2
            aconst_null
            astore 3
         2: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* context */
        start local 4 // org.graalvm.polyglot.Context context
         3: .line 103
            aload 4 /* context */
            ldc "js"
            invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
            ldc "buffer"
            aload 1 /* buffer */
            invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
         4: .line 104
            aload 4 /* context */
            ldc "js"
            ldc "new Int8Array(new ArrayBuffer(buffer));"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* jsBuffer */
        start local 5 // org.graalvm.polyglot.Value jsBuffer
         5: .line 105
            aload 1 /* buffer */
            iconst_0
            invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/ByteBuffer;
            pop
         6: .line 106
            aload 5 /* jsBuffer */
            invokevirtual org.graalvm.polyglot.Value.getArraySize:()J
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         7: .line 107
            aload 5 /* jsBuffer */
            lconst_0
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            aload 1 /* buffer */
            invokevirtual java.nio.ByteBuffer.get:()B
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         8: .line 108
            aload 5 /* jsBuffer */
            lconst_1
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            aload 1 /* buffer */
            invokevirtual java.nio.ByteBuffer.get:()B
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         9: .line 109
            aload 5 /* jsBuffer */
            ldc 2
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            aload 1 /* buffer */
            invokevirtual java.nio.ByteBuffer.get:()B
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 5 // org.graalvm.polyglot.Value jsBuffer
        10: .line 110
            aload 4 /* context */
            ifnull 16
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 16
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.nio.ByteBuffer java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        11: astore 2
            aload 4 /* context */
            ifnull 12
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        12: aload 2
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        13: astore 3
            aload 2
            ifnonnull 14
            aload 3
            astore 2
            goto 15
      StackMap locals:
      StackMap stack:
        14: aload 2
            aload 3
            if_acmpeq 15
            aload 2
            aload 3
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        15: aload 2
            athrow
        16: .line 111
      StackMap locals:
      StackMap stack:
            return
        end local 1 // java.nio.ByteBuffer buffer
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   17     0      this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            1   17     1    buffer  Ljava/nio/ByteBuffer;
            3   12     4   context  Lorg/graalvm/polyglot/Context;
            5   10     5  jsBuffer  Lorg/graalvm/polyglot/Value;
      Exception table:
        from    to  target  type
           3    10      11  any
           2    13      13  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testBufferAsArgument();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=7, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 115
            iconst_3
            newarray 8
            dup
            iconst_0
            iconst_1
            bastore
            dup
            iconst_1
            iconst_2
            bastore
            dup
            iconst_2
            iconst_3
            bastore
            invokestatic java.nio.ByteBuffer.wrap:([B)Ljava/nio/ByteBuffer;
            astore 1 /* buffer */
        start local 1 // java.nio.ByteBuffer buffer
         1: .line 116
            aconst_null
            astore 2
            aconst_null
            astore 3
         2: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 4 /* context */
        start local 4 // org.graalvm.polyglot.Context context
         3: .line 117
            aload 4 /* context */
            ldc "js"
            ldc "(function fun(buff) {return new Int8Array(new ArrayBuffer(buff))})"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 5 /* fun */
        start local 5 // org.graalvm.polyglot.Value fun
         4: .line 118
            aload 5 /* fun */
            iconst_1
            anewarray java.lang.Object
            dup
            iconst_0
            aload 1 /* buffer */
            aastore
            invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
            astore 6 /* jsBuffer */
        start local 6 // org.graalvm.polyglot.Value jsBuffer
         5: .line 119
            aload 1 /* buffer */
            iconst_0
            invokevirtual java.nio.ByteBuffer.position:(I)Ljava/nio/ByteBuffer;
            pop
         6: .line 120
            aload 6 /* jsBuffer */
            invokevirtual org.graalvm.polyglot.Value.getArraySize:()J
            ldc 3
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         7: .line 121
            aload 6 /* jsBuffer */
            lconst_0
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            aload 1 /* buffer */
            invokevirtual java.nio.ByteBuffer.get:()B
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         8: .line 122
            aload 6 /* jsBuffer */
            lconst_1
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            aload 1 /* buffer */
            invokevirtual java.nio.ByteBuffer.get:()B
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         9: .line 123
            aload 6 /* jsBuffer */
            ldc 2
            invokevirtual org.graalvm.polyglot.Value.getArrayElement:(J)Lorg/graalvm/polyglot/Value;
            invokevirtual org.graalvm.polyglot.Value.asByte:()B
            i2l
            aload 1 /* buffer */
            invokevirtual java.nio.ByteBuffer.get:()B
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 6 // org.graalvm.polyglot.Value jsBuffer
        end local 5 // org.graalvm.polyglot.Value fun
        10: .line 124
            aload 4 /* context */
            ifnull 16
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 16
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.nio.ByteBuffer java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        11: astore 2
            aload 4 /* context */
            ifnull 12
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        12: aload 2
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        13: astore 3
            aload 2
            ifnonnull 14
            aload 3
            astore 2
            goto 15
      StackMap locals:
      StackMap stack:
        14: aload 2
            aload 3
            if_acmpeq 15
            aload 2
            aload 3
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        15: aload 2
            athrow
        16: .line 125
      StackMap locals:
      StackMap stack:
            return
        end local 1 // java.nio.ByteBuffer buffer
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot      Name  Signature
            0   17     0      this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            1   17     1    buffer  Ljava/nio/ByteBuffer;
            3   12     4   context  Lorg/graalvm/polyglot/Context;
            4   10     5       fun  Lorg/graalvm/polyglot/Value;
            5   10     6  jsBuffer  Lorg/graalvm/polyglot/Value;
      Exception table:
        from    to  target  type
           3    10      11  any
           2    13      13  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testJavaInteropDirect();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 129
            aconst_null
            astore 1
            aconst_null
            astore 2
         1: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.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/interop/InteropByteBufferTest.lambda$0(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 /* cx */
        start local 3 // org.graalvm.polyglot.Context cx
         2: .line 130
            aload 3 /* cx */
            ldc "js"
            ldc "const ByteBuffer = Java.type('java.nio.ByteBuffer');const bb = ByteBuffer.allocateDirect(3);const ab = new ArrayBuffer(bb);const ia = new Int8Array(ab);ia[0] = 41;ia[1] = 42;ia[2] = 43;bb;"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 4 /* buffer */
        start local 4 // org.graalvm.polyglot.Value buffer
         3: .line 138
            aload 4 /* buffer */
            ldc Ljava/nio/ByteBuffer;
            invokevirtual org.graalvm.polyglot.Value.as:(Ljava/lang/Class;)Ljava/lang/Object;
            checkcast java.nio.ByteBuffer
            astore 5 /* jBuffer */
        start local 5 // java.nio.ByteBuffer jBuffer
         4: .line 139
            aload 5 /* jBuffer */
            invokevirtual java.nio.ByteBuffer.isDirect:()Z
            invokestatic org.junit.Assert.assertTrue:(Z)V
         5: .line 140
            aload 5 /* jBuffer */
            iconst_0
            invokevirtual java.nio.ByteBuffer.get:(I)B
            i2l
            ldc 41
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         6: .line 141
            aload 5 /* jBuffer */
            iconst_1
            invokevirtual java.nio.ByteBuffer.get:(I)B
            i2l
            ldc 42
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         7: .line 142
            aload 5 /* jBuffer */
            iconst_2
            invokevirtual java.nio.ByteBuffer.get:(I)B
            i2l
            ldc 43
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 5 // java.nio.ByteBuffer jBuffer
        end local 4 // org.graalvm.polyglot.Value buffer
         8: .line 143
            aload 3 /* cx */
            ifnull 14
            aload 3 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 14
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
         9: astore 1
            aload 3 /* cx */
            ifnull 10
            aload 3 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 3 // org.graalvm.polyglot.Context cx
      StackMap locals:
      StackMap stack:
        10: aload 1
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        11: astore 2
            aload 1
            ifnonnull 12
            aload 2
            astore 1
            goto 13
      StackMap locals:
      StackMap stack:
        12: aload 1
            aload 2
            if_acmpeq 13
            aload 1
            aload 2
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        13: aload 1
            athrow
        14: .line 144
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   15     0     this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            2   10     3       cx  Lorg/graalvm/polyglot/Context;
            3    8     4   buffer  Lorg/graalvm/polyglot/Value;
            4    8     5  jBuffer  Ljava/nio/ByteBuffer;
      Exception table:
        from    to  target  type
           2     8       9  any
           1    11      11  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testJavaInteropHeap();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
         0: .line 148
            aconst_null
            astore 1
            aconst_null
            astore 2
         1: iconst_0
            anewarray java.lang.String
            invokestatic com.oracle.truffle.js.test.JSTest.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/interop/InteropByteBufferTest.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 /* cx */
        start local 3 // org.graalvm.polyglot.Context cx
         2: .line 149
            aload 3 /* cx */
            ldc "js"
            ldc "const ByteBuffer = Java.type('java.nio.ByteBuffer');const bb = ByteBuffer.allocate(3);const ab = new ArrayBuffer(bb);const ia = new Int8Array(ab);ia[0] = 41;ia[1] = 42;ia[2] = 43;bb;"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            astore 4 /* buffer */
        start local 4 // org.graalvm.polyglot.Value buffer
         3: .line 157
            aload 4 /* buffer */
            ldc Ljava/nio/ByteBuffer;
            invokevirtual org.graalvm.polyglot.Value.as:(Ljava/lang/Class;)Ljava/lang/Object;
            checkcast java.nio.ByteBuffer
            astore 5 /* jBuffer */
        start local 5 // java.nio.ByteBuffer jBuffer
         4: .line 158
            aload 5 /* jBuffer */
            invokevirtual java.nio.ByteBuffer.isDirect:()Z
            ifeq 5
            iconst_0
            goto 6
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Value java.nio.ByteBuffer
      StackMap stack:
         5: iconst_1
      StackMap locals:
      StackMap stack: int
         6: invokestatic org.junit.Assert.assertTrue:(Z)V
         7: .line 159
            aload 5 /* jBuffer */
            iconst_0
            invokevirtual java.nio.ByteBuffer.get:(I)B
            i2l
            ldc 41
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         8: .line 160
            aload 5 /* jBuffer */
            iconst_1
            invokevirtual java.nio.ByteBuffer.get:(I)B
            i2l
            ldc 42
            invokestatic org.junit.Assert.assertEquals:(JJ)V
         9: .line 161
            aload 5 /* jBuffer */
            iconst_2
            invokevirtual java.nio.ByteBuffer.get:(I)B
            i2l
            ldc 43
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        end local 5 // java.nio.ByteBuffer jBuffer
        end local 4 // org.graalvm.polyglot.Value buffer
        10: .line 162
            aload 3 /* cx */
            ifnull 16
            aload 3 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 16
      StackMap locals: com.oracle.truffle.js.test.interop.InteropByteBufferTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        11: astore 1
            aload 3 /* cx */
            ifnull 12
            aload 3 /* cx */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 3 // org.graalvm.polyglot.Context cx
      StackMap locals:
      StackMap stack:
        12: aload 1
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        13: astore 2
            aload 1
            ifnonnull 14
            aload 2
            astore 1
            goto 15
      StackMap locals:
      StackMap stack:
        14: aload 1
            aload 2
            if_acmpeq 15
            aload 1
            aload 2
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        15: aload 1
            athrow
        16: .line 163
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.oracle.truffle.js.test.interop.InteropByteBufferTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   17     0     this  Lcom/oracle/truffle/js/test/interop/InteropByteBufferTest;
            2   12     3       cx  Lorg/graalvm/polyglot/Context;
            3   10     4   buffer  Lorg/graalvm/polyglot/Value;
            4   10     5  jBuffer  Ljava/nio/ByteBuffer;
      Exception table:
        from    to  target  type
           2    10      11  any
           1    13      13  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  private static boolean lambda$0(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 className
         0: .line 129
            iconst_1
            ireturn
        end local 0 // java.lang.String className
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    1     0  className  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 className
         0: .line 148
            iconst_1
            ireturn
        end local 0 // java.lang.String className
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    1     0  className  Ljava/lang/String;
}
SourceFile: "InteropByteBufferTest.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