Drop old JVM binary format extensions: static in outer, impl class name
This commit is contained in:
@@ -835,13 +835,6 @@ public class AsmUtil {
|
|||||||
return asmTypeByFqNameWithoutInnerClasses(fqName).getDescriptor();
|
return asmTypeByFqNameWithoutInnerClasses(fqName).getDescriptor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
|
||||||
public static String shortNameByAsmType(@NotNull Type type) {
|
|
||||||
String internalName = type.getInternalName();
|
|
||||||
int lastSlash = internalName.lastIndexOf('/');
|
|
||||||
return lastSlash < 0 ? internalName : internalName.substring(lastSlash + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static Type asmTypeByFqNameWithoutInnerClasses(@NotNull FqName fqName) {
|
public static Type asmTypeByFqNameWithoutInnerClasses(@NotNull FqName fqName) {
|
||||||
return Type.getObjectType(internalNameByFqNameWithoutInnerClasses(fqName));
|
return Type.getObjectType(internalNameByFqNameWithoutInnerClasses(fqName));
|
||||||
|
|||||||
@@ -77,11 +77,13 @@ import java.util.Set;
|
|||||||
|
|
||||||
import static org.jetbrains.kotlin.builtins.KotlinBuiltIns.isNullableAny;
|
import static org.jetbrains.kotlin.builtins.KotlinBuiltIns.isNullableAny;
|
||||||
import static org.jetbrains.kotlin.codegen.AsmUtil.*;
|
import static org.jetbrains.kotlin.codegen.AsmUtil.*;
|
||||||
import static org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings.*;
|
import static org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings.INDEX_FOR_VALUE_PARAMETER;
|
||||||
|
import static org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings.METHOD_FOR_FUNCTION;
|
||||||
import static org.jetbrains.kotlin.descriptors.CallableMemberDescriptor.Kind.DECLARATION;
|
import static org.jetbrains.kotlin.descriptors.CallableMemberDescriptor.Kind.DECLARATION;
|
||||||
import static org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget.*;
|
import static org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget.*;
|
||||||
import static org.jetbrains.kotlin.resolve.DescriptorToSourceUtils.getSourceFromDescriptor;
|
import static org.jetbrains.kotlin.resolve.DescriptorToSourceUtils.getSourceFromDescriptor;
|
||||||
import static org.jetbrains.kotlin.resolve.DescriptorUtils.*;
|
import static org.jetbrains.kotlin.resolve.DescriptorUtils.getSuperClassDescriptor;
|
||||||
|
import static org.jetbrains.kotlin.resolve.DescriptorUtils.isInterface;
|
||||||
import static org.jetbrains.kotlin.resolve.jvm.AsmTypes.OBJECT_TYPE;
|
import static org.jetbrains.kotlin.resolve.jvm.AsmTypes.OBJECT_TYPE;
|
||||||
import static org.jetbrains.kotlin.types.expressions.ExpressionTypingUtils.*;
|
import static org.jetbrains.kotlin.types.expressions.ExpressionTypingUtils.*;
|
||||||
import static org.jetbrains.org.objectweb.asm.Opcodes.*;
|
import static org.jetbrains.org.objectweb.asm.Opcodes.*;
|
||||||
@@ -172,10 +174,6 @@ public class FunctionCodegen {
|
|||||||
jvmSignature.getGenericsSignature(),
|
jvmSignature.getGenericsSignature(),
|
||||||
getThrownExceptions(functionDescriptor, typeMapper));
|
getThrownExceptions(functionDescriptor, typeMapper));
|
||||||
|
|
||||||
String implClassName = CodegenContextUtil.getImplementationClassShortName(owner);
|
|
||||||
if (implClassName != null) {
|
|
||||||
v.getSerializationBindings().put(METHOD_IMPL_CLASS_NAME, functionDescriptor, implClassName);
|
|
||||||
}
|
|
||||||
if (CodegenContextUtil.isImplClassOwner(owner)) {
|
if (CodegenContextUtil.isImplClassOwner(owner)) {
|
||||||
v.getSerializationBindings().put(METHOD_FOR_FUNCTION, functionDescriptor, asmMethod);
|
v.getSerializationBindings().put(METHOD_FOR_FUNCTION, functionDescriptor, asmMethod);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ import java.util.List;
|
|||||||
import static org.jetbrains.kotlin.codegen.AsmUtil.*;
|
import static org.jetbrains.kotlin.codegen.AsmUtil.*;
|
||||||
import static org.jetbrains.kotlin.codegen.JvmCodegenUtil.isConstOrHasJvmFieldAnnotation;
|
import static org.jetbrains.kotlin.codegen.JvmCodegenUtil.isConstOrHasJvmFieldAnnotation;
|
||||||
import static org.jetbrains.kotlin.codegen.JvmCodegenUtil.isJvmInterface;
|
import static org.jetbrains.kotlin.codegen.JvmCodegenUtil.isJvmInterface;
|
||||||
import static org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings.*;
|
import static org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings.FIELD_FOR_PROPERTY;
|
||||||
|
import static org.jetbrains.kotlin.codegen.serialization.JvmSerializationBindings.SYNTHETIC_METHOD_FOR_PROPERTY;
|
||||||
import static org.jetbrains.kotlin.resolve.DescriptorUtils.*;
|
import static org.jetbrains.kotlin.resolve.DescriptorUtils.*;
|
||||||
import static org.jetbrains.kotlin.resolve.jvm.AsmTypes.K_PROPERTY_TYPE;
|
import static org.jetbrains.kotlin.resolve.jvm.AsmTypes.K_PROPERTY_TYPE;
|
||||||
import static org.jetbrains.kotlin.resolve.jvm.annotations.AnnotationUtilKt.hasJvmFieldAnnotation;
|
import static org.jetbrains.kotlin.resolve.jvm.annotations.AnnotationUtilKt.hasJvmFieldAnnotation;
|
||||||
@@ -111,11 +112,6 @@ public class PropertyCodegen {
|
|||||||
assert kind == OwnerKind.PACKAGE || kind == OwnerKind.IMPLEMENTATION || kind == OwnerKind.DEFAULT_IMPLS
|
assert kind == OwnerKind.PACKAGE || kind == OwnerKind.IMPLEMENTATION || kind == OwnerKind.DEFAULT_IMPLS
|
||||||
: "Generating property with a wrong kind (" + kind + "): " + descriptor;
|
: "Generating property with a wrong kind (" + kind + "): " + descriptor;
|
||||||
|
|
||||||
String implClassName = CodegenContextUtil.getImplementationClassShortName(context);
|
|
||||||
if (implClassName != null) {
|
|
||||||
v.getSerializationBindings().put(PROPERTY_IMPL_CLASS_NAME, descriptor, implClassName);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CodegenContextUtil.isImplClassOwner(context)) {
|
if (CodegenContextUtil.isImplClassOwner(context)) {
|
||||||
assert declaration != null : "Declaration is null for different context: " + context;
|
assert declaration != null : "Declaration is null for different context: " + context;
|
||||||
|
|
||||||
@@ -266,10 +262,6 @@ public class PropertyCodegen {
|
|||||||
mv.visitInsn(Opcodes.RETURN);
|
mv.visitInsn(Opcodes.RETURN);
|
||||||
mv.visitEnd();
|
mv.visitEnd();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Type tImplType = typeMapper.mapDefaultImpls((ClassDescriptor) context.getContextDescriptor());
|
|
||||||
v.getSerializationBindings().put(PROPERTY_IMPL_CLASS_NAME, descriptor, shortNameByAsmType(tImplType));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (kind != OwnerKind.DEFAULT_IMPLS) {
|
if (kind != OwnerKind.DEFAULT_IMPLS) {
|
||||||
v.getSerializationBindings().put(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor, new Method(name, desc));
|
v.getSerializationBindings().put(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor, new Method(name, desc));
|
||||||
@@ -330,7 +322,6 @@ public class PropertyCodegen {
|
|||||||
ImplementationBodyCodegen codegen = (ImplementationBodyCodegen) memberCodegen.getParentCodegen();
|
ImplementationBodyCodegen codegen = (ImplementationBodyCodegen) memberCodegen.getParentCodegen();
|
||||||
builder = codegen.v;
|
builder = codegen.v;
|
||||||
backingFieldContext = codegen.context;
|
backingFieldContext = codegen.context;
|
||||||
v.getSerializationBindings().put(STATIC_FIELD_IN_OUTER_CLASS, propertyDescriptor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isObject(propertyDescriptor.getContainingDeclaration()) &&
|
if (isObject(propertyDescriptor.getContainingDeclaration()) &&
|
||||||
|
|||||||
@@ -16,10 +16,8 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.codegen.context
|
package org.jetbrains.kotlin.codegen.context
|
||||||
|
|
||||||
import org.jetbrains.kotlin.codegen.AsmUtil
|
|
||||||
import org.jetbrains.org.objectweb.asm.Type
|
import org.jetbrains.org.objectweb.asm.Type
|
||||||
|
|
||||||
|
|
||||||
public object CodegenContextUtil {
|
public object CodegenContextUtil {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun getImplementationOwnerClassType(owner: CodegenContext<*>): Type? =
|
public fun getImplementationOwnerClassType(owner: CodegenContext<*>): Type? =
|
||||||
@@ -29,10 +27,6 @@ public object CodegenContextUtil {
|
|||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
public fun getImplementationClassShortName(owner: CodegenContext<*>): String? =
|
|
||||||
getImplementationOwnerClassType(owner)?.let { AsmUtil.shortNameByAsmType(it) }
|
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
public fun isImplClassOwner(owner: CodegenContext<*>): Boolean =
|
public fun isImplClassOwner(owner: CodegenContext<*>): Boolean =
|
||||||
owner !is DelegatingFacadeContext
|
owner !is DelegatingFacadeContext
|
||||||
|
|||||||
-6
@@ -36,12 +36,6 @@ public final class JvmSerializationBindings {
|
|||||||
SerializationMappingSlice.create();
|
SerializationMappingSlice.create();
|
||||||
public static final SerializationMappingSlice<PropertyDescriptor, Method> SYNTHETIC_METHOD_FOR_PROPERTY =
|
public static final SerializationMappingSlice<PropertyDescriptor, Method> SYNTHETIC_METHOD_FOR_PROPERTY =
|
||||||
SerializationMappingSlice.create();
|
SerializationMappingSlice.create();
|
||||||
public static final SerializationMappingSlice<FunctionDescriptor, String> METHOD_IMPL_CLASS_NAME =
|
|
||||||
SerializationMappingSlice.create();
|
|
||||||
public static final SerializationMappingSlice<PropertyDescriptor, String> PROPERTY_IMPL_CLASS_NAME =
|
|
||||||
SerializationMappingSlice.create();
|
|
||||||
public static final SerializationMappingSetSlice<PropertyDescriptor> STATIC_FIELD_IN_OUTER_CLASS =
|
|
||||||
SerializationMappingSetSlice.create();
|
|
||||||
public static final SerializationMappingSlice<ValueParameterDescriptor, Integer> INDEX_FOR_VALUE_PARAMETER =
|
public static final SerializationMappingSlice<ValueParameterDescriptor, Integer> INDEX_FOR_VALUE_PARAMETER =
|
||||||
SerializationMappingSlice.create();
|
SerializationMappingSlice.create();
|
||||||
|
|
||||||
|
|||||||
+5
-32
@@ -109,11 +109,6 @@ public class JvmSerializerExtension extends SerializerExtension {
|
|||||||
proto.setExtension(JvmProtoBuf.methodSignature, signature);
|
proto.setExtension(JvmProtoBuf.methodSignature, signature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = bindings.get(METHOD_IMPL_CLASS_NAME, descriptor);
|
|
||||||
if (name != null) {
|
|
||||||
proto.setExtension(JvmProtoBuf.methodImplClassName, stringTable.getStringIndex(name));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -126,35 +121,18 @@ public class JvmSerializerExtension extends SerializerExtension {
|
|||||||
Method setterMethod = setter == null ? null : bindings.get(METHOD_FOR_FUNCTION, setter);
|
Method setterMethod = setter == null ? null : bindings.get(METHOD_FOR_FUNCTION, setter);
|
||||||
|
|
||||||
Pair<Type, String> field = bindings.get(FIELD_FOR_PROPERTY, descriptor);
|
Pair<Type, String> field = bindings.get(FIELD_FOR_PROPERTY, descriptor);
|
||||||
String fieldName;
|
|
||||||
String fieldDesc;
|
|
||||||
boolean isStaticInOuter;
|
|
||||||
if (field != null) {
|
|
||||||
fieldName = field.second;
|
|
||||||
fieldDesc = field.first.getDescriptor();
|
|
||||||
isStaticInOuter = bindings.get(STATIC_FIELD_IN_OUTER_CLASS, descriptor);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
fieldName = null;
|
|
||||||
fieldDesc = null;
|
|
||||||
isStaticInOuter = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
Method syntheticMethod = bindings.get(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor);
|
Method syntheticMethod = bindings.get(SYNTHETIC_METHOD_FOR_PROPERTY, descriptor);
|
||||||
|
|
||||||
JvmProtoBuf.JvmPropertySignature signature = signatureSerializer.propertySignature(
|
JvmProtoBuf.JvmPropertySignature signature = signatureSerializer.propertySignature(
|
||||||
descriptor, fieldName, fieldDesc, isStaticInOuter,
|
descriptor,
|
||||||
|
field != null ? field.second : null,
|
||||||
|
field != null ? field.first.getDescriptor() : null,
|
||||||
syntheticMethod != null ? signatureSerializer.methodSignature(null, syntheticMethod) : null,
|
syntheticMethod != null ? signatureSerializer.methodSignature(null, syntheticMethod) : null,
|
||||||
getterMethod != null ? signatureSerializer.methodSignature(null, getterMethod) : null,
|
getterMethod != null ? signatureSerializer.methodSignature(null, getterMethod) : null,
|
||||||
setterMethod != null ? signatureSerializer.methodSignature(null, setterMethod) : null
|
setterMethod != null ? signatureSerializer.methodSignature(null, setterMethod) : null
|
||||||
);
|
);
|
||||||
|
|
||||||
proto.setExtension(JvmProtoBuf.propertySignature, signature);
|
proto.setExtension(JvmProtoBuf.propertySignature, signature);
|
||||||
|
|
||||||
String name = bindings.get(PROPERTY_IMPL_CLASS_NAME, descriptor);
|
|
||||||
if (name != null) {
|
|
||||||
proto.setExtension(JvmProtoBuf.propertyImplClassName, stringTable.getStringIndex(name));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SignatureSerializer {
|
private class SignatureSerializer {
|
||||||
@@ -230,7 +208,6 @@ public class JvmSerializerExtension extends SerializerExtension {
|
|||||||
@NotNull PropertyDescriptor descriptor,
|
@NotNull PropertyDescriptor descriptor,
|
||||||
@Nullable String fieldName,
|
@Nullable String fieldName,
|
||||||
@Nullable String fieldDesc,
|
@Nullable String fieldDesc,
|
||||||
boolean isStaticInOuter,
|
|
||||||
@Nullable JvmProtoBuf.JvmMethodSignature syntheticMethod,
|
@Nullable JvmProtoBuf.JvmMethodSignature syntheticMethod,
|
||||||
@Nullable JvmProtoBuf.JvmMethodSignature getter,
|
@Nullable JvmProtoBuf.JvmMethodSignature getter,
|
||||||
@Nullable JvmProtoBuf.JvmMethodSignature setter
|
@Nullable JvmProtoBuf.JvmMethodSignature setter
|
||||||
@@ -239,7 +216,7 @@ public class JvmSerializerExtension extends SerializerExtension {
|
|||||||
|
|
||||||
if (fieldDesc != null) {
|
if (fieldDesc != null) {
|
||||||
assert fieldName != null : "Field name shouldn't be null when there's a field type: " + fieldDesc;
|
assert fieldName != null : "Field name shouldn't be null when there's a field type: " + fieldDesc;
|
||||||
signature.setField(fieldSignature(descriptor, fieldName, fieldDesc, isStaticInOuter));
|
signature.setField(fieldSignature(descriptor, fieldName, fieldDesc));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (syntheticMethod != null) {
|
if (syntheticMethod != null) {
|
||||||
@@ -260,8 +237,7 @@ public class JvmSerializerExtension extends SerializerExtension {
|
|||||||
public JvmProtoBuf.JvmFieldSignature fieldSignature(
|
public JvmProtoBuf.JvmFieldSignature fieldSignature(
|
||||||
@NotNull PropertyDescriptor descriptor,
|
@NotNull PropertyDescriptor descriptor,
|
||||||
@NotNull String name,
|
@NotNull String name,
|
||||||
@NotNull String desc,
|
@NotNull String desc
|
||||||
boolean isStaticInOuter
|
|
||||||
) {
|
) {
|
||||||
JvmProtoBuf.JvmFieldSignature.Builder builder = JvmProtoBuf.JvmFieldSignature.newBuilder();
|
JvmProtoBuf.JvmFieldSignature.Builder builder = JvmProtoBuf.JvmFieldSignature.newBuilder();
|
||||||
if (!descriptor.getName().asString().equals(name)) {
|
if (!descriptor.getName().asString().equals(name)) {
|
||||||
@@ -270,9 +246,6 @@ public class JvmSerializerExtension extends SerializerExtension {
|
|||||||
if (requiresSignature(descriptor, desc)) {
|
if (requiresSignature(descriptor, desc)) {
|
||||||
builder.setDesc(stringTable.getStringIndex(desc));
|
builder.setDesc(stringTable.getStringIndex(desc));
|
||||||
}
|
}
|
||||||
if (isStaticInOuter) {
|
|
||||||
builder.setIsStaticInOuter(true);
|
|
||||||
}
|
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,7 @@ public final class DebugJvmProtoBuf {
|
|||||||
com.google.protobuf.ExtensionRegistry registry) {
|
com.google.protobuf.ExtensionRegistry registry) {
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.constructorSignature);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.constructorSignature);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.methodSignature);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.methodSignature);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.methodImplClassName);
|
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.propertySignature);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.propertySignature);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.propertyImplClassName);
|
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.typeAnnotation);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.typeAnnotation);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.isRaw);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.isRaw);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.typeParameterAnnotation);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.typeParameterAnnotation);
|
||||||
@@ -2905,26 +2903,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
int getDesc();
|
int getDesc();
|
||||||
|
|
||||||
// optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
boolean hasIsStaticInOuter();
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
boolean getIsStaticInOuter();
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature}
|
* Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature}
|
||||||
@@ -2987,11 +2965,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
desc_ = input.readInt32();
|
desc_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 24: {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
isStaticInOuter_ = input.readBool();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -3072,36 +3045,9 @@ public final class DebugJvmProtoBuf {
|
|||||||
return desc_;
|
return desc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
public static final int IS_STATIC_IN_OUTER_FIELD_NUMBER = 3;
|
|
||||||
private boolean isStaticInOuter_;
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean hasIsStaticInOuter() {
|
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean getIsStaticInOuter() {
|
|
||||||
return isStaticInOuter_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
name_ = 0;
|
name_ = 0;
|
||||||
desc_ = 0;
|
desc_ = 0;
|
||||||
isStaticInOuter_ = false;
|
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -3121,9 +3067,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeInt32(2, desc_);
|
output.writeInt32(2, desc_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
output.writeBool(3, isStaticInOuter_);
|
|
||||||
}
|
|
||||||
getUnknownFields().writeTo(output);
|
getUnknownFields().writeTo(output);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3141,10 +3084,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(2, desc_);
|
.computeInt32Size(2, desc_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
size += com.google.protobuf.CodedOutputStream
|
|
||||||
.computeBoolSize(3, isStaticInOuter_);
|
|
||||||
}
|
|
||||||
size += getUnknownFields().getSerializedSize();
|
size += getUnknownFields().getSerializedSize();
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
@@ -3265,8 +3204,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
desc_ = 0;
|
desc_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
isStaticInOuter_ = false;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3303,10 +3240,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.desc_ = desc_;
|
result.desc_ = desc_;
|
||||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
to_bitField0_ |= 0x00000004;
|
|
||||||
}
|
|
||||||
result.isStaticInOuter_ = isStaticInOuter_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
onBuilt();
|
onBuilt();
|
||||||
return result;
|
return result;
|
||||||
@@ -3329,9 +3262,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
if (other.hasDesc()) {
|
if (other.hasDesc()) {
|
||||||
setDesc(other.getDesc());
|
setDesc(other.getDesc());
|
||||||
}
|
}
|
||||||
if (other.hasIsStaticInOuter()) {
|
|
||||||
setIsStaticInOuter(other.getIsStaticInOuter());
|
|
||||||
}
|
|
||||||
this.mergeUnknownFields(other.getUnknownFields());
|
this.mergeUnknownFields(other.getUnknownFields());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -3441,59 +3371,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
private boolean isStaticInOuter_ ;
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean hasIsStaticInOuter() {
|
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean getIsStaticInOuter() {
|
|
||||||
return isStaticInOuter_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder setIsStaticInOuter(boolean value) {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
isStaticInOuter_ = value;
|
|
||||||
onChanged();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder clearIsStaticInOuter() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
|
||||||
isStaticInOuter_ = false;
|
|
||||||
onChanged();
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4670,17 +4547,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
.newFileScopedGeneratedExtension(
|
.newFileScopedGeneratedExtension(
|
||||||
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature.class,
|
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature.class,
|
||||||
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature.getDefaultInstance());
|
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmMethodSignature.getDefaultInstance());
|
||||||
public static final int METHOD_IMPL_CLASS_NAME_FIELD_NUMBER = 101;
|
|
||||||
/**
|
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Function { ... }</code>
|
|
||||||
*/
|
|
||||||
public static final
|
|
||||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
|
||||||
org.jetbrains.kotlin.serialization.DebugProtoBuf.Function,
|
|
||||||
java.lang.Integer> methodImplClassName = com.google.protobuf.GeneratedMessage
|
|
||||||
.newFileScopedGeneratedExtension(
|
|
||||||
java.lang.Integer.class,
|
|
||||||
null);
|
|
||||||
public static final int PROPERTY_SIGNATURE_FIELD_NUMBER = 100;
|
public static final int PROPERTY_SIGNATURE_FIELD_NUMBER = 100;
|
||||||
/**
|
/**
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
|
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
|
||||||
@@ -4692,17 +4558,6 @@ public final class DebugJvmProtoBuf {
|
|||||||
.newFileScopedGeneratedExtension(
|
.newFileScopedGeneratedExtension(
|
||||||
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmPropertySignature.class,
|
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmPropertySignature.class,
|
||||||
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmPropertySignature.getDefaultInstance());
|
org.jetbrains.kotlin.serialization.jvm.DebugJvmProtoBuf.JvmPropertySignature.getDefaultInstance());
|
||||||
public static final int PROPERTY_IMPL_CLASS_NAME_FIELD_NUMBER = 101;
|
|
||||||
/**
|
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
|
|
||||||
*/
|
|
||||||
public static final
|
|
||||||
com.google.protobuf.GeneratedMessage.GeneratedExtension<
|
|
||||||
org.jetbrains.kotlin.serialization.DebugProtoBuf.Property,
|
|
||||||
java.lang.Integer> propertyImplClassName = com.google.protobuf.GeneratedMessage
|
|
||||||
.newFileScopedGeneratedExtension(
|
|
||||||
java.lang.Integer.class,
|
|
||||||
null);
|
|
||||||
public static final int TYPE_ANNOTATION_FIELD_NUMBER = 100;
|
public static final int TYPE_ANNOTATION_FIELD_NUMBER = 100;
|
||||||
/**
|
/**
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Type { ... }</code>
|
* <code>extend .org.jetbrains.kotlin.serialization.Type { ... }</code>
|
||||||
@@ -4809,45 +4664,40 @@ public final class DebugJvmProtoBuf {
|
|||||||
"ration\022\010\n\004NONE\020\000\022\030\n\024INTERNAL_TO_CLASS_ID" +
|
"ration\022\010\n\004NONE\020\000\022\030\n\024INTERNAL_TO_CLASS_ID" +
|
||||||
"\020\001\022\024\n\020DESC_TO_CLASS_ID\020\002\"<\n\022JvmMethodSig" +
|
"\020\001\022\024\n\020DESC_TO_CLASS_ID\020\002\"<\n\022JvmMethodSig" +
|
||||||
"nature\022\022\n\004name\030\001 \001(\005B\004\230\265\030\001\022\022\n\004desc\030\002 \001(\005" +
|
"nature\022\022\n\004name\030\001 \001(\005B\004\230\265\030\001\022\022\n\004desc\030\002 \001(\005" +
|
||||||
"B\004\230\265\030\001\"^\n\021JvmFieldSignature\022\022\n\004name\030\001 \001(" +
|
"B\004\230\265\030\001\";\n\021JvmFieldSignature\022\022\n\004name\030\001 \001(" +
|
||||||
"\005B\004\230\265\030\001\022\022\n\004desc\030\002 \001(\005B\004\230\265\030\001\022!\n\022is_static" +
|
"\005B\004\230\265\030\001\022\022\n\004desc\030\002 \001(\005B\004\230\265\030\001\"\316\002\n\024JvmPrope" +
|
||||||
"_in_outer\030\003 \001(\010:\005false\"\316\002\n\024JvmPropertySi",
|
"rtySignature\022H\n\005field\030\001 \001(\01329.org.jetbra",
|
||||||
"gnature\022H\n\005field\030\001 \001(\01329.org.jetbrains.k" +
|
"ins.kotlin.serialization.jvm.JvmFieldSig" +
|
||||||
"otlin.serialization.jvm.JvmFieldSignatur" +
|
"nature\022T\n\020synthetic_method\030\002 \001(\0132:.org.j" +
|
||||||
"e\022T\n\020synthetic_method\030\002 \001(\0132:.org.jetbra" +
|
"etbrains.kotlin.serialization.jvm.JvmMet" +
|
||||||
"ins.kotlin.serialization.jvm.JvmMethodSi" +
|
"hodSignature\022J\n\006getter\030\003 \001(\0132:.org.jetbr" +
|
||||||
"gnature\022J\n\006getter\030\003 \001(\0132:.org.jetbrains." +
|
"ains.kotlin.serialization.jvm.JvmMethodS" +
|
||||||
"kotlin.serialization.jvm.JvmMethodSignat" +
|
"ignature\022J\n\006setter\030\004 \001(\0132:.org.jetbrains" +
|
||||||
"ure\022J\n\006setter\030\004 \001(\0132:.org.jetbrains.kotl" +
|
".kotlin.serialization.jvm.JvmMethodSigna" +
|
||||||
"in.serialization.jvm.JvmMethodSignature:" +
|
"ture:\212\001\n\025constructor_signature\022/.org.jet" +
|
||||||
"\212\001\n\025constructor_signature\022/.org.jetbrain" +
|
"brains.kotlin.serialization.Constructor\030" +
|
||||||
"s.kotlin.serialization.Constructor\030d \001(\013",
|
"d \001(\0132:.org.jetbrains.kotlin.serializati",
|
||||||
"2:.org.jetbrains.kotlin.serialization.jv" +
|
"on.jvm.JvmMethodSignature:\202\001\n\020method_sig" +
|
||||||
"m.JvmMethodSignature:\202\001\n\020method_signatur" +
|
"nature\022,.org.jetbrains.kotlin.serializat" +
|
||||||
"e\022,.org.jetbrains.kotlin.serialization.F" +
|
"ion.Function\030d \001(\0132:.org.jetbrains.kotli" +
|
||||||
"unction\030d \001(\0132:.org.jetbrains.kotlin.ser" +
|
"n.serialization.jvm.JvmMethodSignature:\206" +
|
||||||
"ialization.jvm.JvmMethodSignature:R\n\026met" +
|
"\001\n\022property_signature\022,.org.jetbrains.ko" +
|
||||||
"hod_impl_class_name\022,.org.jetbrains.kotl" +
|
"tlin.serialization.Property\030d \001(\0132<.org." +
|
||||||
"in.serialization.Function\030e \001(\005B\004\230\265\030\001:\206\001" +
|
"jetbrains.kotlin.serialization.jvm.JvmPr" +
|
||||||
"\n\022property_signature\022,.org.jetbrains.kot" +
|
"opertySignature:q\n\017type_annotation\022(.org" +
|
||||||
"lin.serialization.Property\030d \001(\0132<.org.j" +
|
".jetbrains.kotlin.serialization.Type\030d \003" +
|
||||||
"etbrains.kotlin.serialization.jvm.JvmPro",
|
"(\0132..org.jetbrains.kotlin.serialization.",
|
||||||
"pertySignature:T\n\030property_impl_class_na" +
|
"Annotation:8\n\006is_raw\022(.org.jetbrains.kot" +
|
||||||
"me\022,.org.jetbrains.kotlin.serialization." +
|
"lin.serialization.Type\030e \001(\010:\204\001\n\031type_pa" +
|
||||||
"Property\030e \001(\005B\004\230\265\030\001:q\n\017type_annotation\022" +
|
"rameter_annotation\0221.org.jetbrains.kotli" +
|
||||||
"(.org.jetbrains.kotlin.serialization.Typ" +
|
"n.serialization.TypeParameter\030d \003(\0132..or" +
|
||||||
"e\030d \003(\0132..org.jetbrains.kotlin.serializa" +
|
"g.jetbrains.kotlin.serialization.Annotat" +
|
||||||
"tion.Annotation:8\n\006is_raw\022(.org.jetbrain" +
|
"ion:A\n\005index\0222.org.jetbrains.kotlin.seri" +
|
||||||
"s.kotlin.serialization.Type\030e \001(\010:\204\001\n\031ty" +
|
"alization.ValueParameter\030d \001(\005:s\n\020class_" +
|
||||||
"pe_parameter_annotation\0221.org.jetbrains." +
|
"annotation\022).org.jetbrains.kotlin.serial" +
|
||||||
"kotlin.serialization.TypeParameter\030d \003(\013" +
|
"ization.Class\030d \003(\0132..org.jetbrains.kotl" +
|
||||||
"2..org.jetbrains.kotlin.serialization.An",
|
"in.serialization.AnnotationB\022B\020DebugJvmP",
|
||||||
"notation:A\n\005index\0222.org.jetbrains.kotlin" +
|
"rotoBuf"
|
||||||
".serialization.ValueParameter\030d \001(\005:s\n\020c" +
|
|
||||||
"lass_annotation\022).org.jetbrains.kotlin.s" +
|
|
||||||
"erialization.Class\030d \003(\0132..org.jetbrains" +
|
|
||||||
".kotlin.serialization.AnnotationB\022B\020Debu" +
|
|
||||||
"gJvmProtoBuf"
|
|
||||||
};
|
};
|
||||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||||
@@ -4877,7 +4727,7 @@ public final class DebugJvmProtoBuf {
|
|||||||
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_fieldAccessorTable = new
|
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_fieldAccessorTable = new
|
||||||
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
com.google.protobuf.GeneratedMessage.FieldAccessorTable(
|
||||||
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_descriptor,
|
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmFieldSignature_descriptor,
|
||||||
new java.lang.String[] { "Name", "Desc", "IsStaticInOuter", });
|
new java.lang.String[] { "Name", "Desc", });
|
||||||
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_descriptor =
|
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_descriptor =
|
||||||
getDescriptor().getMessageTypes().get(3);
|
getDescriptor().getMessageTypes().get(3);
|
||||||
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_fieldAccessorTable = new
|
internal_static_org_jetbrains_kotlin_serialization_jvm_JvmPropertySignature_fieldAccessorTable = new
|
||||||
@@ -4886,22 +4736,18 @@ public final class DebugJvmProtoBuf {
|
|||||||
new java.lang.String[] { "Field", "SyntheticMethod", "Getter", "Setter", });
|
new java.lang.String[] { "Field", "SyntheticMethod", "Getter", "Setter", });
|
||||||
constructorSignature.internalInit(descriptor.getExtensions().get(0));
|
constructorSignature.internalInit(descriptor.getExtensions().get(0));
|
||||||
methodSignature.internalInit(descriptor.getExtensions().get(1));
|
methodSignature.internalInit(descriptor.getExtensions().get(1));
|
||||||
methodImplClassName.internalInit(descriptor.getExtensions().get(2));
|
propertySignature.internalInit(descriptor.getExtensions().get(2));
|
||||||
propertySignature.internalInit(descriptor.getExtensions().get(3));
|
typeAnnotation.internalInit(descriptor.getExtensions().get(3));
|
||||||
propertyImplClassName.internalInit(descriptor.getExtensions().get(4));
|
isRaw.internalInit(descriptor.getExtensions().get(4));
|
||||||
typeAnnotation.internalInit(descriptor.getExtensions().get(5));
|
typeParameterAnnotation.internalInit(descriptor.getExtensions().get(5));
|
||||||
isRaw.internalInit(descriptor.getExtensions().get(6));
|
index.internalInit(descriptor.getExtensions().get(6));
|
||||||
typeParameterAnnotation.internalInit(descriptor.getExtensions().get(7));
|
classAnnotation.internalInit(descriptor.getExtensions().get(7));
|
||||||
index.internalInit(descriptor.getExtensions().get(8));
|
|
||||||
classAnnotation.internalInit(descriptor.getExtensions().get(9));
|
|
||||||
com.google.protobuf.ExtensionRegistry registry =
|
com.google.protobuf.ExtensionRegistry registry =
|
||||||
com.google.protobuf.ExtensionRegistry.newInstance();
|
com.google.protobuf.ExtensionRegistry.newInstance();
|
||||||
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
|
||||||
registry.add(org.jetbrains.kotlin.serialization.DebugExtOptionsProtoBuf.stringIdInTable);
|
|
||||||
return registry;
|
return registry;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -76,10 +76,6 @@ message JvmFieldSignature {
|
|||||||
|
|
||||||
// JVM descriptor of the field type, e.g. 'Ljava/lang/String;'
|
// JVM descriptor of the field type, e.g. 'Ljava/lang/String;'
|
||||||
optional int32 desc = 2 [(string_id_in_table) = true];
|
optional int32 desc = 2 [(string_id_in_table) = true];
|
||||||
|
|
||||||
// True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
// field in the outer class, not as an instance field here
|
|
||||||
optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message JvmPropertySignature {
|
message JvmPropertySignature {
|
||||||
@@ -98,20 +94,10 @@ extend Constructor {
|
|||||||
|
|
||||||
extend Function {
|
extend Function {
|
||||||
optional JvmMethodSignature method_signature = 100;
|
optional JvmMethodSignature method_signature = 100;
|
||||||
|
|
||||||
// Package-less name of the class with the callable's body and annotations, if it differs from the class it's serialized into.
|
|
||||||
// E.g. for a class "A/B/C$D" this would be "C$D".
|
|
||||||
// This is needed to find the class to load annotations from in the following cases:
|
|
||||||
// 1) annotations on top-level members are written to compiled package part classes
|
|
||||||
// 2) annotations on properties in traits are written to TImpl classes
|
|
||||||
optional int32 method_impl_class_name = 101 [(string_id_in_table) = true];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Property {
|
extend Property {
|
||||||
optional JvmPropertySignature property_signature = 100;
|
optional JvmPropertySignature property_signature = 100;
|
||||||
|
|
||||||
// see Function#method_impl_class_name
|
|
||||||
optional int32 property_impl_class_name = 101 [(string_id_in_table) = true];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extend Type {
|
extend Type {
|
||||||
|
|||||||
-153
@@ -9,9 +9,7 @@ public final class JvmProtoBuf {
|
|||||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.constructorSignature);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.constructorSignature);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.methodSignature);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.methodSignature);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.methodImplClassName);
|
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertySignature);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertySignature);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertyImplClassName);
|
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeAnnotation);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeAnnotation);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.isRaw);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.isRaw);
|
||||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeParameterAnnotation);
|
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeParameterAnnotation);
|
||||||
@@ -2538,26 +2536,6 @@ public final class JvmProtoBuf {
|
|||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
int getDesc();
|
int getDesc();
|
||||||
|
|
||||||
// optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
boolean hasIsStaticInOuter();
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
boolean getIsStaticInOuter();
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature}
|
* Protobuf type {@code org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature}
|
||||||
@@ -2612,11 +2590,6 @@ public final class JvmProtoBuf {
|
|||||||
desc_ = input.readInt32();
|
desc_ = input.readInt32();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 24: {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
isStaticInOuter_ = input.readBool();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||||
@@ -2684,36 +2657,9 @@ public final class JvmProtoBuf {
|
|||||||
return desc_;
|
return desc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
public static final int IS_STATIC_IN_OUTER_FIELD_NUMBER = 3;
|
|
||||||
private boolean isStaticInOuter_;
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean hasIsStaticInOuter() {
|
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean getIsStaticInOuter() {
|
|
||||||
return isStaticInOuter_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initFields() {
|
private void initFields() {
|
||||||
name_ = 0;
|
name_ = 0;
|
||||||
desc_ = 0;
|
desc_ = 0;
|
||||||
isStaticInOuter_ = false;
|
|
||||||
}
|
}
|
||||||
private byte memoizedIsInitialized = -1;
|
private byte memoizedIsInitialized = -1;
|
||||||
public final boolean isInitialized() {
|
public final boolean isInitialized() {
|
||||||
@@ -2733,9 +2679,6 @@ public final class JvmProtoBuf {
|
|||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
||||||
output.writeInt32(2, desc_);
|
output.writeInt32(2, desc_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
output.writeBool(3, isStaticInOuter_);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private int memoizedSerializedSize = -1;
|
private int memoizedSerializedSize = -1;
|
||||||
@@ -2752,10 +2695,6 @@ public final class JvmProtoBuf {
|
|||||||
size += com.google.protobuf.CodedOutputStream
|
size += com.google.protobuf.CodedOutputStream
|
||||||
.computeInt32Size(2, desc_);
|
.computeInt32Size(2, desc_);
|
||||||
}
|
}
|
||||||
if (((bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
size += com.google.protobuf.CodedOutputStream
|
|
||||||
.computeBoolSize(3, isStaticInOuter_);
|
|
||||||
}
|
|
||||||
memoizedSerializedSize = size;
|
memoizedSerializedSize = size;
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
@@ -2851,8 +2790,6 @@ public final class JvmProtoBuf {
|
|||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
bitField0_ = (bitField0_ & ~0x00000001);
|
||||||
desc_ = 0;
|
desc_ = 0;
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
bitField0_ = (bitField0_ & ~0x00000002);
|
||||||
isStaticInOuter_ = false;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2884,10 +2821,6 @@ public final class JvmProtoBuf {
|
|||||||
to_bitField0_ |= 0x00000002;
|
to_bitField0_ |= 0x00000002;
|
||||||
}
|
}
|
||||||
result.desc_ = desc_;
|
result.desc_ = desc_;
|
||||||
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
|
|
||||||
to_bitField0_ |= 0x00000004;
|
|
||||||
}
|
|
||||||
result.isStaticInOuter_ = isStaticInOuter_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
result.bitField0_ = to_bitField0_;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -2900,9 +2833,6 @@ public final class JvmProtoBuf {
|
|||||||
if (other.hasDesc()) {
|
if (other.hasDesc()) {
|
||||||
setDesc(other.getDesc());
|
setDesc(other.getDesc());
|
||||||
}
|
}
|
||||||
if (other.hasIsStaticInOuter()) {
|
|
||||||
setIsStaticInOuter(other.getIsStaticInOuter());
|
|
||||||
}
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3011,59 +2941,6 @@ public final class JvmProtoBuf {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// optional bool is_static_in_outer = 3 [default = false];
|
|
||||||
private boolean isStaticInOuter_ ;
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean hasIsStaticInOuter() {
|
|
||||||
return ((bitField0_ & 0x00000004) == 0x00000004);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public boolean getIsStaticInOuter() {
|
|
||||||
return isStaticInOuter_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder setIsStaticInOuter(boolean value) {
|
|
||||||
bitField0_ |= 0x00000004;
|
|
||||||
isStaticInOuter_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional bool is_static_in_outer = 3 [default = false];</code>
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* True iff this field is a backing field for a companion object and is really present as a static
|
|
||||||
* field in the outer class, not as an instance field here
|
|
||||||
* </pre>
|
|
||||||
*/
|
|
||||||
public Builder clearIsStaticInOuter() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000004);
|
|
||||||
isStaticInOuter_ = false;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature)
|
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.serialization.jvm.JvmFieldSignature)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3865,21 +3742,6 @@ public final class JvmProtoBuf {
|
|||||||
null,
|
null,
|
||||||
100,
|
100,
|
||||||
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
||||||
public static final int METHOD_IMPL_CLASS_NAME_FIELD_NUMBER = 101;
|
|
||||||
/**
|
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Function { ... }</code>
|
|
||||||
*/
|
|
||||||
public static final
|
|
||||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
|
||||||
org.jetbrains.kotlin.serialization.ProtoBuf.Function,
|
|
||||||
java.lang.Integer> methodImplClassName = com.google.protobuf.GeneratedMessageLite
|
|
||||||
.newSingularGeneratedExtension(
|
|
||||||
org.jetbrains.kotlin.serialization.ProtoBuf.Function.getDefaultInstance(),
|
|
||||||
0,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
101,
|
|
||||||
com.google.protobuf.WireFormat.FieldType.INT32);
|
|
||||||
public static final int PROPERTY_SIGNATURE_FIELD_NUMBER = 100;
|
public static final int PROPERTY_SIGNATURE_FIELD_NUMBER = 100;
|
||||||
/**
|
/**
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
|
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
|
||||||
@@ -3895,21 +3757,6 @@ public final class JvmProtoBuf {
|
|||||||
null,
|
null,
|
||||||
100,
|
100,
|
||||||
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
||||||
public static final int PROPERTY_IMPL_CLASS_NAME_FIELD_NUMBER = 101;
|
|
||||||
/**
|
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Property { ... }</code>
|
|
||||||
*/
|
|
||||||
public static final
|
|
||||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
|
||||||
org.jetbrains.kotlin.serialization.ProtoBuf.Property,
|
|
||||||
java.lang.Integer> propertyImplClassName = com.google.protobuf.GeneratedMessageLite
|
|
||||||
.newSingularGeneratedExtension(
|
|
||||||
org.jetbrains.kotlin.serialization.ProtoBuf.Property.getDefaultInstance(),
|
|
||||||
0,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
101,
|
|
||||||
com.google.protobuf.WireFormat.FieldType.INT32);
|
|
||||||
public static final int TYPE_ANNOTATION_FIELD_NUMBER = 100;
|
public static final int TYPE_ANNOTATION_FIELD_NUMBER = 100;
|
||||||
/**
|
/**
|
||||||
* <code>extend .org.jetbrains.kotlin.serialization.Type { ... }</code>
|
* <code>extend .org.jetbrains.kotlin.serialization.Type { ... }</code>
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
|
|
||||||
package kotlin.reflect.jvm.internal
|
package kotlin.reflect.jvm.internal
|
||||||
|
|
||||||
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||||
|
import org.jetbrains.kotlin.resolve.DescriptorUtils.isClassOrEnumClass
|
||||||
|
import org.jetbrains.kotlin.resolve.DescriptorUtils.isCompanionObject
|
||||||
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil
|
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBufUtil
|
||||||
import java.lang.reflect.Field
|
import java.lang.reflect.Field
|
||||||
import kotlin.reflect.jvm.internal.JvmPropertySignature.JavaField
|
import kotlin.reflect.jvm.internal.JvmPropertySignature.JavaField
|
||||||
@@ -50,7 +53,10 @@ internal abstract class DescriptorBasedProperty<out R> protected constructor(
|
|||||||
when (jvmSignature) {
|
when (jvmSignature) {
|
||||||
is KotlinProperty -> {
|
is KotlinProperty -> {
|
||||||
JvmProtoBufUtil.getJvmFieldSignature(jvmSignature.proto, jvmSignature.nameResolver, jvmSignature.typeTable)?.let {
|
JvmProtoBufUtil.getJvmFieldSignature(jvmSignature.proto, jvmSignature.nameResolver, jvmSignature.typeTable)?.let {
|
||||||
container.findFieldBySignature(jvmSignature.proto, jvmSignature.nameResolver, it.name)
|
val isCompanionOfClass = (descriptor.containingDeclaration as? ClassDescriptor)?.let { containingClass ->
|
||||||
|
isCompanionObject(containingClass) && isClassOrEnumClass(containingClass.containingDeclaration)
|
||||||
|
} ?: false
|
||||||
|
container.findFieldBySignature(it.name, isCompanionOfClass)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is JavaField -> jvmSignature.field
|
is JavaField -> jvmSignature.field
|
||||||
|
|||||||
@@ -19,16 +19,11 @@ package kotlin.reflect.jvm.internal
|
|||||||
import org.jetbrains.kotlin.descriptors.*
|
import org.jetbrains.kotlin.descriptors.*
|
||||||
import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBodies
|
import org.jetbrains.kotlin.descriptors.impl.DeclarationDescriptorVisitorEmptyBodies
|
||||||
import org.jetbrains.kotlin.load.java.JvmAbi
|
import org.jetbrains.kotlin.load.java.JvmAbi
|
||||||
import org.jetbrains.kotlin.load.java.structure.reflect.classId
|
|
||||||
import org.jetbrains.kotlin.load.java.structure.reflect.createArrayType
|
import org.jetbrains.kotlin.load.java.structure.reflect.createArrayType
|
||||||
import org.jetbrains.kotlin.load.java.structure.reflect.safeClassLoader
|
import org.jetbrains.kotlin.load.java.structure.reflect.safeClassLoader
|
||||||
import org.jetbrains.kotlin.load.kotlin.reflect.RuntimeModuleData
|
import org.jetbrains.kotlin.load.kotlin.reflect.RuntimeModuleData
|
||||||
import org.jetbrains.kotlin.name.ClassId
|
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope
|
import org.jetbrains.kotlin.resolve.scopes.MemberScope
|
||||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.NameResolver
|
|
||||||
import org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf
|
|
||||||
import java.lang.reflect.Constructor
|
import java.lang.reflect.Constructor
|
||||||
import java.lang.reflect.Field
|
import java.lang.reflect.Field
|
||||||
import java.lang.reflect.Method
|
import java.lang.reflect.Method
|
||||||
@@ -242,16 +237,8 @@ internal abstract class KDeclarationContainerImpl : ClassBasedDeclarationContain
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: check resulting field's type
|
// TODO: check resulting field's type
|
||||||
fun findFieldBySignature(
|
fun findFieldBySignature(name: String, isCompanionOfClass: Boolean): Field? {
|
||||||
proto: ProtoBuf.Property,
|
val owner = if (isCompanionOfClass) jClass.enclosingClass else jClass
|
||||||
nameResolver: NameResolver,
|
|
||||||
name: String
|
|
||||||
): Field? {
|
|
||||||
val owner = implClassForCallable(nameResolver, proto) ?:
|
|
||||||
if (proto.hasExtension(JvmProtoBuf.propertySignature) &&
|
|
||||||
proto.getExtension(JvmProtoBuf.propertySignature).let { it.hasField() && it.field.isStaticInOuter }) {
|
|
||||||
jClass.enclosingClass ?: throw KotlinReflectionInternalError("Inconsistent metadata for field $name in $jClass")
|
|
||||||
} else jClass
|
|
||||||
|
|
||||||
return try {
|
return try {
|
||||||
owner.getDeclaredField(name)
|
owner.getDeclaredField(name)
|
||||||
@@ -261,17 +248,6 @@ internal abstract class KDeclarationContainerImpl : ClassBasedDeclarationContain
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns the JVM class which contains this callable. This class may be different from the one represented by descriptors
|
|
||||||
// in case of top level functions (their bodies are in package parts), methods with implementations in interfaces, etc.
|
|
||||||
private fun implClassForCallable(nameResolver: NameResolver, proto: ProtoBuf.Property): Class<*>? {
|
|
||||||
if (!proto.hasExtension(JvmProtoBuf.propertyImplClassName)) return null
|
|
||||||
|
|
||||||
val implClassName = nameResolver.getName(proto.getExtension(JvmProtoBuf.propertyImplClassName))
|
|
||||||
// TODO: store fq name of impl class name in jvm_descriptors.proto
|
|
||||||
val classId = ClassId(jClass.classId.packageFqName, implClassName)
|
|
||||||
return jClass.safeClassLoader.loadClass(classId.asSingleFqName().asString())
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val DEFAULT_CONSTRUCTOR_MARKER = Class.forName("kotlin.jvm.internal.DefaultConstructorMarker")
|
private val DEFAULT_CONSTRUCTOR_MARKER = Class.forName("kotlin.jvm.internal.DefaultConstructorMarker")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -212,11 +212,6 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi
|
|||||||
if (!checkEquals(old.getExtension(JvmProtoBuf.methodSignature), new.getExtension(JvmProtoBuf.methodSignature))) return false
|
if (!checkEquals(old.getExtension(JvmProtoBuf.methodSignature), new.getExtension(JvmProtoBuf.methodSignature))) return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old.hasExtension(JvmProtoBuf.methodImplClassName) != new.hasExtension(JvmProtoBuf.methodImplClassName)) return false
|
|
||||||
if (old.hasExtension(JvmProtoBuf.methodImplClassName)) {
|
|
||||||
if (!checkStringEquals(old.getExtension(JvmProtoBuf.methodImplClassName), new.getExtension(JvmProtoBuf.methodImplClassName))) return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -270,11 +265,6 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi
|
|||||||
if (!checkEquals(old.getExtension(JvmProtoBuf.propertySignature), new.getExtension(JvmProtoBuf.propertySignature))) return false
|
if (!checkEquals(old.getExtension(JvmProtoBuf.propertySignature), new.getExtension(JvmProtoBuf.propertySignature))) return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old.hasExtension(JvmProtoBuf.propertyImplClassName) != new.hasExtension(JvmProtoBuf.propertyImplClassName)) return false
|
|
||||||
if (old.hasExtension(JvmProtoBuf.propertyImplClassName)) {
|
|
||||||
if (!checkStringEquals(old.getExtension(JvmProtoBuf.propertyImplClassName), new.getExtension(JvmProtoBuf.propertyImplClassName))) return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -524,11 +514,6 @@ open class ProtoCompareGenerated(public val oldNameResolver: NameResolver, publi
|
|||||||
if (!checkStringEquals(old.desc, new.desc)) return false
|
if (!checkStringEquals(old.desc, new.desc)) return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old.hasIsStaticInOuter() != new.hasIsStaticInOuter()) return false
|
|
||||||
if (old.hasIsStaticInOuter()) {
|
|
||||||
if (old.isStaticInOuter != new.isStaticInOuter) return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -924,10 +909,6 @@ public fun ProtoBuf.Function.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes
|
|||||||
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.methodSignature).hashCode(stringIndexes, fqNameIndexes)
|
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.methodSignature).hashCode(stringIndexes, fqNameIndexes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasExtension(JvmProtoBuf.methodImplClassName)) {
|
|
||||||
hashCode = 31 * hashCode + stringIndexes(getExtension(JvmProtoBuf.methodImplClassName))
|
|
||||||
}
|
|
||||||
|
|
||||||
return hashCode
|
return hashCode
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -976,10 +957,6 @@ public fun ProtoBuf.Property.hashCode(stringIndexes: (Int) -> Int, fqNameIndexes
|
|||||||
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.propertySignature).hashCode(stringIndexes, fqNameIndexes)
|
hashCode = 31 * hashCode + getExtension(JvmProtoBuf.propertySignature).hashCode(stringIndexes, fqNameIndexes)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasExtension(JvmProtoBuf.propertyImplClassName)) {
|
|
||||||
hashCode = 31 * hashCode + stringIndexes(getExtension(JvmProtoBuf.propertyImplClassName))
|
|
||||||
}
|
|
||||||
|
|
||||||
return hashCode
|
return hashCode
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1228,10 +1205,6 @@ public fun JvmProtoBuf.JvmFieldSignature.hashCode(stringIndexes: (Int) -> Int, f
|
|||||||
hashCode = 31 * hashCode + stringIndexes(desc)
|
hashCode = 31 * hashCode + stringIndexes(desc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasIsStaticInOuter()) {
|
|
||||||
hashCode = 31 * hashCode + isStaticInOuter.hashCode()
|
|
||||||
}
|
|
||||||
|
|
||||||
return hashCode
|
return hashCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user