public class com.oracle.truffle.js.test.interop.DateTest
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.oracle.truffle.js.test.interop.DateTest
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 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/js/test/interop/DateTest;
public void testDateValue();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=10, args_size=1
start local 0 0: iconst_2
anewarray java.time.ZoneId
dup
iconst_0
invokestatic java.time.ZoneId.systemDefault:()Ljava/time/ZoneId;
aastore
dup
iconst_1
ldc "UTC+9"
invokestatic java.time.ZoneId.of:(Ljava/lang/String;)Ljava/time/ZoneId;
aastore
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 21
StackMap locals: com.oracle.truffle.js.test.interop.DateTest top int int java.time.ZoneId[]
StackMap stack:
1: aload 4
iload 2
aaload
astore 1
start local 1 2: aconst_null
astore 5
aconst_null
astore 6
3: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
aload 1
invokevirtual org.graalvm.polyglot.Context$Builder.timeZone:(Ljava/time/ZoneId;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 7
start local 7 4: aload 7
ldc "js"
ldc "new Date('2019-07-02 13:37');"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
astore 8
start local 8 5: aload 8
invokevirtual org.graalvm.polyglot.Value.isInstant:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
6: aload 8
invokevirtual org.graalvm.polyglot.Value.isDate:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
7: aload 8
invokevirtual org.graalvm.polyglot.Value.isTime:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
8: aload 8
invokevirtual org.graalvm.polyglot.Value.isTimeZone:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
9: sipush 2019
getstatic java.time.Month.JULY:Ljava/time/Month;
iconst_2
bipush 13
bipush 37
invokestatic java.time.LocalDateTime.of:(ILjava/time/Month;III)Ljava/time/LocalDateTime;
aload 1
invokestatic java.time.ZonedDateTime.of:(Ljava/time/LocalDateTime;Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;
astore 9
start local 9 10: aload 9
invokevirtual java.time.ZonedDateTime.toInstant:()Ljava/time/Instant;
aload 8
invokevirtual org.graalvm.polyglot.Value.asInstant:()Ljava/time/Instant;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
11: aload 9
invokevirtual java.time.ZonedDateTime.toLocalDate:()Ljava/time/LocalDate;
aload 8
invokevirtual org.graalvm.polyglot.Value.asDate:()Ljava/time/LocalDate;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
12: aload 9
invokevirtual java.time.ZonedDateTime.toLocalTime:()Ljava/time/LocalTime;
aload 8
invokevirtual org.graalvm.polyglot.Value.asTime:()Ljava/time/LocalTime;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
13: aload 1
aload 8
invokevirtual org.graalvm.polyglot.Value.asTimeZone:()Ljava/time/ZoneId;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
end local 9 end local 8 14: aload 7
ifnull 20
aload 7
invokevirtual org.graalvm.polyglot.Context.close:()V
goto 20
StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId int int java.time.ZoneId[] java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
StackMap stack: java.lang.Throwable
15: astore 5
aload 7
ifnull 16
aload 7
invokevirtual org.graalvm.polyglot.Context.close:()V
end local 7 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
end local 1 20: StackMap locals: com.oracle.truffle.js.test.interop.DateTest top int int java.time.ZoneId[]
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
21: iload 2
iload 3
if_icmplt 1
22: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 23 0 this Lcom/oracle/truffle/js/test/interop/DateTest;
2 20 1 timeZone Ljava/time/ZoneId;
4 16 7 context Lorg/graalvm/polyglot/Context;
5 14 8 date Lorg/graalvm/polyglot/Value;
10 14 9 expected Ljava/time/ZonedDateTime;
Exception table:
from to target type
4 14 15 any
3 17 17 any
RuntimeVisibleAnnotations:
org.junit.Test()
public void testImportDate();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=13, args_size=1
start local 0 0: iconst_2
anewarray java.time.ZoneId
dup
iconst_0
invokestatic java.time.ZoneId.systemDefault:()Ljava/time/ZoneId;
aastore
dup
iconst_1
ldc "UTC+9"
invokestatic java.time.ZoneId.of:(Ljava/lang/String;)Ljava/time/ZoneId;
aastore
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 34
StackMap locals: com.oracle.truffle.js.test.interop.DateTest top int int java.time.ZoneId[]
StackMap stack:
1: aload 4
iload 2
aaload
astore 1
start local 1 2: aconst_null
astore 5
aconst_null
astore 6
3: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
aload 1
invokevirtual org.graalvm.polyglot.Context$Builder.timeZone:(Ljava/time/ZoneId;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 7
start local 7 4: aload 7
ldc "js"
ldc "(date) => new Date(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
astore 8
start local 8 5: sipush 2019
getstatic java.time.Month.JULY:Ljava/time/Month;
iconst_2
bipush 13
bipush 37
invokestatic java.time.LocalDateTime.of:(ILjava/time/Month;III)Ljava/time/LocalDateTime;
aload 1
invokestatic java.time.ZonedDateTime.of:(Ljava/time/LocalDateTime;Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;
astore 9
start local 9 6: iconst_0
istore 10
start local 10 7: goto 26
8: StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId int int java.time.ZoneId[] java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context org.graalvm.polyglot.Value java.time.ZonedDateTime int
StackMap stack:
iload 10
ifne 11
9: aload 9
invokevirtual java.time.ZonedDateTime.toInstant:()Ljava/time/Instant;
astore 11
start local 11 10: goto 15
end local 11 StackMap locals:
StackMap stack:
11: iload 10
iconst_1
if_icmpne 14
12: aload 9
invokevirtual java.time.ZonedDateTime.toInstant:()Ljava/time/Instant;
invokestatic java.util.Date.from:(Ljava/time/Instant;)Ljava/util/Date;
astore 11
start local 11 13: goto 15
end local 11 14: StackMap locals:
StackMap stack:
aload 9
astore 11
start local 11 15: StackMap locals: java.lang.Object
StackMap stack:
aload 8
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 11
aastore
invokevirtual org.graalvm.polyglot.Value.execute:([Ljava/lang/Object;)Lorg/graalvm/polyglot/Value;
astore 12
start local 12 16: aload 12
invokevirtual org.graalvm.polyglot.Value.isHostObject:()Z
invokestatic org.junit.Assert.assertFalse:(Z)V
17: aload 12
invokevirtual org.graalvm.polyglot.Value.isInstant:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
18: aload 12
invokevirtual org.graalvm.polyglot.Value.isDate:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
19: aload 12
invokevirtual org.graalvm.polyglot.Value.isTime:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
20: aload 12
invokevirtual org.graalvm.polyglot.Value.isTimeZone:()Z
invokestatic org.junit.Assert.assertTrue:(Z)V
21: aload 9
invokevirtual java.time.ZonedDateTime.toInstant:()Ljava/time/Instant;
aload 12
invokevirtual org.graalvm.polyglot.Value.asInstant:()Ljava/time/Instant;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
22: aload 9
invokevirtual java.time.ZonedDateTime.toLocalDate:()Ljava/time/LocalDate;
aload 12
invokevirtual org.graalvm.polyglot.Value.asDate:()Ljava/time/LocalDate;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
23: aload 9
invokevirtual java.time.ZonedDateTime.toLocalTime:()Ljava/time/LocalTime;
aload 12
invokevirtual org.graalvm.polyglot.Value.asTime:()Ljava/time/LocalTime;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
24: aload 1
aload 12
invokevirtual org.graalvm.polyglot.Value.asTimeZone:()Ljava/time/ZoneId;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
end local 12 end local 11 25: iinc 10 1
StackMap locals:
StackMap stack:
26: iload 10
iconst_3
if_icmplt 8
end local 10 end local 9 end local 8 27: aload 7
ifnull 33
aload 7
invokevirtual org.graalvm.polyglot.Context.close:()V
goto 33
StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId int int java.time.ZoneId[] java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
StackMap stack: java.lang.Throwable
28: astore 5
aload 7
ifnull 29
aload 7
invokevirtual org.graalvm.polyglot.Context.close:()V
end local 7 StackMap locals:
StackMap stack:
29: aload 5
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
30: astore 6
aload 5
ifnonnull 31
aload 6
astore 5
goto 32
StackMap locals:
StackMap stack:
31: aload 5
aload 6
if_acmpeq 32
aload 5
aload 6
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
32: aload 5
athrow
end local 1 33: StackMap locals: com.oracle.truffle.js.test.interop.DateTest top int int java.time.ZoneId[]
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
34: iload 2
iload 3
if_icmplt 1
35: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 36 0 this Lcom/oracle/truffle/js/test/interop/DateTest;
2 33 1 timeZone Ljava/time/ZoneId;
4 29 7 context Lorg/graalvm/polyglot/Context;
5 27 8 toJSDate Lorg/graalvm/polyglot/Value;
6 27 9 expected Ljava/time/ZonedDateTime;
7 27 10 i I
10 11 11 foreignDate Ljava/lang/Object;
13 14 11 foreignDate Ljava/lang/Object;
15 25 11 foreignDate Ljava/lang/Object;
16 25 12 date Lorg/graalvm/polyglot/Value;
Exception table:
from to target type
4 27 28 any
3 30 30 any
RuntimeVisibleAnnotations:
org.junit.Test()
public void testJavaInterop();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=10, args_size=1
start local 0 0: iconst_2
anewarray java.time.ZoneId
dup
iconst_0
invokestatic java.time.ZoneId.systemDefault:()Ljava/time/ZoneId;
aastore
dup
iconst_1
ldc "UTC+9"
invokestatic java.time.ZoneId.of:(Ljava/lang/String;)Ljava/time/ZoneId;
aastore
dup
astore 4
arraylength
istore 3
iconst_0
istore 2
goto 25
StackMap locals: com.oracle.truffle.js.test.interop.DateTest top int int java.time.ZoneId[]
StackMap stack:
1: aload 4
iload 2
aaload
astore 1
start local 1 2: aconst_null
astore 5
aconst_null
astore 6
3: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
aload 1
invokevirtual org.graalvm.polyglot.Context$Builder.timeZone:(Ljava/time/ZoneId;)Lorg/graalvm/polyglot/Context$Builder;
getstatic org.graalvm.polyglot.HostAccess.ALL:Lorg/graalvm/polyglot/HostAccess;
invokevirtual org.graalvm.polyglot.Context$Builder.allowHostAccess:(Lorg/graalvm/polyglot/HostAccess;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 7
start local 7 4: new com.oracle.truffle.js.test.interop.DateTest$DateConsumer
dup
invokespecial com.oracle.truffle.js.test.interop.DateTest$DateConsumer.<init>:()V
astore 8
start local 8 5: aload 7
ldc "js"
invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
ldc "consumer"
aload 8
invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
6: aload 7
ldc "js"
ldc "var date = new Date('2019-07-02 13:37');"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
pop
7: aload 7
ldc "js"
ldc "consumer.acceptInstant(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
pop
8: aload 7
ldc "js"
ldc "consumer.acceptLocalDate(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
pop
9: aload 7
ldc "js"
ldc "consumer.acceptLocalTime(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
pop
10: aload 7
ldc "js"
ldc "consumer.acceptLocalDateTime(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
pop
11: aload 7
ldc "js"
ldc "consumer.acceptZoneId(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
pop
12: sipush 2019
getstatic java.time.Month.JULY:Ljava/time/Month;
iconst_2
bipush 13
bipush 37
invokestatic java.time.LocalDateTime.of:(ILjava/time/Month;III)Ljava/time/LocalDateTime;
aload 1
invokestatic java.time.ZonedDateTime.of:(Ljava/time/LocalDateTime;Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;
astore 9
start local 9 13: aload 9
invokevirtual java.time.ZonedDateTime.toInstant:()Ljava/time/Instant;
aload 8
getfield com.oracle.truffle.js.test.interop.DateTest$DateConsumer.instant:Ljava/time/Instant;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
14: aload 9
invokevirtual java.time.ZonedDateTime.toLocalDate:()Ljava/time/LocalDate;
aload 8
getfield com.oracle.truffle.js.test.interop.DateTest$DateConsumer.localDate:Ljava/time/LocalDate;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
15: aload 9
invokevirtual java.time.ZonedDateTime.toLocalTime:()Ljava/time/LocalTime;
aload 8
getfield com.oracle.truffle.js.test.interop.DateTest$DateConsumer.localTime:Ljava/time/LocalTime;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
16: aload 9
invokevirtual java.time.ZonedDateTime.toLocalDateTime:()Ljava/time/LocalDateTime;
aload 8
getfield com.oracle.truffle.js.test.interop.DateTest$DateConsumer.localDateTime:Ljava/time/LocalDateTime;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
17: aload 1
aload 8
getfield com.oracle.truffle.js.test.interop.DateTest$DateConsumer.zoneId:Ljava/time/ZoneId;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
end local 9 end local 8 18: aload 7
ifnull 24
aload 7
invokevirtual org.graalvm.polyglot.Context.close:()V
goto 24
StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId int int java.time.ZoneId[] java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
StackMap stack: java.lang.Throwable
19: astore 5
aload 7
ifnull 20
aload 7
invokevirtual org.graalvm.polyglot.Context.close:()V
end local 7 StackMap locals:
StackMap stack:
20: aload 5
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
21: astore 6
aload 5
ifnonnull 22
aload 6
astore 5
goto 23
StackMap locals:
StackMap stack:
22: aload 5
aload 6
if_acmpeq 23
aload 5
aload 6
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
23: aload 5
athrow
end local 1 24: StackMap locals: com.oracle.truffle.js.test.interop.DateTest top int int java.time.ZoneId[]
StackMap stack:
iinc 2 1
StackMap locals:
StackMap stack:
25: iload 2
iload 3
if_icmplt 1
26: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 27 0 this Lcom/oracle/truffle/js/test/interop/DateTest;
2 24 1 timeZone Ljava/time/ZoneId;
4 20 7 context Lorg/graalvm/polyglot/Context;
5 18 8 consumer Lcom/oracle/truffle/js/test/interop/DateTest$DateConsumer;
13 18 9 expected Ljava/time/ZonedDateTime;
Exception table:
from to target type
4 18 19 any
3 21 21 any
RuntimeVisibleAnnotations:
org.junit.Test()
public void testDatePrototypeBuiltins();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=13, args_size=1
start local 0 0: ldc "UTC"
invokestatic java.time.ZoneId.of:(Ljava/lang/String;)Ljava/time/ZoneId;
astore 1
start local 1 1: ldc "UTC+2"
invokestatic java.time.ZoneId.of:(Ljava/lang/String;)Ljava/time/ZoneId;
astore 2
start local 2 2: aconst_null
astore 3
aconst_null
astore 4
3: iconst_0
anewarray java.lang.String
invokestatic com.oracle.truffle.js.test.JSTest.newContextBuilder:([Ljava/lang/String;)Lorg/graalvm/polyglot/Context$Builder;
aload 2
invokevirtual org.graalvm.polyglot.Context$Builder.timeZone:(Ljava/time/ZoneId;)Lorg/graalvm/polyglot/Context$Builder;
invokevirtual org.graalvm.polyglot.Context$Builder.build:()Lorg/graalvm/polyglot/Context;
astore 5
start local 5 4: sipush 2019
getstatic java.time.Month.JULY:Ljava/time/Month;
iconst_2
bipush 13
bipush 37
bipush 42
ldc 211000000
invokestatic java.time.LocalDateTime.of:(ILjava/time/Month;IIIII)Ljava/time/LocalDateTime;
aload 2
invokestatic java.time.ZonedDateTime.of:(Ljava/time/LocalDateTime;Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;
astore 6
start local 6 5: aload 6
invokevirtual java.time.ZonedDateTime.toInstant:()Ljava/time/Instant;
astore 7
start local 7 6: aload 5
ldc "js"
invokevirtual org.graalvm.polyglot.Context.getBindings:(Ljava/lang/String;)Lorg/graalvm/polyglot/Value;
ldc "date"
aload 7
invokevirtual org.graalvm.polyglot.Value.putMember:(Ljava/lang/String;Ljava/lang/Object;)V
7: aload 7
invokevirtual java.time.Instant.toEpochMilli:()J
aload 5
ldc "js"
ldc "Date.prototype.getTime.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asLong:()J
invokestatic org.junit.Assert.assertEquals:(JJ)V
8: aload 7
invokevirtual java.time.Instant.toEpochMilli:()J
aload 5
ldc "js"
ldc "Date.prototype.valueOf.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asLong:()J
invokestatic org.junit.Assert.assertEquals:(JJ)V
9: iconst_2
newarray 4
dup
iconst_1
iconst_1
bastore
dup
astore 11
arraylength
istore 10
iconst_0
istore 9
goto 25
StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId java.time.ZoneId java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context java.time.ZonedDateTime java.time.Instant top int int boolean[]
StackMap stack:
10: aload 11
iload 9
baload
istore 8
start local 8 11: iload 8
ifeq 13
12: aload 6
aload 1
invokevirtual java.time.ZonedDateTime.withZoneSameInstant:(Ljava/time/ZoneId;)Ljava/time/ZonedDateTime;
astore 6
13: StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId java.time.ZoneId java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context java.time.ZonedDateTime java.time.Instant int int int boolean[]
StackMap stack:
iload 8
ifeq 14
ldc "UTC"
goto 15
StackMap locals:
StackMap stack:
14: ldc ""
StackMap locals:
StackMap stack: java.lang.String
15: astore 12
start local 12 16: aload 6
invokevirtual java.time.ZonedDateTime.getYear:()I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "FullYear.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
17: aload 6
invokevirtual java.time.ZonedDateTime.getMonth:()Ljava/time/Month;
invokevirtual java.time.Month.ordinal:()I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Month.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
18: aload 6
invokevirtual java.time.ZonedDateTime.getDayOfMonth:()I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Date.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
19: aload 6
invokevirtual java.time.ZonedDateTime.getDayOfWeek:()Ljava/time/DayOfWeek;
invokevirtual java.time.DayOfWeek.ordinal:()I
iconst_1
iadd
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Day.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
20: aload 6
invokevirtual java.time.ZonedDateTime.getHour:()I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Hours.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
21: aload 6
invokevirtual java.time.ZonedDateTime.getMinute:()I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Minutes.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
22: aload 6
invokevirtual java.time.ZonedDateTime.getSecond:()I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Seconds.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
23: aload 6
getstatic java.time.temporal.ChronoField.MILLI_OF_SECOND:Ljava/time/temporal/ChronoField;
invokevirtual java.time.ZonedDateTime.get:(Ljava/time/temporal/TemporalField;)I
i2l
aload 5
ldc "js"
new java.lang.StringBuilder
dup
ldc "Date.prototype.get"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 12
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc "Milliseconds.call(date);"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asInt:()I
i2l
invokestatic org.junit.Assert.assertEquals:(JJ)V
end local 12 end local 8 24: iinc 9 1
StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId java.time.ZoneId java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context java.time.ZonedDateTime java.time.Instant top int int boolean[]
StackMap stack:
25: iload 9
iload 10
if_icmplt 10
26: aload 5
ldc "js"
ldc "Date.prototype.toString.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
ldc "Tue Jul 02 2019 13:37:42 GMT+0200"
invokestatic org.hamcrest.CoreMatchers.startsWith:(Ljava/lang/String;)Lorg/hamcrest/Matcher;
invokestatic org.junit.Assert.assertThat:(Ljava/lang/Object;Lorg/hamcrest/Matcher;)V
27: aload 5
ldc "js"
ldc "Date.prototype.toTimeString.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
ldc "13:37:42 GMT+0200"
invokestatic org.hamcrest.CoreMatchers.startsWith:(Ljava/lang/String;)Lorg/hamcrest/Matcher;
invokestatic org.junit.Assert.assertThat:(Ljava/lang/Object;Lorg/hamcrest/Matcher;)V
28: ldc "Tue Jul 02 2019"
aload 5
ldc "js"
ldc "Date.prototype.toDateString.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
29: ldc "Tue, 02 Jul 2019 11:37:42 GMT"
aload 5
ldc "js"
ldc "Date.prototype.toUTCString.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
30: ldc "2019-07-02T11:37:42.211Z"
aload 5
ldc "js"
ldc "Date.prototype.toISOString.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asString:()Ljava/lang/String;
invokestatic org.junit.Assert.assertEquals:(Ljava/lang/Object;Ljava/lang/Object;)V
31: aload 2
invokevirtual java.time.ZoneId.getRules:()Ljava/time/zone/ZoneRules;
aload 7
invokevirtual java.time.zone.ZoneRules.getOffset:(Ljava/time/Instant;)Ljava/time/ZoneOffset;
invokevirtual java.time.ZoneOffset.getTotalSeconds:()I
ineg
bipush 60
idiv
i2l
aload 5
ldc "js"
ldc "Date.prototype.getTimezoneOffset.call(date);"
invokevirtual org.graalvm.polyglot.Context.eval:(Ljava/lang/String;Ljava/lang/CharSequence;)Lorg/graalvm/polyglot/Value;
invokevirtual org.graalvm.polyglot.Value.asLong:()J
invokestatic org.junit.Assert.assertEquals:(JJ)V
end local 7 end local 6 32: aload 5
ifnull 38
aload 5
invokevirtual org.graalvm.polyglot.Context.close:()V
goto 38
StackMap locals: com.oracle.truffle.js.test.interop.DateTest java.time.ZoneId java.time.ZoneId java.lang.Throwable java.lang.Throwable org.graalvm.polyglot.Context
StackMap stack: java.lang.Throwable
33: astore 3
aload 5
ifnull 34
aload 5
invokevirtual org.graalvm.polyglot.Context.close:()V
end local 5 StackMap locals:
StackMap stack:
34: aload 3
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
35: astore 4
aload 3
ifnonnull 36
aload 4
astore 3
goto 37
StackMap locals:
StackMap stack:
36: aload 3
aload 4
if_acmpeq 37
aload 3
aload 4
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
37: aload 3
athrow
38: StackMap locals:
StackMap stack:
return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 39 0 this Lcom/oracle/truffle/js/test/interop/DateTest;
1 39 1 utcTZ Ljava/time/ZoneId;
2 39 2 localTZ Ljava/time/ZoneId;
4 34 5 context Lorg/graalvm/polyglot/Context;
5 32 6 expected Ljava/time/ZonedDateTime;
6 32 7 instant Ljava/time/Instant;
11 24 8 utc Z
16 24 12 u Ljava/lang/String;
Exception table:
from to target type
4 32 33 any
3 35 35 any
RuntimeVisibleAnnotations:
org.junit.Test()
}
SourceFile: "DateTest.java"
NestMembers:
com.oracle.truffle.js.test.interop.DateTest$DateConsumer
InnerClasses:
public DateConsumer = com.oracle.truffle.js.test.interop.DateTest$DateConsumer of com.oracle.truffle.js.test.interop.DateTest
public final Builder = org.graalvm.polyglot.Context$Builder of org.graalvm.polyglot.Context