Stack map generation problem
Chen Liang
chen.l.liang at oracle.com
Thu Dec 12 19:32:37 UTC 2024
Hmm, couldn't reproduce with a local JDK mainline build (25) and the latest smallrye mutiny 2.7.0. (It also appears from bci that your example is an older version of mutiny). I changed the class java/util/ServiceLoader to Dummy in jshell and cannot reproduce this issue; cannot reproduce with stack maps recomputation either. Here's the javap output of the transformed results.
static {};
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=3, args_size=0
0: ldc_w #304 // String mutiny.disableCallBackDecorators
3: invokestatic #306 // Method java/lang/Boolean.getBoolean:(Ljava/lang/String;)Z
6: putstatic #203 // Field DISABLE_CALLBACK_DECORATORS:Z
9: ldc_w #312 // class io/smallrye/mutiny/infrastructure/ExecutorConfiguration
12: invokestatic #561 // Method Dummy.load:(Ljava/lang/Class;)Ljava/util/ServiceLoader;
15: astore_0
16: aload_0
17: invokevirtual #212 // Method java/util/ServiceLoader.iterator:()Ljava/util/Iterator;
20: astore_1
21: aload_1
22: invokeinterface #216, 1 // InterfaceMethod java/util/Iterator.hasNext:()Z
27: ifeq 61
30: aload_1
31: invokeinterface #221, 1 // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
36: checkcast #312 // class io/smallrye/mutiny/infrastructure/ExecutorConfiguration
39: astore_2
40: aload_2
41: invokeinterface #314, 1 // InterfaceMethod io/smallrye/mutiny/infrastructure/ExecutorConfiguration.getDefaultWorkerExecutor:()Ljava/util/concurrent/Executor;
46: ldc_w #318 // String executor
49: invokestatic #167 // Method io/smallrye/mutiny/helpers/ParameterValidation.nonNull:(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
52: checkcast #320 // class java/util/concurrent/Executor
55: invokestatic #32 // Method setDefaultExecutor:(Ljava/util/concurrent/Executor;)V
58: goto 64
61: invokestatic #322 // Method setDefaultExecutor:()V
64: invokestatic #324 // Method reload:()V
67: invokestatic #327 // Method resetCanCallerThreadBeBlockedSupplier:()V
70: getstatic #241 // Field io/smallrye/mutiny/infrastructure/Infrastructure$PrintAndDumpThrowableConsumer.INSTANCE:Lio/smallrye/mutiny/infrastructure/Infrastructure$PrintAndDumpThrowableConsumer;
73: putstatic #155 // Field droppedExceptionHandler:Ljava/util/function/Consumer;
76: getstatic #271 // Field io/smallrye/mutiny/infrastructure/Infrastructure$PrintOperatorEventOperatorLogger.INSTANCE:Lio/smallrye/mutiny/infrastructure/Infrastructure$PrintOperatorEventOperatorLogger;
79: putstatic #260 // Field operatorLogger:Lio/smallrye/mutiny/infrastructure/Infrastructure$OperatorLogger;
82: sipush 128
85: putstatic #16 // Field multiOverflowDefaultBufferSize:I
88: bipush 32
90: putstatic #20 // Field bufferSizeXs:I
93: sipush 256
96: putstatic #23 // Field bufferSizeS:I
99: return
LocalVariableTable:
Start Length Slot Name Signature
40 18 2 next Lio/smallrye/mutiny/infrastructure/ExecutorConfiguration;
16 54 0 executorLoader Ljava/util/ServiceLoader;
21 49 1 iterator Ljava/util/Iterator;
LocalVariableTypeTable:
Start Length Slot Name Signature
16 54 0 executorLoader Ljava/util/ServiceLoader<Lio/smallrye/mutiny/infrastructure/ExecutorConfiguration;>;
21 49 1 iterator Ljava/util/Iterator<Lio/smallrye/mutiny/infrastructure/ExecutorConfiguration;>;
LineNumberTable:
line 39: 0
line 42: 9
line 43: 16
line 44: 21
line 45: 30
line 46: 40
line 47: 58
line 48: 61
line 51: 64
line 53: 67
line 63: 70
line 65: 76
line 67: 82
line 69: 88
line 70: 93
StackMapTable: number_of_entries = 2
frame_type = 253 /* append */
offset_delta = 61
locals = [ class java/util/ServiceLoader, class java/util/Iterator ]
frame_type = 2 /* same */
Regards, Chen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20241212/102bb234/attachment-0001.htm>
More information about the classfile-api-dev
mailing list