-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Invoke compiled enum class file from dotr failed #7424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The classfiles generated (with java -c -v -p) rs$line$1$.classClassfile rs$line$1$.class
Last modified Oct 31, 2019; size 736 bytes
MD5 checksum 1ce56dbdae438e10f3f08c9776ad8c0f
Compiled from "rs$line$1"
public final class rs$line$1$ implements java.io.Serializable
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_FINAL, ACC_SUPER
Constant pool:
#1 = Utf8 rs$line$1$
#2 = Class #1 // rs$line$1$
#3 = Utf8 java/lang/Object
#4 = Class #3 // java/lang/Object
#5 = Utf8 java/io/Serializable
#6 = Class #5 // java/io/Serializable
#7 = Utf8 rs$line$1
#8 = Utf8 MODULE$
#9 = Utf8 Lrs$line$1$;
#10 = Utf8 res0
#11 = Utf8 [LA;
#12 = Utf8 <clinit>
#13 = Utf8 ()V
#14 = Utf8 <init>
#15 = NameAndType #14:#13 // "<init>":()V
#16 = Methodref #2.#15 // rs$line$1$."<init>":()V
#17 = Methodref #4.#15 // java/lang/Object."<init>":()V
#18 = NameAndType #8:#9 // MODULE$:Lrs$line$1$;
#19 = Fieldref #2.#18 // rs$line$1$.MODULE$:Lrs$line$1$;
#20 = Utf8 A$
#21 = Class #20 // A$
#22 = Utf8 LA$;
#23 = NameAndType #8:#22 // MODULE$:LA$;
#24 = Fieldref #21.#23 // A$.MODULE$:LA$;
#25 = Utf8 A
#26 = Class #25 // A
#27 = Utf8 values
#28 = Utf8 ()[LA;
#29 = NameAndType #27:#28 // values:()[LA;
#30 = Methodref #26.#29 // A.values:()[LA;
#31 = NameAndType #10:#11 // res0:[LA;
#32 = Fieldref #2.#31 // rs$line$1$.res0:[LA;
#33 = Utf8 this
#34 = Utf8 writeReplace
#35 = Utf8 ()Ljava/lang/Object;
#36 = Utf8 scala/runtime/ModuleSerializationProxy
#37 = Class #36 // scala/runtime/ModuleSerializationProxy
#38 = Utf8 (Ljava/lang/Class;)V
#39 = NameAndType #14:#38 // "<init>":(Ljava/lang/Class;)V
#40 = Methodref #37.#39 // scala/runtime/ModuleSerializationProxy."<init>":(Ljava/lang/Class;)V
#41 = Utf8 Code
#42 = Utf8 LineNumberTable
#43 = Utf8 LocalVariableTable
#44 = Utf8 Signature
#45 = Utf8 SourceFile
#46 = Utf8 Scala
{
public static final rs$line$1$ MODULE$;
descriptor: Lrs$line$1$;
flags: ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private final A[] res0;
descriptor: [LA;
flags: ACC_PRIVATE, ACC_FINAL
public static {};
descriptor: ()V
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: new #2 // class rs$line$1$
3: invokespecial #16 // Method "<init>":()V
6: return
private rs$line$1$();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
0: aload_0
1: invokespecial #17 // Method java/lang/Object."<init>":()V
4: aload_0
5: putstatic #19 // Field MODULE$:Lrs$line$1$;
8: aload_0
9: getstatic #24 // Field A$.MODULE$:LA$;
12: invokevirtual #30 // Method A.values:()[LA;
15: putfield #32 // Field res0:[LA;
18: return
LineNumberTable:
line 1: 0
LocalVariableTable:
Start Length Slot Name Signature
0 19 0 this Lrs$line$1$;
private java.lang.Object writeReplace();
descriptor: ()Ljava/lang/Object;
flags: ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
0: new #37 // class scala/runtime/ModuleSerializationProxy
3: dup
4: ldc #2 // class rs$line$1$
6: invokespecial #40 // Method scala/runtime/ModuleSerializationProxy."<init>":(Ljava/lang/Class;)V
9: areturn
LineNumberTable:
line 1: 0
LocalVariableTable:
Start Length Slot Name Signature
0 10 0 this Lrs$line$1$;
public A[] res0();
descriptor: ()[LA;
flags: ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: getfield #32 // Field res0:[LA;
4: areturn
LineNumberTable:
line 1: 0
LocalVariableTable:
Start Length Slot Name Signature
0 5 0 this Lrs$line$1$;
Signature: #28 // ()[LA;
}
SourceFile: "rs$line$1"
Error: unknown attribute
Scala: length = 0x0 rs$line$1.classClassfile rs$line$1.class
Last modified Oct 31, 2019; size 243 bytes
MD5 checksum 1a00ea90fe85ba440288651393c56a04
Compiled from "rs$line$1"
public final class rs$line$1
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_FINAL, ACC_SUPER
Constant pool:
#1 = Utf8 rs$line$1
#2 = Class #1 // rs$line$1
#3 = Utf8 java/lang/Object
#4 = Class #3 // java/lang/Object
#5 = Utf8 res0
#6 = Utf8 ()[LA;
#7 = Utf8 rs$line$1$
#8 = Class #7 // rs$line$1$
#9 = Utf8 MODULE$
#10 = Utf8 Lrs$line$1$;
#11 = NameAndType #9:#10 // MODULE$:Lrs$line$1$;
#12 = Fieldref #8.#11 // rs$line$1$.MODULE$:Lrs$line$1$;
#13 = NameAndType #5:#6 // res0:()[LA;
#14 = Methodref #8.#13 // rs$line$1$.res0:()[LA;
#15 = Utf8 Code
#16 = Utf8 SourceFile
#17 = Utf8 TASTY
#18 = Utf8 Scala
{
public static A[] res0();
descriptor: ()[LA;
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: getstatic #12 // Field rs$line$1$.MODULE$:Lrs$line$1$;
3: invokevirtual #14 // Method rs$line$1$.res0:()[LA;
6: areturn
}
SourceFile: "rs$line$1"
Error: unknown attribute
TASTY: length = 0x10
00 1D 3A DC 3F D7 A6 00 00 F9 DE 9C 42 F0 D1 00
Error: unknown attribute
Scala: length = 0x0 |
I guess I'm seeing the side effect of this ? using 0.19, defining an enum like this:
and using valueOf method
an exception is thrown
|
So I've seen the culprit in the constructor of private rs$line$1$();
descriptor: ()V
flags: ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
0: aload_0
1: invokespecial #17 // Method java/lang/Object."<init>":()V
4: aload_0
5: putstatic #19 // Field MODULE$:Lrs$line$1$;
8: aload_0
9: getstatic #24 // Field A$.MODULE$:LA$;
12: invokevirtual #30 // Method A.values:()[LA;
15: putfield #32 // Field res0:[LA;
18: return so you can see at address |
minimized code
The text was updated successfully, but these errors were encountered: