Move everything under kotlin-native folder

I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
This commit is contained in:
Stanislav Erokhin
2020-10-27 21:00:28 +03:00
parent 91e4162dad
commit f624800b84
2830 changed files with 0 additions and 0 deletions
@@ -0,0 +1,20 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.catch3
import kotlin.test.*
@Test fun runTest() {
try {
println("Before")
throw Error("Error happens")
println("After")
} catch (e: Throwable) {
println("Caught Throwable")
}
println("Done")
}
@@ -0,0 +1,24 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.catch4
import kotlin.test.*
@Test fun runTest() {
try {
println("Before")
throw Error("Error happens")
println("After")
} catch (e: Exception) {
println("Caught Exception")
} catch (e: Error) {
println("Caught Error")
} catch (e: Throwable) {
println("Caught Throwable")
}
println("Done")
}
@@ -0,0 +1,34 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.catch5
import kotlin.test.*
@Test fun runTest() {
try {
try {
println("Before")
foo()
println("After")
} catch (e: Exception) {
println("Caught Exception")
}
println("After nested try")
} catch (e: Error) {
println("Caught Error")
} catch (e: Throwable) {
println("Caught Throwable")
}
println("Done")
}
fun foo() {
throw Error("Error happens")
println("After in foo()")
}
@@ -0,0 +1,30 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.catch6
import kotlin.test.*
@Test fun runTest() {
try {
println("Before")
foo()
println("After")
} catch (e: Exception) {
println("Caught Exception")
} catch (e: Error) {
println("Caught Error")
}
println("Done")
}
fun foo() {
try {
throw Error("Error happens")
} catch (e: Exception) {
println("Caught Exception")
}
}
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.catch8
import kotlin.test.*
@Test fun runTest() {
try {
throw Error("Error happens")
} catch (e: Throwable) {
val message = e.message
if (message != null) {
println(message)
}
}
}
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally1
import kotlin.test.*
@Test fun runTest() {
try {
println("Try")
} finally {
println("Finally")
}
println("Done")
}
@@ -0,0 +1,21 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally10
import kotlin.test.*
@Test fun runTest() {
while (true) {
try {
continue
} finally {
println("Finally")
break
}
}
println("After")
}
@@ -0,0 +1,25 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally11
import kotlin.test.*
@Test fun runTest() {
try {
try {
return
} catch (e: Error) {
println("Catch 1")
} finally {
println("Finally")
throw Error()
}
} catch (e: Error) {
println("Catch 2")
}
println("Done")
}
@@ -0,0 +1,23 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally2
import kotlin.test.*
@Test fun runTest() {
try {
println("Try")
throw Error("Error happens")
println("After throw")
} catch (e: Error) {
println("Caught Error")
} finally {
println("Finally")
}
println("Done")
}
@@ -0,0 +1,28 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally3
import kotlin.test.*
@Test fun runTest() {
try {
try {
println("Try")
throw Error("Error happens")
println("After throw")
} finally {
println("Finally")
}
println("After nested try")
} catch (e: Error) {
println("Caught Error")
}
println("Done")
}
@@ -0,0 +1,34 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally4
import kotlin.test.*
@Test fun runTest() {
try {
try {
println("Try")
throw Error("Error happens")
println("After throw")
} catch (e: Error) {
println("Catch")
throw Exception()
println("After throw")
} finally {
println("Finally")
}
println("After nested try")
} catch (e: Error) {
println("Caught Error")
} catch (e: Exception) {
println("Caught Exception")
}
println("Done")
}
@@ -0,0 +1,24 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally5
import kotlin.test.*
@Test fun runTest() {
println(foo())
}
fun foo(): Int {
try {
println("Done")
return 0
} finally {
println("Finally")
}
println("After")
return 1
}
@@ -0,0 +1,25 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally6
import kotlin.test.*
@Test fun runTest() {
println(foo())
}
fun foo(): Int {
try {
println("Done")
return 0
} finally {
println("Finally")
return 1
}
println("After")
return 2
}
@@ -0,0 +1,25 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally7
import kotlin.test.*
@Test fun runTest() {
println(foo())
}
fun foo(): Int {
try {
println("Done")
throw Error()
} finally {
println("Finally")
return 1
}
println("After")
return 2
}
@@ -0,0 +1,27 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally8
import kotlin.test.*
@Test fun runTest() {
println(foo())
}
fun foo(): Int {
try {
try {
return 42
} finally {
println("Finally 1")
}
} finally {
println("Finally 2")
}
println("After")
return 2
}
@@ -0,0 +1,30 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.finally9
import kotlin.test.*
@Test fun runTest() {
do {
try {
break
} finally {
println("Finally 1")
}
} while (false)
var stop = false
while (!stop) {
try {
stop = true
continue
} finally {
println("Finally 2")
}
}
println("After")
}
@@ -0,0 +1,33 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.returnsDifferentTypes
import kotlin.test.*
class ReceiveChannel<out E>
inline fun <E, R> ReceiveChannel<E>.consume(block: ReceiveChannel<E>.() -> R): R {
try {
return block()
}
finally {
println("zzz")
}
}
inline fun <E> ReceiveChannel<E>.elementAtOrElse(index: Int, defaultValue: (Int) -> E): E =
consume {
if (index < 0)
return defaultValue(index)
return 42 as E
}
fun <E> ReceiveChannel<E>.elementAt(index: Int): E =
elementAtOrElse(index) { throw IndexOutOfBoundsException("qxx") }
@Test fun runTest() {
println(ReceiveChannel<Int>().elementAt(0))
}
@@ -0,0 +1,18 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.try1
import kotlin.test.*
@Test fun runTest() {
val x = try {
5
} catch (e: Throwable) {
6
}
println(x)
}
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.try2
import kotlin.test.*
@Test fun runTest() {
val x = try {
throw Error()
5
} catch (e: Throwable) {
6
}
println(x)
}
@@ -0,0 +1,18 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.try3
import kotlin.test.*
@Test fun runTest() {
val x = try {
throw Error()
} catch (e: Throwable) {
6
}
println(x)
}
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the LICENSE file.
*/
package codegen.`try`.try4
import kotlin.test.*
@Test fun runTest() {
val x = try {
println("Try")
5
} catch (e: Throwable) {
throw e
}
println(x)
}