Don't write Kotlin metadata in light classes mode
This was already happening for classes and packages, now will also for interface DefaultImpls and any other possible classes
This commit is contained in:
@@ -44,8 +44,6 @@ import org.jetbrains.kotlin.lexer.JetTokens;
|
|||||||
import org.jetbrains.kotlin.load.java.JvmAbi;
|
import org.jetbrains.kotlin.load.java.JvmAbi;
|
||||||
import org.jetbrains.kotlin.load.java.JvmAnnotationNames;
|
import org.jetbrains.kotlin.load.java.JvmAnnotationNames;
|
||||||
import org.jetbrains.kotlin.load.java.descriptors.JavaCallableMemberDescriptor;
|
import org.jetbrains.kotlin.load.java.descriptors.JavaCallableMemberDescriptor;
|
||||||
import org.jetbrains.kotlin.name.FqName;
|
|
||||||
import org.jetbrains.kotlin.name.FqNameUnsafe;
|
|
||||||
import org.jetbrains.kotlin.name.Name;
|
import org.jetbrains.kotlin.name.Name;
|
||||||
import org.jetbrains.kotlin.psi.*;
|
import org.jetbrains.kotlin.psi.*;
|
||||||
import org.jetbrains.kotlin.resolve.BindingContext;
|
import org.jetbrains.kotlin.resolve.BindingContext;
|
||||||
@@ -253,8 +251,6 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void generateKotlinAnnotation() {
|
protected void generateKotlinAnnotation() {
|
||||||
if (state.getClassBuilderMode() != ClassBuilderMode.FULL) return;
|
|
||||||
|
|
||||||
if (!isTopLevelOrInnerClass(descriptor)) {
|
if (!isTopLevelOrInnerClass(descriptor)) {
|
||||||
AnnotationVisitor av = v.getVisitor().visitAnnotation(
|
AnnotationVisitor av = v.getVisitor().visitAnnotation(
|
||||||
asmDescByFqNameWithoutInnerClasses(JvmAnnotationNames.KOTLIN_LOCAL_CLASS), true
|
asmDescByFqNameWithoutInnerClasses(JvmAnnotationNames.KOTLIN_LOCAL_CLASS), true
|
||||||
|
|||||||
@@ -117,7 +117,9 @@ public abstract class MemberCodegen<T extends JetElement/* TODO: & JetDeclaratio
|
|||||||
|
|
||||||
generateSyntheticParts();
|
generateSyntheticParts();
|
||||||
|
|
||||||
generateKotlinAnnotation();
|
if (state.getClassBuilderMode() == ClassBuilderMode.FULL) {
|
||||||
|
generateKotlinAnnotation();
|
||||||
|
}
|
||||||
|
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,10 +69,6 @@ public class MultifileClassPartCodegen(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun generateKotlinAnnotation() {
|
override fun generateKotlinAnnotation() {
|
||||||
if (state.classBuilderMode != ClassBuilderMode.FULL) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val members = ArrayList<DeclarationDescriptor>()
|
val members = ArrayList<DeclarationDescriptor>()
|
||||||
for (declaration in element.declarations) {
|
for (declaration in element.declarations) {
|
||||||
when (declaration) {
|
when (declaration) {
|
||||||
|
|||||||
@@ -107,10 +107,6 @@ public class PackagePartCodegen extends MemberCodegen<JetFile> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void generateKotlinAnnotation() {
|
protected void generateKotlinAnnotation() {
|
||||||
if (state.getClassBuilderMode() != ClassBuilderMode.FULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
List<DeclarationDescriptor> members = new ArrayList<DeclarationDescriptor>();
|
List<DeclarationDescriptor> members = new ArrayList<DeclarationDescriptor>();
|
||||||
for (JetDeclaration declaration : element.getDeclarations()) {
|
for (JetDeclaration declaration : element.getDeclarations()) {
|
||||||
if (declaration instanceof JetNamedFunction) {
|
if (declaration instanceof JetNamedFunction) {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ public interface Generic <N, NN> {
|
|||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
NN b1(@org.jetbrains.annotations.Nullable NN nn);
|
NN b1(@org.jetbrains.annotations.Nullable NN nn);
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinSyntheticClass(version = {0, 27, 0}, abiVersion = 27)
|
|
||||||
static final class DefaultImpls {
|
static final class DefaultImpls {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,6 @@ public interface Primitives {
|
|||||||
|
|
||||||
double getDouble();
|
double getDouble();
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinSyntheticClass(version = {0, 27, 0}, abiVersion = 27)
|
|
||||||
static final class DefaultImpls {
|
static final class DefaultImpls {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
public interface PrivateInTrait {
|
public interface PrivateInTrait {
|
||||||
@kotlin.jvm.internal.KotlinSyntheticClass(version = {0, 27, 0}, abiVersion = 27)
|
|
||||||
static final class DefaultImpls {
|
static final class DefaultImpls {
|
||||||
@org.jetbrains.annotations.NotNull
|
@org.jetbrains.annotations.NotNull
|
||||||
static java.lang.String getNn(PrivateInTrait $this) { /* compiled code */ }
|
static java.lang.String getNn(PrivateInTrait $this) { /* compiled code */ }
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ public interface Trait {
|
|||||||
|
|
||||||
void setNotNullVar(@org.jetbrains.annotations.NotNull java.lang.String p);
|
void setNotNullVar(@org.jetbrains.annotations.NotNull java.lang.String p);
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinSyntheticClass(version = {0, 27, 0}, abiVersion = 27)
|
|
||||||
static final class DefaultImpls {
|
static final class DefaultImpls {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-1
@@ -16,7 +16,6 @@ public interface TraitClassObjectField {
|
|||||||
private Companion() { /* compiled code */ }
|
private Companion() { /* compiled code */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
@kotlin.jvm.internal.KotlinSyntheticClass(version = {0, 27, 0}, abiVersion = 27)
|
|
||||||
static final class DefaultImpls {
|
static final class DefaultImpls {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user