-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
STDLIB_COMPILATION
directive
In the current implementation, box test classloader loads classes from `kotlin-stdlib.jar` even if we redefine it in the test sources. We need to change this behavior, e.g., to test stdlib compilation. However, implementation of such classloader consumes more metaspace memory as we cannot share the stdlib classloader between different test instances. Thus, we leave the old behavior by-default and change it only if the test has `STDLIB_COMPILATION` directive.
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
MODULE main | ||
CLASS kotlin/UIntArray.class | ||
CLASS METADATA | ||
K1 | ||
--- | ||
K2 | ||
equals(Ljava/lang/Object;)Z | ||
K1 | ||
equals-impl([ILjava/lang/Object;)Z | ||
K2 | ||
--- | ||
K1 | ||
--- | ||
K2 | ||
hashCode()I | ||
K1 | ||
hashCode-impl([I)I | ||
K2 | ||
--- | ||
K1 | ||
--- | ||
K2 | ||
toString()Ljava/lang/String; | ||
K1 | ||
toString-impl([I)Ljava/lang/String; | ||
K2 | ||
--- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// TARGET_BACKEND: JVM | ||
// WITH_STDLIB | ||
// LANGUAGE: +MultiPlatformProjects | ||
// JVM_ABI_K1_K2_DIFF: KT-67645 | ||
// STDLIB_COMPILATION | ||
|
||
// MODULE: common | ||
// FILE: array.kt | ||
|
||
package kotlin | ||
|
||
@kotlin.jvm.JvmInline | ||
value class UIntArray(val delegate: IntArray) : Collection<UInt> { | ||
override val size: Int | ||
get() = delegate.size | ||
|
||
override fun isEmpty(): Boolean = null!! | ||
override fun iterator(): Iterator<UInt> = null!! | ||
override fun containsAll(elements: Collection<UInt>): Boolean = null!! | ||
override fun contains(element: UInt): Boolean = null!! | ||
operator fun get(index: Int): Int = 42 | ||
operator fun set(index: Int, value: UInt) {} | ||
} | ||
|
||
// MODULE: main()()(common) | ||
// FILE: test.kt | ||
|
||
fun box(): String = if (UIntArray(intArrayOf(1))[0] == 42) "OK" else "Fail" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.