Last active
January 21, 2024 23:49
-
-
Save sschr15/e64a894a0b22b4b74c4e31eb7a9a8630 to your computer and use it in GitHub Desktop.
feature/kotlin/fixes/exceptions diff against KT 1.9.20 stdlib
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --color -ur decomp-current/kotlin/collections/AbstractIterator.java decomp-fixes/kotlin/collections/AbstractIterator.java | |
--- decomp-current/kotlin/collections/AbstractIterator.java 2024-01-21 17:29:18.443022400 -0600 | |
+++ decomp-fixes/kotlin/collections/AbstractIterator.java 2024-01-21 17:27:28.923283900 -0600 | |
@@ -1,10 +1,63 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.collections | |
+ | |
+import java.util.Iterator | |
+import java.util.NoSuchElementException | |
+import kotlin.jvm.internal.markers.KMappedMarker | |
+ | |
+abstract class AbstractIterator<T> : Iterator<T>, KMappedMarker { | |
+ private State state = State.NotReady; | |
+ | |
+ private final var nextValue: Any? | |
+ private final var state: State | |
+ | |
+ public override operator fun hasNext(): Boolean { | |
+ if (this.state === State.Failed) { | |
+ throw new IllegalArgumentException("Failed requirement.".toString()); | |
+ } else { | |
+ var var10000: Boolean; | |
+ switch (AbstractIterator.WhenMappings.$EnumSwitchMapping$0[this.state.ordinal()]) { | |
+ case 1: | |
+ var10000 = false; | |
+ break; | |
+ case 2: | |
+ var10000 = true; | |
+ break; | |
+ default: | |
+ var10000 = this.tryToComputeNext(); | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ } | |
+ | |
+ public override operator fun next(): Any { | |
+ if (!this.hasNext()) { | |
+ throw new NoSuchElementException(); | |
+ } else { | |
+ this.state = State.NotReady; | |
+ return this.nextValue; | |
+ } | |
+ } | |
+ | |
+ private fun tryToComputeNext(): Boolean { | |
+ this.state = State.Failed; | |
+ this.computeNext(); | |
+ return this.state === State.Ready; | |
+ } | |
+ | |
+ protected abstract fun computeNext() { | |
+ } | |
+ | |
+ protected fun setNext(value: Any) { | |
+ this.nextValue = (T)value; | |
+ this.state = State.Ready; | |
+ } | |
+ | |
+ protected fun done() { | |
+ this.state = State.Done; | |
+ } | |
+ | |
+ override fun remove() { | |
+ throw new UnsupportedOperationException("Operation is not supported for read-only collection"); | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/collections/builders/ListBuilder.java decomp-fixes/kotlin/collections/builders/ListBuilder.java | |
--- decomp-current/kotlin/collections/builders/ListBuilder.java 2024-01-21 17:29:18.474217200 -0600 | |
+++ decomp-fixes/kotlin/collections/builders/ListBuilder.java 2024-01-21 17:27:28.955980600 -0600 | |
@@ -1,11 +1,484 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IllegalStateException: First expression of constructor is not InvocationExprent | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:152) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:405) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.collections.builders | |
+ | |
+import java.io.NotSerializableException | |
+import java.io.Serializable | |
+import java.util.Arrays | |
+import java.util.ConcurrentModificationException | |
+import java.util.Iterator | |
+import java.util.List | |
+import java.util.ListIterator | |
+import java.util.NoSuchElementException | |
+import java.util.RandomAccess | |
+import kotlin.jvm.internal.SourceDebugExtension | |
+import kotlin.jvm.internal.markers.KMutableList | |
+import kotlin.jvm.internal.markers.KMutableListIterator | |
+ | |
+@SourceDebugExtension(["SMAP\nListBuilder.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ListBuilder.kt\nkotlin/collections/builders/ListBuilder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,487:1\n1#2:488\n*E\n"]) | |
+internal class ListBuilder<E> private constructor(vararg array: Any, | |
+ offset: Int, | |
+ length: Int, | |
+ isReadOnly: Boolean, | |
+ backing: ListBuilder<Any>?, | |
+ root: ListBuilder<Any>? | |
+ ) | |
+ : AbstractMutableList<E>, | |
+ List<E>, | |
+ RandomAccess, | |
+ Serializable, | |
+ KMutableList { | |
+ @JvmStatic | |
+ private ListBuilder.Companion Companion = new ListBuilder.Companion(null); | |
+ private E[] array; | |
+ private ListBuilder<E> backing; | |
+ private ListBuilder<E> root; | |
+ @JvmStatic | |
+ private ListBuilder Empty; | |
+ | |
+ private final var array: Array<Any> | |
+ private final val backing: ListBuilder<Any>? | |
+ private final val isEffectivelyReadOnly: Boolean | |
+ private final get() { | |
+ return this.isReadOnly || this.root != null && this.root.isReadOnly; | |
+ } | |
+ | |
+ private final var isReadOnly: Boolean | |
+ private final var length: Int | |
+ private final var offset: Int | |
+ private final val root: ListBuilder<Any>? | |
+ public open val size: Int | |
+ public open get() { | |
+ this.checkForComodification(); | |
+ return this.length; | |
+ } | |
+ | |
+ | |
+ init { | |
+ this.array = (E[])array; | |
+ this.offset = offset; | |
+ this.length = length; | |
+ this.isReadOnly = isReadOnly; | |
+ this.backing = backing; | |
+ this.root = root; | |
+ if (this.backing != null) { | |
+ this.modCount = this.backing.modCount; | |
+ } | |
+ } | |
+ | |
+ public constructor() : this(10) | |
+ public constructor(initialCapacity: Int) : this((E[])ListBuilderKt.arrayOfUninitializedElements(initialCapacity), 0, 0, false, null, null) | |
+ public fun build(): kotlin.collections.List<Any> { | |
+ if (this.backing != null) { | |
+ throw new IllegalStateException(); | |
+ } else { | |
+ this.checkIsMutable(); | |
+ this.isReadOnly = true; | |
+ return if (this.length > 0) this else Empty; | |
+ } | |
+ } | |
+ | |
+ private fun writeReplace(): Any { | |
+ if (this.isEffectivelyReadOnly()) { | |
+ return new SerializedCollection(this, 0); | |
+ } else { | |
+ throw new NotSerializableException("The list cannot be serialized while it is being built."); | |
+ } | |
+ } | |
+ | |
+ public override fun isEmpty(): Boolean { | |
+ this.checkForComodification(); | |
+ return this.length == 0; | |
+ } | |
+ | |
+ public override operator fun get(index: Int): Any { | |
+ this.checkForComodification(); | |
+ AbstractList.Companion.checkElementIndex$kotlin_stdlib(index, this.length); | |
+ return this.array[this.offset + index]; | |
+ } | |
+ | |
+ public override operator fun set(index: Int, element: Any): Any { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ AbstractList.Companion.checkElementIndex$kotlin_stdlib(index, this.length); | |
+ var old: Any = this.array[this.offset + index]; | |
+ this.array[this.offset + index] = (E)element; | |
+ return (E)old; | |
+ } | |
+ | |
+ public override fun indexOf(element: Any): Int { | |
+ this.checkForComodification(); | |
+ | |
+ for (int i = 0; i < this.length; i++) { | |
+ if (this.array[this.offset + i] == element) { | |
+ return i; | |
+ } | |
+ } | |
+ | |
+ return -1; | |
+ } | |
+ | |
+ public override fun lastIndexOf(element: Any): Int { | |
+ this.checkForComodification(); | |
+ | |
+ for (int i = this.length - 1; i >= 0; i--) { | |
+ if (this.array[this.offset + i] == element) { | |
+ return i; | |
+ } | |
+ } | |
+ | |
+ return -1; | |
+ } | |
+ | |
+ public override operator fun iterator(): MutableIterator<Any> { | |
+ return this.listIterator(0); | |
+ } | |
+ | |
+ public override fun listIterator(): MutableListIterator<Any> { | |
+ return this.listIterator(0); | |
+ } | |
+ | |
+ public override fun listIterator(index: Int): MutableListIterator<Any> { | |
+ this.checkForComodification(); | |
+ AbstractList.Companion.checkPositionIndex$kotlin_stdlib(index, this.length); | |
+ return new ListBuilder.Itr<>(this, index); | |
+ } | |
+ | |
+ public override fun add(element: Any): Boolean { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ this.addAtInternal(this.offset + this.length, (E)element); | |
+ return true; | |
+ } | |
+ | |
+ public override fun add(index: Int, element: Any) { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ AbstractList.Companion.checkPositionIndex$kotlin_stdlib(index, this.length); | |
+ this.addAtInternal(this.offset + index, (E)element); | |
+ } | |
+ | |
+ public override fun addAll(elements: Collection<Any>): Boolean { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ var n: Int = elements.size(); | |
+ this.addAllInternal(this.offset + this.length, elements, n); | |
+ return n > 0; | |
+ } | |
+ | |
+ public override fun addAll(index: Int, elements: Collection<Any>): Boolean { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ AbstractList.Companion.checkPositionIndex$kotlin_stdlib(index, this.length); | |
+ var n: Int = elements.size(); | |
+ this.addAllInternal(this.offset + index, elements, n); | |
+ return n > 0; | |
+ } | |
+ | |
+ public override fun clear() { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ this.removeRangeInternal(this.offset, this.length); | |
+ } | |
+ | |
+ public override fun removeAt(index: Int): Any { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ AbstractList.Companion.checkElementIndex$kotlin_stdlib(index, this.length); | |
+ return this.removeAtInternal(this.offset + index); | |
+ } | |
+ | |
+ public override fun remove(element: Any): Boolean { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ var i: Int = this.indexOf(element); | |
+ if (i >= 0) { | |
+ this.remove(i); | |
+ } | |
+ | |
+ return i >= 0; | |
+ } | |
+ | |
+ public override fun removeAll(elements: Collection<Any>): Boolean { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ return this.retainOrRemoveAllInternal(this.offset, this.length, elements, false) > 0; | |
+ } | |
+ | |
+ public override fun retainAll(elements: Collection<Any>): Boolean { | |
+ this.checkIsMutable(); | |
+ this.checkForComodification(); | |
+ return this.retainOrRemoveAllInternal(this.offset, this.length, elements, true) > 0; | |
+ } | |
+ | |
+ public override fun subList(fromIndex: Int, toIndex: Int): MutableList<Any> { | |
+ AbstractList.Companion.checkRangeIndexes$kotlin_stdlib(fromIndex, toIndex, this.length); | |
+ var var10000: ListBuilder = new ListBuilder; | |
+ var var10003: Int = this.offset + fromIndex; | |
+ var var10004: Int = toIndex - fromIndex; | |
+ var var10007: ListBuilder = this.root; | |
+ if (this.root == null) { | |
+ var10007 = this; | |
+ } | |
+ | |
+ var10000./* $VF: Unable to resugar constructor */<init>(this.array, var10003, var10004, this.isReadOnly, this, var10007); | |
+ return var10000; | |
+ } | |
+ | |
+ public override fun <T> toArray(destination: Array<T>): Array<T> { | |
+ this.checkForComodification(); | |
+ if (destination.length < this.length) { | |
+ var var10000: Array<Any> = Arrays.copyOfRange(this.array, this.offset, this.offset + this.length, (Class<? extends Object[]>)destination.getClass()); | |
+ return (T[])var10000; | |
+ } else { | |
+ ArraysKt.copyInto(this.array, (E[])destination, 0, this.offset, this.offset + this.length); | |
+ return (T[])CollectionsKt.terminateCollectionToArray(this.length, destination); | |
+ } | |
+ } | |
+ | |
+ public override fun toArray(): Array<Any?> { | |
+ this.checkForComodification(); | |
+ return ArraysKt.copyOfRange(this.array, this.offset, this.offset + this.length); | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ this.checkForComodification(); | |
+ return other === this || other is List && this.contentEquals(other as List<?>); | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ this.checkForComodification(); | |
+ return ListBuilderKt.access$subarrayContentHashCode(this.array, this.offset, this.length); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ this.checkForComodification(); | |
+ return ListBuilderKt.access$subarrayContentToString(this.array, this.offset, this.length, this); | |
+ } | |
+ | |
+ private fun registerModification() { | |
+ this.modCount++; | |
+ } | |
+ | |
+ private fun checkForComodification() { | |
+ if (this.root != null && this.root.modCount != this.modCount) { | |
+ throw new ConcurrentModificationException(); | |
+ } | |
+ } | |
+ | |
+ private fun checkIsMutable() { | |
+ if (this.isEffectivelyReadOnly()) { | |
+ throw new UnsupportedOperationException(); | |
+ } | |
+ } | |
+ | |
+ private fun ensureExtraCapacity(n: Int) { | |
+ this.ensureCapacityInternal(this.length + n); | |
+ } | |
+ | |
+ private fun ensureCapacityInternal(minCapacity: Int) { | |
+ if (minCapacity < 0) { | |
+ throw new OutOfMemoryError(); | |
+ } else { | |
+ if (minCapacity > this.array.length) { | |
+ this.array = ListBuilderKt.copyOfUninitializedElements(this.array, AbstractList.Companion.newCapacity$kotlin_stdlib(this.array.length, minCapacity)); | |
+ } | |
+ } | |
+ } | |
+ | |
+ private fun contentEquals(other: kotlin.collections.List<*>): Boolean { | |
+ return ListBuilderKt.access$subarrayContentEquals(this.array, this.offset, this.length, other); | |
+ } | |
+ | |
+ private fun insertAtInternal(i: Int, n: Int) { | |
+ this.ensureExtraCapacity(n); | |
+ ArraysKt.copyInto(this.array, this.array, i + n, i, this.offset + this.length); | |
+ this.length += n; | |
+ } | |
+ | |
+ private fun addAtInternal(i: Int, element: Any) { | |
+ this.registerModification(); | |
+ if (this.backing != null) { | |
+ this.backing.addAtInternal(i, (E)element); | |
+ this.array = this.backing.array; | |
+ var var3: Int = this.length++; | |
+ } else { | |
+ this.insertAtInternal(i, 1); | |
+ this.array[i] = (E)element; | |
+ } | |
+ } | |
+ | |
+ private fun addAllInternal(i: Int, elements: Collection<Any>, n: Int) { | |
+ this.registerModification(); | |
+ if (this.backing != null) { | |
+ this.backing.addAllInternal(i, elements, n); | |
+ this.array = this.backing.array; | |
+ this.length += n; | |
+ } else { | |
+ this.insertAtInternal(i, n); | |
+ var j: Int = 0; | |
+ | |
+ for (Iterator it = elements.iterator(); j < n; j++) { | |
+ this.array[i + j] = (E)it.next(); | |
+ } | |
+ } | |
+ } | |
+ | |
+ private fun removeAtInternal(i: Int): Any { | |
+ this.registerModification(); | |
+ if (this.backing != null) { | |
+ var var7: Any = this.backing.removeAtInternal(i); | |
+ this.length += -1; | |
+ return (E)var7; | |
+ } else { | |
+ var old: Any = this.array[i]; | |
+ ArraysKt.copyInto(this.array, this.array, i, i + 1, this.offset + this.length); | |
+ ListBuilderKt.resetAt(this.array, this.offset + this.length - 1); | |
+ this.length += -1; | |
+ return (E)old; | |
+ } | |
+ } | |
+ | |
+ private fun removeRangeInternal(rangeOffset: Int, rangeLength: Int) { | |
+ if (rangeLength > 0) { | |
+ this.registerModification(); | |
+ } | |
+ | |
+ if (this.backing != null) { | |
+ this.backing.removeRangeInternal(rangeOffset, rangeLength); | |
+ } else { | |
+ ArraysKt.copyInto(this.array, this.array, rangeOffset, rangeOffset + rangeLength, this.length); | |
+ ListBuilderKt.resetRange(this.array, this.length - rangeLength, this.length); | |
+ } | |
+ | |
+ this.length -= rangeLength; | |
+ } | |
+ | |
+ private fun retainOrRemoveAllInternal(rangeOffset: Int, rangeLength: Int, elements: Collection<Any>, retain: Boolean): Int { | |
+ var var10000: Int; | |
+ if (this.backing != null) { | |
+ var10000 = this.backing.retainOrRemoveAllInternal(rangeOffset, rangeLength, elements, retain); | |
+ } else { | |
+ var i: Int = 0; | |
+ var j: Int = 0; | |
+ | |
+ while (i < rangeLength) { | |
+ if (elements.contains(this.array[rangeOffset + i]) == retain) { | |
+ this.array[rangeOffset + j++] = this.array[rangeOffset + i++]; | |
+ } else { | |
+ i++; | |
+ } | |
+ } | |
+ | |
+ var removed: Int = rangeLength - j; | |
+ ArraysKt.copyInto(this.array, this.array, rangeOffset + j, rangeOffset + rangeLength, this.length); | |
+ ListBuilderKt.resetRange(this.array, this.length - removed, this.length); | |
+ var10000 = removed; | |
+ } | |
+ | |
+ if (var10000 > 0) { | |
+ this.registerModification(); | |
+ } | |
+ | |
+ this.length -= var10000; | |
+ return var10000; | |
+ } | |
+ | |
+ @JvmStatic | |
+ fun { | |
+ var var0: ListBuilder = new ListBuilder(0); | |
+ var0.isReadOnly = true; | |
+ Empty = var0; | |
+ } | |
+ | |
+ private companion object Companion private constructor() { | |
+ private final val Empty: ListBuilder<Nothing> | |
+ | |
+ } | |
+ | |
+ @SourceDebugExtension(["SMAP\nListBuilder.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ListBuilder.kt\nkotlin/collections/builders/ListBuilder$Itr\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,487:1\n1#2:488\n*E\n"]) | |
+ private class Itr<E> : ListIterator<E>, KMutableListIterator { | |
+ private ListBuilder<E> list; | |
+ | |
+ private final var expectedModCount: Int | |
+ private final var index: Int | |
+ private final var lastIndex: Int | |
+ private final val list: ListBuilder<Any> | |
+ | |
+ public constructor(list: ListBuilder<Any>, index: Int) { | |
+ this.list = list; | |
+ this.index = index; | |
+ this.lastIndex = -1; | |
+ this.expectedModCount = ListBuilder.access$getModCount$p$s-2084097795(list); | |
+ } | |
+ | |
+ public override fun hasPrevious(): Boolean { | |
+ return this.index > 0; | |
+ } | |
+ | |
+ public override operator fun hasNext(): Boolean { | |
+ return this.index < ListBuilder.access$getLength$p(this.list); | |
+ } | |
+ | |
+ public override fun previousIndex(): Int { | |
+ return this.index - 1; | |
+ } | |
+ | |
+ public override fun nextIndex(): Int { | |
+ return this.index; | |
+ } | |
+ | |
+ public override fun previous(): Any { | |
+ this.checkForComodification(); | |
+ if (this.index <= 0) { | |
+ throw new NoSuchElementException(); | |
+ } else { | |
+ this.index += -1; | |
+ this.lastIndex = this.index; | |
+ return (E)ListBuilder.access$getArray$p(this.list)[ListBuilder.access$getOffset$p(this.list) + this.lastIndex]; | |
+ } | |
+ } | |
+ | |
+ public override operator fun next(): Any { | |
+ this.checkForComodification(); | |
+ if (this.index >= ListBuilder.access$getLength$p(this.list)) { | |
+ throw new NoSuchElementException(); | |
+ } else { | |
+ this.lastIndex = this.index++; | |
+ return (E)ListBuilder.access$getArray$p(this.list)[ListBuilder.access$getOffset$p(this.list) + this.lastIndex]; | |
+ } | |
+ } | |
+ | |
+ public override fun set(element: Any) { | |
+ this.checkForComodification(); | |
+ if (this.lastIndex == -1) { | |
+ throw new IllegalStateException("Call next() or previous() before replacing element from the iterator.".toString()); | |
+ } else { | |
+ this.list.set(this.lastIndex, (E)element); | |
+ } | |
+ } | |
+ | |
+ public override fun add(element: Any) { | |
+ this.checkForComodification(); | |
+ this.list.add(this.index++, (E)element); | |
+ this.lastIndex = -1; | |
+ this.expectedModCount = ListBuilder.access$getModCount$p$s-2084097795(this.list); | |
+ } | |
+ | |
+ public override fun remove() { | |
+ this.checkForComodification(); | |
+ if (this.lastIndex == -1) { | |
+ throw new IllegalStateException("Call next() or previous() before removing element from the iterator.".toString()); | |
+ } else { | |
+ this.list.remove(this.lastIndex); | |
+ this.index = this.lastIndex; | |
+ this.lastIndex = -1; | |
+ this.expectedModCount = ListBuilder.access$getModCount$p$s-2084097795(this.list); | |
+ } | |
+ } | |
+ | |
+ private fun checkForComodification() { | |
+ if (ListBuilder.access$getModCount$p$s-2084097795(this.list) != this.expectedModCount) { | |
+ throw new ConcurrentModificationException(); | |
+ } | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/collections/IndexedValue.java decomp-fixes/kotlin/collections/IndexedValue.java | |
--- decomp-current/kotlin/collections/IndexedValue.java 2024-01-21 17:29:18.463298900 -0600 | |
+++ decomp-fixes/kotlin/collections/IndexedValue.java 2024-01-21 17:27:28.943408100 -0600 | |
@@ -1,10 +1,46 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.collections | |
+ | |
+data class IndexedValue<T>(index: Int, value: Any) { | |
+ public final val index: Int | |
+ public final val value: Any | |
+ | |
+ init { | |
+ this.index = index; | |
+ this.value = (T)value; | |
+ } | |
+ | |
+ public operator fun component1(): Int { | |
+ return this.index; | |
+ } | |
+ | |
+ public operator fun component2(): Any { | |
+ return this.value; | |
+ } | |
+ | |
+ public fun copy(index: Int, value: Any): IndexedValue<Any> { | |
+ return new IndexedValue<>(index, (T)value); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return "IndexedValue(index=" + this.index + ", value=" + this.value + ')'; | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return Integer.hashCode(this.index) * 31 + (if (this.value == null) 0 else this.value.hashCode()); | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ if (this === other) { | |
+ return true; | |
+ } else if (other !is IndexedValue) { | |
+ return false; | |
+ } else { | |
+ var var2: IndexedValue = other as IndexedValue; | |
+ if (this.index != (other as IndexedValue).index) { | |
+ return false; | |
+ } else { | |
+ return this.value == var2.value; | |
+ } | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/contracts/ContractBuilder.java decomp-fixes/kotlin/contracts/ContractBuilder.java | |
--- decomp-current/kotlin/contracts/ContractBuilder.java 2024-01-21 17:29:18.485777500 -0600 | |
+++ decomp-fixes/kotlin/contracts/ContractBuilder.java 2024-01-21 17:27:28.967257700 -0600 | |
@@ -1,15 +1,28 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NumberFormatException: For input string: "" | |
- at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) | |
- at java.base/java.lang.Integer.parseInt(Integer.java:671) | |
- at java.base/java.lang.Integer.parseInt(Integer.java:777) | |
- at org.vineflower.kotlin.util.KTypes.getJavaSignature(KTypes.java:102) | |
- at org.vineflower.kotlin.struct.KType.from(KType.java:66) | |
- at org.vineflower.kotlin.struct.KFunction.parse(KFunction.java:118) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:223) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.contracts | |
+ | |
+import kotlin.internal.ContractsDsl | |
+ | |
+@ContractsDsl | |
+@ExperimentalContracts | |
+@SinceKotlin(version = "1.3") | |
+interface ContractBuilder { | |
+ @ContractsDsl | |
+ public abstract fun returns(): Returns { | |
+ } | |
+ | |
+ @ContractsDsl | |
+ public abstract fun returns(value: Any?): Returns { | |
+ } | |
+ | |
+ @ContractsDsl | |
+ public abstract fun returnsNotNull(): ReturnsNotNull { | |
+ } | |
+ | |
+ @ContractsDsl | |
+ public abstract fun <R> callsInPlace(lambda: () -> R, kind: InvocationKind): CallsInPlace { | |
+ } | |
+ | |
+ // $VF: Class flags could not be determined | |
+ internal class DefaultImpls { | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/InitializedLazyImpl.java decomp-fixes/kotlin/InitializedLazyImpl.java | |
--- decomp-current/kotlin/InitializedLazyImpl.java 2024-01-21 17:29:18.414940500 -0600 | |
+++ decomp-fixes/kotlin/InitializedLazyImpl.java 2024-01-21 17:27:28.894215200 -0600 | |
@@ -1,10 +1,19 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+import java.io.Serializable | |
+ | |
+internal class InitializedLazyImpl<T>(value: Any) : Lazy<T>, Serializable { | |
+ public open val value: Any | |
+ | |
+ init { | |
+ this.value = (T)value; | |
+ } | |
+ | |
+ public override fun isInitialized(): Boolean { | |
+ return true; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return java.lang.String.valueOf(this.getValue()); | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/io/path/PathsKt__PathReadWriteKt.java decomp-fixes/kotlin/io/path/PathsKt__PathReadWriteKt.java | |
--- decomp-current/kotlin/io/path/PathsKt__PathReadWriteKt.java 2024-01-21 17:29:18.610567800 -0600 | |
+++ decomp-fixes/kotlin/io/path/PathsKt__PathReadWriteKt.java 2024-01-21 17:27:29.109706700 -0600 | |
@@ -1,11 +1,336 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 8 out of bounds for length 1 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.jetbrains.java.decompiler.struct.attr.StructExceptionsAttribute.getExcClassname(StructExceptionsAttribute.java:32) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.io.path | |
+ | |
+import java.io.BufferedReader | |
+import java.io.BufferedWriter | |
+import java.io.Closeable | |
+import java.io.InputStream | |
+import java.io.InputStreamReader | |
+import java.io.OutputStream | |
+import java.io.OutputStreamWriter | |
+import java.io.Writer | |
+import java.nio.charset.Charset | |
+import java.nio.file.Files | |
+import java.nio.file.OpenOption | |
+import java.nio.file.Path | |
+import java.nio.file.StandardOpenOption | |
+import java.util.Arrays | |
+import kotlin.internal.InlineOnly | |
+import kotlin.internal.PlatformImplementationsKt | |
+import kotlin.jvm.internal.InlineMarker | |
+import kotlin.jvm.internal.SourceDebugExtension | |
+ | |
+@SourceDebugExtension(["SMAP\nPathReadWrite.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathReadWrite.kt\nkotlin/io/path/PathsKt__PathReadWriteKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 ReadWrite.kt\nkotlin/io/TextStreamsKt\n+ 4 _Sequences.kt\nkotlin/sequences/SequencesKt___SequencesKt\n*L\n1#1,326:1\n1#2:327\n1#2:329\n52#3:328\n1313#4,2:330\n*S KotlinDebug\n*F\n+ 1 PathReadWrite.kt\nkotlin/io/path/PathsKt__PathReadWriteKt\n*L\n202#1:329\n202#1:328\n202#1:330,2\n*E\n"]) | |
+// $VF: Class flags could not be determined | |
+internal class PathsKt__PathReadWriteKt { | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.reader(charset: Charset, vararg options: OpenOption): InputStreamReader { | |
+ return new InputStreamReader(Files.newInputStream(`$this$reader`, Arrays.copyOf(options, options.length)), charset); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.bufferedReader(charset: Charset, bufferSize: Int, vararg options: OpenOption): BufferedReader { | |
+ return new BufferedReader( | |
+ new InputStreamReader(Files.newInputStream(`$this$bufferedReader`, Arrays.copyOf(options, options.length)), charset), bufferSize | |
+ ); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.writer(charset: Charset, vararg options: OpenOption): OutputStreamWriter { | |
+ return new OutputStreamWriter(Files.newOutputStream(`$this$writer`, Arrays.copyOf(options, options.length)), charset); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.bufferedWriter(charset: Charset, bufferSize: Int, vararg options: OpenOption): BufferedWriter { | |
+ return new BufferedWriter( | |
+ new OutputStreamWriter(Files.newOutputStream(`$this$bufferedWriter`, Arrays.copyOf(options, options.length)), charset), bufferSize | |
+ ); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.readBytes(): ByteArray { | |
+ var var10000: ByteArray = Files.readAllBytes(`$this$readBytes`); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.writeBytes(array: ByteArray, vararg options: OpenOption) { | |
+ Files.write(`$this$writeBytes`, array, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.appendBytes(array: ByteArray) { | |
+ Files.write(`$this$appendBytes`, array, StandardOpenOption.APPEND); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun Path.readText(charset: Charset): String { | |
+ label19: { | |
+ var var3: Array<OpenOption> = new OpenOption[0]; | |
+ var var2: Closeable = new InputStreamReader(Files.newInputStream(`$this$readText`, Arrays.copyOf(var3, var3.length)), charset); | |
+ var var10: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ try { | |
+ var var11: java.lang.String = TextStreamsKt.readText(var2 as InputStreamReader); | |
+ } catch (java.lang.Throwable var6) { | |
+ var10 = var6; | |
+ throw var6; | |
+ } | |
+ } catch (java.lang.Throwable var7) { | |
+ CloseableKt.closeFinally(var2, var10); | |
+ } | |
+ | |
+ CloseableKt.closeFinally(var2, null); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun Path.writeText(text: CharSequence, charset: Charset, vararg options: OpenOption) { | |
+ label19: { | |
+ var var10000: OutputStream = Files.newOutputStream(`$this$writeText`, Arrays.copyOf(options, options.length)); | |
+ var var12: Closeable = new OutputStreamWriter(var10000, charset); | |
+ var var5: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ try { | |
+ var var13: Writer = (var12 as OutputStreamWriter).append(text); | |
+ } catch (java.lang.Throwable var8) { | |
+ var5 = var8; | |
+ throw var8; | |
+ } | |
+ } catch (java.lang.Throwable var9) { | |
+ CloseableKt.closeFinally(var12, var5); | |
+ } | |
+ | |
+ CloseableKt.closeFinally(var12, null); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun Path.appendText(text: CharSequence, charset: Charset) { | |
+ label19: { | |
+ var var10000: OutputStream = Files.newOutputStream(`$this$appendText`, StandardOpenOption.APPEND); | |
+ var var11: Closeable = new OutputStreamWriter(var10000, charset); | |
+ var var12: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ try { | |
+ var var13: Writer = (var11 as OutputStreamWriter).append(text); | |
+ } catch (java.lang.Throwable var7) { | |
+ var12 = var7; | |
+ throw var7; | |
+ } | |
+ } catch (java.lang.Throwable var8) { | |
+ CloseableKt.closeFinally(var11, var12); | |
+ } | |
+ | |
+ CloseableKt.closeFinally(var11, null); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.forEachLine(charset: Charset, action: (String) -> Unit) { | |
+ label47: { | |
+ var var10000: BufferedReader = Files.newBufferedReader(`$this$forEachLine`, charset); | |
+ var var5: Closeable = var10000 as BufferedReader; | |
+ var var6: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ var var13: <unknown>; | |
+ try { | |
+ while (var13.hasNext()) { | |
+ action.invoke(var13.next()); | |
+ } | |
+ } catch (java.lang.Throwable var16) { | |
+ var6 = var16; | |
+ throw var16; | |
+ } | |
+ } catch (java.lang.Throwable var17) { | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var5, var6); | |
+ } else if (var6 == null) { | |
+ var5.close(); | |
+ } else { | |
+ try { | |
+ var5.close(); | |
+ } catch (java.lang.Throwable var15) { | |
+ } | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ } | |
+ | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var5, null); | |
+ } else { | |
+ var5.close(); | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.inputStream(vararg options: OpenOption): InputStream { | |
+ var var10000: InputStream = Files.newInputStream(`$this$inputStream`, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.outputStream(vararg options: OpenOption): OutputStream { | |
+ var var10000: OutputStream = Files.newOutputStream(`$this$outputStream`, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.readLines(charset: Charset): List<String> { | |
+ var var10000: java.util.List = Files.readAllLines(`$this$readLines`, charset); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun <T> Path.useLines(charset: Charset, block: (Sequence<String>) -> T): T { | |
+ label42: { | |
+ var var3: Closeable = Files.newBufferedReader(`$this$useLines`, charset); | |
+ var var4: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ try { | |
+ ; | |
+ } catch (java.lang.Throwable var8) { | |
+ var4 = var8; | |
+ throw var8; | |
+ } | |
+ } catch (java.lang.Throwable var9) { | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var3, var4); | |
+ } else if (var3 != null) { | |
+ if (var4 == null) { | |
+ var3.close(); | |
+ } else { | |
+ try { | |
+ var3.close(); | |
+ } catch (java.lang.Throwable var7) { | |
+ } | |
+ } | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ } | |
+ | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var3, null); | |
+ } else if (var3 != null) { | |
+ var3.close(); | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ var it: Any; | |
+ return (T)it; | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.writeLines(lines: Iterable<CharSequence>, charset: Charset, vararg options: OpenOption): Path { | |
+ var var10000: Path = Files.write(`$this$writeLines`, lines, charset, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.writeLines(lines: Sequence<CharSequence>, charset: Charset, vararg options: OpenOption): Path { | |
+ var var10000: Path = Files.write(`$this$writeLines`, SequencesKt.asIterable(lines), charset, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.appendLines(lines: Iterable<CharSequence>, charset: Charset): Path { | |
+ var var10000: Path = Files.write(`$this$appendLines`, lines, charset, StandardOpenOption.APPEND); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.appendLines(lines: Sequence<CharSequence>, charset: Charset): Path { | |
+ var var10000: Path = Files.write(`$this$appendLines`, SequencesKt.asIterable(lines), charset, StandardOpenOption.APPEND); | |
+ return var10000; | |
+ } | |
+ | |
+ open fun PathsKt__PathReadWriteKt() { | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/io/path/PathsKt__PathUtilsKt.java decomp-fixes/kotlin/io/path/PathsKt__PathUtilsKt.java | |
--- decomp-current/kotlin/io/path/PathsKt__PathUtilsKt.java 2024-01-21 17:29:18.611567100 -0600 | |
+++ decomp-fixes/kotlin/io/path/PathsKt__PathUtilsKt.java 2024-01-21 17:27:29.110706600 -0600 | |
@@ -1,11 +1,746 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 178 out of bounds for length 1 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.jetbrains.java.decompiler.struct.attr.StructExceptionsAttribute.getExcClassname(StructExceptionsAttribute.java:32) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.io.path | |
+ | |
+import java.io.Closeable | |
+import java.net.URI | |
+import java.nio.file.CopyOption | |
+import java.nio.file.DirectoryStream | |
+import java.nio.file.FileAlreadyExistsException | |
+import java.nio.file.FileStore | |
+import java.nio.file.FileVisitOption | |
+import java.nio.file.FileVisitor | |
+import java.nio.file.Files | |
+import java.nio.file.LinkOption | |
+import java.nio.file.Path | |
+import java.nio.file.Paths | |
+import java.nio.file.StandardCopyOption | |
+import java.nio.file.attribute.FileAttribute | |
+import java.nio.file.attribute.FileTime | |
+import java.nio.file.attribute.PosixFilePermission | |
+import java.nio.file.attribute.UserPrincipal | |
+import java.util.Arrays | |
+import kotlin.contracts.InvocationKind | |
+import kotlin.internal.InlineOnly | |
+import kotlin.internal.PlatformImplementationsKt | |
+import kotlin.jvm.internal.InlineMarker | |
+import kotlin.jvm.internal.SourceDebugExtension | |
+ | |
+@SourceDebugExtension(["SMAP\nPathUtils.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathUtils.kt\nkotlin/io/path/PathsKt__PathUtilsKt\n+ 2 ArrayIntrinsics.kt\nkotlin/ArrayIntrinsicsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,1174:1\n26#2:1175\n26#2:1179\n1#3:1176\n1855#4,2:1177\n*S KotlinDebug\n*F\n+ 1 PathUtils.kt\nkotlin/io/path/PathsKt__PathUtilsKt\n*L\n221#1:1175\n616#1:1179\n440#1:1177,2\n*E\n"]) | |
+// $VF: Class flags could not be determined | |
+internal class PathsKt__PathUtilsKt : PathsKt__PathRecursiveFunctionsKt { | |
+ public final val extension: String | |
+ public final get() { | |
+ var var10000: Path = `$this$extension`.getFileName(); | |
+ if (var10000 != null) { | |
+ var var1: java.lang.String = var10000.toString(); | |
+ if (var1 != null) { | |
+ var var2: java.lang.String = StringsKt.substringAfterLast(var1, '.', ""); | |
+ if (var2 != null) { | |
+ return var2; | |
+ } | |
+ } | |
+ } | |
+ | |
+ return ""; | |
+ } | |
+ | |
+ public final val invariantSeparatorsPath: String | |
+ public final inline get() { | |
+ return PathsKt.getInvariantSeparatorsPathString(`$this$invariantSeparatorsPath`); | |
+ } | |
+ | |
+ public final val invariantSeparatorsPathString: String | |
+ public final get() { | |
+ var separator: java.lang.String = `$this$invariantSeparatorsPathString`.getFileSystem().getSeparator(); | |
+ var var2: java.lang.String; | |
+ if (!(separator == "/")) { | |
+ var2 = `$this$invariantSeparatorsPathString`.toString(); | |
+ var2 = StringsKt.replace$default(var2, separator, "/", false, 4, null); | |
+ } else { | |
+ var2 = `$this$invariantSeparatorsPathString`.toString(); | |
+ } | |
+ | |
+ return var2; | |
+ } | |
+ | |
+ public final val name: String | |
+ public final get() { | |
+ var var10000: Path = `$this$name`.getFileName(); | |
+ var var1: java.lang.String = if (var10000 != null) var10000.toString() else null; | |
+ if (var1 == null) { | |
+ var1 = ""; | |
+ } | |
+ | |
+ return var1; | |
+ } | |
+ | |
+ public final val nameWithoutExtension: String | |
+ public final get() { | |
+ var var10000: Path = `$this$nameWithoutExtension`.getFileName(); | |
+ if (var10000 != null) { | |
+ var var1: java.lang.String = var10000.toString(); | |
+ if (var1 != null) { | |
+ var var2: java.lang.String = StringsKt.substringBeforeLast$default(var1, ".", null, 2, null); | |
+ if (var2 != null) { | |
+ return var2; | |
+ } | |
+ } | |
+ } | |
+ | |
+ return ""; | |
+ } | |
+ | |
+ public final val pathString: String | |
+ public final inline get() { | |
+ return `$this$pathString`.toString(); | |
+ } | |
+ | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.absolute(): Path { | |
+ var var10000: Path = `$this$absolute`.toAbsolutePath(); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.absolutePathString(): String { | |
+ return `$this$absolutePathString`.toAbsolutePath().toString(); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @JvmStatic | |
+ public fun Path.relativeTo(base: Path): Path { | |
+ try { | |
+ return PathRelativizer.INSTANCE.tryRelativeTo(`$this$relativeTo`, base); | |
+ } catch (IllegalArgumentException var4) { | |
+ throw new IllegalArgumentException(var4.getMessage() + "\nthis path: " + `$this$relativeTo` + "\nbase path: " + base, var4); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @JvmStatic | |
+ public fun Path.relativeToOrSelf(base: Path): Path { | |
+ var var10000: Path = PathsKt.relativeToOrNull(`$this$relativeToOrSelf`, base); | |
+ if (var10000 == null) { | |
+ var10000 = `$this$relativeToOrSelf`; | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @JvmStatic | |
+ public fun Path.relativeToOrNull(base: Path): Path? { | |
+ var var2: Path; | |
+ try { | |
+ var2 = PathRelativizer.INSTANCE.tryRelativeTo(`$this$relativeToOrNull`, base); | |
+ } catch (IllegalArgumentException var4) { | |
+ var2 = null; | |
+ } | |
+ | |
+ return var2; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.copyTo(target: Path, overwrite: Boolean): Path { | |
+ var var10000: Array<CopyOption> = if (overwrite) new CopyOption[]{StandardCopyOption.REPLACE_EXISTING} else new CopyOption[0]; | |
+ var var6: Path = Files.copy(`$this$copyTo`, target, Arrays.copyOf(var10000, var10000.length)); | |
+ return var6; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.copyTo(target: Path, vararg options: CopyOption): Path { | |
+ var var10000: Path = Files.copy(`$this$copyTo`, target, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.exists(vararg options: LinkOption): Boolean { | |
+ return Files.exists(`$this$exists`, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.notExists(vararg options: LinkOption): Boolean { | |
+ return Files.notExists(`$this$notExists`, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.isRegularFile(vararg options: LinkOption): Boolean { | |
+ return Files.isRegularFile(`$this$isRegularFile`, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.isDirectory(vararg options: LinkOption): Boolean { | |
+ return Files.isDirectory(`$this$isDirectory`, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.isSymbolicLink(): Boolean { | |
+ return Files.isSymbolicLink(`$this$isSymbolicLink`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.isExecutable(): Boolean { | |
+ return Files.isExecutable(`$this$isExecutable`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.isHidden(): Boolean { | |
+ return Files.isHidden(`$this$isHidden`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.isReadable(): Boolean { | |
+ return Files.isReadable(`$this$isReadable`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path.isWritable(): Boolean { | |
+ return Files.isWritable(`$this$isWritable`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.isSameFileAs(other: Path): Boolean { | |
+ return Files.isSameFile(`$this$isSameFileAs`, other); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun Path.listDirectoryEntries(glob: String): List<Path> { | |
+ label19: { | |
+ var var2: Closeable = Files.newDirectoryStream(`$this$listDirectoryEntries`, glob); | |
+ var var3: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ try { | |
+ var it: DirectoryStream = var2 as DirectoryStream; | |
+ var var10: java.util.List = CollectionsKt.toList(it); | |
+ } catch (java.lang.Throwable var6) { | |
+ var3 = var6; | |
+ throw var6; | |
+ } | |
+ } catch (java.lang.Throwable var7) { | |
+ CloseableKt.closeFinally(var2, var3); | |
+ } | |
+ | |
+ CloseableKt.closeFinally(var2, null); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun <T> Path.useDirectoryEntries(glob: String, block: (Sequence<Path>) -> T): T { | |
+ label42: { | |
+ var var3: Closeable = Files.newDirectoryStream(`$this$useDirectoryEntries`, glob); | |
+ var var4: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ try { | |
+ ; | |
+ } catch (java.lang.Throwable var8) { | |
+ var4 = var8; | |
+ throw var8; | |
+ } | |
+ } catch (java.lang.Throwable var9) { | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var3, var4); | |
+ } else if (var3 != null) { | |
+ if (var4 == null) { | |
+ var3.close(); | |
+ } else { | |
+ try { | |
+ var3.close(); | |
+ } catch (java.lang.Throwable var7) { | |
+ } | |
+ } | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ } | |
+ | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var3, null); | |
+ } else if (var3 != null) { | |
+ var3.close(); | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ var it: Any; | |
+ return (T)it; | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.forEachDirectoryEntry(glob: String, action: (Path) -> Unit) { | |
+ label51: { | |
+ var var3: Closeable = Files.newDirectoryStream(`$this$forEachDirectoryEntry`, glob); | |
+ var var4: java.lang.Throwable = null; | |
+ | |
+ try { | |
+ var var9: <unknown>; | |
+ try { | |
+ while (var9.hasNext()) { | |
+ action.invoke(var9.next()); | |
+ } | |
+ } catch (java.lang.Throwable var12) { | |
+ var4 = var12; | |
+ throw var12; | |
+ } | |
+ } catch (java.lang.Throwable var13) { | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var3, var4); | |
+ } else if (var3 != null) { | |
+ if (var4 == null) { | |
+ var3.close(); | |
+ } else { | |
+ try { | |
+ var3.close(); | |
+ } catch (java.lang.Throwable var11) { | |
+ } | |
+ } | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ } | |
+ | |
+ InlineMarker.finallyStart(1); | |
+ if (PlatformImplementationsKt.apiVersionIsAtLeast(1, 1, 0)) { | |
+ CloseableKt.closeFinally(var3, null); | |
+ } else if (var3 != null) { | |
+ var3.close(); | |
+ } | |
+ | |
+ InlineMarker.finallyEnd(1); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.fileSize(): Long { | |
+ return Files.size(`$this$fileSize`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.deleteExisting() { | |
+ Files.delete(`$this$deleteExisting`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.deleteIfExists(): Boolean { | |
+ return Files.deleteIfExists(`$this$deleteIfExists`); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.createDirectory(vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path = Files.createDirectory(`$this$createDirectory`, Arrays.copyOf(attributes, attributes.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.createDirectories(vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path = Files.createDirectories(`$this$createDirectories`, Arrays.copyOf(attributes, attributes.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.9") | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun Path.createParentDirectories(vararg attributes: FileAttribute<*>): Path { | |
+ var parent: Path = `$this$createParentDirectories`.getParent(); | |
+ if (parent != null) { | |
+ var var10001: Array<LinkOption> = new LinkOption[0]; | |
+ if (!Files.isDirectory(parent, Arrays.copyOf(var10001, var10001.length))) { | |
+ try { | |
+ var var9: Array<FileAttribute> = Arrays.copyOf(attributes, attributes.length); | |
+ } catch (FileAlreadyExistsException var7) { | |
+ var10001 = new LinkOption[0]; | |
+ if (!Files.isDirectory(parent, Arrays.copyOf(var10001, var10001.length))) { | |
+ throw var7; | |
+ } | |
+ } | |
+ } | |
+ } | |
+ | |
+ return `$this$createParentDirectories`; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.moveTo(target: Path, vararg options: CopyOption): Path { | |
+ var var10000: Path = Files.move(`$this$moveTo`, target, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.moveTo(target: Path, overwrite: Boolean): Path { | |
+ var var10000: Array<CopyOption> = if (overwrite) new CopyOption[]{StandardCopyOption.REPLACE_EXISTING} else new CopyOption[0]; | |
+ var var6: Path = Files.move(`$this$moveTo`, target, Arrays.copyOf(var10000, var10000.length)); | |
+ return var6; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.fileStore(): FileStore { | |
+ var var10000: FileStore = Files.getFileStore(`$this$fileStore`); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.getAttribute(attribute: String, vararg options: LinkOption): Any? { | |
+ return Files.getAttribute(`$this$getAttribute`, attribute, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.setAttribute(attribute: String, value: Any?, vararg options: LinkOption): Path { | |
+ var var10000: Path = Files.setAttribute(`$this$setAttribute`, attribute, value, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @PublishedApi | |
+ @JvmStatic | |
+ internal fun fileAttributeViewNotAvailable(path: Path, attributeViewClass: Class<*>): Nothing { | |
+ throw new UnsupportedOperationException("The desired attribute view type " + attributeViewClass + " is not available for the file " + path + '.'); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.readAttributes(attributes: String, vararg options: LinkOption): Map<String, Any?> { | |
+ var var10000: java.util.Map = Files.readAttributes(`$this$readAttributes`, attributes, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.getLastModifiedTime(vararg options: LinkOption): FileTime { | |
+ var var10000: FileTime = Files.getLastModifiedTime(`$this$getLastModifiedTime`, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.setLastModifiedTime(value: FileTime): Path { | |
+ var var10000: Path = Files.setLastModifiedTime(`$this$setLastModifiedTime`, value); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.getOwner(vararg options: LinkOption): UserPrincipal? { | |
+ return Files.getOwner(`$this$getOwner`, Arrays.copyOf(options, options.length)); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.setOwner(value: UserPrincipal): Path { | |
+ var var10000: Path = Files.setOwner(`$this$setOwner`, value); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.getPosixFilePermissions(vararg options: LinkOption): Set<PosixFilePermission> { | |
+ var var10000: java.util.Set = Files.getPosixFilePermissions(`$this$getPosixFilePermissions`, Arrays.copyOf(options, options.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.setPosixFilePermissions(value: Set<PosixFilePermission>): Path { | |
+ var var10000: Path = Files.setPosixFilePermissions(`$this$setPosixFilePermissions`, value); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.createLinkPointingTo(target: Path): Path { | |
+ var var10000: Path = Files.createLink(`$this$createLinkPointingTo`, target); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.createSymbolicLinkPointingTo(target: Path, vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path = Files.createSymbolicLink(`$this$createSymbolicLinkPointingTo`, target, Arrays.copyOf(attributes, attributes.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.readSymbolicLink(): Path { | |
+ var var10000: Path = Files.readSymbolicLink(`$this$readSymbolicLink`); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun Path.createFile(vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path = Files.createFile(`$this$createFile`, Arrays.copyOf(attributes, attributes.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun createTempFile(prefix: String?, suffix: String?, vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path = Files.createTempFile(prefix, suffix, Arrays.copyOf(attributes, attributes.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun createTempFile(directory: Path?, prefix: String?, suffix: String?, vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path; | |
+ if (directory != null) { | |
+ var10000 = Files.createTempFile(directory, prefix, suffix, Arrays.copyOf(attributes, attributes.length)); | |
+ } else { | |
+ var10000 = Files.createTempFile(prefix, suffix, Arrays.copyOf(attributes, attributes.length)); | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public inline fun createTempDirectory(prefix: String?, vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path = Files.createTempDirectory(prefix, Arrays.copyOf(attributes, attributes.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @Throws(java/io/IOException::class) | |
+ @JvmStatic | |
+ public fun createTempDirectory(directory: Path?, prefix: String?, vararg attributes: FileAttribute<*>): Path { | |
+ var var10000: Path; | |
+ if (directory != null) { | |
+ var10000 = Files.createTempDirectory(directory, prefix, Arrays.copyOf(attributes, attributes.length)); | |
+ } else { | |
+ var10000 = Files.createTempDirectory(prefix, Arrays.copyOf(attributes, attributes.length)); | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline operator fun Path.div(other: Path): Path { | |
+ var var10000: Path = `$this$div`.resolve(other); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline operator fun Path.div(other: String): Path { | |
+ var var10000: Path = `$this$div`.resolve(other); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path(path: String): Path { | |
+ var var10000: Path = Paths.get(path); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun Path(base: String, vararg subpaths: String): Path { | |
+ var var10000: Path = Paths.get(base, Arrays.copyOf(subpaths, subpaths.length)); | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.5") | |
+ @WasExperimental(markerClass = [ExperimentalPathApi::class]) | |
+ @InlineOnly | |
+ @JvmStatic | |
+ public inline fun URI.toPath(): Path { | |
+ var var10000: Path = Paths.get(`$this$toPath`); | |
+ return var10000; | |
+ } | |
+ | |
+ @ExperimentalPathApi | |
+ @SinceKotlin(version = "1.7") | |
+ @JvmStatic | |
+ public fun Path.walk(vararg options: PathWalkOption): Sequence<Path> { | |
+ return new PathTreeWalk(`$this$walk`, options); | |
+ } | |
+ | |
+ @ExperimentalPathApi | |
+ @SinceKotlin(version = "1.7") | |
+ @JvmStatic | |
+ public fun Path.visitFileTree(visitor: FileVisitor<Path>, maxDepth: Int, followLinks: Boolean) { | |
+ Files.walkFileTree(`$this$visitFileTree`, if (followLinks) SetsKt.setOf(FileVisitOption.FOLLOW_LINKS) else SetsKt.emptySet(), maxDepth, visitor); | |
+ } | |
+ | |
+ @ExperimentalPathApi | |
+ @SinceKotlin(version = "1.7") | |
+ @JvmStatic | |
+ public fun Path.visitFileTree(maxDepth: Int, followLinks: Boolean, builderAction: (FileVisitorBuilder) -> Unit) { | |
+ contract { | |
+ callsInPlace(builderAction, InvocationKind.EXACTLY_ONCE) | |
+ } | |
+ | |
+ PathsKt.visitFileTree(`$this$visitFileTree`, PathsKt.fileVisitor(builderAction), maxDepth, followLinks); | |
+ } | |
+ | |
+ @ExperimentalPathApi | |
+ @SinceKotlin(version = "1.7") | |
+ @JvmStatic | |
+ public fun fileVisitor(builderAction: (FileVisitorBuilder) -> Unit): FileVisitor<Path> { | |
+ contract { | |
+ callsInPlace(builderAction, InvocationKind.EXACTLY_ONCE) | |
+ } | |
+ | |
+ var var1: FileVisitorBuilderImpl = new FileVisitorBuilderImpl(); | |
+ builderAction.invoke(var1); | |
+ return var1.build(); | |
+ } | |
+ | |
+ open fun PathsKt__PathUtilsKt() { | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/jvm/internal/ClassReference.java decomp-fixes/kotlin/jvm/internal/ClassReference.java | |
--- decomp-current/kotlin/jvm/internal/ClassReference.java 2024-01-21 17:29:18.534234600 -0600 | |
+++ decomp-fixes/kotlin/jvm/internal/ClassReference.java 2024-01-21 17:27:29.027452400 -0600 | |
@@ -1,18 +1,402 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NumberFormatException: For input string: "" | |
- at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) | |
- at java.base/java.lang.Integer.parseInt(Integer.java:671) | |
- at java.base/java.lang.Integer.parseInt(Integer.java:777) | |
- at org.vineflower.kotlin.util.KTypes.getJavaSignature(KTypes.java:102) | |
- at org.vineflower.kotlin.struct.KType.from(KType.java:66) | |
- at org.vineflower.kotlin.struct.KType.from(KType.java:62) | |
- at org.vineflower.kotlin.struct.KType.from(KType.java:62) | |
- at org.vineflower.kotlin.struct.KProperty.parse(KProperty.java:267) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:222) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:405) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.jvm.internal | |
+ | |
+import java.lang.reflect.Constructor | |
+import java.lang.reflect.Method | |
+import java.util.ArrayList | |
+import java.util.HashMap | |
+import java.util.LinkedHashMap | |
+import java.util.Map | |
+import java.util.Map.Entry | |
+import kotlin.jvm.functions.Function0 | |
+import kotlin.jvm.functions.Function1 | |
+import kotlin.jvm.functions.Function10 | |
+import kotlin.jvm.functions.Function11 | |
+import kotlin.jvm.functions.Function12 | |
+import kotlin.jvm.functions.Function13 | |
+import kotlin.jvm.functions.Function14 | |
+import kotlin.jvm.functions.Function15 | |
+import kotlin.jvm.functions.Function16 | |
+import kotlin.jvm.functions.Function17 | |
+import kotlin.jvm.functions.Function18 | |
+import kotlin.jvm.functions.Function19 | |
+import kotlin.jvm.functions.Function2 | |
+import kotlin.jvm.functions.Function20 | |
+import kotlin.jvm.functions.Function21 | |
+import kotlin.jvm.functions.Function22 | |
+import kotlin.jvm.functions.Function3 | |
+import kotlin.jvm.functions.Function4 | |
+import kotlin.jvm.functions.Function5 | |
+import kotlin.jvm.functions.Function6 | |
+import kotlin.jvm.functions.Function7 | |
+import kotlin.jvm.functions.Function8 | |
+import kotlin.jvm.functions.Function9 | |
+import kotlin.reflect.KCallable | |
+import kotlin.reflect.KClass | |
+import kotlin.reflect.KFunction | |
+import kotlin.reflect.KType | |
+import kotlin.reflect.KTypeParameter | |
+import kotlin.reflect.KVisibility | |
+ | |
+@SourceDebugExtension(["SMAP\nClassReference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ClassReference.kt\nkotlin/jvm/internal/ClassReference\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 3 Maps.kt\nkotlin/collections/MapsKt__MapsKt\n*L\n1#1,205:1\n1559#2:206\n1590#2,4:207\n1253#2,4:211\n1238#2,4:217\n453#3:215\n403#3:216\n*S KotlinDebug\n*F\n+ 1 ClassReference.kt\nkotlin/jvm/internal/ClassReference\n*L\n107#1:206\n107#1:207,4\n155#1:211,4\n163#1:217,4\n163#1:215\n163#1:216\n*E\n"]) | |
+class ClassReference(jClass: Class<*>) : KClass<Object>, ClassBasedDeclarationContainer { | |
+ @JvmStatic | |
+ public ClassReference.Companion Companion = new ClassReference.Companion(null); | |
+ @JvmStatic | |
+ private Map<Class<? extends Function<?>>, Integer> FUNCTION_CLASSES; | |
+ @JvmStatic | |
+ private HashMap<java.lang.String, java.lang.String> primitiveFqNames; | |
+ @JvmStatic | |
+ private HashMap<java.lang.String, java.lang.String> primitiveWrapperFqNames; | |
+ @JvmStatic | |
+ private HashMap<java.lang.String, java.lang.String> classFqNames; | |
+ @JvmStatic | |
+ private Map<java.lang.String, java.lang.String> simpleNames; | |
+ | |
+ public open val annotations: List<Annotation> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val constructors: Collection<KFunction<Any>> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isAbstract: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isCompanion: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isData: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isFinal: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isFun: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isInner: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isOpen: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isSealed: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val isValue: Boolean | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val jClass: Class<*> | |
+ public open val members: Collection<KCallable<*>> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val nestedClasses: Collection<KClass<*>> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val objectInstance: Any? | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val qualifiedName: String? | |
+ public open get() { | |
+ return Companion.getClassQualifiedName(this.getJClass()); | |
+ } | |
+ | |
+ public open val sealedSubclasses: List<KClass<out Any>> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val simpleName: String? | |
+ public open get() { | |
+ return Companion.getClassSimpleName(this.getJClass()); | |
+ } | |
+ | |
+ public open val supertypes: List<KType> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val typeParameters: List<KTypeParameter> | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ public open val visibility: KVisibility? | |
+ public open get() { | |
+ this.error(); | |
+ throw new KotlinNothingValueException(); | |
+ } | |
+ | |
+ | |
+ init { | |
+ this.jClass = jClass; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.1") | |
+ public override fun isInstance(value: Any?): Boolean { | |
+ return Companion.isInstance(value, this.getJClass()); | |
+ } | |
+ | |
+ private fun error(): Nothing { | |
+ throw new KotlinReflectionNotSupportedError(); | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ return other is ClassReference | |
+ && JvmClassMappingKt.<Object>getJavaObjectType(this as KClass<Object>) == JvmClassMappingKt.getJavaObjectType(other as KClass); | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return JvmClassMappingKt.getJavaObjectType(this as KClass<Object>).hashCode(); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return this.getJClass().toString() + " (Kotlin reflection is not available)"; | |
+ } | |
+ | |
+ @JvmStatic | |
+ fun { | |
+ var var18: java.lang.Iterable = CollectionsKt.listOf( | |
+ new Class[]{ | |
+ Function0::class.java, | |
+ Function1::class.java, | |
+ Function2::class.java, | |
+ Function3::class.java, | |
+ Function4::class.java, | |
+ Function5::class.java, | |
+ Function6::class.java, | |
+ Function7::class.java, | |
+ Function8::class.java, | |
+ Function9::class.java, | |
+ Function10::class.java, | |
+ Function11::class.java, | |
+ Function12::class.java, | |
+ Function13::class.java, | |
+ Function14::class.java, | |
+ Function15::class.java, | |
+ Function16::class.java, | |
+ Function17::class.java, | |
+ Function18::class.java, | |
+ Function19::class.java, | |
+ Function20::class.java, | |
+ Function21::class.java, | |
+ Function22::class.java | |
+ } | |
+ ); | |
+ var `destination$iv$iv`: java.util.Collection = new ArrayList(CollectionsKt.collectionSizeOrDefault(var18, 10)); | |
+ var `$this$associateByTo$iv$iv$iv`: Int = 0; | |
+ | |
+ for (Object item$iv$iv : var18) { | |
+ var `element$iv$iv$iv`: Int = `$this$associateByTo$iv$iv$iv`++; | |
+ if (`element$iv$iv$iv` < 0) { | |
+ CollectionsKt.throwIndexOverflow(); | |
+ } | |
+ | |
+ `destination$iv$iv`.add(TuplesKt.to(`item$iv$iv` as Class<*>, `element$iv$iv$iv`)); | |
+ } | |
+ | |
+ FUNCTION_CLASSES = MapsKt.toMap(`destination$iv$iv`); | |
+ var var19: HashMap = new HashMap(); | |
+ var19.put("boolean", "kotlin.Boolean"); | |
+ var19.put("char", "kotlin.Char"); | |
+ var19.put("byte", "kotlin.Byte"); | |
+ var19.put("short", "kotlin.Short"); | |
+ var19.put("int", "kotlin.Int"); | |
+ var19.put("float", "kotlin.Float"); | |
+ var19.put("long", "kotlin.Long"); | |
+ var19.put("double", "kotlin.Double"); | |
+ primitiveFqNames = var19; | |
+ var var20: HashMap = new HashMap(); | |
+ var20.put("java.lang.Boolean", "kotlin.Boolean"); | |
+ var20.put("java.lang.Character", "kotlin.Char"); | |
+ var20.put("java.lang.Byte", "kotlin.Byte"); | |
+ var20.put("java.lang.Short", "kotlin.Short"); | |
+ var20.put("java.lang.Integer", "kotlin.Int"); | |
+ var20.put("java.lang.Float", "kotlin.Float"); | |
+ var20.put("java.lang.Long", "kotlin.Long"); | |
+ var20.put("java.lang.Double", "kotlin.Double"); | |
+ primitiveWrapperFqNames = var20; | |
+ var var21: HashMap = new HashMap(); | |
+ var var23: HashMap = var21; | |
+ var21.put("java.lang.Object", "kotlin.Any"); | |
+ var21.put("java.lang.String", "kotlin.String"); | |
+ var21.put("java.lang.CharSequence", "kotlin.CharSequence"); | |
+ var21.put("java.lang.Throwable", "kotlin.Throwable"); | |
+ var21.put("java.lang.Cloneable", "kotlin.Cloneable"); | |
+ var21.put("java.lang.Number", "kotlin.Number"); | |
+ var21.put("java.lang.Comparable", "kotlin.Comparable"); | |
+ var21.put("java.lang.Enum", "kotlin.Enum"); | |
+ var21.put("java.lang.annotation.Annotation", "kotlin.Annotation"); | |
+ var21.put("java.lang.Iterable", "kotlin.collections.Iterable"); | |
+ var21.put("java.util.Iterator", "kotlin.collections.Iterator"); | |
+ var21.put("java.util.Collection", "kotlin.collections.Collection"); | |
+ var21.put("java.util.List", "kotlin.collections.List"); | |
+ var21.put("java.util.Set", "kotlin.collections.Set"); | |
+ var21.put("java.util.ListIterator", "kotlin.collections.ListIterator"); | |
+ var21.put("java.util.Map", "kotlin.collections.Map"); | |
+ var21.put("java.util.Map$Entry", "kotlin.collections.Map.Entry"); | |
+ var21.put("kotlin.jvm.internal.StringCompanionObject", "kotlin.String.Companion"); | |
+ var21.put("kotlin.jvm.internal.EnumCompanionObject", "kotlin.Enum.Companion"); | |
+ var21.putAll(primitiveFqNames); | |
+ var21.putAll(primitiveWrapperFqNames); | |
+ | |
+ for (Object element$iv : var27) { | |
+ var var39: Map = var23; | |
+ var var41: java.lang.String = var36 as java.lang.String; | |
+ var var47: StringBuilder = new StringBuilder().append("kotlin.jvm.internal."); | |
+ var var42: Pair = TuplesKt.to( | |
+ var47.append(StringsKt.substringAfterLast$default(var41, '.', null, 2, null)).append("CompanionObject").toString(), var41 + ".Companion" | |
+ ); | |
+ var39.put(var42.getFirst(), var42.getSecond()); | |
+ } | |
+ | |
+ for (Entry var31 : FUNCTION_CLASSES.entrySet()) { | |
+ var23.put((var31.getKey() as Class<*>).getName(), "kotlin.Function" + (var31.getValue() as java.lang.Number).intValue()); | |
+ } | |
+ | |
+ classFqNames = var21; | |
+ var var22: Map = classFqNames; | |
+ var `destination$iv$ivx`: Map = new LinkedHashMap(MapsKt.mapCapacity(classFqNames.size())); | |
+ | |
+ for (Object element$iv$iv$iv : var35) { | |
+ `destination$iv$ivx`.put( | |
+ (var43 as Entry).getKey(), StringsKt.substringAfterLast$default((var43 as Entry).getValue() as java.lang.String, '.', null, 2, null) | |
+ ); | |
+ } | |
+ | |
+ simpleNames = `destination$iv$ivx`; | |
+ } | |
+ | |
+ @SourceDebugExtension(["SMAP\nClassReference.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ClassReference.kt\nkotlin/jvm/internal/ClassReference$Companion\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,205:1\n1#2:206\n*E\n"]) | |
+ companion object Companion private constructor() { | |
+ private final val FUNCTION_CLASSES: kotlin.collections.Map<Class<out () -> *>, Int> | |
+ private final val classFqNames: HashMap<String, String> | |
+ private final val primitiveFqNames: HashMap<String, String> | |
+ private final val primitiveWrapperFqNames: HashMap<String, String> | |
+ private final val simpleNames: kotlin.collections.Map<String, String> | |
+ | |
+ | |
+ public fun getClassSimpleName(jClass: Class<*>): String? { | |
+ var var10000: java.lang.String; | |
+ if (jClass.isAnonymousClass()) { | |
+ var10000 = null; | |
+ } else if (jClass.isLocalClass()) { | |
+ var componentType: java.lang.String = jClass.getSimpleName(); | |
+ var var9: Method = jClass.getEnclosingMethod(); | |
+ if (var9 != null) { | |
+ var10000 = StringsKt.substringAfter$default(componentType, var9.getName() + '$', null, 2, null); | |
+ if (var10000 != null) { | |
+ return var10000; | |
+ } | |
+ } | |
+ | |
+ var var10: Constructor = jClass.getEnclosingConstructor(); | |
+ if (var10 != null) { | |
+ var10000 = StringsKt.substringAfter$default(componentType, var10.getName() + '$', null, 2, null); | |
+ } else { | |
+ var10000 = StringsKt.substringAfter$default(componentType, '$', null, 2, null); | |
+ } | |
+ } else if (jClass.isArray()) { | |
+ var var8: Class = jClass.getComponentType(); | |
+ if (var8.isPrimitive()) { | |
+ var var3: java.lang.String = ClassReference.access$getSimpleNames$cp().get(var8.getName()) as java.lang.String; | |
+ var10000 = if (var3 != null) var3 + "Array" else null; | |
+ } else { | |
+ var10000 = null; | |
+ } | |
+ | |
+ if (var10000 == null) { | |
+ var10000 = "Array"; | |
+ } | |
+ } else { | |
+ var10000 = ClassReference.access$getSimpleNames$cp().get(jClass.getName()) as java.lang.String; | |
+ if (var10000 == null) { | |
+ var10000 = jClass.getSimpleName(); | |
+ } | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ public fun getClassQualifiedName(jClass: Class<*>): String? { | |
+ var var10000: java.lang.String; | |
+ if (jClass.isAnonymousClass()) { | |
+ var10000 = null; | |
+ } else if (jClass.isLocalClass()) { | |
+ var10000 = null; | |
+ } else if (jClass.isArray()) { | |
+ var componentType: Class = jClass.getComponentType(); | |
+ if (componentType.isPrimitive()) { | |
+ var var3: java.lang.String = ClassReference.access$getClassFqNames$cp().get(componentType.getName()) as java.lang.String; | |
+ var10000 = if (var3 != null) var3 + "Array" else null; | |
+ } else { | |
+ var10000 = null; | |
+ } | |
+ | |
+ if (var10000 == null) { | |
+ var10000 = "kotlin.Array"; | |
+ } | |
+ } else { | |
+ var10000 = ClassReference.access$getClassFqNames$cp().get(jClass.getName()) as java.lang.String; | |
+ if (var10000 == null) { | |
+ var10000 = jClass.getCanonicalName(); | |
+ } | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ public fun isInstance(value: Any?, jClass: Class<*>): Boolean { | |
+ var var10000: Map = ClassReference.access$getFUNCTION_CLASSES$cp(); | |
+ var objectType: Int = var10000.get(jClass) as Integer; | |
+ return if (objectType != null) | |
+ TypeIntrinsics.isFunctionOfArity(value, objectType.intValue()) | |
+ else | |
+ (if (jClass.isPrimitive()) JvmClassMappingKt.getJavaObjectType(JvmClassMappingKt.getKotlinClass(jClass)) else jClass).isInstance(value); | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/jvm/JvmClassMappingKt.java decomp-fixes/kotlin/jvm/JvmClassMappingKt.java | |
--- decomp-current/kotlin/jvm/JvmClassMappingKt.java 2024-01-21 17:29:18.516513700 -0600 | |
+++ decomp-fixes/kotlin/jvm/JvmClassMappingKt.java 2024-01-21 17:27:29.002827600 -0600 | |
@@ -176,23 +176,7 @@ | |
public final val kotlin: KClass<T> | |
public final get() { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // java.lang.ClassCastException: class org.vineflower.kotlin.expr.KVarExprent cannot be cast to class org.jetbrains.java.decompiler.modules.decompiler.exps.FieldExprent (org.vineflower.kotlin.expr.KVarExprent and org.jetbrains.java.decompiler.modules.decompiler.exps.FieldExprent are in unnamed module of loader 'app') | |
- // at org.vineflower.kotlin.expr.KFunctionExprent.toJava(KFunctionExprent.java:96) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.getCastedExprent(ExprProcessor.java:1018) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.ExitExprent.toJava(ExitExprent.java:86) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.ExprProcessor.listToJava(ExprProcessor.java:895) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.stats.BasicBlockStatement.toJava(BasicBlockStatement.java:90) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.stats.RootStatement.toJava(RootStatement.java:36) | |
- // | |
- // Bytecode: | |
- // 0: aload 0 | |
- // 1: ldc "<this>" | |
- // 3: invokestatic kotlin/jvm/internal/Intrinsics.checkNotNullParameter (Ljava/lang/Object;Ljava/lang/String;)V | |
- // 6: aload 0 | |
- // 7: invokestatic kotlin/jvm/internal/Reflection.getOrCreateKotlinClass (Ljava/lang/Class;)Lkotlin/reflect/KClass; | |
- // a: areturn | |
+ return `$this$kotlin`.kotlin; | |
} | |
/** @deprecated */ | |
diff --color -ur decomp-current/kotlin/KotlinNothingValueException.java decomp-fixes/kotlin/KotlinNothingValueException.java | |
--- decomp-current/kotlin/KotlinNothingValueException.java 2024-01-21 17:29:18.415939400 -0600 | |
+++ decomp-fixes/kotlin/KotlinNothingValueException.java 2024-01-21 17:27:28.894215200 -0600 | |
@@ -1,15 +1,9 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:150) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+@SinceKotlin(version = "1.4") | |
+@PublishedApi | |
+internal class KotlinNothingValueException : RuntimeException { | |
+ | |
+ public constructor(message: String?) : super(message) | |
+ public constructor(message: String?, cause: Throwable?) : super(message, cause) | |
+ public constructor(cause: Throwable?) : super(cause)} | |
diff --color -ur decomp-current/kotlin/KotlinNullPointerException.java decomp-fixes/kotlin/KotlinNullPointerException.java | |
--- decomp-current/kotlin/KotlinNullPointerException.java 2024-01-21 17:29:18.415939400 -0600 | |
+++ decomp-fixes/kotlin/KotlinNullPointerException.java 2024-01-21 17:27:28.894215200 -0600 | |
@@ -1,15 +1,5 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:150) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+open class KotlinNullPointerException : NullPointerException { | |
+ | |
+ public constructor(message: String?) : super(message)} | |
diff --color -ur decomp-current/kotlin/Lazy.java decomp-fixes/kotlin/Lazy.java | |
--- decomp-current/kotlin/Lazy.java 2024-01-21 17:29:18.417449500 -0600 | |
+++ decomp-fixes/kotlin/Lazy.java 2024-01-21 17:27:28.896424300 -0600 | |
@@ -1,10 +1,8 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+interface Lazy<T> { | |
+ public val value: Any | |
+ | |
+ public abstract fun isInitialized(): Boolean { | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/NoWhenBranchMatchedException.java decomp-fixes/kotlin/NoWhenBranchMatchedException.java | |
--- decomp-current/kotlin/NoWhenBranchMatchedException.java 2024-01-21 17:29:18.419117600 -0600 | |
+++ decomp-fixes/kotlin/NoWhenBranchMatchedException.java 2024-01-21 17:27:28.897569800 -0600 | |
@@ -1,15 +1,7 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:150) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+open class NoWhenBranchMatchedException : RuntimeException { | |
+ | |
+ public constructor(message: String?) : super(message) | |
+ public constructor(message: String?, cause: Throwable?) : super(message, cause) | |
+ public constructor(cause: Throwable?) : super(cause)} | |
diff --color -ur decomp-current/kotlin/Pair.java decomp-fixes/kotlin/Pair.java | |
--- decomp-current/kotlin/Pair.java 2024-01-21 17:29:18.422583400 -0600 | |
+++ decomp-fixes/kotlin/Pair.java 2024-01-21 17:27:28.901582600 -0600 | |
@@ -1,10 +1,48 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+import java.io.Serializable | |
+ | |
+data class Pair<A, B>(first: Any, second: Any) : Serializable { | |
+ public final val first: Any | |
+ public final val second: Any | |
+ | |
+ init { | |
+ this.first = (A)first; | |
+ this.second = (B)second; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return "" + '(' + this.first + ", " + this.second + ')'; | |
+ } | |
+ | |
+ public operator fun component1(): Any { | |
+ return this.first; | |
+ } | |
+ | |
+ public operator fun component2(): Any { | |
+ return this.second; | |
+ } | |
+ | |
+ public fun copy(first: Any, second: Any): Pair<Any, Any> { | |
+ return new Pair<>((A)first, (B)second); | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return (if (this.first == null) 0 else this.first.hashCode()) * 31 + (if (this.second == null) 0 else this.second.hashCode()); | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ if (this === other) { | |
+ return true; | |
+ } else if (other !is Pair) { | |
+ return false; | |
+ } else { | |
+ var var2: Pair = other as Pair; | |
+ if (!(this.first == (other as Pair).first)) { | |
+ return false; | |
+ } else { | |
+ return this.second == var2.second; | |
+ } | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/properties/NotNullVar.java decomp-fixes/kotlin/properties/NotNullVar.java | |
--- decomp-current/kotlin/properties/NotNullVar.java 2024-01-21 17:29:18.545582500 -0600 | |
+++ decomp-fixes/kotlin/properties/NotNullVar.java 2024-01-21 17:27:29.041095000 -0600 | |
@@ -1,10 +1,24 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.properties | |
+ | |
+import kotlin.reflect.KProperty | |
+ | |
+private class NotNullVar<T> : ReadWriteProperty<Object, T> { | |
+ private final var value: Any? | |
+ | |
+ | |
+ public override operator fun getValue(thisRef: Any?, property: KProperty<*>): Any { | |
+ if (this.value == null) { | |
+ throw new IllegalStateException("Property " + property.getName() + " should be initialized before get."); | |
+ } else { | |
+ return this.value; | |
+ } | |
+ } | |
+ | |
+ public override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Any) { | |
+ this.value = (T)value; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return "NotNullProperty(" + (if (this.value != null) "value=" + this.value else "value not initialized yet") + ')'; | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/properties/ObservableProperty.java decomp-fixes/kotlin/properties/ObservableProperty.java | |
--- decomp-current/kotlin/properties/ObservableProperty.java 2024-01-21 17:29:18.545582500 -0600 | |
+++ decomp-fixes/kotlin/properties/ObservableProperty.java 2024-01-21 17:27:29.041095000 -0600 | |
@@ -1,10 +1,34 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.properties | |
+ | |
+import kotlin.reflect.KProperty | |
+ | |
+abstract class ObservableProperty<V> : ReadWriteProperty<Object, V> { | |
+ private final var value: Any | |
+ | |
+ open fun ObservableProperty(initialValue: V) { | |
+ this.value = (V)initialValue; | |
+ } | |
+ | |
+ protected open fun beforeChange(property: KProperty<*>, oldValue: Any, newValue: Any): Boolean { | |
+ return true; | |
+ } | |
+ | |
+ protected open fun afterChange(property: KProperty<*>, oldValue: Any, newValue: Any) { | |
+ } | |
+ | |
+ public override operator fun getValue(thisRef: Any?, property: KProperty<*>): Any { | |
+ return this.value; | |
+ } | |
+ | |
+ public override operator fun setValue(thisRef: Any?, property: KProperty<*>, value: Any) { | |
+ var oldValue: Any = this.value; | |
+ if (this.beforeChange(property, this.value, value)) { | |
+ this.value = (V)value; | |
+ this.afterChange(property, (V)oldValue, (V)value); | |
+ } | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return "ObservableProperty(value=" + this.value + ')'; | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/ranges/ClosedRange.java decomp-fixes/kotlin/ranges/ClosedRange.java | |
--- decomp-current/kotlin/ranges/ClosedRange.java 2024-01-21 17:29:18.550338400 -0600 | |
+++ decomp-fixes/kotlin/ranges/ClosedRange.java 2024-01-21 17:27:29.047739300 -0600 | |
@@ -1,10 +1,25 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.ranges | |
+ | |
+interface ClosedRange<T extends java.lang.Comparable<? super T>> { | |
+ public val endInclusive: Any | |
+ public val start: Any | |
+ | |
+ public open operator fun contains(value: Any): Boolean { | |
+ } | |
+ | |
+ public open fun isEmpty(): Boolean { | |
+ } | |
+ | |
+ // $VF: Class flags could not be determined | |
+ internal class DefaultImpls { | |
+ @JvmStatic | |
+ fun <T extends java.lang.Comparable<? super T>> contains(`$this`: ClosedRange<T>, value: T): Boolean { | |
+ return value.compareTo(`$this`.getStart()) >= 0 && value.compareTo(`$this`.getEndInclusive()) <= 0; | |
+ } | |
+ | |
+ @JvmStatic | |
+ fun <T extends java.lang.Comparable<? super T>> isEmpty(`$this`: ClosedRange<T>): Boolean { | |
+ return `$this`.getStart().compareTo(`$this`.getEndInclusive()) > 0; | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/ranges/ComparableOpenEndRange.java decomp-fixes/kotlin/ranges/ComparableOpenEndRange.java | |
--- decomp-current/kotlin/ranges/ComparableOpenEndRange.java 2024-01-21 17:29:18.551340600 -0600 | |
+++ decomp-fixes/kotlin/ranges/ComparableOpenEndRange.java 2024-01-21 17:27:29.047739300 -0600 | |
@@ -1,10 +1,39 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.ranges | |
+ | |
+private open class ComparableOpenEndRange<T extends java.lang.Comparable<? super T>>(start: Any, endExclusive: Any) : OpenEndRange<T> { | |
+ private T start; | |
+ private T endExclusive; | |
+ | |
+ public open val endExclusive: Any | |
+ public open val start: Any | |
+ | |
+ init { | |
+ this.start = (T)start; | |
+ this.endExclusive = (T)endExclusive; | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ return other is ComparableOpenEndRange | |
+ && ( | |
+ this.isEmpty() && (other as ComparableOpenEndRange).isEmpty() | |
+ || this.getStart() == (other as ComparableOpenEndRange).getStart() | |
+ && this.getEndExclusive() == (other as ComparableOpenEndRange).getEndExclusive() | |
+ ); | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return if (this.isEmpty()) -1 else 31 * this.getStart().hashCode() + this.getEndExclusive().hashCode(); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return this.getStart() + "..<" + this.getEndExclusive(); | |
+ } | |
+ | |
+ override fun contains(value: T): Boolean { | |
+ return OpenEndRange.DefaultImpls.contains(this, (T)value); | |
+ } | |
+ | |
+ override fun isEmpty(): Boolean { | |
+ return OpenEndRange.DefaultImpls.isEmpty(this); | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/ranges/ComparableRange.java decomp-fixes/kotlin/ranges/ComparableRange.java | |
--- decomp-current/kotlin/ranges/ComparableRange.java 2024-01-21 17:29:18.551340600 -0600 | |
+++ decomp-fixes/kotlin/ranges/ComparableRange.java 2024-01-21 17:27:29.047739300 -0600 | |
@@ -1,10 +1,38 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.ranges | |
+ | |
+private open class ComparableRange<T extends java.lang.Comparable<? super T>>(start: Any, endInclusive: Any) : ClosedRange<T> { | |
+ private T start; | |
+ private T endInclusive; | |
+ | |
+ public open val endInclusive: Any | |
+ public open val start: Any | |
+ | |
+ init { | |
+ this.start = (T)start; | |
+ this.endInclusive = (T)endInclusive; | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ return other is ComparableRange | |
+ && ( | |
+ this.isEmpty() && (other as ComparableRange).isEmpty() | |
+ || this.getStart() == (other as ComparableRange).getStart() && this.getEndInclusive() == (other as ComparableRange).getEndInclusive() | |
+ ); | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return if (this.isEmpty()) -1 else 31 * this.getStart().hashCode() + this.getEndInclusive().hashCode(); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return this.getStart() + ".." + this.getEndInclusive(); | |
+ } | |
+ | |
+ override fun contains(value: T): Boolean { | |
+ return ClosedRange.DefaultImpls.contains(this, (T)value); | |
+ } | |
+ | |
+ override fun isEmpty(): Boolean { | |
+ return ClosedRange.DefaultImpls.isEmpty(this); | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/ranges/OpenEndRange.java decomp-fixes/kotlin/ranges/OpenEndRange.java | |
--- decomp-current/kotlin/ranges/OpenEndRange.java 2024-01-21 17:29:18.553657500 -0600 | |
+++ decomp-fixes/kotlin/ranges/OpenEndRange.java 2024-01-21 17:27:29.050361300 -0600 | |
@@ -1,10 +1,27 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.ranges | |
+ | |
+@SinceKotlin(version = "1.9") | |
+@WasExperimental(markerClass = [ExperimentalStdlibApi::class]) | |
+interface OpenEndRange<T extends java.lang.Comparable<? super T>> { | |
+ public val endExclusive: Any | |
+ public val start: Any | |
+ | |
+ public open operator fun contains(value: Any): Boolean { | |
+ } | |
+ | |
+ public open fun isEmpty(): Boolean { | |
+ } | |
+ | |
+ // $VF: Class flags could not be determined | |
+ internal class DefaultImpls { | |
+ @JvmStatic | |
+ fun <T extends java.lang.Comparable<? super T>> contains(`$this`: OpenEndRange<T>, value: T): Boolean { | |
+ return value.compareTo(`$this`.getStart()) >= 0 && value.compareTo(`$this`.getEndExclusive()) < 0; | |
+ } | |
+ | |
+ @JvmStatic | |
+ fun <T extends java.lang.Comparable<? super T>> isEmpty(`$this`: OpenEndRange<T>): Boolean { | |
+ return `$this`.getStart().compareTo(`$this`.getEndExclusive()) >= 0; | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/reflect/KClass.java decomp-fixes/kotlin/reflect/KClass.java | |
--- decomp-current/kotlin/reflect/KClass.java 2024-01-21 17:29:18.557847400 -0600 | |
+++ decomp-fixes/kotlin/reflect/KClass.java 2024-01-21 17:27:29.054860400 -0600 | |
@@ -1,10 +1,37 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.reflect | |
+ | |
+interface KClass<T> : KDeclarationContainer, KAnnotatedElement, KClassifier { | |
+ public val constructors: Collection<KFunction<Any>> | |
+ public val isAbstract: Boolean | |
+ public val isCompanion: Boolean | |
+ public val isData: Boolean | |
+ public val isFinal: Boolean | |
+ public val isFun: Boolean | |
+ public val isInner: Boolean | |
+ public val isOpen: Boolean | |
+ public val isSealed: Boolean | |
+ public val isValue: Boolean | |
+ public val members: Collection<KCallable<*>> | |
+ public val nestedClasses: Collection<KClass<*>> | |
+ public val objectInstance: Any? | |
+ public val qualifiedName: String? | |
+ public val sealedSubclasses: List<KClass<out Any>> | |
+ public val simpleName: String? | |
+ public val supertypes: List<KType> | |
+ public val typeParameters: List<KTypeParameter> | |
+ public val visibility: KVisibility? | |
+ | |
+ @SinceKotlin(version = "1.1") | |
+ public abstract fun isInstance(value: Any?): Boolean { | |
+ } | |
+ | |
+ public abstract override operator fun equals(other: Any?): Boolean { | |
+ } | |
+ | |
+ public abstract override fun hashCode(): Int { | |
+ } | |
+ | |
+ // $VF: Class flags could not be determined | |
+ internal class DefaultImpls { | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/reflect/TypesJVMKt.java decomp-fixes/kotlin/reflect/TypesJVMKt.java | |
--- decomp-current/kotlin/reflect/TypesJVMKt.java 2024-01-21 17:29:18.562942000 -0600 | |
+++ decomp-fixes/kotlin/reflect/TypesJVMKt.java 2024-01-21 17:27:29.061020400 -0600 | |
@@ -56,139 +56,48 @@ | |
@ExperimentalStdlibApi | |
private fun KType.computeJavaType(forceWrapper: Boolean): Type { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "org.vineflower.kotlin.expr.KConstExprent.getValue()" is null | |
- // at org.vineflower.kotlin.expr.KConstExprent.toJava(KConstExprent.java:21) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.wrapOperandString(FunctionExprent.java:745) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.wrapOperandString(FunctionExprent.java:714) | |
- // | |
- // Bytecode: | |
- // 000: aload 0 | |
- // 001: invokeinterface kotlin/reflect/KType.getClassifier ()Lkotlin/reflect/KClassifier; 1 | |
- // 006: astore 2 | |
- // 007: aload 2 | |
- // 008: instanceof kotlin/reflect/KTypeParameter | |
- // 00b: ifeq 01d | |
- // 00e: new kotlin/reflect/TypeVariableImpl | |
- // 011: dup | |
- // 012: aload 2 | |
- // 013: checkcast kotlin/reflect/KTypeParameter | |
- // 016: invokespecial kotlin/reflect/TypeVariableImpl.<init> (Lkotlin/reflect/KTypeParameter;)V | |
- // 019: checkcast java/lang/reflect/Type | |
- // 01c: areturn | |
- // 01d: aload 2 | |
- // 01e: instanceof kotlin/reflect/KClass | |
- // 021: ifeq 117 | |
- // 024: iload 1 | |
- // 025: ifeq 032 | |
- // 028: aload 2 | |
- // 029: checkcast kotlin/reflect/KClass | |
- // 02c: invokestatic kotlin/jvm/JvmClassMappingKt.getJavaObjectType (Lkotlin/reflect/KClass;)Ljava/lang/Class; | |
- // 02f: goto 039 | |
- // 032: aload 2 | |
- // 033: checkcast kotlin/reflect/KClass | |
- // 036: invokestatic kotlin/jvm/JvmClassMappingKt.getJavaClass (Lkotlin/reflect/KClass;)Ljava/lang/Class; | |
- // 039: astore 3 | |
- // 03a: aload 0 | |
- // 03b: invokeinterface kotlin/reflect/KType.getArguments ()Ljava/util/List; 1 | |
- // 040: astore 4 | |
- // 042: aload 4 | |
- // 044: invokeinterface java/util/List.isEmpty ()Z 1 | |
- // 049: ifeq 051 | |
- // 04c: aload 3 | |
- // 04d: checkcast java/lang/reflect/Type | |
- // 050: areturn | |
- // 051: aload 3 | |
- // 052: invokevirtual java/lang/Class.isArray ()Z | |
- // 055: ifeq 110 | |
- // 058: aload 3 | |
- // 059: invokevirtual java/lang/Class.getComponentType ()Ljava/lang/Class; | |
- // 05c: invokevirtual java/lang/Class.isPrimitive ()Z | |
- // 05f: ifeq 067 | |
- // 062: aload 3 | |
- // 063: checkcast java/lang/reflect/Type | |
- // 066: areturn | |
- // 067: aload 4 | |
- // 069: invokestatic kotlin/collections/CollectionsKt.singleOrNull (Ljava/util/List;)Ljava/lang/Object; | |
- // 06c: checkcast kotlin/reflect/KTypeProjection | |
- // 06f: dup | |
- // 070: ifnonnull 08f | |
- // 073: pop | |
- // 074: new java/lang/IllegalArgumentException | |
- // 077: dup | |
- // 078: new java/lang/StringBuilder | |
- // 07b: dup | |
- // 07c: invokespecial java/lang/StringBuilder.<init> ()V | |
- // 07f: ldc "kotlin.Array must have exactly one type argument: " | |
- // 081: invokevirtual java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
- // 084: aload 0 | |
- // 085: invokevirtual java/lang/StringBuilder.append (Ljava/lang/Object;)Ljava/lang/StringBuilder; | |
- // 088: invokevirtual java/lang/StringBuilder.toString ()Ljava/lang/String; | |
- // 08b: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V | |
- // 08e: athrow | |
- // 08f: astore 5 | |
- // 091: aload 5 | |
- // 093: invokevirtual kotlin/reflect/KTypeProjection.component1 ()Lkotlin/reflect/KVariance; | |
- // 096: astore 6 | |
- // 098: aload 5 | |
- // 09a: invokevirtual kotlin/reflect/KTypeProjection.component2 ()Lkotlin/reflect/KType; | |
- // 09d: astore 7 | |
- // 09f: aload 6 | |
- // 0a1: dup | |
- // 0a2: ifnonnull 0aa | |
- // 0a5: pop | |
- // 0a6: bipush -1 | |
- // 0a7: goto 0b2 | |
- // 0aa: getstatic kotlin/reflect/TypesJVMKt$WhenMappings.$EnumSwitchMapping$0 [I | |
- // 0ad: swap | |
- // 0ae: invokevirtual kotlin/reflect/KVariance.ordinal ()I | |
- // 0b1: iaload | |
- // 0b2: tableswitch 85 -1 3 34 85 34 41 41 | |
- // 0d4: aload 3 | |
- // 0d5: checkcast java/lang/reflect/Type | |
- // 0d8: goto 10f | |
- // 0db: aload 7 | |
- // 0dd: dup | |
- // 0de: invokestatic kotlin/jvm/internal/Intrinsics.checkNotNull (Ljava/lang/Object;)V | |
- // 0e1: bipush 0 | |
- // 0e2: bipush 1 | |
- // 0e3: aconst_null | |
- // 0e4: invokestatic kotlin/reflect/TypesJVMKt.computeJavaType$default (Lkotlin/reflect/KType;ZILjava/lang/Object;)Ljava/lang/reflect/Type; | |
- // 0e7: astore 8 | |
- // 0e9: aload 8 | |
- // 0eb: instanceof java/lang/Class | |
- // 0ee: ifeq 0f8 | |
- // 0f1: aload 3 | |
- // 0f2: checkcast java/lang/reflect/Type | |
- // 0f5: goto 10f | |
- // 0f8: new kotlin/reflect/GenericArrayTypeImpl | |
- // 0fb: dup | |
- // 0fc: aload 8 | |
- // 0fe: invokespecial kotlin/reflect/GenericArrayTypeImpl.<init> (Ljava/lang/reflect/Type;)V | |
- // 101: checkcast java/lang/reflect/Type | |
- // 104: goto 10f | |
- // 107: new kotlin/NoWhenBranchMatchedException | |
- // 10a: dup | |
- // 10b: invokespecial kotlin/NoWhenBranchMatchedException.<init> ()V | |
- // 10e: athrow | |
- // 10f: areturn | |
- // 110: aload 3 | |
- // 111: aload 4 | |
- // 113: invokestatic kotlin/reflect/TypesJVMKt.createPossiblyInnerType (Ljava/lang/Class;Ljava/util/List;)Ljava/lang/reflect/Type; | |
- // 116: areturn | |
- // 117: new java/lang/UnsupportedOperationException | |
- // 11a: dup | |
- // 11b: new java/lang/StringBuilder | |
- // 11e: dup | |
- // 11f: invokespecial java/lang/StringBuilder.<init> ()V | |
- // 122: ldc "Unsupported type classifier: " | |
- // 124: invokevirtual java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
- // 127: aload 0 | |
- // 128: invokevirtual java/lang/StringBuilder.append (Ljava/lang/Object;)Ljava/lang/StringBuilder; | |
- // 12b: invokevirtual java/lang/StringBuilder.toString ()Ljava/lang/String; | |
- // 12e: invokespecial java/lang/UnsupportedOperationException.<init> (Ljava/lang/String;)V | |
- // 131: athrow | |
+ var classifier: KClassifier = `$this$computeJavaType`.getClassifier(); | |
+ if (classifier is KTypeParameter) { | |
+ return new TypeVariableImpl(classifier as KTypeParameter); | |
+ } else if (classifier is KClass) { | |
+ var jClass: Class = if (forceWrapper) JvmClassMappingKt.getJavaObjectType(classifier as KClass) else JvmClassMappingKt.getJavaClass(classifier as KClass); | |
+ var arguments: List = `$this$computeJavaType`.getArguments(); | |
+ if (arguments.isEmpty()) { | |
+ return jClass; | |
+ } else if (jClass.isArray()) { | |
+ if (jClass.getComponentType().isPrimitive()) { | |
+ return jClass; | |
+ } else { | |
+ var var10000: KTypeProjection = CollectionsKt.singleOrNull(arguments); | |
+ if (var10000 == null) { | |
+ throw new IllegalArgumentException("kotlin.Array must have exactly one type argument: " + `$this$computeJavaType`); | |
+ } else { | |
+ var variance: KVariance = var10000.component1(); | |
+ var elementType: KType = var10000.component2(); | |
+ var var9: Type; | |
+ switch (variance == null ? -1 : TypesJVMKt.WhenMappings.$EnumSwitchMapping$0[variance.ordinal()]) { | |
+ case -1: | |
+ case 1: | |
+ var9 = jClass; | |
+ break; | |
+ case 0: | |
+ default: | |
+ throw new NoWhenBranchMatchedException(); | |
+ case 2: | |
+ case 3: | |
+ var javaElementType: Type = computeJavaType$default(elementType, false, 1, null); | |
+ var9 = if (javaElementType is Class<*>) jClass else new GenericArrayTypeImpl(javaElementType); | |
+ } | |
+ | |
+ return var9; | |
+ } | |
+ } | |
+ } else { | |
+ return createPossiblyInnerType(jClass, arguments); | |
+ } | |
+ } else { | |
+ throw new UnsupportedOperationException("Unsupported type classifier: " + `$this$computeJavaType`); | |
+ } | |
} | |
@JvmSynthetic | |
@@ -243,53 +152,21 @@ | |
} | |
private fun typeToString(type: Type): String { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "org.vineflower.kotlin.expr.KConstExprent.getValue()" is null | |
- // at org.vineflower.kotlin.expr.KConstExprent.toJava(KConstExprent.java:21) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.wrapOperandString(FunctionExprent.java:745) | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.wrapOperandString(FunctionExprent.java:714) | |
- // | |
- // Bytecode: | |
- // 00: aload 0 | |
- // 01: instanceof java/lang/Class | |
- // 04: ifeq 56 | |
- // 07: aload 0 | |
- // 08: checkcast java/lang/Class | |
- // 0b: invokevirtual java/lang/Class.isArray ()Z | |
- // 0e: ifeq 46 | |
- // 11: aload 0 | |
- // 12: getstatic kotlin/reflect/TypesJVMKt$typeToString$unwrap$1.INSTANCE Lkotlin/reflect/TypesJVMKt$typeToString$unwrap$1; | |
- // 15: checkcast kotlin/jvm/functions/Function1 | |
- // 18: invokestatic kotlin/sequences/SequencesKt.generateSequence (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence; | |
- // 1b: astore 2 | |
- // 1c: new java/lang/StringBuilder | |
- // 1f: dup | |
- // 20: invokespecial java/lang/StringBuilder.<init> ()V | |
- // 23: aload 2 | |
- // 24: invokestatic kotlin/sequences/SequencesKt.last (Lkotlin/sequences/Sequence;)Ljava/lang/Object; | |
- // 27: checkcast java/lang/Class | |
- // 2a: invokevirtual java/lang/Class.getName ()Ljava/lang/String; | |
- // 2d: invokevirtual java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
- // 30: ldc_w "[]" | |
- // 33: checkcast java/lang/CharSequence | |
- // 36: aload 2 | |
- // 37: invokestatic kotlin/sequences/SequencesKt.count (Lkotlin/sequences/Sequence;)I | |
- // 3a: invokestatic kotlin/text/StringsKt.repeat (Ljava/lang/CharSequence;I)Ljava/lang/String; | |
- // 3d: invokevirtual java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
- // 40: invokevirtual java/lang/StringBuilder.toString ()Ljava/lang/String; | |
- // 43: goto 4d | |
- // 46: aload 0 | |
- // 47: checkcast java/lang/Class | |
- // 4a: invokevirtual java/lang/Class.getName ()Ljava/lang/String; | |
- // 4d: astore 1 | |
- // 4e: aload 1 | |
- // 4f: invokestatic kotlin/jvm/internal/Intrinsics.checkNotNull (Ljava/lang/Object;)V | |
- // 52: aload 1 | |
- // 53: goto 5a | |
- // 56: aload 0 | |
- // 57: invokevirtual java/lang/Object.toString ()Ljava/lang/String; | |
- // 5a: areturn | |
+ var var3: java.lang.String; | |
+ if (type is Class<*>) { | |
+ if ((type as Class<*>).isArray()) { | |
+ var unwrap: Sequence = SequencesKt.generateSequence(type, <unrepresentable>.INSTANCE); | |
+ var3 = SequencesKt.<Class>last(unwrap).getName() + StringsKt.repeat("[]", SequencesKt.count(unwrap)); | |
+ } else { | |
+ var3 = (type as Class<*>).getName(); | |
+ } | |
+ | |
+ var3 = var3; | |
+ } else { | |
+ var3 = type.toString(); | |
+ } | |
+ | |
+ return var3; | |
} | |
@JvmSynthetic | |
diff --color -ur decomp-current/kotlin/SafePublicationLazyImpl.java decomp-fixes/kotlin/SafePublicationLazyImpl.java | |
--- decomp-current/kotlin/SafePublicationLazyImpl.java 2024-01-21 17:29:18.425589900 -0600 | |
+++ decomp-fixes/kotlin/SafePublicationLazyImpl.java 2024-01-21 17:27:28.904583000 -0600 | |
@@ -1,10 +1,58 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+import java.io.Serializable | |
+import java.util.concurrent.atomic.AtomicReferenceFieldUpdater | |
+ | |
+private class SafePublicationLazyImpl<T>(initializer: () -> Any) : Lazy<T>, Serializable { | |
+ @JvmStatic | |
+ public SafePublicationLazyImpl.Companion Companion = new SafePublicationLazyImpl.Companion(null); | |
+ @JvmStatic | |
+ private AtomicReferenceFieldUpdater<SafePublicationLazyImpl<?>, Object> valueUpdater = AtomicReferenceFieldUpdater.newUpdater( | |
+ SafePublicationLazyImpl.class, Object.class, "_value" | |
+ ); | |
+ | |
+ private final var _value: Any? | |
+ private final val final: Any | |
+ private final var initializer: (() -> Any)? | |
+ private set | |
+ public open val value: Any | |
+ public open get() { | |
+ if (this._value != UNINITIALIZED_VALUE.INSTANCE) { | |
+ return (T)this._value; | |
+ } else { | |
+ if (this.initializer != null) { | |
+ var newValue: Any = this.initializer.invoke(); | |
+ if (valueUpdater.compareAndSet(this, UNINITIALIZED_VALUE.INSTANCE, newValue)) { | |
+ this.initializer = null; | |
+ return (T)newValue; | |
+ } | |
+ } | |
+ | |
+ return (T)this._value; | |
+ } | |
+ } | |
+ | |
+ | |
+ init { | |
+ this.initializer = initializer; | |
+ this._value = UNINITIALIZED_VALUE.INSTANCE; | |
+ this.final = UNINITIALIZED_VALUE.INSTANCE; | |
+ } | |
+ | |
+ public override fun isInitialized(): Boolean { | |
+ return this._value != UNINITIALIZED_VALUE.INSTANCE; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return if (this.isInitialized()) java.lang.String.valueOf(this.getValue()) else "Lazy value not initialized yet."; | |
+ } | |
+ | |
+ private fun writeReplace(): Any { | |
+ return new InitializedLazyImpl(this.getValue()); | |
+ } | |
+ | |
+ companion object Companion private constructor() { | |
+ private final val valueUpdater: AtomicReferenceFieldUpdater<SafePublicationLazyImpl<*>, Any> | |
+ | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/sequences/SequenceBuilderIterator.java decomp-fixes/kotlin/sequences/SequenceBuilderIterator.java | |
--- decomp-current/kotlin/sequences/SequenceBuilderIterator.java 2024-01-21 17:29:18.568557700 -0600 | |
+++ decomp-fixes/kotlin/sequences/SequenceBuilderIterator.java 2024-01-21 17:27:29.065283900 -0600 | |
@@ -1,10 +1,132 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.sequences | |
+ | |
+import java.util.Iterator | |
+import java.util.NoSuchElementException | |
+import kotlin.coroutines.Continuation | |
+import kotlin.coroutines.CoroutineContext | |
+import kotlin.coroutines.EmptyCoroutineContext | |
+import kotlin.coroutines.intrinsics.IntrinsicsKt | |
+import kotlin.coroutines.jvm.internal.DebugProbesKt | |
+import kotlin.jvm.internal.markers.KMappedMarker | |
+ | |
+private class SequenceBuilderIterator<T> : SequenceScope<T>, Iterator<T>, Continuation<Unit>, KMappedMarker { | |
+ public open val context: CoroutineContext | |
+ public open get() { | |
+ return EmptyCoroutineContext.INSTANCE; | |
+ } | |
+ | |
+ private final var nextIterator: kotlin.collections.Iterator<Any>? | |
+ public final var nextStep: Continuation<Unit>? | |
+ internal set | |
+ private final var nextValue: Any? | |
+ private final var state: Int | |
+ | |
+ | |
+ public override operator fun hasNext(): Boolean { | |
+ while (true) { | |
+ switch (this.state) { | |
+ case 1: | |
+ var var10000: Iterator = this.nextIterator; | |
+ if (var10000.hasNext()) { | |
+ this.state = 2; | |
+ return true; | |
+ } | |
+ | |
+ this.nextIterator = null; | |
+ case 0: | |
+ this.state = 5; | |
+ var var2: Continuation = this.nextStep; | |
+ this.nextStep = null; | |
+ var2.resumeWith(Result.constructor-impl(Unit.INSTANCE)); | |
+ break; | |
+ case 2: | |
+ case 3: | |
+ return true; | |
+ case 4: | |
+ return false; | |
+ default: | |
+ throw this.exceptionalState(); | |
+ } | |
+ } | |
+ } | |
+ | |
+ public override operator fun next(): Any { | |
+ switch (this.state) { | |
+ case 0: | |
+ case 1: | |
+ return this.nextNotReady(); | |
+ case 2: | |
+ this.state = 1; | |
+ var var10000: Iterator = this.nextIterator; | |
+ return (T)var10000.next(); | |
+ case 3: | |
+ this.state = 0; | |
+ var result: Any = this.nextValue; | |
+ this.nextValue = null; | |
+ return (T)result; | |
+ default: | |
+ throw this.exceptionalState(); | |
+ } | |
+ } | |
+ | |
+ private fun nextNotReady(): Any { | |
+ if (!this.hasNext()) { | |
+ throw new NoSuchElementException(); | |
+ } else { | |
+ return this.next(); | |
+ } | |
+ } | |
+ | |
+ private fun exceptionalState(): Throwable { | |
+ var var10000: java.lang.Throwable; | |
+ switch (this.state) { | |
+ case 4: | |
+ var10000 = new NoSuchElementException(); | |
+ break; | |
+ case 5: | |
+ var10000 = new IllegalStateException("Iterator has failed."); | |
+ break; | |
+ default: | |
+ var10000 = new IllegalStateException("Unexpected state of the iterator: " + this.state); | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ public override suspend fun yield(value: Any) { | |
+ this.nextValue = (T)value; | |
+ this.state = 3; | |
+ this.nextStep = `$completion`; | |
+ var var10000: Any = IntrinsicsKt.getCOROUTINE_SUSPENDED(); | |
+ if (var10000 === IntrinsicsKt.getCOROUTINE_SUSPENDED()) { | |
+ DebugProbesKt.probeCoroutineSuspended(`$completion`); | |
+ } | |
+ | |
+ return if (var10000 === IntrinsicsKt.getCOROUTINE_SUSPENDED()) var10000 else Unit.INSTANCE; | |
+ } | |
+ | |
+ public override suspend fun yieldAll(iterator: kotlin.collections.Iterator<Any>) { | |
+ if (!iterator.hasNext()) { | |
+ return Unit.INSTANCE; | |
+ } else { | |
+ this.nextIterator = iterator; | |
+ this.state = 2; | |
+ this.nextStep = `$completion`; | |
+ var var10000: Any = IntrinsicsKt.getCOROUTINE_SUSPENDED(); | |
+ if (var10000 === IntrinsicsKt.getCOROUTINE_SUSPENDED()) { | |
+ DebugProbesKt.probeCoroutineSuspended(`$completion`); | |
+ } | |
+ | |
+ return if (var10000 === IntrinsicsKt.getCOROUTINE_SUSPENDED()) var10000 else Unit.INSTANCE; | |
+ } | |
+ } | |
+ | |
+ public override fun resumeWith(result: Result<Unit>) { | |
+ ResultKt.throwOnFailure(result); | |
+ this.state = 4; | |
+ } | |
+ | |
+ override fun remove() { | |
+ throw new UnsupportedOperationException("Operation is not supported for read-only collection"); | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/SynchronizedLazyImpl.java decomp-fixes/kotlin/SynchronizedLazyImpl.java | |
--- decomp-current/kotlin/SynchronizedLazyImpl.java 2024-01-21 17:29:18.427589800 -0600 | |
+++ decomp-fixes/kotlin/SynchronizedLazyImpl.java 2024-01-21 17:27:28.907743800 -0600 | |
@@ -1,10 +1,56 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+import java.io.Serializable | |
+import kotlin.jvm.functions.Function0 | |
+ | |
+private class SynchronizedLazyImpl<T>(initializer: () -> Any, lock: Any?) : Lazy<T>, Serializable { | |
+ private final var _value: Any? | |
+ private final var initializer: (() -> Any)? | |
+ private set | |
+ private final val lock: Any | |
+ public open val value: Any | |
+ public open get() { | |
+ if (this._value != UNINITIALIZED_VALUE.INSTANCE) { | |
+ return (T)this._value; | |
+ } else { | |
+ synchronized (this.lock) { | |
+ var var10000: Any; | |
+ if (this._value != UNINITIALIZED_VALUE.INSTANCE) { | |
+ var10000 = (Function0)this._value; | |
+ } else { | |
+ var10000 = this.initializer; | |
+ var typedValue: Any = var10000.invoke(); | |
+ this._value = typedValue; | |
+ this.initializer = null; | |
+ var10000 = (Function0)typedValue; | |
+ } | |
+ | |
+ return (T)var10000; | |
+ } | |
+ } | |
+ } | |
+ | |
+ | |
+ init { | |
+ this.initializer = initializer; | |
+ this._value = UNINITIALIZED_VALUE.INSTANCE; | |
+ var var10001: Any = lock; | |
+ if (lock == null) { | |
+ var10001 = this; | |
+ } | |
+ | |
+ this.lock = var10001; | |
+ } | |
+ | |
+ public override fun isInitialized(): Boolean { | |
+ return this._value != UNINITIALIZED_VALUE.INSTANCE; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return if (this.isInitialized()) java.lang.String.valueOf(this.getValue()) else "Lazy value not initialized yet."; | |
+ } | |
+ | |
+ private fun writeReplace(): Any { | |
+ return new InitializedLazyImpl(this.getValue()); | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/text/HexExtensionsKt.java decomp-fixes/kotlin/text/HexExtensionsKt.java | |
--- decomp-current/kotlin/text/HexExtensionsKt.java 2024-01-21 17:29:18.575937800 -0600 | |
+++ decomp-fixes/kotlin/text/HexExtensionsKt.java 2024-01-21 17:27:29.073611100 -0600 | |
@@ -105,130 +105,48 @@ | |
bytePrefixLength: Int, | |
byteSuffixLength: Int | |
): Int { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // org.jetbrains.java.decompiler.main.plugins.PluginImplementationException: Plugin should implement custom handling | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.getExprType(FunctionExprent.java:234) | |
- // | |
- // Bytecode: | |
- // 00: iload 0 | |
- // 01: ifle 08 | |
- // 04: bipush 1 | |
- // 05: goto 09 | |
- // 08: bipush 0 | |
- // 09: istore 7 | |
- // 0b: iload 7 | |
- // 0d: ifne 21 | |
- // 10: ldc "Failed requirement." | |
- // 12: astore 8 | |
- // 14: new java/lang/IllegalArgumentException | |
- // 17: dup | |
- // 18: aload 8 | |
- // 1a: invokevirtual java/lang/Object.toString ()Ljava/lang/String; | |
- // 1d: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V | |
- // 20: athrow | |
- // 21: iload 0 | |
- // 22: bipush 1 | |
- // 23: isub | |
- // 24: iload 1 | |
- // 25: idiv | |
- // 26: istore 7 | |
- // 28: bipush 0 | |
- // 29: istore 9 | |
- // 2b: iload 1 | |
- // 2c: bipush 1 | |
- // 2d: isub | |
- // 2e: iload 2 | |
- // 2f: idiv | |
- // 30: istore 10 | |
- // 32: iload 0 | |
- // 33: iload 1 | |
- // 34: irem | |
- // 35: istore 11 | |
- // 37: iload 11 | |
- // 39: istore 12 | |
- // 3b: bipush 0 | |
- // 3c: istore 13 | |
- // 3e: iload 12 | |
- // 40: ifne 47 | |
- // 43: iload 1 | |
- // 44: goto 49 | |
- // 47: iload 12 | |
- // 49: nop | |
- // 4a: istore 14 | |
- // 4c: iload 14 | |
- // 4e: bipush 1 | |
- // 4f: isub | |
- // 50: iload 2 | |
- // 51: idiv | |
- // 52: istore 11 | |
- // 54: iload 7 | |
- // 56: iload 10 | |
- // 58: imul | |
- // 59: iload 11 | |
- // 5b: iadd | |
- // 5c: nop | |
- // 5d: istore 8 | |
- // 5f: iload 0 | |
- // 60: bipush 1 | |
- // 61: isub | |
- // 62: iload 7 | |
- // 64: isub | |
- // 65: iload 8 | |
- // 67: isub | |
- // 68: istore 9 | |
- // 6a: iload 7 | |
- // 6c: i2l | |
- // 6d: iload 8 | |
- // 6f: i2l | |
- // 70: iload 3 | |
- // 71: i2l | |
- // 72: lmul | |
- // 73: ladd | |
- // 74: iload 9 | |
- // 76: i2l | |
- // 77: iload 4 | |
- // 79: i2l | |
- // 7a: lmul | |
- // 7b: ladd | |
- // 7c: iload 0 | |
- // 7d: i2l | |
- // 7e: iload 5 | |
- // 80: i2l | |
- // 81: ldc2_w 2 | |
- // 84: ladd | |
- // 85: iload 6 | |
- // 87: i2l | |
- // 88: ladd | |
- // 89: lmul | |
- // 8a: ladd | |
- // 8b: lstore 10 | |
- // 8d: new kotlin/ranges/IntRange | |
- // 90: dup | |
- // 91: bipush 0 | |
- // 92: ldc 2147483647 | |
- // 94: invokespecial kotlin/ranges/IntRange.<init> (II)V | |
- // 97: checkcast kotlin/ranges/ClosedRange | |
- // 9a: lload 10 | |
- // 9c: invokestatic kotlin/ranges/RangesKt.intRangeContains (Lkotlin/ranges/ClosedRange;J)Z | |
- // 9f: ifne c4 | |
- // a2: new java/lang/IllegalArgumentException | |
- // a5: dup | |
- // a6: new java/lang/StringBuilder | |
- // a9: dup | |
- // aa: invokespecial java/lang/StringBuilder.<init> ()V | |
- // ad: ldc "The resulting string length is too big: " | |
- // af: invokevirtual java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
- // b2: lload 10 | |
- // b4: invokestatic kotlin/ULong.constructor-impl (J)J | |
- // b7: invokestatic kotlin/ULong.toString-impl (J)Ljava/lang/String; | |
- // ba: invokevirtual java/lang/StringBuilder.append (Ljava/lang/Object;)Ljava/lang/StringBuilder; | |
- // bd: invokevirtual java/lang/StringBuilder.toString ()Ljava/lang/String; | |
- // c0: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V | |
- // c3: athrow | |
- // c4: lload 10 | |
- // c6: l2i | |
- // c7: ireturn | |
+ if (totalBytes <= 0) { | |
+ throw new IllegalArgumentException("Failed requirement.".toString()); | |
+ } else { | |
+ var var15: Int = (totalBytes - 1) / bytesPerLine; | |
+ var totalLength: Int = (bytesPerLine - 1) / bytesPerGroup; | |
+ var groupSeparators: Int = var15 * ((bytesPerLine - 1) / bytesPerGroup) | |
+ + ((if (totalBytes % bytesPerLine == 0) bytesPerLine else totalBytes % bytesPerLine) - 1) / bytesPerGroup; | |
+ var var18: Long = (long)var15 | |
+ + (long)( | |
+ var15 * ((bytesPerLine - 1) / bytesPerGroup) | |
+ + ((if (totalBytes % bytesPerLine == 0) bytesPerLine else totalBytes % bytesPerLine) - 1) / bytesPerGroup | |
+ ) | |
+ * (long)groupSeparatorLength | |
+ + (long)( | |
+ totalBytes | |
+ - 1 | |
+ - var15 | |
+ - ( | |
+ var15 * ((bytesPerLine - 1) / bytesPerGroup) | |
+ + ((if (totalBytes % bytesPerLine == 0) bytesPerLine else totalBytes % bytesPerLine) - 1) / bytesPerGroup | |
+ ) | |
+ ) | |
+ * (long)byteSeparatorLength | |
+ + (long)totalBytes * ((long)bytePrefixLength + 2L + (long)byteSuffixLength); | |
+ if (!RangesKt.intRangeContains( | |
+ new IntRange(0, Integer.MAX_VALUE), | |
+ (long)var15 | |
+ + (long)groupSeparators * (long)groupSeparatorLength | |
+ + (long)( | |
+ totalBytes | |
+ - 1 | |
+ - var15 | |
+ - (var15 * totalLength + ((if (totalBytes % bytesPerLine == 0) bytesPerLine else totalBytes % bytesPerLine) - 1) / bytesPerGroup) | |
+ ) | |
+ * (long)byteSeparatorLength | |
+ + (long)totalBytes * ((long)bytePrefixLength + 2L + (long)byteSuffixLength) | |
+ )) { | |
+ throw new IllegalArgumentException("The resulting string length is too big: " + ULong.toString-impl(ULong.constructor-impl(var18))); | |
+ } else { | |
+ return (int)var18; | |
+ } | |
+ } | |
} | |
@ExperimentalStdlibApi | |
diff --color -ur decomp-current/kotlin/text/Regex$special$$inlined$fromInt$1.java decomp-fixes/kotlin/text/Regex$special$$inlined$fromInt$1.java | |
--- decomp-current/kotlin/text/Regex$special$$inlined$fromInt$1.java 2024-01-21 17:29:18.578963800 -0600 | |
+++ decomp-fixes/kotlin/text/Regex$special$$inlined$fromInt$1.java 2024-01-21 17:27:29.075610800 -0600 | |
@@ -14,26 +14,6 @@ | |
// QF: local property | |
internal fun <reified T> `<anonymous>`(it: T): Boolean where T : FlagEnum, T : Enum<T> { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // org.jetbrains.java.decompiler.main.plugins.PluginImplementationException: Plugin should implement custom handling | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.getExprType(FunctionExprent.java:234) | |
- // | |
- // Bytecode: | |
- // 00: aload 0 | |
- // 01: getfield kotlin/text/Regex$special$$inlined$fromInt$1.$value I | |
- // 04: aload 1 | |
- // 05: checkcast kotlin/text/FlagEnum | |
- // 08: invokeinterface kotlin/text/FlagEnum.getMask ()I 1 | |
- // 0d: iand | |
- // 0e: aload 1 | |
- // 0f: checkcast kotlin/text/FlagEnum | |
- // 12: invokeinterface kotlin/text/FlagEnum.getValue ()I 1 | |
- // 17: if_icmpne 1e | |
- // 1a: bipush 1 | |
- // 1b: goto 1f | |
- // 1e: bipush 0 | |
- // 1f: invokestatic java/lang/Boolean.valueOf (Z)Ljava/lang/Boolean; | |
- // 22: areturn | |
+ return (this.$value and (it as FlagEnum).getMask()) == (it as FlagEnum).getValue(); | |
} | |
} | |
diff --color -ur decomp-current/kotlin/text/Regex.java decomp-fixes/kotlin/text/Regex.java | |
--- decomp-current/kotlin/text/Regex.java 2024-01-21 17:29:18.578963800 -0600 | |
+++ decomp-fixes/kotlin/text/Regex.java 2024-01-21 17:27:29.075610800 -0600 | |
@@ -1,10 +1,347 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IllegalStateException: First expression of constructor is not InvocationExprent | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:152) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.text | |
+ | |
+import java.io.Serializable | |
+import java.util.ArrayList | |
+import java.util.Collections | |
+import java.util.EnumSet | |
+import java.util.regex.Matcher | |
+import java.util.regex.Pattern | |
+import kotlin.coroutines.Continuation | |
+import kotlin.coroutines.intrinsics.IntrinsicsKt | |
+import kotlin.jvm.functions.Function0 | |
+import kotlin.jvm.functions.Function2 | |
+import kotlin.jvm.internal.SourceDebugExtension | |
+import org.jetbrains.annotations.NotNull | |
+import org.jetbrains.annotations.Nullable | |
+ | |
+@SourceDebugExtension(["SMAP\nRegex.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Regex.kt\nkotlin/text/Regex\n+ 2 Regex.kt\nkotlin/text/RegexKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,397:1\n22#2,3:398\n1#3:401\n*S KotlinDebug\n*F\n+ 1 Regex.kt\nkotlin/text/Regex\n*L\n103#1:398,3\n*E\n"]) | |
+class Regex @PublishedApi internal constructor(nativePattern: Pattern) : Serializable { | |
+ @JvmStatic | |
+ public Regex.Companion Companion = new Regex.Companion(null); | |
+ | |
+ private final var _options: Set<RegexOption>? | |
+ private final val nativePattern: Pattern | |
+ public final val options: Set<RegexOption> | |
+ public final get() { | |
+ var var10000: java.util.Set = this._options; | |
+ if (this._options == null) { | |
+ var `value$iv`: Int = this.nativePattern.flags(); | |
+ var var3: EnumSet = EnumSet.allOf(RegexOption.class); | |
+ CollectionsKt.retainAll(var3, new Regex$special$$inlined$fromInt$1(`value$iv`)); | |
+ var10000 = Collections.unmodifiableSet(var3); | |
+ this._options = var10000; | |
+ var10000 = var10000; | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ public final val pattern: String | |
+ public final get() { | |
+ var var10000: java.lang.String = this.nativePattern.pattern(); | |
+ return var10000; | |
+ } | |
+ | |
+ | |
+ init { | |
+ this.nativePattern = nativePattern; | |
+ } | |
+ | |
+ public constructor(pattern: String) { | |
+ var var10001: Pattern = Pattern.compile(pattern); | |
+ this(var10001); | |
+ } | |
+ | |
+ public constructor(pattern: String, option: RegexOption) { | |
+ var var10001: Pattern = Pattern.compile(pattern, Regex.Companion.access$ensureUnicodeCase(Companion, option.getValue())); | |
+ this(var10001); | |
+ } | |
+ | |
+ public constructor(pattern: String, options: Set<RegexOption>) { | |
+ var var10001: Pattern = Pattern.compile(pattern, Regex.Companion.access$ensureUnicodeCase(Companion, RegexKt.access$toInt(options))); | |
+ this(var10001); | |
+ } | |
+ | |
+ public infix fun matches(input: CharSequence): Boolean { | |
+ return this.nativePattern.matcher(input).matches(); | |
+ } | |
+ | |
+ public fun containsMatchIn(input: CharSequence): Boolean { | |
+ return this.nativePattern.matcher(input).find(); | |
+ } | |
+ | |
+ public fun find(input: CharSequence, startIndex: Int): MatchResult? { | |
+ var var10000: Matcher = this.nativePattern.matcher(input); | |
+ return RegexKt.access$findNext(var10000, startIndex, input); | |
+ } | |
+ | |
+ public fun findAll(input: CharSequence, startIndex: Int): Sequence<MatchResult> { | |
+ if (startIndex >= 0 && startIndex <= input.length()) { | |
+ return SequencesKt.generateSequence((new Function0<MatchResult>(this, input, startIndex) { | |
+ { | |
+ super(0); | |
+ this.this$0 = `$receiver`; | |
+ this.$input = `$input`; | |
+ this.$startIndex = `$startIndex`; | |
+ } | |
+ | |
+ @Nullable | |
+ public final MatchResult invoke() { | |
+ return this.this$0.find(this.$input, this.$startIndex); | |
+ } | |
+ }) as Function0<? extends MatchResult>, <unrepresentable>.INSTANCE); | |
+ } else { | |
+ throw new IndexOutOfBoundsException("Start index out of bounds: " + startIndex + ", input length: " + input.length()); | |
+ } | |
+ } | |
+ | |
+ public fun matchEntire(input: CharSequence): MatchResult? { | |
+ var var10000: Matcher = this.nativePattern.matcher(input); | |
+ return RegexKt.access$matchEntire(var10000, input); | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.7") | |
+ @WasExperimental(markerClass = [ExperimentalStdlibApi::class]) | |
+ public fun matchAt(input: CharSequence, index: Int): MatchResult? { | |
+ var var3: Matcher = this.nativePattern.matcher(input).useAnchoringBounds(false).useTransparentBounds(true).region(index, input.length()); | |
+ var var10000: MatcherMatchResult; | |
+ if (var3.lookingAt()) { | |
+ var10000 = new MatcherMatchResult(var3, input); | |
+ } else { | |
+ var10000 = null; | |
+ } | |
+ | |
+ return var10000; | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.7") | |
+ @WasExperimental(markerClass = [ExperimentalStdlibApi::class]) | |
+ public fun matchesAt(input: CharSequence, index: Int): Boolean { | |
+ return this.nativePattern.matcher(input).useAnchoringBounds(false).useTransparentBounds(true).region(index, input.length()).lookingAt(); | |
+ } | |
+ | |
+ public fun replace(input: CharSequence, replacement: String): String { | |
+ var var10000: java.lang.String = this.nativePattern.matcher(input).replaceAll(replacement); | |
+ return var10000; | |
+ } | |
+ | |
+ public fun replace(input: CharSequence, transform: (MatchResult) -> CharSequence): String { | |
+ var var10000: MatchResult = find$default(this, input, 0, 2, null); | |
+ if (var10000 == null) { | |
+ return input.toString(); | |
+ } else { | |
+ var match: MatchResult = var10000; | |
+ var lastStart: Int = 0; | |
+ var length: Int = input.length(); | |
+ var sb: StringBuilder = new StringBuilder(length); | |
+ | |
+ do { | |
+ sb.append(input, lastStart, match.getRange().getStart()); | |
+ sb.append(transform.invoke(match) as java.lang.CharSequence); | |
+ lastStart = match.getRange().getEndInclusive() + 1; | |
+ match = match.next(); | |
+ } while (lastStart < length && match != null); | |
+ | |
+ if (lastStart < length) { | |
+ sb.append(input, lastStart, length); | |
+ } | |
+ | |
+ var var8: java.lang.String = sb.toString(); | |
+ return var8; | |
+ } | |
+ } | |
+ | |
+ public fun replaceFirst(input: CharSequence, replacement: String): String { | |
+ var var10000: java.lang.String = this.nativePattern.matcher(input).replaceFirst(replacement); | |
+ return var10000; | |
+ } | |
+ | |
+ public fun split(input: CharSequence, limit: Int): List<String> { | |
+ StringsKt.requireNonNegativeLimit(limit); | |
+ var matcher: Matcher = this.nativePattern.matcher(input); | |
+ if (limit != 1 && matcher.find()) { | |
+ var result: ArrayList = new ArrayList(if (limit > 0) RangesKt.coerceAtMost(limit, 10) else 10); | |
+ var lastStart: Int = 0; | |
+ var lastSplit: Int = limit - 1; | |
+ | |
+ do { | |
+ result.add(input.subSequence(lastStart, matcher.start()).toString()); | |
+ lastStart = matcher.end(); | |
+ } while ((lastSplit < 0 || result.size() != lastSplit) && matcher.find()); | |
+ | |
+ result.add(input.subSequence(lastStart, input.length()).toString()); | |
+ return result; | |
+ } else { | |
+ return CollectionsKt.listOf(input.toString()); | |
+ } | |
+ } | |
+ | |
+ @SinceKotlin(version = "1.6") | |
+ @WasExperimental(markerClass = [ExperimentalStdlibApi::class]) | |
+ public fun splitToSequence(input: CharSequence, limit: Int): Sequence<String> { | |
+ StringsKt.requireNonNegativeLimit(limit); | |
+ return SequencesKt.sequence((new Function2<SequenceScope<? super java.lang.String>, Continuation<? super Unit>, Object>(this, input, limit, null) { | |
+ Object L$1; | |
+ int I$0; | |
+ int label; | |
+ | |
+ { | |
+ super(2, `$completion`); | |
+ this.this$0 = `$receiver`; | |
+ this.$input = `$input`; | |
+ this.$limit = `$limit`; | |
+ } | |
+ | |
+ // $VF: Irreducible bytecode was duplicated to produce valid code | |
+ @Nullable | |
+ @Override | |
+ public final Object invokeSuspend(@NotNull Object $result) { | |
+ var var6: Any = IntrinsicsKt.getCOROUTINE_SUSPENDED(); | |
+ var `$this$sequence`: SequenceScope; | |
+ var matcher: Matcher; | |
+ var splitCount: Int; | |
+ switch (this.label) { | |
+ case 0: | |
+ ResultKt.throwOnFailure(`$result`); | |
+ `$this$sequence` = this.L$0 as SequenceScope; | |
+ matcher = Regex.access$getNativePattern$p(this.this$0).matcher(this.$input); | |
+ if (this.$limit == 1 || !matcher.find()) { | |
+ var var10: java.lang.String = this.$input.toString(); | |
+ var var13: Continuation = this; | |
+ this.label = 1; | |
+ if (`$this$sequence`.yield(var10, var13) === var6) { | |
+ return var6; | |
+ } | |
+ | |
+ return Unit.INSTANCE; | |
+ } | |
+ | |
+ splitCount = 0; | |
+ var var10001: java.lang.String = this.$input.subSequence(0, matcher.start()).toString(); | |
+ var var10002: Continuation = this; | |
+ this.L$0 = `$this$sequence`; | |
+ this.L$1 = matcher; | |
+ this.I$0 = 0; | |
+ this.label = 2; | |
+ if (`$this$sequence`.yield(var10001, var10002) === var6) { | |
+ return var6; | |
+ } | |
+ break; | |
+ case 1: | |
+ ResultKt.throwOnFailure(`$result`); | |
+ return Unit.INSTANCE; | |
+ case 2: | |
+ splitCount = this.I$0; | |
+ matcher = this.L$1 as Matcher; | |
+ `$this$sequence` = this.L$0 as SequenceScope; | |
+ ResultKt.throwOnFailure(`$result`); | |
+ break; | |
+ case 3: | |
+ ResultKt.throwOnFailure(`$result`); | |
+ return Unit.INSTANCE; | |
+ default: | |
+ throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); | |
+ } | |
+ | |
+ var var8: java.lang.String; | |
+ var var11: Continuation; | |
+ do { | |
+ var var7: Int = matcher.end(); | |
+ if (++splitCount == this.$limit - 1 || !matcher.find()) { | |
+ var8 = this.$input.subSequence(var7, this.$input.length()).toString(); | |
+ var11 = this; | |
+ this.L$0 = null; | |
+ this.L$1 = null; | |
+ this.label = 3; | |
+ if (`$this$sequence`.yield(var8, var11) === var6) { | |
+ return var6; | |
+ } | |
+ | |
+ return Unit.INSTANCE; | |
+ } | |
+ | |
+ var8 = this.$input.subSequence(var7, matcher.start()).toString(); | |
+ var11 = this; | |
+ this.L$0 = `$this$sequence`; | |
+ this.L$1 = matcher; | |
+ this.I$0 = splitCount; | |
+ this.label = 2; | |
+ } while ($this$sequence.yield(var8, var11) != var6); | |
+ | |
+ return var6; | |
+ } | |
+ | |
+ @NotNull | |
+ @Override | |
+ public final Continuation<Unit> create(@Nullable Object value, @NotNull Continuation<?> $completion) { | |
+ var var3: Function2 = new <anonymous constructor>(this.this$0, this.$input, this.$limit, `$completion`); | |
+ var3.L$0 = value; | |
+ return var3 as Continuation<Unit>; | |
+ } | |
+ | |
+ @Nullable | |
+ public final Object invoke(@NotNull SequenceScope<? super java.lang.String> p1, @Nullable Continuation<? super Unit> p2) { | |
+ return (this.create(p1, p2) as <unrepresentable>).invokeSuspend(Unit.INSTANCE); | |
+ } | |
+ }) as Function2<? super SequenceScope<? super java.lang.String>, ? super Continuation<? super Unit>, ? extends Object>); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ var var10000: java.lang.String = this.nativePattern.toString(); | |
+ return var10000; | |
+ } | |
+ | |
+ public fun toPattern(): Pattern { | |
+ return this.nativePattern; | |
+ } | |
+ | |
+ private fun writeReplace(): Any { | |
+ var var10002: java.lang.String = this.nativePattern.pattern(); | |
+ return new Regex.Serialized(var10002, this.nativePattern.flags()); | |
+ } | |
+ | |
+ companion object Companion private constructor() { | |
+ public fun fromLiteral(literal: String): Regex { | |
+ return new Regex(literal, RegexOption.LITERAL); | |
+ } | |
+ | |
+ public fun escape(literal: String): String { | |
+ var var10000: java.lang.String = Pattern.quote(literal); | |
+ return var10000; | |
+ } | |
+ | |
+ public fun escapeReplacement(literal: String): String { | |
+ var var10000: java.lang.String = Matcher.quoteReplacement(literal); | |
+ return var10000; | |
+ } | |
+ | |
+ private fun ensureUnicodeCase(flags: Int): Int { | |
+ return if ((flags and 2) != 0) flags or 64 else flags; | |
+ } | |
+ } | |
+ | |
+ private class Serialized(pattern: String, flags: Int) : Serializable { | |
+ @JvmStatic | |
+ public Regex.Serialized.Companion Companion = new Regex.Serialized.Companion(null); | |
+ @JvmStatic | |
+ private long serialVersionUID = 0L; | |
+ | |
+ public final val flags: Int | |
+ public final val pattern: String | |
+ | |
+ init { | |
+ this.pattern = pattern; | |
+ this.flags = flags; | |
+ } | |
+ | |
+ private fun readResolve(): Any { | |
+ var var10002: Pattern = Pattern.compile(this.pattern, this.flags); | |
+ return new Regex(var10002); | |
+ } | |
+ | |
+ companion object Companion private constructor() { | |
+ private const val serialVersionUID: Long | |
+ | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/text/RegexKt.java decomp-fixes/kotlin/text/RegexKt.java | |
--- decomp-current/kotlin/text/RegexKt.java 2024-01-21 17:29:18.578963800 -0600 | |
+++ decomp-fixes/kotlin/text/RegexKt.java 2024-01-21 17:27:29.076610100 -0600 | |
@@ -27,42 +27,17 @@ | |
var `$this$fromInt_u24lambda_u241`: EnumSet = var2; | |
var var10000: java.lang.Iterable = `$this$fromInt_u24lambda_u241`; | |
Intrinsics.needClassReification(); | |
- CollectionsKt.retainAll( | |
- var10000, | |
- ( | |
- new Function1<T, java.lang.Boolean>(value) { | |
- { | |
- super(1); | |
- this.$value = `$value`; | |
- } | |
- | |
- @NotNull | |
- public final java.lang.Boolean invoke(T var1) { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // org.jetbrains.java.decompiler.main.plugins.PluginImplementationException: Plugin should implement custom handling | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.getExprType(FunctionExprent.java:234) | |
- // | |
- // Bytecode: | |
- // 00: aload 0 | |
- // 01: getfield kotlin/text/RegexKt$fromInt$1$1.$value I | |
- // 04: aload 1 | |
- // 05: checkcast kotlin/text/FlagEnum | |
- // 08: invokeinterface kotlin/text/FlagEnum.getMask ()I 1 | |
- // 0d: iand | |
- // 0e: aload 1 | |
- // 0f: checkcast kotlin/text/FlagEnum | |
- // 12: invokeinterface kotlin/text/FlagEnum.getValue ()I 1 | |
- // 17: if_icmpne 1e | |
- // 1a: bipush 1 | |
- // 1b: goto 1f | |
- // 1e: bipush 0 | |
- // 1f: invokestatic java/lang/Boolean.valueOf (Z)Ljava/lang/Boolean; | |
- // 22: areturn | |
- } | |
- } | |
- ) as Function1 | |
- ); | |
+ CollectionsKt.retainAll(var10000, (new Function1<T, java.lang.Boolean>(value) { | |
+ { | |
+ super(1); | |
+ this.$value = `$value`; | |
+ } | |
+ | |
+ @NotNull | |
+ public final java.lang.Boolean invoke(T it) { | |
+ return (this.$value and (it as FlagEnum).getMask()) == (it as FlagEnum).getValue(); | |
+ } | |
+ }) as Function1); | |
var var5: java.util.Set = Collections.unmodifiableSet(var2); | |
return var5; | |
} | |
diff --color -ur decomp-current/kotlin/text/StringsKt__StringsJVMKt.java decomp-fixes/kotlin/text/StringsKt__StringsJVMKt.java | |
--- decomp-current/kotlin/text/StringsKt__StringsJVMKt.java 2024-01-21 17:29:18.582438600 -0600 | |
+++ decomp-fixes/kotlin/text/StringsKt__StringsJVMKt.java 2024-01-21 17:27:29.079610500 -0600 | |
@@ -296,34 +296,9 @@ | |
@JvmStatic | |
public fun CharSequence.split(regex: Pattern, limit: Int): List<String> { | |
- // $VF: Couldn't be decompiled | |
- // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
- // org.jetbrains.java.decompiler.main.plugins.PluginImplementationException: Plugin should implement custom handling | |
- // at org.jetbrains.java.decompiler.modules.decompiler.exps.FunctionExprent.getExprType(FunctionExprent.java:234) | |
- // | |
- // Bytecode: | |
- // 00: aload 0 | |
- // 01: ldc "<this>" | |
- // 03: invokestatic kotlin/jvm/internal/Intrinsics.checkNotNullParameter (Ljava/lang/Object;Ljava/lang/String;)V | |
- // 06: aload 1 | |
- // 07: ldc_w "regex" | |
- // 0a: invokestatic kotlin/jvm/internal/Intrinsics.checkNotNullParameter (Ljava/lang/Object;Ljava/lang/String;)V | |
- // 0d: iload 2 | |
- // 0e: invokestatic kotlin/text/StringsKt.requireNonNegativeLimit (I)V | |
- // 11: aload 1 | |
- // 12: aload 0 | |
- // 13: iload 2 | |
- // 14: ifne 1b | |
- // 17: bipush -1 | |
- // 18: goto 1c | |
- // 1b: iload 2 | |
- // 1c: invokevirtual java/util/regex/Pattern.split (Ljava/lang/CharSequence;I)[Ljava/lang/String; | |
- // 1f: dup | |
- // 20: ldc_w "split(...)" | |
- // 23: invokestatic kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue (Ljava/lang/Object;Ljava/lang/String;)V | |
- // 26: checkcast [Ljava/lang/Object; | |
- // 29: invokestatic kotlin/collections/ArraysKt.asList ([Ljava/lang/Object;)Ljava/util/List; | |
- // 2c: areturn | |
+ StringsKt.requireNonNegativeLimit(limit); | |
+ var var10000: Array<java.lang.String> = regex.split(`$this$split`, if (limit == 0) -1 else limit); | |
+ return ArraysKt.asList(var10000); | |
} | |
@InlineOnly | |
diff --color -ur decomp-current/kotlin/time/TimedValue.java decomp-fixes/kotlin/time/TimedValue.java | |
--- decomp-current/kotlin/time/TimedValue.java 2024-01-21 17:29:18.594081500 -0600 | |
+++ decomp-fixes/kotlin/time/TimedValue.java 2024-01-21 17:27:29.091084400 -0600 | |
@@ -1,10 +1,50 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin.time | |
+ | |
+@SinceKotlin(version = "1.9") | |
+@WasExperimental(markerClass = [ExperimentalTime::class]) | |
+data class TimedValue<T>(value: Any, duration: Duration) : TimedValue((T)value, duration) { | |
+ private long duration; | |
+ | |
+ public final val duration: Duration | |
+ public final val value: Any | |
+ | |
+ fun TimedValue(value: T, duration: Long) { | |
+ this.value = (T)value; | |
+ this.duration = duration; | |
+ } | |
+ | |
+ public operator fun component1(): Any { | |
+ return this.value; | |
+ } | |
+ | |
+ public operator fun component2(): Duration { | |
+ return this.duration; | |
+ } | |
+ | |
+ public fun copy(value: Any, duration: Duration): TimedValue<Any> { | |
+ return new TimedValue<>(value, duration, null); | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return "TimedValue(value=" + this.value + ", duration=" + Duration.toString-impl(this.duration) + ')'; | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return (if (this.value == null) 0 else this.value.hashCode()) * 31 + Duration.hashCode-impl(this.duration); | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ if (this === other) { | |
+ return true; | |
+ } else if (other !is TimedValue) { | |
+ return false; | |
+ } else { | |
+ var var2: TimedValue = other as TimedValue; | |
+ if (!(this.value == (other as TimedValue).value)) { | |
+ return false; | |
+ } else { | |
+ return Duration.equals-impl0(this.duration, var2.duration); | |
+ } | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/Triple.java decomp-fixes/kotlin/Triple.java | |
--- decomp-current/kotlin/Triple.java 2024-01-21 17:29:18.428884400 -0600 | |
+++ decomp-fixes/kotlin/Triple.java 2024-01-21 17:27:28.907743800 -0600 | |
@@ -1,10 +1,57 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+import java.io.Serializable | |
+ | |
+data class Triple<A, B, C>(first: Any, second: Any, third: Any) : Serializable { | |
+ public final val first: Any | |
+ public final val second: Any | |
+ public final val third: Any | |
+ | |
+ init { | |
+ this.first = (A)first; | |
+ this.second = (B)second; | |
+ this.third = (C)third; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return "" + '(' + this.first + ", " + this.second + ", " + this.third + ')'; | |
+ } | |
+ | |
+ public operator fun component1(): Any { | |
+ return this.first; | |
+ } | |
+ | |
+ public operator fun component2(): Any { | |
+ return this.second; | |
+ } | |
+ | |
+ public operator fun component3(): Any { | |
+ return this.third; | |
+ } | |
+ | |
+ public fun copy(first: Any, second: Any, third: Any): Triple<Any, Any, Any> { | |
+ return new Triple<>((A)first, (B)second, (C)third); | |
+ } | |
+ | |
+ public override fun hashCode(): Int { | |
+ return ((if (this.first == null) 0 else this.first.hashCode()) * 31 + (if (this.second == null) 0 else this.second.hashCode())) * 31 | |
+ + (if (this.third == null) 0 else this.third.hashCode()); | |
+ } | |
+ | |
+ public override operator fun equals(other: Any?): Boolean { | |
+ if (this === other) { | |
+ return true; | |
+ } else if (other !is Triple) { | |
+ return false; | |
+ } else { | |
+ var var2: Triple = other as Triple; | |
+ if (!(this.first == (other as Triple).first)) { | |
+ return false; | |
+ } else if (!(this.second == var2.second)) { | |
+ return false; | |
+ } else { | |
+ return this.third == var2.third; | |
+ } | |
+ } | |
+ } | |
+} | |
diff --color -ur decomp-current/kotlin/TypeCastException.java decomp-fixes/kotlin/TypeCastException.java | |
--- decomp-current/kotlin/TypeCastException.java 2024-01-21 17:29:18.430074400 -0600 | |
+++ decomp-fixes/kotlin/TypeCastException.java 2024-01-21 17:27:28.909191400 -0600 | |
@@ -1,15 +1,5 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:150) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+open class TypeCastException : ClassCastException { | |
+ | |
+ public constructor(message: String?) : super(message)} | |
diff --color -ur decomp-current/kotlin/UninitializedPropertyAccessException.java decomp-fixes/kotlin/UninitializedPropertyAccessException.java | |
--- decomp-current/kotlin/UninitializedPropertyAccessException.java 2024-01-21 17:29:18.436921100 -0600 | |
+++ decomp-fixes/kotlin/UninitializedPropertyAccessException.java 2024-01-21 17:27:28.916935400 -0600 | |
@@ -1,15 +1,7 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0 | |
- at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100) | |
- at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106) | |
- at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302) | |
- at java.base/java.util.Objects.checkIndex(Objects.java:385) | |
- at java.base/java.util.ArrayList.get(ArrayList.java:427) | |
- at org.vineflower.kotlin.struct.KConstructor.stringify(KConstructor.java:150) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:377) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+class UninitializedPropertyAccessException : RuntimeException { | |
+ | |
+ public constructor(message: String?) : super(message) | |
+ public constructor(message: String?, cause: Throwable?) : super(message, cause) | |
+ public constructor(cause: Throwable?) : super(cause)} | |
diff --color -ur decomp-current/kotlin/UnsafeLazyImpl.java decomp-fixes/kotlin/UnsafeLazyImpl.java | |
--- decomp-current/kotlin/UnsafeLazyImpl.java 2024-01-21 17:29:18.437924100 -0600 | |
+++ decomp-fixes/kotlin/UnsafeLazyImpl.java 2024-01-21 17:27:28.917933900 -0600 | |
@@ -1,10 +1,38 @@ | |
-/* | |
-$VF: Unable to decompile class | |
-Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!) | |
-java.lang.NullPointerException: Cannot invoke "org.vineflower.kotlin.struct.KType.stringify(int)" because "this.type" is null | |
- at org.vineflower.kotlin.struct.KProperty.stringify(KProperty.java:106) | |
- at org.vineflower.kotlin.KotlinWriter.writeClass(KotlinWriter.java:344) | |
- at org.jetbrains.java.decompiler.main.ClassesProcessor.writeClass(ClassesProcessor.java:472) | |
- at org.jetbrains.java.decompiler.main.Fernflower.getClassContent(Fernflower.java:191) | |
- at org.jetbrains.java.decompiler.struct.ContextUnit.lambda$save$3(ContextUnit.java:187) | |
-*/ | |
\ No newline at end of file | |
+package kotlin | |
+ | |
+import java.io.Serializable | |
+import kotlin.jvm.functions.Function0 | |
+ | |
+internal class UnsafeLazyImpl<T>(initializer: () -> Any) : Lazy<T>, Serializable { | |
+ private final var _value: Any? | |
+ private final var initializer: (() -> Any)? | |
+ private set | |
+ public open val value: Any | |
+ public open get() { | |
+ if (this._value === UNINITIALIZED_VALUE.INSTANCE) { | |
+ var var10001: Function0 = this.initializer; | |
+ this._value = var10001.invoke(); | |
+ this.initializer = null; | |
+ } | |
+ | |
+ return (T)this._value; | |
+ } | |
+ | |
+ | |
+ init { | |
+ this.initializer = initializer; | |
+ this._value = UNINITIALIZED_VALUE.INSTANCE; | |
+ } | |
+ | |
+ public override fun isInitialized(): Boolean { | |
+ return this._value != UNINITIALIZED_VALUE.INSTANCE; | |
+ } | |
+ | |
+ public override fun toString(): String { | |
+ return if (this.isInitialized()) java.lang.String.valueOf(this.getValue()) else "Lazy value not initialized yet."; | |
+ } | |
+ | |
+ private fun writeReplace(): Any { | |
+ return new InitializedLazyImpl(this.getValue()); | |
+ } | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment