public class com.oracle.truffle.sl.test.SLInteropOperatorTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.sl.test.SLInteropOperatorTest
super_class: java.lang.Object
{
private org.graalvm.polyglot.Context context;
descriptor: Lorg/graalvm/polyglot/Context;
flags: (0x0002) ACC_PRIVATE
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/oracle/truffle/sl/test/SLInteropOperatorTest;
public void setUp();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=1, args_size=1
start local 0 0: aload 0
iconst_1
anewarray java.lang.String
dup
iconst_0
ldc "sl"
aastore
invokestatic org.graalvm.polyglot.Context.create:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context;
putfield com.oracle.truffle.sl.test.SLInteropOperatorTest.context:Lorg/graalvm/polyglot/Context;
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/oracle/truffle/sl/test/SLInteropOperatorTest;
RuntimeVisibleAnnotations:
org.junit.Before()
public void tearDown();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
putfield com.oracle.truffle.sl.test.SLInteropOperatorTest.context:Lorg/graalvm/polyglot/Context;
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/oracle/truffle/sl/test/SLInteropOperatorTest;
RuntimeVisibleAnnotations:
org.junit.After()
public void testAdd();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: ldc "sl"
ldc "function testAdd(a,b) {return a + b;} function main() {return testAdd;}"
ldc "testAdd.sl"
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;
astore 1
start local 1 1: aload 0
getfield com.oracle.truffle.sl.test.SLInteropOperatorTest.context:Lorg/graalvm/polyglot/Context;
aload 1
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: aload 2
invokevirtual org.graalvm.polyglot.Value.canExecute:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
3: aload 2
iconst_2
anewarray java.lang.Object
dup
iconst_0
iconst_1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
iconst_2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
astore 3
start local 3 4: aload 3
invokevirtual org.graalvm.polyglot.Value.isNumber:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
5: ldc 3
aload 3
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
6: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lcom/oracle/truffle/sl/test/SLInteropOperatorTest;
1 7 1 src Lorg/graalvm/polyglot/Source;
2 7 2 fnc Lorg/graalvm/polyglot/Value;
4 7 3 res Lorg/graalvm/polyglot/Value;
RuntimeVisibleAnnotations:
org.junit.Test()
public void testSub();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=1
start local 0 0: ldc "sl"
ldc "function testSub(a,b) {return a - b;} function main() {return testSub;}"
ldc "testSub.sl"
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;
astore 1
start local 1 1: aload 0
getfield com.oracle.truffle.sl.test.SLInteropOperatorTest.context:Lorg/graalvm/polyglot/Context;
aload 1
invokevirtual org.graalvm.polyglot.Context.eval:(Lorg/graalvm/polyglot/Source;)Lorg/graalvm/polyglot/Value;
astore 2
start local 2 2: aload 2
iconst_2
anewarray java.lang.Object
dup
iconst_0
iconst_1
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
dup
iconst_1
iconst_2
invokestatic java.lang.Integer.valueOf:(I)Ljava/lang/Integer;
aastore
invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
astore 3
start local 3 3: aload 3
invokevirtual org.graalvm.polyglot.Value.isNumber:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
4: ldc -1
aload 3
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
5: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lcom/oracle/truffle/sl/test/SLInteropOperatorTest;
1 6 1 src Lorg/graalvm/polyglot/Source;
2 6 2 fnc Lorg/graalvm/polyglot/Value;
3 6 3 res Lorg/graalvm/polyglot/Value;
RuntimeVisibleAnnotations:
org.junit.Test()
}
SourceFile: "SLInteropOperatorTest.java"
InnerClasses:
public Builder = org.graalvm.polyglot.Source$Builder of org.graalvm.polyglot.Source