[IR] Don't produce gaps for skipped IR declarations during serialization
This commit is contained in:
committed by
Space Team
parent
a4c9a4f150
commit
161fe1d2ca
@@ -32,24 +32,8 @@ class SerializedMetadata(
|
||||
val fragmentNames: List<String>
|
||||
)
|
||||
|
||||
sealed class SerializedDeclaration {
|
||||
abstract val id: Int
|
||||
abstract val size: Int
|
||||
abstract val bytes: ByteArray
|
||||
|
||||
abstract val declarationName: String
|
||||
}
|
||||
|
||||
class TopLevelDeclaration(override val id: Int, override val declarationName: String, override val bytes: ByteArray) :
|
||||
SerializedDeclaration() {
|
||||
override val size = bytes.size
|
||||
}
|
||||
|
||||
object SkippedDeclaration : SerializedDeclaration() {
|
||||
override val id = -1
|
||||
override val size = 0
|
||||
override val bytes = ByteArray(0)
|
||||
override val declarationName: String = "<SKIPPED>"
|
||||
class SerializedDeclaration(val id: Int, val declarationName: String, val bytes: ByteArray) {
|
||||
val size = bytes.size
|
||||
}
|
||||
|
||||
class SerializedIrFile(
|
||||
|
||||
Reference in New Issue
Block a user