Rewrite IR plugin infrastructure (and serialization plugin) so it won't emit LazyIR.
LazyIR was emitted because plugin was not able to declare symbols, only to reference them. Moreover, declarations added by frontend plugin were also unbound symbols produced by psi2ir, and declaration stub generator was stubbing them with LazyIR – therefore access to global symbol table is not enough for plugins. IrProvider won't help here, because some functions produced by plugin have circular dependencies. By moving compiler plugins step between psi2ir and declaration stub generator, both problems are resolved – unbound symbols produced by psi2ir and compiler plugins are declared where they would be declared if this was a user code, and only unbound symbols left are external dependencies, which is a correct input for lazy ir.
This commit is contained in:
+10
-4
@@ -186,8 +186,10 @@ public final class ListOfUsers$$serializer : java/lang/Object, kotlinx/serializa
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
LINENUMBER (13)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder p0, java.lang.Object p1) {
|
||||
@@ -487,8 +489,10 @@ public final class OptionalUser$$serializer : java/lang/Object, kotlinx/serializ
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
RETURN
|
||||
LABEL (L7)
|
||||
LINENUMBER (10)
|
||||
RETURN
|
||||
LABEL (L8)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder p0, java.lang.Object p1) {
|
||||
@@ -829,8 +833,10 @@ public final class User$$serializer : java/lang/Object, kotlinx/serialization/in
|
||||
ALOAD (4)
|
||||
ALOAD (3)
|
||||
INVOKEINTERFACE (kotlinx/serialization/CompositeEncoder, endStructure, (Lkotlinx/serialization/SerialDescriptor;)V)
|
||||
RETURN
|
||||
LABEL (L2)
|
||||
LINENUMBER (7)
|
||||
RETURN
|
||||
LABEL (L3)
|
||||
}
|
||||
|
||||
public void serialize(kotlinx.serialization.Encoder p0, java.lang.Object p1) {
|
||||
@@ -957,4 +963,4 @@ public final class User : java/lang/Object {
|
||||
public final java.lang.String getFirstName()
|
||||
|
||||
public final java.lang.String getLastName()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user