dotty.tools.dotc.semanticdb.internal.WireFormat.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala3-compiler_3 Show documentation
Show all versions of scala3-compiler_3 Show documentation
scala3-compiler-bootstrapped
package dotty.tools.dotc.semanticdb.internal
object WireFormat {
val WIRETYPE_VARINT = 0
val WIRETYPE_FIXED64 = 1
val WIRETYPE_LENGTH_DELIMITED = 2
val WIRETYPE_START_GROUP = 3
val WIRETYPE_END_GROUP = 4
val WIRETYPE_FIXED32 = 5
val TAG_TYPE_BITS = 3
val TAG_TYPE_MASK = (1 << TAG_TYPE_BITS) - 1
def getTagWireType(tag: Int) = tag & TAG_TYPE_MASK
def makeTag(fieldNumber: Int, wireType: Int) =
(fieldNumber << TAG_TYPE_BITS) | wireType
def getTagFieldNumber(tag: Int): Int = tag >>> TAG_TYPE_BITS
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy