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

  public void testStatementLimit();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 73
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         1: .line 74
            ldc 50
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 75
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         3: .line 73
            astore 1 /* limits */
        start local 1 // org.graalvm.polyglot.ResourceLimits limits
         4: .line 77
            aconst_null
            astore 2
            aconst_null
            astore 3
         5: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)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
         6: .line 78
            aload 4 /* context */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         7: .line 80
            aload 4 /* context */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         8: .line 81
            invokestatic org.junit.Assert.fail:()V
         9: .line 82
            goto 12
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        10: astore 5 /* e */
        start local 5 // org.graalvm.polyglot.PolyglotException e
        11: .line 83
            aload 4 /* context */
            aload 5 /* e */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 5 // org.graalvm.polyglot.PolyglotException e
        12: .line 85
      StackMap locals:
      StackMap stack:
            aload 4 /* context */
            ifnull 18
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 18
      StackMap locals:
      StackMap stack: java.lang.Throwable
        13: astore 2
            aload 4 /* context */
            ifnull 14
            aload 4 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 4 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        14: aload 2
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        15: astore 3
            aload 2
            ifnonnull 16
            aload 3
            astore 2
            goto 17
      StackMap locals:
      StackMap stack:
        16: aload 2
            aload 3
            if_acmpeq 17
            aload 2
            aload 3
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        17: aload 2
            athrow
        18: .line 86
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.graalvm.polyglot.ResourceLimits limits
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   19     0     this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            4   19     1   limits  Lorg/graalvm/polyglot/ResourceLimits;
            6   14     4  context  Lorg/graalvm/polyglot/Context;
           11   12     5        e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
           7     9      10  Class org.graalvm.polyglot.PolyglotException
           6    12      13  any
           5    15      15  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementLimitFilter();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=8, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 90
            bipush 10
            ldc "internalSource"
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(ILjava/lang/String;)Lorg/graalvm/polyglot/Source;
            astore 1 /* internalSource */
        start local 1 // org.graalvm.polyglot.Source internalSource
         1: .line 91
            bipush 10
            ldc "publicSource"
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(ILjava/lang/String;)Lorg/graalvm/polyglot/Source;
            astore 2 /* publicSource */
        start local 2 // org.graalvm.polyglot.Source publicSource
         2: .line 92
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 93
            ldc 50
            aload 1 /* internalSource */
            invokedynamic test(Lorg/graalvm/polyglot/Source;)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/api/instrumentation/test/ResourceLimitsTest.lambda$0(Lorg/graalvm/polyglot/Source;Lorg/graalvm/polyglot/Source;)Z (6)
                  (Lorg/graalvm/polyglot/Source;)Z
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 94
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         5: .line 92
            astore 3 /* limits */
        start local 3 // org.graalvm.polyglot.ResourceLimits limits
         6: .line 96
            aconst_null
            astore 4
            aconst_null
            astore 5
         7: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 6 /* context */
        start local 6 // org.graalvm.polyglot.Context context
         8: .line 97
            iconst_0
            istore 7 /* i */
        start local 7 // int i
         9: goto 13
        10: .line 98
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Source org.graalvm.polyglot.Source org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context int
      StackMap stack:
            aload 6 /* context */
            aload 2 /* publicSource */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        11: .line 99
            aload 6 /* context */
            aload 1 /* internalSource */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        12: .line 97
            iinc 7 /* i */ 1
      StackMap locals:
      StackMap stack:
        13: iload 7 /* i */
            iconst_5
            if_icmplt 10
        end local 7 // int i
        14: .line 102
            iconst_0
            istore 7 /* i */
        start local 7 // int i
        15: goto 18
        16: .line 103
      StackMap locals:
      StackMap stack:
            aload 6 /* context */
            aload 1 /* internalSource */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        17: .line 102
            iinc 7 /* i */ 1
      StackMap locals:
      StackMap stack:
        18: iload 7 /* i */
            bipush 100
            if_icmplt 16
        end local 7 // int i
        19: .line 105
            aload 6 /* context */
            ldc "instrumentation-test-language"
            ldc "LOOP(1, STATEMENT)"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            pop
        20: .line 106
            invokestatic org.junit.Assert.fail:()V
        21: .line 107
            goto 24
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Source org.graalvm.polyglot.Source org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        22: astore 7 /* e */
        start local 7 // org.graalvm.polyglot.PolyglotException e
        23: .line 108
            aload 6 /* context */
            aload 7 /* e */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 7 // org.graalvm.polyglot.PolyglotException e
        24: .line 110
      StackMap locals:
      StackMap stack:
            aload 6 /* context */
            ifnull 30
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 30
      StackMap locals:
      StackMap stack: java.lang.Throwable
        25: astore 4
            aload 6 /* context */
            ifnull 26
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 6 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        26: aload 4
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        27: astore 5
            aload 4
            ifnonnull 28
            aload 5
            astore 4
            goto 29
      StackMap locals:
      StackMap stack:
        28: aload 4
            aload 5
            if_acmpeq 29
            aload 4
            aload 5
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        29: aload 4
            athrow
        30: .line 111
      StackMap locals:
      StackMap stack:
            return
        end local 3 // org.graalvm.polyglot.ResourceLimits limits
        end local 2 // org.graalvm.polyglot.Source publicSource
        end local 1 // org.graalvm.polyglot.Source internalSource
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot            Name  Signature
            0   31     0            this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   31     1  internalSource  Lorg/graalvm/polyglot/Source;
            2   31     2    publicSource  Lorg/graalvm/polyglot/Source;
            6   31     3          limits  Lorg/graalvm/polyglot/ResourceLimits;
            8   26     6         context  Lorg/graalvm/polyglot/Context;
            9   14     7               i  I
           15   19     7               i  I
           23   24     7               e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
          14    21      22  Class org.graalvm.polyglot.PolyglotException
           8    24      25  any
           7    27      27  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementInvalidLimitFilter();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=6, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 115
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         1: .line 116
            ldc 50
            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/api/instrumentation/test/ResourceLimitsTest.lambda$1(Lorg/graalvm/polyglot/Source;)Z (6)
                  (Lorg/graalvm/polyglot/Source;)Z
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 117
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         3: .line 115
            astore 1 /* limits0 */
        start local 1 // org.graalvm.polyglot.ResourceLimits limits0
         4: .line 118
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         5: .line 119
            ldc 50
            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/api/instrumentation/test/ResourceLimitsTest.lambda$2(Lorg/graalvm/polyglot/Source;)Z (6)
                  (Lorg/graalvm/polyglot/Source;)Z
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         6: .line 120
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         7: .line 118
            astore 2 /* limits1 */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits1
         8: .line 121
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1 /* limits0 */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            invokevirtual org.graalvm.polyglot.Context.close:()V
         9: .line 122
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits1 */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            invokevirtual org.graalvm.polyglot.Context.close:()V
        10: .line 124
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 3 /* engine */
        start local 3 // org.graalvm.polyglot.Engine engine
        11: .line 125
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1 /* limits0 */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            invokevirtual org.graalvm.polyglot.Context.close:()V
        12: .line 126
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits1 */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            astore 4 /* builder */
        start local 4 // org.graalvm.polyglot.Context$Builder builder
        13: .line 128
            aload 4 /* builder */
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            pop
        14: .line 129
            invokestatic org.junit.Assert.fail:()V
        15: .line 130
            goto 20
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Engine org.graalvm.polyglot.Context$Builder
      StackMap stack: java.lang.IllegalArgumentException
        16: astore 5 /* e */
        start local 5 // java.lang.IllegalArgumentException e
        17: .line 131
            ldc "Using multiple source predicates per engine is not supported. The same statement limit source predicate must be used for all polyglot contexts that are assigned to the same engine. Resolve this by using the same predicate instance when constructing the limits object with ResourceLimits.Builder.statementLimit(long, Predicate)."
        18: .line 134
            aload 5 /* e */
            invokevirtual java.lang.IllegalArgumentException.getMessage:()Ljava/lang/String;
        19: .line 131
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 5 // java.lang.IllegalArgumentException e
        20: .line 136
      StackMap locals:
      StackMap stack:
            return
        end local 4 // org.graalvm.polyglot.Context$Builder builder
        end local 3 // org.graalvm.polyglot.Engine engine
        end local 2 // org.graalvm.polyglot.ResourceLimits limits1
        end local 1 // org.graalvm.polyglot.ResourceLimits limits0
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   21     0     this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            4   21     1  limits0  Lorg/graalvm/polyglot/ResourceLimits;
            8   21     2  limits1  Lorg/graalvm/polyglot/ResourceLimits;
           11   21     3   engine  Lorg/graalvm/polyglot/Engine;
           13   21     4  builder  Lorg/graalvm/polyglot/Context$Builder;
           17   20     5        e  Ljava/lang/IllegalArgumentException;
      Exception table:
        from    to  target  type
          13    15      16  Class java.lang.IllegalArgumentException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementLimitFilterError();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=8, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 140
            new java.lang.RuntimeException
            dup
            ldc "error"
            invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
            astore 1 /* expectedException */
        start local 1 // java.lang.RuntimeException expectedException
         1: .line 141
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 142
            ldc 50
            aload 1 /* expectedException */
            invokedynamic test(Ljava/lang/RuntimeException;)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/api/instrumentation/test/ResourceLimitsTest.lambda$3(Ljava/lang/RuntimeException;Lorg/graalvm/polyglot/Source;)Z (6)
                  (Lorg/graalvm/polyglot/Source;)Z
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 145
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         4: .line 141
            astore 2 /* limits */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits
         5: .line 146
            aconst_null
            astore 3
            aconst_null
            astore 4
         6: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 5 /* context */
        start local 5 // org.graalvm.polyglot.Context context
         7: .line 147
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            astore 6 /* source */
        start local 6 // org.graalvm.polyglot.Source source
         8: .line 149
            aload 5 /* context */
            aload 6 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         9: .line 150
            invokestatic org.junit.Assert.fail:()V
        10: .line 151
            goto 14
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.lang.RuntimeException org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Source
      StackMap stack: org.graalvm.polyglot.PolyglotException
        11: astore 7 /* ex */
        start local 7 // org.graalvm.polyglot.PolyglotException ex
        12: .line 152
            aload 7 /* ex */
            invokevirtual org.graalvm.polyglot.PolyglotException.isHostException:()Z
            invokestatic org.junit.Assert.assertTrue:(Z)V
        13: .line 153
            aload 1 /* expectedException */
            aload 7 /* ex */
            invokevirtual org.graalvm.polyglot.PolyglotException.asHostException:()Ljava/lang/Throwable;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 7 // org.graalvm.polyglot.PolyglotException ex
        end local 6 // org.graalvm.polyglot.Source source
        14: .line 155
      StackMap locals:
      StackMap stack:
            aload 5 /* context */
            ifnull 20
            aload 5 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 20
      StackMap locals:
      StackMap stack: java.lang.Throwable
        15: astore 3
            aload 5 /* context */
            ifnull 16
            aload 5 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 5 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        16: aload 3
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        17: astore 4
            aload 3
            ifnonnull 18
            aload 4
            astore 3
            goto 19
      StackMap locals:
      StackMap stack:
        18: aload 3
            aload 4
            if_acmpeq 19
            aload 3
            aload 4
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        19: aload 3
            athrow
        20: .line 156
      StackMap locals:
      StackMap stack:
            return
        end local 2 // org.graalvm.polyglot.ResourceLimits limits
        end local 1 // java.lang.RuntimeException expectedException
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot               Name  Signature
            0   21     0               this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   21     1  expectedException  Ljava/lang/RuntimeException;
            5   21     2             limits  Lorg/graalvm/polyglot/ResourceLimits;
            7   16     5            context  Lorg/graalvm/polyglot/Context;
            8   14     6             source  Lorg/graalvm/polyglot/Source;
           12   14     7                 ex  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
           8    10      11  Class org.graalvm.polyglot.PolyglotException
           7    14      15  any
           6    17      17  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementLimitOnEvent();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=8, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 160
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 1 /* events */
        start local 1 // java.util.List events
         1: .line 161
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 162
            lconst_1
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 163
            aload 1 /* events */
            invokedynamic accept(Ljava/util/List;)Ljava/util/function/Consumer;
              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;)V
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$4(Ljava/util/List;Lorg/graalvm/polyglot/ResourceLimitEvent;)V (6)
                  (Lorg/graalvm/polyglot/ResourceLimitEvent;)V
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.onLimit:(Ljava/util/function/Consumer;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 164
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         5: .line 161
            astore 2 /* limits */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits
         6: .line 165
            aconst_null
            astore 3
            aconst_null
            astore 4
         7: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 5 /* context */
        start local 5 // org.graalvm.polyglot.Context context
         8: .line 166
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            astore 6 /* source */
        start local 6 // org.graalvm.polyglot.Source source
         9: .line 168
            aload 5 /* context */
            aload 6 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        10: .line 170
            aload 5 /* context */
            aload 6 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        11: .line 171
            invokestatic org.junit.Assert.fail:()V
        12: .line 172
            goto 17
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.List org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Source
      StackMap stack: org.graalvm.polyglot.PolyglotException
        13: astore 7 /* ex */
        start local 7 // org.graalvm.polyglot.PolyglotException ex
        14: .line 173
            aload 5 /* context */
            aload 7 /* ex */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        15: .line 174
            lconst_1
            aload 1 /* events */
            invokeinterface java.util.List.size:()I
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        16: .line 175
            aload 5 /* context */
            aload 1 /* events */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        end local 7 // org.graalvm.polyglot.PolyglotException ex
        end local 6 // org.graalvm.polyglot.Source source
        17: .line 177
      StackMap locals:
      StackMap stack:
            aload 5 /* context */
            ifnull 23
            aload 5 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 23
      StackMap locals:
      StackMap stack: java.lang.Throwable
        18: astore 3
            aload 5 /* context */
            ifnull 19
            aload 5 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 5 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        19: aload 3
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        20: astore 4
            aload 3
            ifnonnull 21
            aload 4
            astore 3
            goto 22
      StackMap locals:
      StackMap stack:
        21: aload 3
            aload 4
            if_acmpeq 22
            aload 3
            aload 4
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        22: aload 3
            athrow
        23: .line 178
      StackMap locals:
      StackMap stack:
            return
        end local 2 // org.graalvm.polyglot.ResourceLimits limits
        end local 1 // java.util.List events
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   24     0     this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   24     1   events  Ljava/util/List<Lorg/graalvm/polyglot/ResourceLimitEvent;>;
            6   24     2   limits  Lorg/graalvm/polyglot/ResourceLimits;
            8   19     5  context  Lorg/graalvm/polyglot/Context;
            9   17     6   source  Lorg/graalvm/polyglot/Source;
           14   17     7       ex  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
          10    12      13  Class org.graalvm.polyglot.PolyglotException
           8    17      18  any
           7    20      20  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementLimitDifferentPerContext();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=10, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 182
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         1: .line 183
            lconst_1
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 184
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         3: .line 182
            astore 1 /* limits1 */
        start local 1 // org.graalvm.polyglot.ResourceLimits limits1
         4: .line 185
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         5: .line 186
            ldc 2
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         6: .line 187
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         7: .line 185
            astore 2 /* limits2 */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits2
         8: .line 188
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            astore 3 /* source */
        start local 3 // org.graalvm.polyglot.Source source
         9: .line 189
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 4 /* engine */
        start local 4 // org.graalvm.polyglot.Engine engine
        10: .line 191
            iconst_0
            istore 5 /* i */
        start local 5 // int i
        11: goto 53
        12: .line 193
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Source org.graalvm.polyglot.Engine int
      StackMap stack:
            aconst_null
            astore 6
            aconst_null
            astore 7
        13: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 4 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 8 /* context */
        start local 8 // org.graalvm.polyglot.Context context
        14: .line 194
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        15: .line 195
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        16: .line 196
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        17: .line 197
            aload 8 /* context */
            ifnull 23
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 23
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Source org.graalvm.polyglot.Engine int java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        18: astore 6
            aload 8 /* context */
            ifnull 19
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 8 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        19: aload 6
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        20: astore 7
            aload 6
            ifnonnull 21
            aload 7
            astore 6
            goto 22
      StackMap locals:
      StackMap stack:
        21: aload 6
            aload 7
            if_acmpeq 22
            aload 6
            aload 7
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        22: aload 6
            athrow
        23: .line 200
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 6
            aconst_null
            astore 7
        24: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 4 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1 /* limits1 */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 8 /* context */
        start local 8 // org.graalvm.polyglot.Context context
        25: .line 201
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        26: .line 203
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        27: .line 204
            invokestatic org.junit.Assert.fail:()V
        28: .line 205
            goto 31
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Source org.graalvm.polyglot.Engine int java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        29: astore 9 /* ex */
        start local 9 // org.graalvm.polyglot.PolyglotException ex
        30: .line 206
            aload 8 /* context */
            aload 9 /* ex */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 9 // org.graalvm.polyglot.PolyglotException ex
        31: .line 208
      StackMap locals:
      StackMap stack:
            aload 8 /* context */
            ifnull 37
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 37
      StackMap locals:
      StackMap stack: java.lang.Throwable
        32: astore 6
            aload 8 /* context */
            ifnull 33
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 8 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        33: aload 6
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        34: astore 7
            aload 6
            ifnonnull 35
            aload 7
            astore 6
            goto 36
      StackMap locals:
      StackMap stack:
        35: aload 6
            aload 7
            if_acmpeq 36
            aload 6
            aload 7
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        36: aload 6
            athrow
        37: .line 211
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 6
            aconst_null
            astore 7
        38: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 4 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits2 */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 8 /* context */
        start local 8 // org.graalvm.polyglot.Context context
        39: .line 212
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        40: .line 213
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        41: .line 215
            aload 8 /* context */
            aload 3 /* source */
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        42: .line 216
            invokestatic org.junit.Assert.fail:()V
        43: .line 217
            goto 46
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Source org.graalvm.polyglot.Engine int java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        44: astore 9 /* ex */
        start local 9 // org.graalvm.polyglot.PolyglotException ex
        45: .line 218
            aload 8 /* context */
            aload 9 /* ex */
            iconst_2
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 9 // org.graalvm.polyglot.PolyglotException ex
        46: .line 220
      StackMap locals:
      StackMap stack:
            aload 8 /* context */
            ifnull 52
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 52
      StackMap locals:
      StackMap stack: java.lang.Throwable
        47: astore 6
            aload 8 /* context */
            ifnull 48
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 8 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        48: aload 6
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        49: astore 7
            aload 6
            ifnonnull 50
            aload 7
            astore 6
            goto 51
      StackMap locals:
      StackMap stack:
        50: aload 6
            aload 7
            if_acmpeq 51
            aload 6
            aload 7
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        51: aload 6
            athrow
        52: .line 191
      StackMap locals:
      StackMap stack:
            iinc 5 /* i */ 1
      StackMap locals:
      StackMap stack:
        53: iload 5 /* i */
            bipush 10
            if_icmplt 12
        end local 5 // int i
        54: .line 222
            return
        end local 4 // org.graalvm.polyglot.Engine engine
        end local 3 // org.graalvm.polyglot.Source source
        end local 2 // org.graalvm.polyglot.ResourceLimits limits2
        end local 1 // org.graalvm.polyglot.ResourceLimits limits1
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   55     0     this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            4   55     1  limits1  Lorg/graalvm/polyglot/ResourceLimits;
            8   55     2  limits2  Lorg/graalvm/polyglot/ResourceLimits;
            9   55     3   source  Lorg/graalvm/polyglot/Source;
           10   55     4   engine  Lorg/graalvm/polyglot/Engine;
           11   54     5        i  I
           14   19     8  context  Lorg/graalvm/polyglot/Context;
           25   33     8  context  Lorg/graalvm/polyglot/Context;
           30   31     9       ex  Lorg/graalvm/polyglot/PolyglotException;
           39   48     8  context  Lorg/graalvm/polyglot/Context;
           45   46     9       ex  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
          14    17      18  any
          13    20      20  any
          26    28      29  Class org.graalvm.polyglot.PolyglotException
          25    31      32  any
          24    34      34  any
          41    43      44  Class org.graalvm.polyglot.PolyglotException
          39    46      47  any
          38    49      49  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementLimitDifferentPerContextParallel();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=6, locals=8, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 226
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         1: .line 227
            lconst_1
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 228
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         3: .line 226
            astore 1 /* limits1 */
        start local 1 // org.graalvm.polyglot.ResourceLimits limits1
         4: .line 229
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         5: .line 230
            ldc 2
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         6: .line 231
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         7: .line 229
            astore 2 /* limits2 */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits2
         8: .line 232
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            astore 3 /* source */
        start local 3 // org.graalvm.polyglot.Source source
         9: .line 233
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 4 /* engine */
        start local 4 // org.graalvm.polyglot.Engine engine
        10: .line 235
            bipush 20
            invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
            astore 5 /* executorService */
        start local 5 // java.util.concurrent.ExecutorService executorService
        11: .line 236
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 6 /* futures */
        start local 6 // java.util.List futures
        12: .line 238
            iconst_0
            istore 7 /* i */
        start local 7 // int i
        13: goto 16
        14: .line 239
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Source org.graalvm.polyglot.Engine java.util.concurrent.ExecutorService java.util.List int
      StackMap stack:
            aload 6 /* futures */
            aload 5 /* executorService */
            aload 4 /* engine */
            aload 3 /* source */
            aload 1 /* limits1 */
            aload 2 /* limits2 */
            invokedynamic run(Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/Source;Lorg/graalvm/polyglot/ResourceLimits;Lorg/graalvm/polyglot/ResourceLimits;)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/api/instrumentation/test/ResourceLimitsTest.lambda$5(Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/Source;Lorg/graalvm/polyglot/ResourceLimits;Lorg/graalvm/polyglot/ResourceLimits;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        15: .line 238
            iinc 7 /* i */ 1
      StackMap locals:
      StackMap stack:
        16: iload 7 /* i */
            bipush 10
            if_icmplt 14
        end local 7 // int i
        17: .line 273
            aload 5 /* executorService */
            invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
        18: .line 274
            aload 5 /* executorService */
            ldc 100
            getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
            invokeinterface java.util.concurrent.ExecutorService.awaitTermination:(JLjava/util/concurrent/TimeUnit;)Z
            pop
        19: .line 275
            return
        end local 6 // java.util.List futures
        end local 5 // java.util.concurrent.ExecutorService executorService
        end local 4 // org.graalvm.polyglot.Engine engine
        end local 3 // org.graalvm.polyglot.Source source
        end local 2 // org.graalvm.polyglot.ResourceLimits limits2
        end local 1 // org.graalvm.polyglot.ResourceLimits limits1
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0   20     0             this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            4   20     1          limits1  Lorg/graalvm/polyglot/ResourceLimits;
            8   20     2          limits2  Lorg/graalvm/polyglot/ResourceLimits;
            9   20     3           source  Lorg/graalvm/polyglot/Source;
           10   20     4           engine  Lorg/graalvm/polyglot/Engine;
           11   20     5  executorService  Ljava/util/concurrent/ExecutorService;
           12   20     6          futures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           13   17     7                i  I
    Exceptions:
      throws java.lang.InterruptedException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  private static org.graalvm.polyglot.Source statements(int);
    descriptor: (I)Lorg/graalvm/polyglot/Source;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // int count
         0: .line 278
            iload 0 /* count */
            ldc Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            invokevirtual java.lang.Class.getSimpleName:()Ljava/lang/String;
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(ILjava/lang/String;)Lorg/graalvm/polyglot/Source;
            areturn
        end local 0 // int count
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    1     0  count  I
    MethodParameters:
       Name  Flags
      count  

  private static org.graalvm.polyglot.Source statements(int, java.lang.String);
    descriptor: (ILjava/lang/String;)Lorg/graalvm/polyglot/Source;
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // int count
        start local 1 // java.lang.String name
         0: .line 282
            ldc "instrumentation-test-language"
            new java.lang.StringBuilder
            dup
            ldc "LOOP("
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            iload 0 /* count */
            ldc 2147483647
            if_icmpne 1
            ldc "infinity"
            goto 2
      StackMap locals: int java.lang.String
      StackMap stack: java.lang.String java.lang.StringBuilder
         1: iload 0 /* count */
            invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
      StackMap locals: int java.lang.String
      StackMap stack: java.lang.String java.lang.StringBuilder java.io.Serializable
         2: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
            ldc ", STATEMENT)"
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            aload 1 /* name */
            invokestatic org.graalvm.polyglot.Source.newBuilder:(Ljava/lang/String;Ljava/lang/CharSequence;Ljava/lang/String;)Lorg/graalvm/polyglot/Source$Builder;
            invokevirtual org.graalvm.polyglot.Source$Builder.buildLiteral:()Lorg/graalvm/polyglot/Source;
            areturn
        end local 1 // java.lang.String name
        end local 0 // int count
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    3     0  count  I
            0    3     1   name  Ljava/lang/String;
    MethodParameters:
       Name  Flags
      count  
      name   

  public void testSharedContextStatementLimitSynchronous();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=9, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 287
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 1 /* events */
        start local 1 // java.util.List events
         1: .line 288
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 289
            ldc 50
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 290
            aload 1 /* events */
            invokedynamic accept(Ljava/util/List;)Ljava/util/function/Consumer;
              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;)V
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$6(Ljava/util/List;Lorg/graalvm/polyglot/ResourceLimitEvent;)V (6)
                  (Lorg/graalvm/polyglot/ResourceLimitEvent;)V
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.onLimit:(Ljava/util/function/Consumer;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 291
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         5: .line 288
            astore 2 /* limits */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits
         6: .line 292
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 3 /* engine */
        start local 3 // org.graalvm.polyglot.Engine engine
         7: .line 294
            iconst_0
            istore 4 /* i */
        start local 4 // int i
         8: goto 28
         9: .line 295
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.List org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Engine int
      StackMap stack:
            aconst_null
            astore 5
            aconst_null
            astore 6
        10: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 7 /* c */
        start local 7 // org.graalvm.polyglot.Context c
        11: .line 296
            aload 7 /* c */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        12: .line 298
            aload 7 /* c */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        13: .line 299
            invokestatic org.junit.Assert.fail:()V
        14: .line 300
            goto 20
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.List org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.Engine int java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        15: astore 8 /* e */
        start local 8 // org.graalvm.polyglot.PolyglotException e
        16: .line 301
            aload 7 /* c */
            aload 8 /* e */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        17: .line 302
            lconst_1
            aload 1 /* events */
            invokeinterface java.util.List.size:()I
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        18: .line 303
            aload 7 /* c */
            aload 1 /* events */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        19: .line 304
            aload 1 /* events */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.toString:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        end local 8 // org.graalvm.polyglot.PolyglotException e
        20: .line 306
      StackMap locals:
      StackMap stack:
            aload 7 /* c */
            ifnull 26
            aload 7 /* c */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 26
      StackMap locals:
      StackMap stack: java.lang.Throwable
        21: astore 5
            aload 7 /* c */
            ifnull 22
            aload 7 /* c */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 7 // org.graalvm.polyglot.Context c
      StackMap locals:
      StackMap stack:
        22: aload 5
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        23: astore 6
            aload 5
            ifnonnull 24
            aload 6
            astore 5
            goto 25
      StackMap locals:
      StackMap stack:
        24: aload 5
            aload 6
            if_acmpeq 25
            aload 5
            aload 6
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        25: aload 5
            athrow
        26: .line 307
      StackMap locals:
      StackMap stack:
            aload 1 /* events */
            invokeinterface java.util.List.clear:()V
        27: .line 294
            iinc 4 /* i */ 1
      StackMap locals:
      StackMap stack:
        28: iload 4 /* i */
            bipush 10
            if_icmplt 9
        end local 4 // int i
        29: .line 309
            return
        end local 3 // org.graalvm.polyglot.Engine engine
        end local 2 // org.graalvm.polyglot.ResourceLimits limits
        end local 1 // java.util.List events
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   30     0    this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   30     1  events  Ljava/util/List<Lorg/graalvm/polyglot/ResourceLimitEvent;>;
            6   30     2  limits  Lorg/graalvm/polyglot/ResourceLimits;
            7   30     3  engine  Lorg/graalvm/polyglot/Engine;
            8   29     4       i  I
           11   22     7       c  Lorg/graalvm/polyglot/Context;
           16   20     8       e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
          12    14      15  Class org.graalvm.polyglot.PolyglotException
          11    20      21  any
          10    23      23  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testSharedContextStatementLimitParallel();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=8, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 313
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 1 /* engine */
        start local 1 // org.graalvm.polyglot.Engine engine
         1: .line 314
            new java.util.HashMap
            dup
            invokespecial java.util.HashMap.<init>:()V
            astore 2 /* events */
        start local 2 // java.util.Map events
         2: .line 316
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 317
            ldc 50
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 318
            aload 2 /* events */
            invokedynamic accept(Ljava/util/Map;)Ljava/util/function/Consumer;
              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;)V
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$7(Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V (6)
                  (Lorg/graalvm/polyglot/ResourceLimitEvent;)V
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.onLimit:(Ljava/util/function/Consumer;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         5: .line 323
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         6: .line 316
            astore 3 /* limits */
        start local 3 // org.graalvm.polyglot.ResourceLimits limits
         7: .line 324
            bipush 20
            invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
            astore 4 /* executorService */
        start local 4 // java.util.concurrent.ExecutorService executorService
         8: .line 325
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 5 /* futures */
        start local 5 // java.util.List futures
         9: .line 327
            iconst_0
            istore 6 /* i */
        start local 6 // int i
        10: goto 13
        11: .line 328
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List int
      StackMap stack:
            aload 5 /* futures */
            aload 4 /* executorService */
            aload 1 /* engine */
            aload 3 /* limits */
            aload 2 /* events */
            invokedynamic run(Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/ResourceLimits;Ljava/util/Map;)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/api/instrumentation/test/ResourceLimitsTest.lambda$8(Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/ResourceLimits;Ljava/util/Map;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        12: .line 327
            iinc 6 /* i */ 1
      StackMap locals:
      StackMap stack:
        13: iload 6 /* i */
            sipush 1000
            if_icmplt 11
        end local 6 // int i
        14: .line 345
            aload 5 /* futures */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 7
            goto 17
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List top java.util.Iterator
      StackMap stack:
        15: aload 7
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.util.concurrent.Future
            astore 6 /* future */
        start local 6 // java.util.concurrent.Future future
        16: .line 346
            aload 6 /* future */
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
        end local 6 // java.util.concurrent.Future future
        17: .line 345
      StackMap locals:
      StackMap stack:
            aload 7
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 15
        18: .line 348
            aload 4 /* executorService */
            invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
        19: .line 349
            aload 4 /* executorService */
            ldc 100
            getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
            invokeinterface java.util.concurrent.ExecutorService.awaitTermination:(JLjava/util/concurrent/TimeUnit;)Z
            pop
        20: .line 350
            aload 2 /* events */
            dup
            astore 6
            monitorenter
        21: .line 351
            ldc 1000
            aload 2 /* events */
            invokeinterface java.util.Map.size:()I
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        22: .line 350
            aload 6
            monitorexit
        23: goto 26
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List java.util.Map
      StackMap stack: java.lang.Throwable
        24: aload 6
            monitorexit
        25: athrow
        26: .line 353
      StackMap locals:
      StackMap stack:
            return
        end local 5 // java.util.List futures
        end local 4 // java.util.concurrent.ExecutorService executorService
        end local 3 // org.graalvm.polyglot.ResourceLimits limits
        end local 2 // java.util.Map events
        end local 1 // org.graalvm.polyglot.Engine engine
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0   27     0             this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   27     1           engine  Lorg/graalvm/polyglot/Engine;
            2   27     2           events  Ljava/util/Map<Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/ResourceLimitEvent;>;
            7   27     3           limits  Lorg/graalvm/polyglot/ResourceLimits;
            8   27     4  executorService  Ljava/util/concurrent/ExecutorService;
            9   27     5          futures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           10   14     6                i  I
           16   17     6           future  Ljava/util/concurrent/Future<*>;
      Exception table:
        from    to  target  type
          21    23      24  any
          24    25      24  any
    Exceptions:
      throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testParallelContextStatementLimit();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=10, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 357
            new java.util.HashMap
            dup
            invokespecial java.util.HashMap.<init>:()V
            astore 1 /* events */
        start local 1 // java.util.Map events
         1: .line 359
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         2: .line 360
            ldc 10000
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 361
            aload 1 /* events */
            invokedynamic accept(Ljava/util/Map;)Ljava/util/function/Consumer;
              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;)V
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$9(Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V (6)
                  (Lorg/graalvm/polyglot/ResourceLimitEvent;)V
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.onLimit:(Ljava/util/function/Consumer;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 367
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         5: .line 359
            astore 2 /* limits */
        start local 2 // org.graalvm.polyglot.ResourceLimits limits
         6: .line 368
            bipush 20
            invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
            astore 3 /* executorService */
        start local 3 // java.util.concurrent.ExecutorService executorService
         7: .line 369
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 4 /* futures */
        start local 4 // java.util.List futures
         8: .line 370
            aconst_null
            astore 5
            aconst_null
            astore 6
         9: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 7 /* c */
        start local 7 // org.graalvm.polyglot.Context c
        10: .line 371
            aload 3 /* executorService */
            aload 7 /* c */
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.forceMultiThreading:(Ljava/util/concurrent/ExecutorService;Lorg/graalvm/polyglot/Context;)V
        11: .line 372
            iconst_0
            istore 8 /* i */
        start local 8 // int i
        12: goto 15
        13: .line 373
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context int
      StackMap stack:
            aload 4 /* futures */
            aload 3 /* executorService */
            aload 7 /* c */
            invokedynamic run(Lorg/graalvm/polyglot/Context;)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/api/instrumentation/test/ResourceLimitsTest.lambda$10(Lorg/graalvm/polyglot/Context;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        14: .line 372
            iinc 8 /* i */ 1
      StackMap locals:
      StackMap stack:
        15: iload 8 /* i */
            sipush 10000
            if_icmplt 13
        end local 8 // int i
        16: .line 377
            aload 4 /* futures */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 9
            goto 19
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context top java.util.Iterator
      StackMap stack:
        17: aload 9
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.util.concurrent.Future
            astore 8 /* future */
        start local 8 // java.util.concurrent.Future future
        18: .line 378
            aload 8 /* future */
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
        end local 8 // java.util.concurrent.Future future
        19: .line 377
      StackMap locals:
      StackMap stack:
            aload 9
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 17
        20: .line 381
            aload 7 /* c */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        21: .line 382
            invokestatic org.junit.Assert.fail:()V
        22: .line 383
            goto 33
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        23: astore 8 /* e */
        start local 8 // org.graalvm.polyglot.PolyglotException e
        24: .line 384
            aload 7 /* c */
            aload 8 /* e */
            sipush 10000
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        25: .line 385
            aload 1 /* events */
            dup
            astore 9
            monitorenter
        26: .line 386
            aload 1 /* events */
            aload 7 /* c */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        27: .line 387
            aload 7 /* c */
            aload 1 /* events */
            aload 7 /* c */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        28: .line 388
            aload 1 /* events */
            aload 7 /* c */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.toString:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        29: .line 385
            aload 9
            monitorexit
        30: goto 33
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.PolyglotException java.util.Map
      StackMap stack: java.lang.Throwable
        31: aload 9
            monitorexit
        32: athrow
        end local 8 // org.graalvm.polyglot.PolyglotException e
        33: .line 391
      StackMap locals:
      StackMap stack:
            aload 7 /* c */
            ifnull 39
            aload 7 /* c */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 39
      StackMap locals:
      StackMap stack: java.lang.Throwable
        34: astore 5
            aload 7 /* c */
            ifnull 35
            aload 7 /* c */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 7 // org.graalvm.polyglot.Context c
      StackMap locals:
      StackMap stack:
        35: aload 5
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        36: astore 6
            aload 5
            ifnonnull 37
            aload 6
            astore 5
            goto 38
      StackMap locals:
      StackMap stack:
        37: aload 5
            aload 6
            if_acmpeq 38
            aload 5
            aload 6
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        38: aload 5
            athrow
        39: .line 392
      StackMap locals:
      StackMap stack:
            aload 3 /* executorService */
            invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
        40: .line 393
            aload 3 /* executorService */
            ldc 100
            getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
            invokeinterface java.util.concurrent.ExecutorService.awaitTermination:(JLjava/util/concurrent/TimeUnit;)Z
            pop
        41: .line 394
            return
        end local 4 // java.util.List futures
        end local 3 // java.util.concurrent.ExecutorService executorService
        end local 2 // org.graalvm.polyglot.ResourceLimits limits
        end local 1 // java.util.Map events
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0   42     0             this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   42     1           events  Ljava/util/Map<Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/ResourceLimitEvent;>;
            6   42     2           limits  Lorg/graalvm/polyglot/ResourceLimits;
            7   42     3  executorService  Ljava/util/concurrent/ExecutorService;
            8   42     4          futures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           10   35     7                c  Lorg/graalvm/polyglot/Context;
           12   16     8                i  I
           18   19     8           future  Ljava/util/concurrent/Future<*>;
           24   33     8                e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
          20    22      23  Class org.graalvm.polyglot.PolyglotException
          26    30      31  any
          31    32      31  any
          10    33      34  any
           9    36      36  any
    Exceptions:
      throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testParallelMultiContextStatementLimit();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=10, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 398
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 1 /* engine */
        start local 1 // org.graalvm.polyglot.Engine engine
         1: .line 399
            new java.util.concurrent.ConcurrentHashMap
            dup
            invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
            astore 2 /* events */
        start local 2 // java.util.Map events
         2: .line 403
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 404
            ldc 100
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 405
            aload 2 /* events */
            invokedynamic accept(Ljava/util/Map;)Ljava/util/function/Consumer;
              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;)V
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$11(Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V (6)
                  (Lorg/graalvm/polyglot/ResourceLimitEvent;)V
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.onLimit:(Ljava/util/function/Consumer;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         5: .line 408
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         6: .line 403
            astore 3 /* limits */
        start local 3 // org.graalvm.polyglot.ResourceLimits limits
         7: .line 409
            bipush 20
            invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
            astore 4 /* executorService */
        start local 4 // java.util.concurrent.ExecutorService executorService
         8: .line 410
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 5 /* testFutures */
        start local 5 // java.util.List testFutures
         9: .line 412
            iconst_0
            istore 6 /* contextIndex */
        start local 6 // int contextIndex
        10: goto 21
        11: .line 413
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List int
      StackMap stack:
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 7 /* c */
        start local 7 // org.graalvm.polyglot.Context c
        12: .line 414
            aload 4 /* executorService */
            aload 7 /* c */
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.forceMultiThreading:(Ljava/util/concurrent/ExecutorService;Lorg/graalvm/polyglot/Context;)V
        13: .line 416
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 8 /* futures */
        start local 8 // java.util.List futures
        14: .line 417
            iconst_0
            istore 9 /* i */
        start local 9 // int i
        15: goto 18
        16: .line 418
      StackMap locals: org.graalvm.polyglot.Context java.util.List int
      StackMap stack:
            aload 8 /* futures */
            aload 4 /* executorService */
            aload 7 /* c */
            invokedynamic run(Lorg/graalvm/polyglot/Context;)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/api/instrumentation/test/ResourceLimitsTest.lambda$12(Lorg/graalvm/polyglot/Context;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        17: .line 417
            iinc 9 /* i */ 1
      StackMap locals:
      StackMap stack:
        18: iload 9 /* i */
            bipush 100
            if_icmplt 16
        end local 9 // int i
        19: .line 422
            aload 5 /* testFutures */
            aload 4 /* executorService */
            aload 8 /* futures */
            aload 7 /* c */
            aload 2 /* events */
            invokedynamic run(Ljava/util/List;Lorg/graalvm/polyglot/Context;Ljava/util/Map;)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/api/instrumentation/test/ResourceLimitsTest.lambda$13(Ljava/util/List;Lorg/graalvm/polyglot/Context;Ljava/util/Map;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        end local 8 // java.util.List futures
        end local 7 // org.graalvm.polyglot.Context c
        20: .line 412
            iinc 6 /* contextIndex */ 1
      StackMap locals:
      StackMap stack:
        21: iload 6 /* contextIndex */
            bipush 100
            if_icmplt 11
        end local 6 // int contextIndex
        22: .line 450
            aload 5 /* testFutures */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 7
            goto 25
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List top java.util.Iterator
      StackMap stack:
        23: aload 7
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.util.concurrent.Future
            astore 6 /* future */
        start local 6 // java.util.concurrent.Future future
        24: .line 451
            aload 6 /* future */
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
        end local 6 // java.util.concurrent.Future future
        25: .line 450
      StackMap locals:
      StackMap stack:
            aload 7
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 23
        26: .line 454
            ldc 100
            aload 2 /* events */
            invokeinterface java.util.Map.size:()I
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        27: .line 455
            aload 4 /* executorService */
            invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
        28: .line 456
            aload 4 /* executorService */
            ldc 100
            getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
            invokeinterface java.util.concurrent.ExecutorService.awaitTermination:(JLjava/util/concurrent/TimeUnit;)Z
            pop
        29: .line 457
            return
        end local 5 // java.util.List testFutures
        end local 4 // java.util.concurrent.ExecutorService executorService
        end local 3 // org.graalvm.polyglot.ResourceLimits limits
        end local 2 // java.util.Map events
        end local 1 // org.graalvm.polyglot.Engine engine
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0   30     0             this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   30     1           engine  Lorg/graalvm/polyglot/Engine;
            2   30     2           events  Ljava/util/Map<Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/ResourceLimitEvent;>;
            7   30     3           limits  Lorg/graalvm/polyglot/ResourceLimits;
            8   30     4  executorService  Ljava/util/concurrent/ExecutorService;
            9   30     5      testFutures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           10   22     6     contextIndex  I
           12   20     7                c  Lorg/graalvm/polyglot/Context;
           14   20     8          futures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           15   19     9                i  I
           24   25     6           future  Ljava/util/concurrent/Future<*>;
    Exceptions:
      throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  private static void forceMultiThreading(java.util.concurrent.ExecutorService, org.graalvm.polyglot.Context);
    descriptor: (Ljava/util/concurrent/ExecutorService;Lorg/graalvm/polyglot/Context;)V
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=4, locals=2, args_size=2
        start local 0 // java.util.concurrent.ExecutorService executorService
        start local 1 // org.graalvm.polyglot.Context c
         0: .line 460
            aload 1 /* c */
            invokevirtual org.graalvm.polyglot.Context.enter:()V
         1: .line 461
            aload 0 /* executorService */
            new com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest$1
            dup
            aload 1 /* c */
            invokespecial com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest$1.<init>:(Lorg/graalvm/polyglot/Context;)V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
         2: .line 466
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
         3: .line 467
            aload 1 /* c */
            invokevirtual org.graalvm.polyglot.Context.leave:()V
         4: .line 468
            return
        end local 1 // org.graalvm.polyglot.Context c
        end local 0 // java.util.concurrent.ExecutorService executorService
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0    5     0  executorService  Ljava/util/concurrent/ExecutorService;
            0    5     1                c  Lorg/graalvm/polyglot/Context;
    Exceptions:
      throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
    MethodParameters:
                 Name  Flags
      executorService  
      c                

  public void testParallelMultiContextStatementResetLimit();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=5, locals=10, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 472
            invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 1 /* engine */
        start local 1 // org.graalvm.polyglot.Engine engine
         1: .line 473
            new java.util.concurrent.ConcurrentHashMap
            dup
            invokespecial java.util.concurrent.ConcurrentHashMap.<init>:()V
            astore 2 /* events */
        start local 2 // java.util.Map events
         2: .line 477
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 478
            ldc 100
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 479
            aload 2 /* events */
            invokedynamic accept(Ljava/util/Map;)Ljava/util/function/Consumer;
              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;)V
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$14(Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V (6)
                  (Lorg/graalvm/polyglot/ResourceLimitEvent;)V
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.onLimit:(Ljava/util/function/Consumer;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         5: .line 482
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         6: .line 477
            astore 3 /* limits */
        start local 3 // org.graalvm.polyglot.ResourceLimits limits
         7: .line 483
            bipush 20
            invokestatic java.util.concurrent.Executors.newFixedThreadPool:(I)Ljava/util/concurrent/ExecutorService;
            astore 4 /* executorService */
        start local 4 // java.util.concurrent.ExecutorService executorService
         8: .line 484
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 5 /* testFutures */
        start local 5 // java.util.List testFutures
         9: .line 485
            iconst_0
            istore 6 /* contextIndex */
        start local 6 // int contextIndex
        10: goto 22
        11: .line 486
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List int
      StackMap stack:
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 7 /* c */
        start local 7 // org.graalvm.polyglot.Context c
        12: .line 487
            aload 4 /* executorService */
            aload 7 /* c */
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.forceMultiThreading:(Ljava/util/concurrent/ExecutorService;Lorg/graalvm/polyglot/Context;)V
        13: .line 488
            new java.util.ArrayList
            dup
            invokespecial java.util.ArrayList.<init>:()V
            astore 8 /* futures */
        start local 8 // java.util.List futures
        14: .line 489
            iconst_0
            istore 9 /* i */
        start local 9 // int i
        15: goto 18
        16: .line 490
      StackMap locals: org.graalvm.polyglot.Context java.util.List int
      StackMap stack:
            aload 8 /* futures */
            aload 4 /* executorService */
            aload 7 /* c */
            invokedynamic run(Lorg/graalvm/polyglot/Context;)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/api/instrumentation/test/ResourceLimitsTest.lambda$15(Lorg/graalvm/polyglot/Context;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        17: .line 489
            iinc 9 /* i */ 1
      StackMap locals:
      StackMap stack:
        18: iload 9 /* i */
            bipush 100
            if_icmplt 16
        end local 9 // int i
        19: .line 494
            aload 4 /* executorService */
            aload 8 /* futures */
            aload 7 /* c */
            invokedynamic run(Ljava/util/List;Lorg/graalvm/polyglot/Context;)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/api/instrumentation/test/ResourceLimitsTest.lambda$16(Ljava/util/List;Lorg/graalvm/polyglot/Context;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            astore 9 /* prev */
        start local 9 // java.util.concurrent.Future prev
        20: .line 505
            aload 5 /* testFutures */
            aload 4 /* executorService */
            aload 9 /* prev */
            aload 7 /* c */
            aload 2 /* events */
            invokedynamic run(Ljava/util/concurrent/Future;Lorg/graalvm/polyglot/Context;Ljava/util/Map;)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/api/instrumentation/test/ResourceLimitsTest.lambda$17(Ljava/util/concurrent/Future;Lorg/graalvm/polyglot/Context;Ljava/util/Map;)V (6)
                  ()V
            invokeinterface java.util.concurrent.ExecutorService.submit:(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            pop
        end local 9 // java.util.concurrent.Future prev
        end local 8 // java.util.List futures
        end local 7 // org.graalvm.polyglot.Context c
        21: .line 485
            iinc 6 /* contextIndex */ 1
      StackMap locals:
      StackMap stack:
        22: iload 6 /* contextIndex */
            bipush 100
            if_icmplt 11
        end local 6 // int contextIndex
        23: .line 526
            aload 5 /* testFutures */
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 7
            goto 26
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest org.graalvm.polyglot.Engine java.util.Map org.graalvm.polyglot.ResourceLimits java.util.concurrent.ExecutorService java.util.List top java.util.Iterator
      StackMap stack:
        24: aload 7
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.util.concurrent.Future
            astore 6 /* future */
        start local 6 // java.util.concurrent.Future future
        25: .line 527
            aload 6 /* future */
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
        end local 6 // java.util.concurrent.Future future
        26: .line 526
      StackMap locals:
      StackMap stack:
            aload 7
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 24
        27: .line 530
            ldc 100
            aload 2 /* events */
            invokeinterface java.util.Map.size:()I
            i2l
            invokestatic org.junit.Assert.assertEquals:(JJ)V
        28: .line 531
            aload 4 /* executorService */
            invokeinterface java.util.concurrent.ExecutorService.shutdown:()V
        29: .line 532
            aload 4 /* executorService */
            ldc 100
            getstatic java.util.concurrent.TimeUnit.SECONDS:Ljava/util/concurrent/TimeUnit;
            invokeinterface java.util.concurrent.ExecutorService.awaitTermination:(JLjava/util/concurrent/TimeUnit;)Z
            pop
        30: .line 533
            return
        end local 5 // java.util.List testFutures
        end local 4 // java.util.concurrent.ExecutorService executorService
        end local 3 // org.graalvm.polyglot.ResourceLimits limits
        end local 2 // java.util.Map events
        end local 1 // org.graalvm.polyglot.Engine engine
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0   31     0             this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            1   31     1           engine  Lorg/graalvm/polyglot/Engine;
            2   31     2           events  Ljava/util/Map<Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/ResourceLimitEvent;>;
            7   31     3           limits  Lorg/graalvm/polyglot/ResourceLimits;
            8   31     4  executorService  Ljava/util/concurrent/ExecutorService;
            9   31     5      testFutures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           10   23     6     contextIndex  I
           12   21     7                c  Lorg/graalvm/polyglot/Context;
           14   21     8          futures  Ljava/util/List<Ljava/util/concurrent/Future<*>;>;
           15   19     9                i  I
           20   21     9             prev  Ljava/util/concurrent/Future<*>;
           25   26     6           future  Ljava/util/concurrent/Future<*>;
    Exceptions:
      throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  public void testStatementLimitErrors();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=2, locals=2, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 537
            invokedynamic call()Ljava/util/concurrent/Callable;
              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;
                  com/oracle/truffle/api/instrumentation/test/ResourceLimitsTest.lambda$18()Ljava/lang/Object; (6)
                  ()Ljava/lang/Object;
            ldc Ljava/lang/IllegalArgumentException;
            invokestatic com.oracle.truffle.api.test.polyglot.AbstractPolyglotTest.assertFails:(Ljava/util/concurrent/Callable;Ljava/lang/Class;)V
         1: .line 538
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.create:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context;
            astore 1 /* context */
        start local 1 // org.graalvm.polyglot.Context context
         2: .line 540
            aload 1 /* context */
            invokevirtual org.graalvm.polyglot.Context.resetLimits:()V
         3: .line 542
            iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aconst_null
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            pop
         4: .line 543
            return
        end local 1 // org.graalvm.polyglot.Context context
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0    5     0     this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            2    5     1  context  Lorg/graalvm/polyglot/Context;
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  private static void assertStatementCountLimit(org.graalvm.polyglot.Context, org.graalvm.polyglot.PolyglotException, int);
    descriptor: (Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=3, locals=4, args_size=3
        start local 0 // org.graalvm.polyglot.Context c
        start local 1 // org.graalvm.polyglot.PolyglotException e
        start local 2 // int limit
         0: .line 546
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.isCancelled:()Z
            invokestatic org.junit.Assert.assertTrue:(Z)V
         1: .line 547
            new java.lang.StringBuilder
            dup
            ldc "Statement count limit of "
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            iload 2 /* limit */
            invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
            ldc " exceeded. Statements executed "
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            iload 2 /* limit */
            iconst_1
            iadd
            invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
            ldc "."
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            astore 3 /* expectedMessage */
        start local 3 // java.lang.String expectedMessage
         2: .line 548
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.isResourceExhausted:()Z
            invokestatic org.junit.Assert.assertTrue:(Z)V
         3: .line 549
            aload 3 /* expectedMessage */
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.getMessage:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
         4: .line 550
            ldc "STATEMENT"
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.getSourceLocation:()Lorg/graalvm/polyglot/SourceSection;
            invokevirtual org.graalvm.polyglot.SourceSection.getCharacters:()Ljava/lang/CharSequence;
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
         5: .line 552
            aload 0 /* c */
            ldc "instrumentation-test-language"
            ldc "EXPRESSION"
            invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
            pop
         6: .line 553
            invokestatic org.junit.Assert.fail:()V
         7: .line 554
            goto 11
      StackMap locals: org.graalvm.polyglot.Context org.graalvm.polyglot.PolyglotException int java.lang.String
      StackMap stack: org.graalvm.polyglot.PolyglotException
         8: pop
         9: .line 555
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.isCancelled:()Z
            invokestatic org.junit.Assert.assertTrue:(Z)V
        10: .line 556
            aload 3 /* expectedMessage */
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.getMessage:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
        11: .line 558
      StackMap locals:
      StackMap stack:
            return
        end local 3 // java.lang.String expectedMessage
        end local 2 // int limit
        end local 1 // org.graalvm.polyglot.PolyglotException e
        end local 0 // org.graalvm.polyglot.Context c
      LocalVariableTable:
        Start  End  Slot             Name  Signature
            0   12     0                c  Lorg/graalvm/polyglot/Context;
            0   12     1                e  Lorg/graalvm/polyglot/PolyglotException;
            0   12     2            limit  I
            2   12     3  expectedMessage  Ljava/lang/String;
      Exception table:
        from    to  target  type
           5     7       8  Class org.graalvm.polyglot.PolyglotException
    MethodParameters:
       Name  Flags
      c      
      e      
      limit  

  public void testStatementLimitNoLimitCombination();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=4, locals=9, args_size=1
        start local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
         0: .line 562
            aconst_null
            astore 1
            aconst_null
            astore 2
         1: invokestatic org.graalvm.polyglot.Engine.create:()Lorg/graalvm/polyglot/Engine;
            astore 3 /* engine */
        start local 3 // org.graalvm.polyglot.Engine engine
         2: .line 563
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
         3: .line 564
            ldc 50
            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/api/instrumentation/test/ResourceLimitsTest.lambda$19(Lorg/graalvm/polyglot/Source;)Z (6)
                  (Lorg/graalvm/polyglot/Source;)Z
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
         4: .line 565
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
         5: .line 563
            astore 4 /* limits */
        start local 4 // org.graalvm.polyglot.ResourceLimits limits
         6: .line 567
            aconst_null
            astore 5
            aconst_null
            astore 6
         7: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 4 /* limits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 7 /* context */
        start local 7 // org.graalvm.polyglot.Context context
         8: .line 568
            aload 7 /* context */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         9: .line 570
            aload 7 /* context */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        10: .line 571
            invokestatic org.junit.Assert.fail:()V
        11: .line 572
            goto 14
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Engine org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        12: astore 8 /* e */
        start local 8 // org.graalvm.polyglot.PolyglotException e
        13: .line 573
            aload 7 /* context */
            aload 8 /* e */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 8 // org.graalvm.polyglot.PolyglotException e
        14: .line 575
      StackMap locals:
      StackMap stack:
            aload 7 /* context */
            ifnull 20
            aload 7 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 20
      StackMap locals:
      StackMap stack: java.lang.Throwable
        15: astore 5
            aload 7 /* context */
            ifnull 16
            aload 7 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 7 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        16: aload 5
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        17: astore 6
            aload 5
            ifnonnull 18
            aload 6
            astore 5
            goto 19
      StackMap locals:
      StackMap stack:
        18: aload 5
            aload 6
            if_acmpeq 19
            aload 5
            aload 6
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        19: aload 5
            athrow
        20: .line 577
      StackMap locals:
      StackMap stack:
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.build:()Lorg/graalvm/polyglot/ResourceLimits;
            astore 5 /* limitsNoLimits */
        start local 5 // org.graalvm.polyglot.ResourceLimits limitsNoLimits
        21: .line 579
            aconst_null
            astore 6
            aconst_null
            astore 7
        22: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 5 /* limitsNoLimits */
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 8 /* context */
        start local 8 // org.graalvm.polyglot.Context context
        23: .line 580
            aload 8 /* context */
            bipush 100
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        24: .line 581
            aload 8 /* context */
            ifnull 30
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 30
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Engine org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        25: astore 6
            aload 8 /* context */
            ifnull 26
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 8 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        26: aload 6
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        27: astore 7
            aload 6
            ifnonnull 28
            aload 7
            astore 6
            goto 29
      StackMap locals:
      StackMap stack:
        28: aload 6
            aload 7
            if_acmpeq 29
            aload 6
            aload 7
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        29: aload 6
            athrow
        30: .line 583
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 6
            aconst_null
            astore 7
        31: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 8 /* context */
        start local 8 // org.graalvm.polyglot.Context context
        32: .line 584
            aload 8 /* context */
            bipush 100
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        33: .line 585
            aload 8 /* context */
            ifnull 39
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 39
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Engine org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
        34: astore 6
            aload 8 /* context */
            ifnull 35
            aload 8 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 8 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        35: aload 6
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        36: astore 7
            aload 6
            ifnonnull 37
            aload 7
            astore 6
            goto 38
      StackMap locals:
      StackMap stack:
        37: aload 6
            aload 7
            if_acmpeq 38
            aload 6
            aload 7
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        38: aload 6
            athrow
        end local 5 // org.graalvm.polyglot.ResourceLimits limitsNoLimits
        end local 4 // org.graalvm.polyglot.ResourceLimits limits
        39: .line 586
      StackMap locals: com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Engine
      StackMap stack:
            aload 3 /* engine */
            ifnull 45
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Engine.close:()V
            goto 45
      StackMap locals:
      StackMap stack: java.lang.Throwable
        40: astore 1
            aload 3 /* engine */
            ifnull 41
            aload 3 /* engine */
            invokevirtual org.graalvm.polyglot.Engine.close:()V
        end local 3 // org.graalvm.polyglot.Engine engine
      StackMap locals:
      StackMap stack:
        41: aload 1
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        42: astore 2
            aload 1
            ifnonnull 43
            aload 2
            astore 1
            goto 44
      StackMap locals:
      StackMap stack:
        43: aload 1
            aload 2
            if_acmpeq 44
            aload 1
            aload 2
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        44: aload 1
            athrow
        45: .line 587
      StackMap locals:
      StackMap stack:
            return
        end local 0 // com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest this
      LocalVariableTable:
        Start  End  Slot            Name  Signature
            0   46     0            this  Lcom/oracle/truffle/api/instrumentation/test/ResourceLimitsTest;
            2   41     3          engine  Lorg/graalvm/polyglot/Engine;
            6   39     4          limits  Lorg/graalvm/polyglot/ResourceLimits;
            8   16     7         context  Lorg/graalvm/polyglot/Context;
           13   14     8               e  Lorg/graalvm/polyglot/PolyglotException;
           21   39     5  limitsNoLimits  Lorg/graalvm/polyglot/ResourceLimits;
           23   26     8         context  Lorg/graalvm/polyglot/Context;
           32   35     8         context  Lorg/graalvm/polyglot/Context;
      Exception table:
        from    to  target  type
           9    11      12  Class org.graalvm.polyglot.PolyglotException
           8    14      15  any
           7    17      17  any
          23    24      25  any
          22    27      27  any
          32    33      34  any
          31    36      36  any
           2    39      40  any
           1    42      42  any
    RuntimeVisibleAnnotations: 
      org.junit.Test()

  private static boolean lambda$0(org.graalvm.polyglot.Source, org.graalvm.polyglot.Source);
    descriptor: (Lorg/graalvm/polyglot/Source;Lorg/graalvm/polyglot/Source;)Z
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=2, args_size=2
        start local 1 // org.graalvm.polyglot.Source s
         0: .line 93
            aload 0
            aload 1 /* s */
            invokevirtual org.graalvm.polyglot.Source.equals:(Ljava/lang/Object;)Z
            ireturn
        end local 1 // org.graalvm.polyglot.Source s
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     1     s  Lorg/graalvm/polyglot/Source;

  private static boolean lambda$1(org.graalvm.polyglot.Source);
    descriptor: (Lorg/graalvm/polyglot/Source;)Z
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.graalvm.polyglot.Source s
         0: .line 116
            iconst_1
            ireturn
        end local 0 // org.graalvm.polyglot.Source s
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0     s  Lorg/graalvm/polyglot/Source;

  private static boolean lambda$2(org.graalvm.polyglot.Source);
    descriptor: (Lorg/graalvm/polyglot/Source;)Z
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.graalvm.polyglot.Source s
         0: .line 119
            iconst_1
            ireturn
        end local 0 // org.graalvm.polyglot.Source s
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0     s  Lorg/graalvm/polyglot/Source;

  private static boolean lambda$3(java.lang.RuntimeException, org.graalvm.polyglot.Source);
    descriptor: (Ljava/lang/RuntimeException;Lorg/graalvm/polyglot/Source;)Z
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=1, locals=2, args_size=2
        start local 1 // org.graalvm.polyglot.Source s
         0: .line 143
            aload 0
            athrow
        end local 1 // org.graalvm.polyglot.Source s
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     1     s  Lorg/graalvm/polyglot/Source;

  private static void lambda$4(java.util.List, org.graalvm.polyglot.ResourceLimitEvent);
    descriptor: (Ljava/util/List;Lorg/graalvm/polyglot/ResourceLimitEvent;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=2, args_size=2
        start local 1 // org.graalvm.polyglot.ResourceLimitEvent e
         0: .line 163
            aload 0
            aload 1 /* e */
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            return
        end local 1 // org.graalvm.polyglot.ResourceLimitEvent e
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     1     e  Lorg/graalvm/polyglot/ResourceLimitEvent;

  private static void lambda$5(org.graalvm.polyglot.Engine, org.graalvm.polyglot.Source, org.graalvm.polyglot.ResourceLimits, org.graalvm.polyglot.ResourceLimits);
    descriptor: (Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/Source;Lorg/graalvm/polyglot/ResourceLimits;Lorg/graalvm/polyglot/ResourceLimits;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=8, args_size=4
         0: .line 242
            aconst_null
            astore 4
            aconst_null
            astore 5
         1: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 0
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 6 /* context */
        start local 6 // org.graalvm.polyglot.Context context
         2: .line 243
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         3: .line 244
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         4: .line 245
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         5: .line 246
            aload 6 /* context */
            ifnull 11
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 11
      StackMap locals: org.graalvm.polyglot.Engine org.graalvm.polyglot.Source org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: java.lang.Throwable
         6: astore 4
            aload 6 /* context */
            ifnull 7
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 6 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
         7: aload 4
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
         8: astore 5
            aload 4
            ifnonnull 9
            aload 5
            astore 4
            goto 10
      StackMap locals:
      StackMap stack:
         9: aload 4
            aload 5
            if_acmpeq 10
            aload 4
            aload 5
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        10: aload 4
            athrow
        11: .line 249
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 4
            aconst_null
            astore 5
        12: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 0
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 2
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 6 /* context */
        start local 6 // org.graalvm.polyglot.Context context
        13: .line 250
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        14: .line 252
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        15: .line 253
            invokestatic org.junit.Assert.fail:()V
        16: .line 254
            goto 19
      StackMap locals: org.graalvm.polyglot.Engine org.graalvm.polyglot.Source org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        17: astore 7 /* ex */
        start local 7 // org.graalvm.polyglot.PolyglotException ex
        18: .line 255
            aload 6 /* context */
            aload 7 /* ex */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 7 // org.graalvm.polyglot.PolyglotException ex
        19: .line 257
      StackMap locals:
      StackMap stack:
            aload 6 /* context */
            ifnull 25
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 25
      StackMap locals:
      StackMap stack: java.lang.Throwable
        20: astore 4
            aload 6 /* context */
            ifnull 21
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 6 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        21: aload 4
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        22: astore 5
            aload 4
            ifnonnull 23
            aload 5
            astore 4
            goto 24
      StackMap locals:
      StackMap stack:
        23: aload 4
            aload 5
            if_acmpeq 24
            aload 4
            aload 5
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        24: aload 4
            athrow
        25: .line 260
      StackMap locals:
      StackMap stack:
            aconst_null
            astore 4
            aconst_null
            astore 5
        26: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 0
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 3
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 6 /* context */
        start local 6 // org.graalvm.polyglot.Context context
        27: .line 261
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        28: .line 262
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        29: .line 264
            aload 6 /* context */
            aload 1
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        30: .line 265
            invokestatic org.junit.Assert.fail:()V
        31: .line 266
            goto 34
      StackMap locals: org.graalvm.polyglot.Engine org.graalvm.polyglot.Source org.graalvm.polyglot.ResourceLimits org.graalvm.polyglot.ResourceLimits java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
        32: astore 7 /* ex */
        start local 7 // org.graalvm.polyglot.PolyglotException ex
        33: .line 267
            aload 6 /* context */
            aload 7 /* ex */
            iconst_2
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        end local 7 // org.graalvm.polyglot.PolyglotException ex
        34: .line 269
      StackMap locals:
      StackMap stack:
            aload 6 /* context */
            ifnull 40
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 40
      StackMap locals:
      StackMap stack: java.lang.Throwable
        35: astore 4
            aload 6 /* context */
            ifnull 36
            aload 6 /* context */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 6 // org.graalvm.polyglot.Context context
      StackMap locals:
      StackMap stack:
        36: aload 4
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        37: astore 5
            aload 4
            ifnonnull 38
            aload 5
            astore 4
            goto 39
      StackMap locals:
      StackMap stack:
        38: aload 4
            aload 5
            if_acmpeq 39
            aload 4
            aload 5
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        39: aload 4
            athrow
        40: .line 270
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            2    7     6  context  Lorg/graalvm/polyglot/Context;
           13   21     6  context  Lorg/graalvm/polyglot/Context;
           18   19     7       ex  Lorg/graalvm/polyglot/PolyglotException;
           27   36     6  context  Lorg/graalvm/polyglot/Context;
           33   34     7       ex  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
           2     5       6  any
           1     8       8  any
          14    16      17  Class org.graalvm.polyglot.PolyglotException
          13    19      20  any
          12    22      22  any
          29    31      32  Class org.graalvm.polyglot.PolyglotException
          27    34      35  any
          26    37      37  any

  private static void lambda$6(java.util.List, org.graalvm.polyglot.ResourceLimitEvent);
    descriptor: (Ljava/util/List;Lorg/graalvm/polyglot/ResourceLimitEvent;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=2, args_size=2
        start local 1 // org.graalvm.polyglot.ResourceLimitEvent e
         0: .line 290
            aload 0
            aload 1 /* e */
            invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
            return
        end local 1 // org.graalvm.polyglot.ResourceLimitEvent e
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     1     e  Lorg/graalvm/polyglot/ResourceLimitEvent;

  private static void lambda$7(java.util.Map, org.graalvm.polyglot.ResourceLimitEvent);
    descriptor: (Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=3, args_size=2
        start local 1 // org.graalvm.polyglot.ResourceLimitEvent e
         0: .line 319
            aload 0
            dup
            astore 2
            monitorenter
         1: .line 320
            aload 0
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            aload 1 /* e */
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         2: .line 319
            aload 2
            monitorexit
         3: goto 6
      StackMap locals: java.util.Map org.graalvm.polyglot.ResourceLimitEvent java.util.Map
      StackMap stack: java.lang.Throwable
         4: aload 2
            monitorexit
         5: athrow
         6: .line 322
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.graalvm.polyglot.ResourceLimitEvent e
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    7     1     e  Lorg/graalvm/polyglot/ResourceLimitEvent;
      Exception table:
        from    to  target  type
           1     3       4  any
           4     5       4  any

  private static void lambda$8(org.graalvm.polyglot.Engine, org.graalvm.polyglot.ResourceLimits, java.util.Map);
    descriptor: (Lorg/graalvm/polyglot/Engine;Lorg/graalvm/polyglot/ResourceLimits;Ljava/util/Map;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=8, args_size=3
         0: .line 329
            aconst_null
            astore 3
            aconst_null
            astore 4
         1: iconst_0
            anewarray java.lang.String
            invokestatic org.graalvm.polyglot.Context.newBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
            aload 0
            invokevirtual org.graalvm.polyglot.Context$Builder.engine:(Lorg/graalvm/polyglot/Engine;)Lorg/graalvm/polyglot/Context$Builder;
            aload 1
            invokevirtual org.graalvm.polyglot.Context$Builder.resourceLimits:(Lorg/graalvm/polyglot/ResourceLimits;)Lorg/graalvm/polyglot/Context$Builder;
            invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
            astore 5 /* c */
        start local 5 // org.graalvm.polyglot.Context c
         2: .line 330
            aload 5 /* c */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         3: .line 332
            aload 5 /* c */
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         4: .line 333
            invokestatic org.junit.Assert.fail:()V
         5: .line 334
            goto 16
      StackMap locals: org.graalvm.polyglot.Engine org.graalvm.polyglot.ResourceLimits java.util.Map java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
      StackMap stack: org.graalvm.polyglot.PolyglotException
         6: astore 6 /* e */
        start local 6 // org.graalvm.polyglot.PolyglotException e
         7: .line 335
            aload 5 /* c */
            aload 6 /* e */
            bipush 50
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
         8: .line 336
            aload 2
            dup
            astore 7
            monitorenter
         9: .line 337
            aload 2
            aload 5 /* c */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        10: .line 338
            aload 5 /* c */
            aload 2
            aload 5 /* c */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        11: .line 339
            aload 2
            aload 5 /* c */
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.toString:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        12: .line 336
            aload 7
            monitorexit
        13: goto 16
      StackMap locals: org.graalvm.polyglot.Engine org.graalvm.polyglot.ResourceLimits java.util.Map java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.PolyglotException java.util.Map
      StackMap stack: java.lang.Throwable
        14: aload 7
            monitorexit
        15: athrow
        end local 6 // org.graalvm.polyglot.PolyglotException e
        16: .line 342
      StackMap locals:
      StackMap stack:
            aload 5 /* c */
            ifnull 22
            aload 5 /* c */
            invokevirtual org.graalvm.polyglot.Context.close:()V
            goto 22
      StackMap locals:
      StackMap stack: java.lang.Throwable
        17: astore 3
            aload 5 /* c */
            ifnull 18
            aload 5 /* c */
            invokevirtual org.graalvm.polyglot.Context.close:()V
        end local 5 // org.graalvm.polyglot.Context c
      StackMap locals:
      StackMap stack:
        18: aload 3
            athrow
      StackMap locals:
      StackMap stack: java.lang.Throwable
        19: astore 4
            aload 3
            ifnonnull 20
            aload 4
            astore 3
            goto 21
      StackMap locals:
      StackMap stack:
        20: aload 3
            aload 4
            if_acmpeq 21
            aload 3
            aload 4
            invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
      StackMap locals:
      StackMap stack:
        21: aload 3
            athrow
        22: .line 343
      StackMap locals:
      StackMap stack:
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            2   18     5     c  Lorg/graalvm/polyglot/Context;
            7   16     6     e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
           3     5       6  Class org.graalvm.polyglot.PolyglotException
           9    13      14  any
          14    15      14  any
           2    16      17  any
           1    19      19  any

  private static void lambda$9(java.util.Map, org.graalvm.polyglot.ResourceLimitEvent);
    descriptor: (Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=3, args_size=2
        start local 1 // org.graalvm.polyglot.ResourceLimitEvent e
         0: .line 362
            aload 0
            dup
            astore 2
            monitorenter
         1: .line 363
            aload 0
            invokeinterface java.util.Map.isEmpty:()Z
            invokestatic org.junit.Assert.assertTrue:(Z)V
         2: .line 364
            aload 0
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            aload 1 /* e */
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         3: .line 362
            aload 2
            monitorexit
         4: goto 7
      StackMap locals: java.util.Map org.graalvm.polyglot.ResourceLimitEvent java.util.Map
      StackMap stack: java.lang.Throwable
         5: aload 2
            monitorexit
         6: athrow
         7: .line 366
      StackMap locals:
      StackMap stack:
            return
        end local 1 // org.graalvm.polyglot.ResourceLimitEvent e
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    8     1     e  Lorg/graalvm/polyglot/ResourceLimitEvent;
      Exception table:
        from    to  target  type
           1     4       5  any
           5     6       5  any

  private static void lambda$10(org.graalvm.polyglot.Context);
    descriptor: (Lorg/graalvm/polyglot/Context;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=1, args_size=1
         0: .line 374
            aload 0
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         1: .line 375
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  private static void lambda$11(java.util.Map, org.graalvm.polyglot.ResourceLimitEvent);
    descriptor: (Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=2, args_size=2
        start local 1 // org.graalvm.polyglot.ResourceLimitEvent e
         0: .line 406
            aload 0
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            aload 1 /* e */
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 407
            return
        end local 1 // org.graalvm.polyglot.ResourceLimitEvent e
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     1     e  Lorg/graalvm/polyglot/ResourceLimitEvent;

  private static void lambda$12(org.graalvm.polyglot.Context);
    descriptor: (Lorg/graalvm/polyglot/Context;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=1, args_size=1
         0: .line 419
            aload 0
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         1: .line 420
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  private static void lambda$13(java.util.List, org.graalvm.polyglot.Context, java.util.Map);
    descriptor: (Ljava/util/List;Lorg/graalvm/polyglot/Context;Ljava/util/Map;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=4, locals=7, args_size=3
         0: .line 423
            aload 0
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 4
            goto 11
      StackMap locals: java.util.List org.graalvm.polyglot.Context java.util.Map top java.util.Iterator
      StackMap stack:
         1: aload 4
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.util.concurrent.Future
            astore 3 /* future */
        start local 3 // java.util.concurrent.Future future
         2: .line 425
            aload 3 /* future */
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
         3: .line 426
            goto 11
      StackMap locals: java.util.List org.graalvm.polyglot.Context java.util.Map java.util.concurrent.Future java.util.Iterator
      StackMap stack: java.lang.Exception
         4: astore 5 /* e1 */
        start local 5 // java.lang.Exception e1
         5: .line 427
            aload 5 /* e1 */
            instanceof java.util.concurrent.ExecutionException
            ifeq 10
         6: .line 428
            aload 5 /* e1 */
            invokevirtual java.lang.Exception.getCause:()Ljava/lang/Throwable;
            instanceof org.graalvm.polyglot.PolyglotException
            ifeq 10
         7: .line 429
            aload 5 /* e1 */
            invokevirtual java.lang.Exception.getCause:()Ljava/lang/Throwable;
            checkcast org.graalvm.polyglot.PolyglotException
            astore 6 /* e */
        start local 6 // org.graalvm.polyglot.PolyglotException e
         8: .line 430
            aload 6 /* e */
            invokevirtual org.graalvm.polyglot.PolyglotException.isCancelled:()Z
            ifeq 10
         9: .line 431
            new java.lang.AssertionError
            dup
            ldc "Context was cancelled too early."
            aload 6 /* e */
            invokespecial java.lang.AssertionError.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
            athrow
        end local 6 // org.graalvm.polyglot.PolyglotException e
        10: .line 435
      StackMap locals: java.lang.Exception
      StackMap stack:
            new java.lang.RuntimeException
            dup
            aload 5 /* e1 */
            invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 5 // java.lang.Exception e1
        end local 3 // java.util.concurrent.Future future
        11: .line 423
      StackMap locals: java.util.List org.graalvm.polyglot.Context java.util.Map top java.util.Iterator
      StackMap stack:
            aload 4
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 1
        12: .line 439
            aload 1
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
        13: .line 440
            invokestatic org.junit.Assert.fail:()V
        14: .line 441
            goto 20
      StackMap locals: java.util.List org.graalvm.polyglot.Context java.util.Map
      StackMap stack: org.graalvm.polyglot.PolyglotException
        15: astore 3 /* e */
        start local 3 // org.graalvm.polyglot.PolyglotException e
        16: .line 442
            aload 1
            aload 3 /* e */
            bipush 100
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        17: .line 443
            aload 2
            aload 1
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        18: .line 444
            aload 1
            aload 2
            aload 1
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        19: .line 445
            aload 2
            aload 1
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.toString:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        end local 3 // org.graalvm.polyglot.PolyglotException e
        20: .line 447
      StackMap locals:
      StackMap stack:
            aload 1
            invokevirtual org.graalvm.polyglot.Context.close:()V
        21: .line 448
            return
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            2   11     3  future  Ljava/util/concurrent/Future<*>;
            5   11     5      e1  Ljava/lang/Exception;
            8   10     6       e  Lorg/graalvm/polyglot/PolyglotException;
           16   20     3       e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
           2     3       4  Class java.lang.InterruptedException
           2     3       4  Class java.util.concurrent.ExecutionException
          12    14      15  Class org.graalvm.polyglot.PolyglotException

  private static void lambda$14(java.util.Map, org.graalvm.polyglot.ResourceLimitEvent);
    descriptor: (Ljava/util/Map;Lorg/graalvm/polyglot/ResourceLimitEvent;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=2, args_size=2
        start local 1 // org.graalvm.polyglot.ResourceLimitEvent e
         0: .line 480
            aload 0
            aload 1 /* e */
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            aload 1 /* e */
            invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
            pop
         1: .line 481
            return
        end local 1 // org.graalvm.polyglot.ResourceLimitEvent e
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     1     e  Lorg/graalvm/polyglot/ResourceLimitEvent;

  private static void lambda$15(org.graalvm.polyglot.Context);
    descriptor: (Lorg/graalvm/polyglot/Context;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=2, locals=1, args_size=1
         0: .line 491
            aload 0
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         1: .line 492
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  private static void lambda$16(java.util.List, org.graalvm.polyglot.Context);
    descriptor: (Ljava/util/List;Lorg/graalvm/polyglot/Context;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=5, args_size=2
         0: .line 495
            aload 0
            invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
            astore 3
            goto 6
      StackMap locals: java.util.List org.graalvm.polyglot.Context top java.util.Iterator
      StackMap stack:
         1: aload 3
            invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
            checkcast java.util.concurrent.Future
            astore 2 /* future */
        start local 2 // java.util.concurrent.Future future
         2: .line 497
            aload 2 /* future */
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
         3: .line 498
            goto 6
      StackMap locals: java.util.List org.graalvm.polyglot.Context java.util.concurrent.Future java.util.Iterator
      StackMap stack: java.lang.Exception
         4: astore 4 /* e1 */
        start local 4 // java.lang.Exception e1
         5: .line 499
            new java.lang.RuntimeException
            dup
            aload 4 /* e1 */
            invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 4 // java.lang.Exception e1
        end local 2 // java.util.concurrent.Future future
         6: .line 495
      StackMap locals: java.util.List org.graalvm.polyglot.Context top java.util.Iterator
      StackMap stack:
            aload 3
            invokeinterface java.util.Iterator.hasNext:()Z
            ifne 1
         7: .line 502
            aload 1
            invokevirtual org.graalvm.polyglot.Context.resetLimits:()V
         8: .line 503
            return
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            2    6     2  future  Ljava/util/concurrent/Future<*>;
            5    6     4      e1  Ljava/lang/Exception;
      Exception table:
        from    to  target  type
           2     3       4  Class java.lang.InterruptedException
           2     3       4  Class java.util.concurrent.ExecutionException

  private static void lambda$17(java.util.concurrent.Future, org.graalvm.polyglot.Context, java.util.Map);
    descriptor: (Ljava/util/concurrent/Future;Lorg/graalvm/polyglot/Context;Ljava/util/Map;)V
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=3, locals=4, args_size=3
         0: .line 507
            aload 0
            invokeinterface java.util.concurrent.Future.get:()Ljava/lang/Object;
            pop
         1: .line 508
            goto 4
      StackMap locals:
      StackMap stack: java.lang.Exception
         2: astore 3 /* e1 */
        start local 3 // java.lang.Exception e1
         3: .line 509
            new java.lang.RuntimeException
            dup
            aload 3 /* e1 */
            invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
            athrow
        end local 3 // java.lang.Exception e1
         4: .line 511
      StackMap locals:
      StackMap stack:
            aload 1
            bipush 100
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         5: .line 513
            aload 1
            iconst_1
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.statements:(I)Lorg/graalvm/polyglot/Source;
            invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
            pop
         6: .line 514
            invokestatic org.junit.Assert.fail:()V
         7: .line 515
            goto 13
      StackMap locals:
      StackMap stack: org.graalvm.polyglot.PolyglotException
         8: astore 3 /* e */
        start local 3 // org.graalvm.polyglot.PolyglotException e
         9: .line 516
            aload 1
            aload 3 /* e */
            bipush 100
            invokestatic com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest.assertStatementCountLimit:(Lorg/graalvm/polyglot/Context;Lorg/graalvm/polyglot/PolyglotException;I)V
        10: .line 517
            aload 2
            aload 1
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        11: .line 518
            aload 1
            aload 2
            aload 1
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.getContext:()Lorg/graalvm/polyglot/Context;
            invokestatic org.junit.Assert.assertSame:(Ljava/lang/Object;Ljava/lang/Object;)V
        12: .line 519
            aload 2
            aload 1
            invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
            checkcast org.graalvm.polyglot.ResourceLimitEvent
            invokevirtual org.graalvm.polyglot.ResourceLimitEvent.toString:()Ljava/lang/String;
            invokestatic org.junit.Assert.assertNotNull:(Ljava/lang/Object;)V
        end local 3 // org.graalvm.polyglot.PolyglotException e
        13: .line 521
      StackMap locals:
      StackMap stack:
            aload 1
            invokevirtual org.graalvm.polyglot.Context.close:()V
        14: .line 522
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            3    4     3    e1  Ljava/lang/Exception;
            9   13     3     e  Lorg/graalvm/polyglot/PolyglotException;
      Exception table:
        from    to  target  type
           0     1       2  Class java.lang.InterruptedException
           0     1       2  Class java.util.concurrent.ExecutionException
           5     7       8  Class org.graalvm.polyglot.PolyglotException

  private static java.lang.Object lambda$18();
    descriptor: ()Ljava/lang/Object;
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=4, locals=0, args_size=0
         0: .line 537
            invokestatic org.graalvm.polyglot.ResourceLimits.newBuilder:()Lorg/graalvm/polyglot/ResourceLimits$Builder;
            ldc -1
            aconst_null
            invokevirtual org.graalvm.polyglot.ResourceLimits$Builder.statementLimit:(JLjava/util/function/Predicate;)Lorg/graalvm/polyglot/ResourceLimits$Builder;
            areturn
      LocalVariableTable:
        Start  End  Slot  Name  Signature
    Exceptions:
      throws java.lang.Exception

  private static boolean lambda$19(org.graalvm.polyglot.Source);
    descriptor: (Lorg/graalvm/polyglot/Source;)Z
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.graalvm.polyglot.Source s
         0: .line 564
            aload 0 /* s */
            invokevirtual org.graalvm.polyglot.Source.isInternal:()Z
            ifeq 1
            iconst_0
            goto 2
      StackMap locals:
      StackMap stack:
         1: iconst_1
      StackMap locals:
      StackMap stack: int
         2: ireturn
        end local 0 // org.graalvm.polyglot.Source s
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    3     0     s  Lorg/graalvm/polyglot/Source;
}
SourceFile: "ResourceLimitsTest.java"
NestMembers:
  com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest$1
InnerClasses:
  com.oracle.truffle.api.instrumentation.test.ResourceLimitsTest$1
  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
  public final Builder = org.graalvm.polyglot.ResourceLimits$Builder of org.graalvm.polyglot.ResourceLimits
  public Builder = org.graalvm.polyglot.Source$Builder of org.graalvm.polyglot.Source