[JS IC] Eradicate GlobalScopeLocalDeclaration from code
- Normalize proto names
This commit is contained in:
committed by
teamcityserver
parent
74d8e16d09
commit
4a601ebf95
@@ -338,30 +338,8 @@ sealed class IdSignature {
|
|||||||
override fun hashCode(): Int = id
|
override fun hashCode(): Int = id
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used to reference local variable and value parameters in function
|
|
||||||
class GlobalScopeLocalDeclaration(val id: Int, val description: String = "<no description>", val filePath: String) : IdSignature() {
|
|
||||||
override val isPubliclyVisible: Boolean get() = false
|
|
||||||
|
|
||||||
override val hasTopLevel: Boolean get() = false
|
|
||||||
|
|
||||||
override fun topLevelSignature(): IdSignature = error("Is not supported for Local ID")
|
|
||||||
|
|
||||||
override fun nearestPublicSig(): IdSignature = error("Is not supported for Local ID")
|
|
||||||
|
|
||||||
override fun packageFqName(): FqName = error("Is not supported for Local ID")
|
|
||||||
|
|
||||||
override fun render(): String = "#$id from ${filePath.split('/').last()}"
|
|
||||||
|
|
||||||
override fun equals(other: Any?): Boolean =
|
|
||||||
other is GlobalScopeLocalDeclaration && id == other.id && filePath == other.filePath
|
|
||||||
|
|
||||||
private val hashCode = id * 31 + filePath.hashCode()
|
|
||||||
|
|
||||||
override fun hashCode(): Int = hashCode
|
|
||||||
}
|
|
||||||
|
|
||||||
class LoweredDeclarationSignature(val original: IdSignature, val stage: Int, val index: Int) : IdSignature() {
|
class LoweredDeclarationSignature(val original: IdSignature, val stage: Int, val index: Int) : IdSignature() {
|
||||||
override val isPubliclyVisible: Boolean get() = true
|
override val isPubliclyVisible: Boolean get() = original.isPubliclyVisible
|
||||||
|
|
||||||
override val hasTopLevel: Boolean get() = true
|
override val hasTopLevel: Boolean get() = true
|
||||||
|
|
||||||
|
|||||||
@@ -63,13 +63,8 @@ message LoweredIdSignature {
|
|||||||
required int32 index = 3;
|
required int32 index = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ScopeLocalIdSignature {
|
|
||||||
required int32 id = 1;
|
|
||||||
optional int32 file = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
message IdSignature {
|
message IdSignature {
|
||||||
oneof idsig {
|
oneof idSig {
|
||||||
CommonIdSignature public_sig = 1;
|
CommonIdSignature public_sig = 1;
|
||||||
FileLocalIdSignature private_sig = 2;
|
FileLocalIdSignature private_sig = 2;
|
||||||
AccessorIdSignature accessor_sig = 3;
|
AccessorIdSignature accessor_sig = 3;
|
||||||
@@ -79,8 +74,7 @@ message IdSignature {
|
|||||||
FileSignature file_sig = 7;
|
FileSignature file_sig = 7;
|
||||||
|
|
||||||
// JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
// JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||||
LoweredIdSignature ic_sig = 105;
|
LoweredIdSignature ic_sig = 101;
|
||||||
ScopeLocalIdSignature external_scoped_local_sig = 107;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-11
@@ -115,7 +115,6 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.Loop as ProtoLoop
|
|||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon as ProtoMemberAccessCommon
|
import org.jetbrains.kotlin.backend.common.serialization.proto.MemberAccessCommon as ProtoMemberAccessCommon
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.NullableIrExpression as ProtoNullableIrExpression
|
import org.jetbrains.kotlin.backend.common.serialization.proto.NullableIrExpression as ProtoNullableIrExpression
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature as ProtoScopeLocalIdSignature
|
|
||||||
|
|
||||||
open class IrFileSerializer(
|
open class IrFileSerializer(
|
||||||
val messageLogger: IrMessageLogger,
|
val messageLogger: IrMessageLogger,
|
||||||
@@ -277,15 +276,6 @@ open class IrFileSerializer(
|
|||||||
return proto.build()
|
return proto.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun serializeScopeLocalSignature(signature: IdSignature.GlobalScopeLocalDeclaration): ProtoScopeLocalIdSignature {
|
|
||||||
val proto = ProtoScopeLocalIdSignature.newBuilder()
|
|
||||||
|
|
||||||
proto.id = signature.id
|
|
||||||
proto.file = serializeString(signature.filePath)
|
|
||||||
|
|
||||||
return proto.build()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun serializeLoweredDeclarationSignature(signature: IdSignature.LoweredDeclarationSignature): ProtoLoweredIdSignature {
|
private fun serializeLoweredDeclarationSignature(signature: IdSignature.LoweredDeclarationSignature): ProtoLoweredIdSignature {
|
||||||
val proto = ProtoLoweredIdSignature.newBuilder()
|
val proto = ProtoLoweredIdSignature.newBuilder()
|
||||||
|
|
||||||
@@ -308,7 +298,6 @@ open class IrFileSerializer(
|
|||||||
is IdSignature.FileSignature -> proto.fileSig = serializeFileSignature(idSignature)
|
is IdSignature.FileSignature -> proto.fileSig = serializeFileSignature(idSignature)
|
||||||
// IR IC part
|
// IR IC part
|
||||||
is IdSignature.LoweredDeclarationSignature -> proto.icSig = serializeLoweredDeclarationSignature(idSignature)
|
is IdSignature.LoweredDeclarationSignature -> proto.icSig = serializeLoweredDeclarationSignature(idSignature)
|
||||||
is IdSignature.GlobalScopeLocalDeclaration -> proto.externalScopedLocalSig = serializeScopeLocalSignature(idSignature)
|
|
||||||
is IdSignature.SpecialFakeOverrideSignature -> {}
|
is IdSignature.SpecialFakeOverrideSignature -> {}
|
||||||
}
|
}
|
||||||
return proto.build()
|
return proto.build()
|
||||||
|
|||||||
+4
-19
@@ -7,12 +7,11 @@ package org.jetbrains.kotlin.backend.common.serialization
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.encodings.BinarySymbolData
|
import org.jetbrains.kotlin.backend.common.serialization.encodings.BinarySymbolData
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.Actual
|
import org.jetbrains.kotlin.backend.common.serialization.proto.Actual
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.IdsigCase.*
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.IdSigCase.*
|
||||||
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.ParameterDescriptor
|
import org.jetbrains.kotlin.descriptors.ParameterDescriptor
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrAnonymousInitializer
|
import org.jetbrains.kotlin.ir.declarations.IrAnonymousInitializer
|
||||||
import org.jetbrains.kotlin.ir.declarations.IrValueParameter
|
import org.jetbrains.kotlin.ir.declarations.IrValueParameter
|
||||||
import org.jetbrains.kotlin.ir.declarations.path
|
|
||||||
import org.jetbrains.kotlin.ir.symbols.*
|
import org.jetbrains.kotlin.ir.symbols.*
|
||||||
import org.jetbrains.kotlin.ir.symbols.impl.*
|
import org.jetbrains.kotlin.ir.symbols.impl.*
|
||||||
import org.jetbrains.kotlin.ir.util.*
|
import org.jetbrains.kotlin.ir.util.*
|
||||||
@@ -26,7 +25,6 @@ import org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature as
|
|||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature as ProtoIdSignature
|
import org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature as ProtoIdSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LocalSignature as ProtoLocalSignature
|
import org.jetbrains.kotlin.backend.common.serialization.proto.LocalSignature as ProtoLocalSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
import org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature as ProtoLoweredIdSignature
|
||||||
import org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature as ProtoScopeLocalIdSignature
|
|
||||||
|
|
||||||
class IrSymbolDeserializer(
|
class IrSymbolDeserializer(
|
||||||
val symbolTable: ReferenceSymbolTable,
|
val symbolTable: ReferenceSymbolTable,
|
||||||
@@ -164,19 +162,7 @@ class IrSymbolDeserializer(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun deserializeScopeLocalIdSignature(proto: Int): IdSignature {
|
private fun deserializeScopeLocalIdSignature(proto: Int): IdSignature {
|
||||||
if (useGlobalSignatures) {
|
return IdSignature.ScopeLocalDeclaration(proto)
|
||||||
return IdSignature.GlobalScopeLocalDeclaration(proto, filePath = fileSymbol.owner.path)
|
|
||||||
} else {
|
|
||||||
return IdSignature.ScopeLocalDeclaration(proto)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun deserializeExternalScopeLocalIdSignature(proto: ProtoScopeLocalIdSignature): IdSignature {
|
|
||||||
if (useGlobalSignatures) {
|
|
||||||
return IdSignature.GlobalScopeLocalDeclaration(proto.id, filePath = fileReader.deserializeString(proto.file))
|
|
||||||
} else {
|
|
||||||
return IdSignature.ScopeLocalDeclaration(proto.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun deserializeLoweredDeclarationSignature(proto: ProtoLoweredIdSignature): IdSignature.LoweredDeclarationSignature {
|
private fun deserializeLoweredDeclarationSignature(proto: ProtoLoweredIdSignature): IdSignature.LoweredDeclarationSignature {
|
||||||
@@ -200,7 +186,7 @@ class IrSymbolDeserializer(
|
|||||||
private fun deserializeFileIdSignature(proto: ProtoFileSignature): IdSignature.FileSignature = fileSignature
|
private fun deserializeFileIdSignature(proto: ProtoFileSignature): IdSignature.FileSignature = fileSignature
|
||||||
|
|
||||||
fun deserializeSignatureData(proto: ProtoIdSignature): IdSignature {
|
fun deserializeSignatureData(proto: ProtoIdSignature): IdSignature {
|
||||||
return when (proto.idsigCase) {
|
return when (proto.idSigCase) {
|
||||||
PUBLIC_SIG -> deserializePublicIdSignature(proto.publicSig)
|
PUBLIC_SIG -> deserializePublicIdSignature(proto.publicSig)
|
||||||
ACCESSOR_SIG -> deserializeAccessorIdSignature(proto.accessorSig)
|
ACCESSOR_SIG -> deserializeAccessorIdSignature(proto.accessorSig)
|
||||||
PRIVATE_SIG -> deserializeFileLocalIdSignature(proto.privateSig)
|
PRIVATE_SIG -> deserializeFileLocalIdSignature(proto.privateSig)
|
||||||
@@ -210,8 +196,7 @@ class IrSymbolDeserializer(
|
|||||||
FILE_SIG -> deserializeFileIdSignature(proto.fileSig)
|
FILE_SIG -> deserializeFileIdSignature(proto.fileSig)
|
||||||
// IR IC part
|
// IR IC part
|
||||||
IC_SIG -> deserializeLoweredDeclarationSignature(proto.icSig)
|
IC_SIG -> deserializeLoweredDeclarationSignature(proto.icSig)
|
||||||
EXTERNAL_SCOPED_LOCAL_SIG -> deserializeExternalScopeLocalIdSignature(proto.externalScopedLocalSig)
|
else -> error("Unexpected IdSignature kind: ${proto.idSigCase}")
|
||||||
else -> error("Unexpected IdSignature kind: ${proto.idsigCase}")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+263
-385
File diff suppressed because it is too large
Load Diff
+2
-11
@@ -71,7 +71,7 @@ public interface IdSignatureOrBuilder extends
|
|||||||
org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature getFileSig();
|
org.jetbrains.kotlin.backend.common.serialization.proto.FileSignature getFileSig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 105;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||||
@@ -79,20 +79,11 @@ public interface IdSignatureOrBuilder extends
|
|||||||
*/
|
*/
|
||||||
boolean hasIcSig();
|
boolean hasIcSig();
|
||||||
/**
|
/**
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 105;</code>
|
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature ic_sig = 101;</code>
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
* JS IC related stuff below. Proto indices 100+ were chosen due to compatibility considerations.
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature getIcSig();
|
org.jetbrains.kotlin.backend.common.serialization.proto.LoweredIdSignature getIcSig();
|
||||||
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature external_scoped_local_sig = 107;</code>
|
|
||||||
*/
|
|
||||||
boolean hasExternalScopedLocalSig();
|
|
||||||
/**
|
|
||||||
* <code>optional .org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature external_scoped_local_sig = 107;</code>
|
|
||||||
*/
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature getExternalScopedLocalSig();
|
|
||||||
}
|
}
|
||||||
-420
@@ -1,420 +0,0 @@
|
|||||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
||||||
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature}
|
|
||||||
*/
|
|
||||||
public final class ScopeLocalIdSignature extends
|
|
||||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
|
|
||||||
// @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature)
|
|
||||||
ScopeLocalIdSignatureOrBuilder {
|
|
||||||
// Use ScopeLocalIdSignature.newBuilder() to construct.
|
|
||||||
private ScopeLocalIdSignature(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
|
|
||||||
super(builder);
|
|
||||||
this.unknownFields = builder.getUnknownFields();
|
|
||||||
}
|
|
||||||
private ScopeLocalIdSignature(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}
|
|
||||||
|
|
||||||
private static final ScopeLocalIdSignature defaultInstance;
|
|
||||||
public static ScopeLocalIdSignature getDefaultInstance() {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ScopeLocalIdSignature getDefaultInstanceForType() {
|
|
||||||
return defaultInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
|
|
||||||
private ScopeLocalIdSignature(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
initFields();
|
|
||||||
int mutable_bitField0_ = 0;
|
|
||||||
org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
|
|
||||||
org.jetbrains.kotlin.protobuf.ByteString.newOutput();
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
|
|
||||||
unknownFieldsOutput, 1);
|
|
||||||
try {
|
|
||||||
boolean done = false;
|
|
||||||
while (!done) {
|
|
||||||
int tag = input.readTag();
|
|
||||||
switch (tag) {
|
|
||||||
case 0:
|
|
||||||
done = true;
|
|
||||||
break;
|
|
||||||
default: {
|
|
||||||
if (!parseUnknownField(input, unknownFieldsCodedOutput,
|
|
||||||
extensionRegistry, tag)) {
|
|
||||||
done = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 8: {
|
|
||||||
bitField0_ |= 0x00000001;
|
|
||||||
id_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 16: {
|
|
||||||
bitField0_ |= 0x00000002;
|
|
||||||
file_ = input.readInt32();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
|
||||||
throw e.setUnfinishedMessage(this);
|
|
||||||
} catch (java.io.IOException e) {
|
|
||||||
throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
|
|
||||||
e.getMessage()).setUnfinishedMessage(this);
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
unknownFieldsCodedOutput.flush();
|
|
||||||
} catch (java.io.IOException e) {
|
|
||||||
// Should not happen
|
|
||||||
} finally {
|
|
||||||
unknownFields = unknownFieldsOutput.toByteString();
|
|
||||||
}
|
|
||||||
makeExtensionsImmutable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.protobuf.Parser<ScopeLocalIdSignature> PARSER =
|
|
||||||
new org.jetbrains.kotlin.protobuf.AbstractParser<ScopeLocalIdSignature>() {
|
|
||||||
public ScopeLocalIdSignature parsePartialFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return new ScopeLocalIdSignature(input, extensionRegistry);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
@java.lang.Override
|
|
||||||
public org.jetbrains.kotlin.protobuf.Parser<ScopeLocalIdSignature> getParserForType() {
|
|
||||||
return PARSER;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int bitField0_;
|
|
||||||
public static final int ID_FIELD_NUMBER = 1;
|
|
||||||
private int id_;
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasId() {
|
|
||||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
public int getId() {
|
|
||||||
return id_;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final int FILE_FIELD_NUMBER = 2;
|
|
||||||
private int file_;
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasFile() {
|
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
public int getFile() {
|
|
||||||
return file_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initFields() {
|
|
||||||
id_ = 0;
|
|
||||||
file_ = 0;
|
|
||||||
}
|
|
||||||
private byte memoizedIsInitialized = -1;
|
|
||||||
public final boolean isInitialized() {
|
|
||||||
byte isInitialized = memoizedIsInitialized;
|
|
||||||
if (isInitialized == 1) return true;
|
|
||||||
if (isInitialized == 0) return false;
|
|
||||||
|
|
||||||
if (!hasId()) {
|
|
||||||
memoizedIsInitialized = 0;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
memoizedIsInitialized = 1;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
|
|
||||||
throws java.io.IOException {
|
|
||||||
getSerializedSize();
|
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
||||||
output.writeInt32(1, id_);
|
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
||||||
output.writeInt32(2, file_);
|
|
||||||
}
|
|
||||||
output.writeRawBytes(unknownFields);
|
|
||||||
}
|
|
||||||
|
|
||||||
private int memoizedSerializedSize = -1;
|
|
||||||
public int getSerializedSize() {
|
|
||||||
int size = memoizedSerializedSize;
|
|
||||||
if (size != -1) return size;
|
|
||||||
|
|
||||||
size = 0;
|
|
||||||
if (((bitField0_ & 0x00000001) == 0x00000001)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(1, id_);
|
|
||||||
}
|
|
||||||
if (((bitField0_ & 0x00000002) == 0x00000002)) {
|
|
||||||
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
|
|
||||||
.computeInt32Size(2, file_);
|
|
||||||
}
|
|
||||||
size += unknownFields.size();
|
|
||||||
memoizedSerializedSize = size;
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 0L;
|
|
||||||
@java.lang.Override
|
|
||||||
protected java.lang.Object writeReplace()
|
|
||||||
throws java.io.ObjectStreamException {
|
|
||||||
return super.writeReplace();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.ByteString data)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return PARSER.parseFrom(data);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.ByteString data,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return PARSER.parseFrom(data, extensionRegistry);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(byte[] data)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return PARSER.parseFrom(data);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(
|
|
||||||
byte[] data,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
|
|
||||||
return PARSER.parseFrom(data, extensionRegistry);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(java.io.InputStream input)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseFrom(input);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(
|
|
||||||
java.io.InputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseFrom(input, extensionRegistry);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseDelimitedFrom(java.io.InputStream input)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseDelimitedFrom(input);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseDelimitedFrom(
|
|
||||||
java.io.InputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseDelimitedFrom(input, extensionRegistry);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseFrom(input);
|
|
||||||
}
|
|
||||||
public static org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parseFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws java.io.IOException {
|
|
||||||
return PARSER.parseFrom(input, extensionRegistry);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Builder newBuilder() { return Builder.create(); }
|
|
||||||
public Builder newBuilderForType() { return newBuilder(); }
|
|
||||||
public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature prototype) {
|
|
||||||
return newBuilder().mergeFrom(prototype);
|
|
||||||
}
|
|
||||||
public Builder toBuilder() { return newBuilder(this); }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature}
|
|
||||||
*/
|
|
||||||
public static final class Builder extends
|
|
||||||
org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature, Builder>
|
|
||||||
implements
|
|
||||||
// @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature)
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignatureOrBuilder {
|
|
||||||
// Construct using org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature.newBuilder()
|
|
||||||
private Builder() {
|
|
||||||
maybeForceBuilderInitialization();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void maybeForceBuilderInitialization() {
|
|
||||||
}
|
|
||||||
private static Builder create() {
|
|
||||||
return new Builder();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder clear() {
|
|
||||||
super.clear();
|
|
||||||
id_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
|
||||||
file_ = 0;
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder clone() {
|
|
||||||
return create().mergeFrom(buildPartial());
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature getDefaultInstanceForType() {
|
|
||||||
return org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature.getDefaultInstance();
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature build() {
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature result = buildPartial();
|
|
||||||
if (!result.isInitialized()) {
|
|
||||||
throw newUninitializedMessageException(result);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature buildPartial() {
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature result = new org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature(this);
|
|
||||||
int from_bitField0_ = bitField0_;
|
|
||||||
int to_bitField0_ = 0;
|
|
||||||
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
|
|
||||||
to_bitField0_ |= 0x00000001;
|
|
||||||
}
|
|
||||||
result.id_ = id_;
|
|
||||||
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
|
|
||||||
to_bitField0_ |= 0x00000002;
|
|
||||||
}
|
|
||||||
result.file_ = file_;
|
|
||||||
result.bitField0_ = to_bitField0_;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature other) {
|
|
||||||
if (other == org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature.getDefaultInstance()) return this;
|
|
||||||
if (other.hasId()) {
|
|
||||||
setId(other.getId());
|
|
||||||
}
|
|
||||||
if (other.hasFile()) {
|
|
||||||
setFile(other.getFile());
|
|
||||||
}
|
|
||||||
setUnknownFields(
|
|
||||||
getUnknownFields().concat(other.unknownFields));
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final boolean isInitialized() {
|
|
||||||
if (!hasId()) {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder mergeFrom(
|
|
||||||
org.jetbrains.kotlin.protobuf.CodedInputStream input,
|
|
||||||
org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
|
|
||||||
throws java.io.IOException {
|
|
||||||
org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature parsedMessage = null;
|
|
||||||
try {
|
|
||||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
|
||||||
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
|
|
||||||
parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature) e.getUnfinishedMessage();
|
|
||||||
throw e;
|
|
||||||
} finally {
|
|
||||||
if (parsedMessage != null) {
|
|
||||||
mergeFrom(parsedMessage);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
private int bitField0_;
|
|
||||||
|
|
||||||
private int id_ ;
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasId() {
|
|
||||||
return ((bitField0_ & 0x00000001) == 0x00000001);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
public int getId() {
|
|
||||||
return id_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
public Builder setId(int value) {
|
|
||||||
bitField0_ |= 0x00000001;
|
|
||||||
id_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
public Builder clearId() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000001);
|
|
||||||
id_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int file_ ;
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
public boolean hasFile() {
|
|
||||||
return ((bitField0_ & 0x00000002) == 0x00000002);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
public int getFile() {
|
|
||||||
return file_;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
public Builder setFile(int value) {
|
|
||||||
bitField0_ |= 0x00000002;
|
|
||||||
file_ = value;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
public Builder clearFile() {
|
|
||||||
bitField0_ = (bitField0_ & ~0x00000002);
|
|
||||||
file_ = 0;
|
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature)
|
|
||||||
}
|
|
||||||
|
|
||||||
static {
|
|
||||||
defaultInstance = new ScopeLocalIdSignature(true);
|
|
||||||
defaultInstance.initFields();
|
|
||||||
}
|
|
||||||
|
|
||||||
// @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature)
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
||||||
// source: compiler/ir/serialization.common/src/KotlinIr.proto
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.backend.common.serialization.proto;
|
|
||||||
|
|
||||||
public interface ScopeLocalIdSignatureOrBuilder extends
|
|
||||||
// @@protoc_insertion_point(interface_extends:org.jetbrains.kotlin.backend.common.serialization.proto.ScopeLocalIdSignature)
|
|
||||||
org.jetbrains.kotlin.protobuf.MessageLiteOrBuilder {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
boolean hasId();
|
|
||||||
/**
|
|
||||||
* <code>required int32 id = 1;</code>
|
|
||||||
*/
|
|
||||||
int getId();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
boolean hasFile();
|
|
||||||
/**
|
|
||||||
* <code>optional int32 file = 2;</code>
|
|
||||||
*/
|
|
||||||
int getFile();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user