diff --git a/.gitmodules b/.gitmodules index 7c9fe241d99..e69de29bb2d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "third-party/ios/libffi"] - path = third-party/ios/libffi - url = https://github.com/ksjogo/libffi diff --git a/Interop/Indexer/build.gradle b/Interop/Indexer/build.gradle index 2b4e8212de0..e91ab194e44 100644 --- a/Interop/Indexer/build.gradle +++ b/Interop/Indexer/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + buildscript { repositories { mavenCentral() diff --git a/Interop/Indexer/prebuilt/nativeInteropStubs/kotlin/clang/clang.kt b/Interop/Indexer/prebuilt/nativeInteropStubs/kotlin/clang/clang.kt index 093731242d7..95d3e111507 100644 --- a/Interop/Indexer/prebuilt/nativeInteropStubs/kotlin/clang/clang.kt +++ b/Interop/Indexer/prebuilt/nativeInteropStubs/kotlin/clang/clang.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + @file:Suppress("UNUSED_EXPRESSION") package clang diff --git a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt index 259dcc4f67c..f3d7ccf0645 100644 --- a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt +++ b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.indexer import clang.* diff --git a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/MacroConstants.kt b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/MacroConstants.kt index 7eaf2084828..f425ef04155 100644 --- a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/MacroConstants.kt +++ b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/MacroConstants.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.indexer import clang.* diff --git a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/NativeIndex.kt b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/NativeIndex.kt index a95916cb4d9..5da08cbe509 100644 --- a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/NativeIndex.kt +++ b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/NativeIndex.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.indexer enum class Language { diff --git a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Utils.kt b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Utils.kt index b6ed261731a..d4ce394dbcc 100644 --- a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Utils.kt +++ b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Utils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.indexer import clang.* diff --git a/Interop/Runtime/build.gradle b/Interop/Runtime/build.gradle index 439bdb19055..a0d14823462 100644 --- a/Interop/Runtime/build.gradle +++ b/Interop/Runtime/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + buildscript { repositories { mavenCentral() diff --git a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmCallbacks.kt b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmCallbacks.kt index 08ac99b3222..9f8332e5249 100644 --- a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmCallbacks.kt +++ b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmCallbacks.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlinx.cinterop /** diff --git a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmNativeMem.kt b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmNativeMem.kt index 6353d8a060c..2b2ae6df163 100644 --- a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmNativeMem.kt +++ b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmNativeMem.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlinx.cinterop import sun.misc.Unsafe diff --git a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmTypes.kt b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmTypes.kt index 1b53267fad6..8863b72910e 100644 --- a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmTypes.kt +++ b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmTypes.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlinx.cinterop import kotlin.reflect.companionObjectInstance diff --git a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmUtils.kt b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmUtils.kt index fefdd69d1fd..3a7a8ebf0a9 100644 --- a/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmUtils.kt +++ b/Interop/Runtime/src/jvm/kotlin/kotlinx/cinterop/JvmUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlinx.cinterop internal fun decodeFromUtf8(bytes: ByteArray) = String(bytes) diff --git a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Types.kt b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Types.kt index 6c6a66a2f2e..30be39f268a 100644 --- a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Types.kt +++ b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Types.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlinx.cinterop /** diff --git a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Utils.kt b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Utils.kt index 9d3f57776dc..a9253fae655 100644 --- a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Utils.kt +++ b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Utils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlinx.cinterop interface NativePlacement { diff --git a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/package-info.java b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/package-info.java index a98e94a8be8..9e737b69fe9 100644 --- a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/package-info.java +++ b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * This package contains API and runtime support for calling C code from Kotlin (aka Kotlin C interop). * diff --git a/Interop/StubGenerator/build.gradle b/Interop/StubGenerator/build.gradle index f2953081046..a4b210c3ed6 100644 --- a/Interop/StubGenerator/build.gradle +++ b/Interop/StubGenerator/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + buildscript { repositories { mavenCentral() diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropConfiguration.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropConfiguration.kt index 12acb30221b..3b1640c8bb3 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropConfiguration.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/InteropConfiguration.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.gen.jvm import org.jetbrains.kotlin.native.interop.indexer.NativeLibrary diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt index c60774c2f3b..33ced7b9617 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/StubGenerator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.gen.jvm import org.jetbrains.kotlin.native.interop.indexer.* diff --git a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt index f12b41582be..526e523f20f 100644 --- a/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt +++ b/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.native.interop.gen.jvm import org.jetbrains.kotlin.native.interop.indexer.Language diff --git a/InteropExample/build.gradle b/InteropExample/build.gradle index e61326bde68..48ccf23e967 100644 --- a/InteropExample/build.gradle +++ b/InteropExample/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + buildscript { repositories { mavenCentral() diff --git a/InteropExample/src/main/kotlin/main.kt b/InteropExample/src/main/kotlin/main.kt index 56249089102..98cc44c75a4 100644 --- a/InteropExample/src/main/kotlin/main.kt +++ b/InteropExample/src/main/kotlin/main.kt @@ -1,3 +1,18 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import kotlinx.cinterop.* import llvm.* @@ -42,4 +57,4 @@ fun main(args: Array) = memScoped { } LLVMDisposeBuilder(builder) LLVMDisposeExecutionEngine(engineRef.value) -} \ No newline at end of file +} diff --git a/backend.native/bc.frontend/build.gradle b/backend.native/bc.frontend/build.gradle index 02f67980c44..71769196787 100644 --- a/backend.native/bc.frontend/build.gradle +++ b/backend.native/bc.frontend/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + buildscript { ext.kotlin_version = '1.0.3' repositories { diff --git a/backend.native/build.gradle b/backend.native/build.gradle index f3ddc034e21..bb6aaa2efb4 100644 --- a/backend.native/build.gradle +++ b/backend.native/build.gradle @@ -18,6 +18,22 @@ apply plugin: org.jetbrains.kotlin.NativeInteropPlugin +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // (gets applied to this project and all its subprojects) allprojects { repositories { diff --git a/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt b/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt index f6a07b996f7..342d30290c2 100644 --- a/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt +++ b/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.cli.bc import com.intellij.openapi.Disposable diff --git a/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.java b/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.java index bb89176ca88..b6a6d6dde6c 100644 --- a/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.java +++ b/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.java @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.cli.bc; import com.sampullara.cli.Argument; diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/AbstractValueUsageTransformer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/AbstractValueUsageTransformer.kt index bdec3766e81..5a42650c3e8 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/AbstractValueUsageTransformer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/AbstractValueUsageTransformer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.builtins.KotlinBuiltIns diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/CheckIrElementVisitor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/CheckIrElementVisitor.kt index acee1561832..62790b06dd9 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/CheckIrElementVisitor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/CheckIrElementVisitor.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.builtins.KotlinBuiltIns diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/DeepCopyIrTreeWithDeclarations.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/DeepCopyIrTreeWithDeclarations.kt index cb5df946b95..76e40f06746 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/DeepCopyIrTreeWithDeclarations.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/DeepCopyIrTreeWithDeclarations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrElementTransformerVoidWithContext.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrElementTransformerVoidWithContext.kt index 687693e6ad3..8871d561c1b 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrElementTransformerVoidWithContext.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrElementTransformerVoidWithContext.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.descriptors.ClassDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrValidator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrValidator.kt index 4f88bfb2390..05cdd6a0793 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrValidator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/IrValidator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/TailRecursionCallsCollector.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/TailRecursionCallsCollector.kt index eb3883d51fd..66e1e4e3e6f 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/TailRecursionCallsCollector.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/TailRecursionCallsCollector.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.ir.IrElement diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/Utils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/Utils.kt index 95495a1b4bd..41433806827 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/Utils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/Utils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common import org.jetbrains.kotlin.backend.jvm.JvmBackendContext diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/descriptors/DescriptorUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/descriptors/DescriptorUtils.kt index 6ca70150d27..1f2426173a8 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/descriptors/DescriptorUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/descriptors/DescriptorUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common.descriptors import org.jetbrains.kotlin.descriptors.CallableDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/AbstractClosureAnnotator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/AbstractClosureAnnotator.kt index c1fa8e82fa1..cfe1caeb193 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/AbstractClosureAnnotator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/AbstractClosureAnnotator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common.lower import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt index e063feabbbc..a5f61d1fc72 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LocalDeclarationsLowering.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LowerUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LowerUtils.kt index 02939161547..56bf2fb6e7f 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LowerUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/LowerUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common.lower import org.jetbrains.kotlin.backend.common.BackendContext diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt index c4aa8faea8d..e6ed6f6d0f4 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/common/lower/TailrecLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.common.lower import org.jetbrains.kotlin.backend.common.BackendContext diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Context.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Context.kt index b70b1b3869c..8aaecb8e087 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Context.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Context.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import llvm.LLVMDumpModule diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Distribution.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Distribution.kt index 87e53cc7e2b..5f6a5dd6496 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Distribution.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Distribution.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.config.CompilerConfiguration diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EnumSpecialDescriptorsFactory.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EnumSpecialDescriptorsFactory.kt index 983c04c2ebb..7d01c4257d6 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EnumSpecialDescriptorsFactory.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EnumSpecialDescriptorsFactory.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.backend.jvm.descriptors.initialize diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EscapeAnalysis.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EscapeAnalysis.kt index 4eb50babcbb..fd05a8361e2 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EscapeAnalysis.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/EscapeAnalysis.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.backend.common.descriptors.allParameters diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Exceptions.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Exceptions.kt index 08f97286c46..c88714a65fd 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Exceptions.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Exceptions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan /** diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Helper0.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Helper0.kt index 5927e040469..ae16f3a7436 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Helper0.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Helper0.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + // // Example startup helper for Kotlin N compiler. Compile to JAR and add it to // Kotlin N classpath - it will get loaded and executed automatically. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/InteropUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/InteropUtils.kt index 2b3ed2aab68..2ce36db88df 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/InteropUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/InteropUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.builtins.KotlinBuiltIns diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBackendContext.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBackendContext.kt index 0fcb7b2f231..5a8815dcc27 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBackendContext.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBackendContext.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.backend.common.BackendContext diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBuiltInClassDescriptorFactory.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBuiltInClassDescriptorFactory.kt index b938037a3a8..bf667b03c6f 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBuiltInClassDescriptorFactory.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanBuiltInClassDescriptorFactory.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.builtins.BuiltInsPackageFragment diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfig.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfig.kt index 94f179f9cba..e5970a2f983 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfig.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfig.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import com.intellij.openapi.project.Project diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfigurationKeys.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfigurationKeys.kt index 7b41d410ac2..2ab36273aca 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfigurationKeys.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanConfigurationKeys.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.config.CompilerConfigurationKey diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanDriver.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanDriver.kt index 16e4a9429f9..e8fd1bb2f8f 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanDriver.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanDriver.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.analyzer.AnalysisResult diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLower.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLower.kt index 68c1aad2485..71d12016772 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLower.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanLower.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.backend.common.runOnFilePostfix diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPhases.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPhases.kt index a269692144a..c3b86c565c4 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPhases.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPhases.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.backend.konan.util.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatform.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatform.kt index a1a530868bb..a0a5c320da8 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatform.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatform.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatformConfigurator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatformConfigurator.kt index 5fb0eea963b..dbb0fb591a4 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatformConfigurator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanPlatformConfigurator.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanProperties.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanProperties.kt index 9cf8e8b49af..68f1f13a257 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanProperties.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanProperties.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import java.io.File diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanTarget.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanTarget.kt index 2238defcb3e..5be3607b6ac 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanTarget.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanTarget.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.config.CommonConfigurationKeys diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/LinkStage.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/LinkStage.kt index 41eecd7089f..401259f6c29 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/LinkStage.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/LinkStage.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import java.io.File diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeBackendFacade.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeBackendFacade.kt index af4e63a57fb..3d896be75e0 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeBackendFacade.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeBackendFacade.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.codegen.CompilationErrorHandler diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Reporting.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Reporting.kt index dfec8414449..932707f2e9d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Reporting.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/Reporting.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.backend.common.BackendContext diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/TopDownAnalyzerFacadeForKonan.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/TopDownAnalyzerFacadeForKonan.kt index c4040b19123..e6df592926e 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/TopDownAnalyzerFacadeForKonan.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/TopDownAnalyzerFacadeForKonan.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ValueTypes.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ValueTypes.kt index b460628a8a3..12dbff34af5 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ValueTypes.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ValueTypes.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan import org.jetbrains.kotlin.builtins.KotlinBuiltIns diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/ClassVtablesBuilder.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/ClassVtablesBuilder.kt index 2e53bd643bf..bbb926db427 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/ClassVtablesBuilder.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/ClassVtablesBuilder.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.descriptors import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepPrintVisitor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepPrintVisitor.kt index 7730e7df0a4..5e8762b6444 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepPrintVisitor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepPrintVisitor.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.descriptors import org.jetbrains.kotlin.backend.konan.llvm.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepVisitor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepVisitor.kt index 32a7b674066..57625d075ea 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepVisitor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DeepVisitor.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.descriptors import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DescriptorUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DescriptorUtils.kt index 1f157209079..ea6547f9166 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DescriptorUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/DescriptorUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.descriptors import org.jetbrains.kotlin.backend.konan.KonanBuiltIns diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt index 3455b1ea5a0..05a4c4ae7df 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/KonanSharedVariablesManager.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.descriptors diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/utils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/utils.kt index 4e22a1da0b5..93ff220b9f1 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/utils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/descriptors/utils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.descriptors import org.jetbrains.kotlin.descriptors.ClassDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/injection.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/injection.kt index 6fdd642a4c5..8f75090792c 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/injection.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/injection.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt index 3a9b1909932..1b620ded100 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/Ir.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.ir import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/IrUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/IrUtils.kt index ee7f8e17000..8e074973ed9 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/IrUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/IrUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.ir import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanIr.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanIr.kt index 62096a4acc2..c92eb539a0c 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanIr.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/KonanIr.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.ir import org.jetbrains.kotlin.descriptors.FunctionDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/ModuleIndex.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/ModuleIndex.kt index 2550d71dd9c..ec7818212ef 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/ModuleIndex.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ir/ModuleIndex.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.ir import org.jetbrains.kotlin.descriptors.ClassDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt index 53694b04265..8bfbe7c3412 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/BinaryInterface.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.LLVMTypeRef diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt index bd012cc41e5..e7538cc72e7 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/CodeGenerator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/ContextUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/ContextUtils.kt index 530046126ad..44d40084652 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/ContextUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/ContextUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/DataLayout.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/DataLayout.kt index 8251236464d..51fffe46bcc 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/DataLayout.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/DataLayout.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/HashUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/HashUtils.kt index ada53b3c785..fad03b4cbd0 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/HashUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/HashUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt index 888f1c34dbf..f750dff0969 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/IrToBitcode.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt index 97eba1d293c..eb9fe3ff586 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmUtils.kt index a9f0abef5e2..dd38b884a99 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/MetadataGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/MetadataGenerator.kt index 869760e88b8..f75a5a9b18a 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/MetadataGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/MetadataGenerator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/RTTIGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/RTTIGenerator.kt index 28e5e9f8693..428789a5177 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/RTTIGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/RTTIGenerator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/Runtime.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/Runtime.kt index c5f7f55aa9f..1ab80dc5362 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/Runtime.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/Runtime.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import kotlinx.cinterop.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticData.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticData.kt index 3da2fd75652..b516c0fac67 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticData.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticData.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticDataUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticDataUtils.kt index b97edd903d7..6649430da85 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticDataUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticDataUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticObjects.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticObjects.kt index dedb2da1bf3..cd54ee57066 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticObjects.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/StaticObjects.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.LLVMLinkage diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/UsedAnnotation.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/UsedAnnotation.kt index c1299459e05..5cfb60e3a2d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/UsedAnnotation.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/UsedAnnotation.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import org.jetbrains.kotlin.descriptors.FunctionDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/VariableManager.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/VariableManager.kt index a8bc4568417..ed482911a36 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/VariableManager.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/VariableManager.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.llvm import llvm.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt index cf1b1c5fe4b..73b1f933246 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/Autoboxing.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.AbstractValueUsageTransformer diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt index e0c8c16d35f..d95ebcfcbaf 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BridgesBuilding.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.BodyLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt index a5765703343..a2a778fde36 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/BuiltinOperatorLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.BodyLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/CallableReferenceLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/CallableReferenceLowering.kt index 1ed929866e6..1c7df23b1ec 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/CallableReferenceLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/CallableReferenceLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.DeclarationContainerLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DefaultArgumentStubGenerator.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DefaultArgumentStubGenerator.kt index 7a33c680808..384d39543fe 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DefaultArgumentStubGenerator.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DefaultArgumentStubGenerator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.BodyLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DelegationLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DelegationLowering.kt index cb07fd504ad..e9f6448aa14 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DelegationLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/DelegationLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt index bd4f4899b95..d3e64ed3137 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/EnumClassLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.ClassLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt index 90100496ac6..810b3e0d650 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/FunctionInlining.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt index c95da0b2c9d..8791b57aab2 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InitializersLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.ClassLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InnerClassLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InnerClassLowering.kt index 885cc556524..7ac07526113 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InnerClassLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InnerClassLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.ClassLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt index ade9aebb5e5..cb6366b431d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/InteropLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/LateinitLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/LateinitLowering.kt index 5cef1f6e6e1..5c4eafeccd5 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/LateinitLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/LateinitLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/StringConcatenationLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/StringConcatenationLowering.kt index bdd22663629..b366d5ba360 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/StringConcatenationLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/StringConcatenationLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.FileLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt index 19faba44154..d8443899056 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/TypeOperatorLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.FunctionLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/VarargLowering.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/VarargLowering.kt index 078450f98b7..bf75c2e67d0 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/VarargLowering.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/lower/VarargLowering.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.lower import org.jetbrains.kotlin.backend.common.DeclarationContainerLoweringPass diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/BackingFieldVisitor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/BackingFieldVisitor.kt index 04d45e7abc9..257ae19088b 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/BackingFieldVisitor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/BackingFieldVisitor.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/DescriptorTable.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/DescriptorTable.kt index a9de8fa5615..1c77ed3bf82 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/DescriptorTable.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/DescriptorTable.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import kotlin.properties.Delegates diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorDeserializer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorDeserializer.kt index 5c3fbaa9eeb..fde003a393d 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorDeserializer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorDeserializer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt index 6fbcb1e4f25..ffd4686244e 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/IrDescriptorSerializer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanClassDataFinder.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanClassDataFinder.kt index f1142ddfdb3..78d56772051 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanClassDataFinder.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanClassDataFinder.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.descriptors.SourceElement diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanDescriptorSerializer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanDescriptorSerializer.kt index c2d0727a631..098cbe20111 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanDescriptorSerializer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanDescriptorSerializer.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanPackageFragment.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanPackageFragment.kt index cd6aaf0cf3c..ba8a7821857 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanPackageFragment.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanPackageFragment.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.descriptors.ModuleDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializationUtil.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializationUtil.kt index e830ce171b5..6be6f1b6699 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializationUtil.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializationUtil.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializerExtension.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializerExtension.kt index 188e3ff2747..04be673721c 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializerExtension.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanSerializerExtension.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanStringTable.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanStringTable.kt index f9bcf4dcbd4..736d75dff83 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanStringTable.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanStringTable.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/LocalDeclarationDeserializer.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/LocalDeclarationDeserializer.kt index 7620cc29453..9be74ff5902 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/LocalDeclarationDeserializer.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/LocalDeclarationDeserializer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializeIr.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializeIr.kt index 15a63418a1c..599469777cf 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializeIr.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializeIr.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializerVisitor.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializerVisitor.kt index d7f4137887d..c4ead3c9825 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializerVisitor.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/SerializerVisitor.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.ir import org.jetbrains.kotlin.backend.konan.Context diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/StringTableUtil.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/StringTableUtil.kt index c82b07ecc64..f84d9b370c5 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/StringTableUtil.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/StringTableUtil.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.serialization import org.jetbrains.kotlin.descriptors.* diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/util/util.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/util/util.kt index bf32b140230..d03fceba95c 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/util/util.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/util/util.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.backend.konan.util import kotlin.system.measureTimeMillis diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/builders/IrBuilders.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/builders/IrBuilders.kt index 8b5437af825..dd251ada63e 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/builders/IrBuilders.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/builders/IrBuilders.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.ir.builders import org.jetbrains.kotlin.descriptors.ValueDescriptor diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils.kt index a0186e2fe5b..3c333eae43c 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/ir/util/IrUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.ir.util import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation diff --git a/backend.native/konan.properties b/backend.native/konan.properties index 97361ad731e..9ab5cb7d342 100644 --- a/backend.native/konan.properties +++ b/backend.native/konan.properties @@ -1,4 +1,20 @@ +# +# Copyright 2010-2017 JetBrains s.r.o. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + # TODO: Do we need a $variable substitution mechanism here? llvmVersion = 3.9.0 dependenciesUrl = http://download.jetbrains.com/kotlin/native diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 9ec4378fb03..2a9850d4d5b 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import groovy.json.JsonOutput import org.jetbrains.kotlin.* diff --git a/build.gradle b/build.gradle index 4c462409d6b..c82ef3f84b6 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,18 @@ -import com.sun.tools.doclets.internal.toolkit.util.Util +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import groovy.io.FileType //ant.importBuild 'backend.native/kotlin-ir/build.xml' diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 3e6b0432430..1e11815ff25 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + apply plugin: 'groovy' repositories { diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/CompileToBitcode.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/CompileToBitcode.groovy index e60343b83f5..d4108880c22 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/CompileToBitcode.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/CompileToBitcode.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin import org.gradle.api.DefaultTask diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecClang.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecClang.groovy index 2576259b0b6..7303097f2ff 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecClang.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecClang.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin import org.gradle.api.Action diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecRemote.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecRemote.groovy index 9bbace0c64f..2bdc0a3f070 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecRemote.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/ExecRemote.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin import org.gradle.api.Action diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy index d7f2db59db6..daf2c09e618 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/KonanTest.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin import groovy.json.JsonOutput diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy index 4ea9c9a86ac..ef53a361e13 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin import org.gradle.api.Named diff --git a/buildSrc/src/main/groovy/org/jetbrains/kotlin/Reporter.groovy b/buildSrc/src/main/groovy/org/jetbrains/kotlin/Reporter.groovy index 5c967f26e0e..512de92a70e 100644 --- a/buildSrc/src/main/groovy/org/jetbrains/kotlin/Reporter.groovy +++ b/buildSrc/src/main/groovy/org/jetbrains/kotlin/Reporter.groovy @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin import com.ullink.slack.simpleslackapi.impl.SlackSessionFactory diff --git a/common/build.gradle b/common/build.gradle index 698c7e49608..ba3a23dc457 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import org.jetbrains.kotlin.CompileCppToBitcode // TODO: consider using some Gradle plugins to build and test diff --git a/dependencies/build.gradle b/dependencies/build.gradle index cc197072900..7c53454c7a9 100644 --- a/dependencies/build.gradle +++ b/dependencies/build.gradle @@ -8,6 +8,22 @@ buildscript { } } +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + abstract class NativeDep extends DefaultTask { private String getCurrentHostTarget() { diff --git a/experiments/MemLayout/.idea/compiler.xml b/experiments/MemLayout/.idea/compiler.xml deleted file mode 100644 index 96cc43efa6a..00000000000 --- a/experiments/MemLayout/.idea/compiler.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/copyright/profiles_settings.xml b/experiments/MemLayout/.idea/copyright/profiles_settings.xml deleted file mode 100644 index e7bedf3377d..00000000000 --- a/experiments/MemLayout/.idea/copyright/profiles_settings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/dictionaries/jetbrains.xml b/experiments/MemLayout/.idea/dictionaries/jetbrains.xml deleted file mode 100644 index e74e927f28f..00000000000 --- a/experiments/MemLayout/.idea/dictionaries/jetbrains.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/libraries/KotlinJavaRuntime.xml b/experiments/MemLayout/.idea/libraries/KotlinJavaRuntime.xml deleted file mode 100644 index c630c0b8796..00000000000 --- a/experiments/MemLayout/.idea/libraries/KotlinJavaRuntime.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/misc.xml b/experiments/MemLayout/.idea/misc.xml deleted file mode 100644 index c6d8fb73c8c..00000000000 --- a/experiments/MemLayout/.idea/misc.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/modules.xml b/experiments/MemLayout/.idea/modules.xml deleted file mode 100644 index cf169cddad6..00000000000 --- a/experiments/MemLayout/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/runConfigurations/_1_MainKt.xml b/experiments/MemLayout/.idea/runConfigurations/_1_MainKt.xml deleted file mode 100644 index 26955536745..00000000000 --- a/experiments/MemLayout/.idea/runConfigurations/_1_MainKt.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/vcs.xml b/experiments/MemLayout/.idea/vcs.xml deleted file mode 100644 index b2bdec2d71b..00000000000 --- a/experiments/MemLayout/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/.idea/workspace.xml b/experiments/MemLayout/.idea/workspace.xml deleted file mode 100644 index cce7a8cb22f..00000000000 --- a/experiments/MemLayout/.idea/workspace.xml +++ /dev/null @@ -1,747 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1472818752311 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/MemLayout.iml b/experiments/MemLayout/MemLayout.iml deleted file mode 100644 index 245d3429faa..00000000000 --- a/experiments/MemLayout/MemLayout.iml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/experiments/MemLayout/native-src/bridge.c b/experiments/MemLayout/native-src/bridge.c deleted file mode 100644 index efa8c998ef9..00000000000 --- a/experiments/MemLayout/native-src/bridge.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include -#include -#include - -JNIEXPORT jlong JNICALL Java_bridge_findSym(JNIEnv *env, jobject bridge, jstring name) { - char* nameChars = (*env)->GetStringUTFChars(env, name, NULL); - jlong result = dlsym(RTLD_DEFAULT, nameChars); - (*env)->ReleaseStringUTFChars(env, name, nameChars); - return result; -} - -JNIEXPORT jlong JNICALL Java_bridge_call0(JNIEnv *env, jobject obj, jlong ptr) { - intptr_t (*func)() = ptr; - return func(); - -} - -JNIEXPORT jlong JNICALL Java_bridge_call1(JNIEnv *env, jobject obj, jlong ptr, jlong arg1) { - intptr_t (*func)(intptr_t) = ptr; - return func(arg1); - -} - -JNIEXPORT jlong JNICALL Java_bridge_call2(JNIEnv *env, jobject obj, jlong ptr, jlong arg1, jlong arg2) { - intptr_t (*func)(intptr_t, intptr_t) = ptr; - return func(arg1, arg2); - -} - -JNIEXPORT jlong JNICALL Java_bridge_call3(JNIEnv *env, jobject obj, jlong ptr, jlong arg1, jlong arg2, jlong arg3) { - intptr_t (*func)(intptr_t, intptr_t, intptr_t) = ptr; - return func(arg1, arg2, arg3); - -} - -JNIEXPORT jlong JNICALL Java_bridge_call4(JNIEnv *env, jobject obj, jlong ptr, jlong arg1, jlong arg2, jlong arg3, jlong arg4) { - intptr_t (*func)(intptr_t, intptr_t, intptr_t, intptr_t) = ptr; - return func(arg1, arg2, arg3, arg4); - -} diff --git a/experiments/MemLayout/native-src/build-bridge.sh b/experiments/MemLayout/native-src/build-bridge.sh deleted file mode 100755 index 887fc152bc6..00000000000 --- a/experiments/MemLayout/native-src/build-bridge.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -clang -shared -o../out/production/MemLayout/libbridge.dylib bridge.c -I /System/Library/Frameworks/JavaVM.framework/Headers - diff --git a/experiments/MemLayout/src/_1/main.kt b/experiments/MemLayout/src/_1/main.kt deleted file mode 100644 index d013e5011c6..00000000000 --- a/experiments/MemLayout/src/_1/main.kt +++ /dev/null @@ -1,215 +0,0 @@ -package _1 -import NativeFunction -import kotlin.reflect.KProperty - -operator fun NativeFunction.invoke(vararg args: Any?): Long { - val convertedArgs = LongArray(args.size) - - val allocatedArgs = mutableListOf() - args.forEachIndexed { i, arg -> - val convertedArg = when (arg) { - null -> 0L - is Long -> arg - is NativeStructPtr -> arg.ptr - is String -> { - val cString = CStringPtr.fromString(arg) - allocatedArgs.add(cString) - cString.ptr - } - is Byte -> arg.toLong() - is Char -> arg.toLong() - is Short -> arg.toLong() - is Int -> arg.toLong() - else -> throw NotImplementedError() - } - convertedArgs[i] = convertedArg - } - try { - return bridge.call(this.ptr, *convertedArgs) - } finally { - allocatedArgs.forEach { bridge.free(it.ptr) } - } -} - -open class NativeStructPtr(val ptr: Long) { - companion object { - class ByteField(val offset: Int) { - operator fun getValue(thisRef: NativeStructPtr, property: KProperty<*>): Byte { - return bridge.getByte(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: NativeStructPtr, property: KProperty<*>, value: Byte) { - bridge.putByte(thisRef.ptr + offset, value) - } - } - - class ShortField(val offset: Int) { - operator fun getValue(thisRef: NativeStructPtr, property: KProperty<*>): Short { - return bridge.getShort(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: NativeStructPtr, property: KProperty<*>, value: Short) { - bridge.putShort(thisRef.ptr + offset, value) - } - } - - class IntField(val offset: Int) { - operator fun getValue(thisRef: NativeStructPtr, property: KProperty<*>): Int { - return bridge.getInt(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: NativeStructPtr, property: KProperty<*>, value: Int) { - bridge.putInt(thisRef.ptr + offset, value) - } - } - - class LongField(val offset: Int) { - operator fun getValue(thisRef: NativeStructPtr, property: KProperty<*>): Long { - return bridge.getLong(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: NativeStructPtr, property: KProperty<*>, value: Long) { - bridge.putLong(thisRef.ptr + offset, value) - } - } - - class StructField(val cast: (Long) -> T, val offset: Int) { - operator fun getValue(thisRef: NativeStructPtr, property: KProperty<*>): T { - return cast(thisRef.ptr + offset); - } - } - - fun byteAt(offset: Int) = ByteField(offset) - fun shortAt(offset: Int) = ShortField(offset) - fun intAt(offset: Int) = IntField(offset) - fun longAt(offset: Int) = LongField(offset) - fun structAt(cast: (Long) -> T, offset: Int) = StructField(cast, offset) - } -} - -class Layout(val size: Int, val cast: (Long) -> T); - -class PtrBox(ptr: Long) : NativeStructPtr(ptr) { - companion object { - val layout = Layout(8, ::PtrBox) - } -} - - -class timespec(ptr: Long) : NativeStructPtr(ptr) { - val tv_sec by longAt(0) - val tv_usec by longAt(8) -} - -class stat64(ptr: Long) : NativeStructPtr(ptr) { - val st_dev by intAt(0) - val st_mode by shortAt(4) - val st_nlink by shortAt(6) - val st_ino by longAt(8) - val st_atimespec by structAt(::timespec, 32) - val st_mtimespec by structAt(::timespec, 48) - val st_ctimespec by structAt(::timespec, 64) - val st_birthtimespec by structAt(::timespec, 80) - val st_size by longAt(96) - - companion object { - val layout = Layout(144, ::stat64) - } - -} -val stat64Fun = NativeFunction.lookup("stat\$INODE64")!! - -class CStringPtr(ptr: Long) : NativeStructPtr(ptr) { - - companion object { - fun fromString(str: String): CStringPtr { - val bytes = str.toByteArray(); // FIXME: encoding - val ptr = bridge.malloc(bytes.size + 1) - bytes.forEachIndexed { i, byte -> - bridge.putByte(ptr + i, byte) - } - bridge.putByte(ptr + bytes.size, 0) - return CStringPtr(ptr) - } - } - - override fun toString(): String { - var length = 0 - while (bridge.getByte(ptr + length) != 0.toByte()) { - ++length - } - - val bytes = ByteArray(length) - for (i in 0 .. length-1) { - bytes.set(i, bridge.getByte(ptr + i)) - } - - return String(bytes) // FIXME: encoding - } - -} - -class dirent64(ptr: Long) : NativeStructPtr(ptr) { - val d_ino by longAt(0) - val d_seekoff by longAt(8) - val d_reclen by shortAt(16) - val d_namelen by shortAt(18) - val d_type by byteAt(20) - val d_name by structAt(::CStringPtr, 21) - - - companion object { - val layout = Layout(1048, ::dirent64) - } -} - -val opendir = NativeFunction.lookup("opendir")!! -val readdir_r64 = NativeFunction.lookup("readdir_r\$INODE64")!! -val closedir = NativeFunction.lookup("closedir")!! - -fun malloc(layout: Layout) = layout.cast(bridge.malloc(layout.size)) -fun malloc(layout: Layout, action: (T) -> R): R { - val s = malloc(layout) - try { - return action(s) - } finally { - bridge.free(s.ptr) - } -} - -fun main(args: Array) { - - malloc(stat64.layout) { s -> - val res = stat64Fun("/etc/passwd", s) - println(res) - with(s) { - println("st_dev=$st_dev") - println("st_mode=$st_mode") - println("st_nlink=$st_nlink") - println("st_ino=$st_ino") - println("st_mtimespec.tv_sec=${st_mtimespec.tv_sec}") - println("st_size=$st_size") - } - } - - val dirp = opendir("/tmp") - try { - malloc(dirent64.layout) { entry -> - malloc(PtrBox.layout) { result -> - - while (true) { - val errno = readdir_r64(dirp, entry, result) - if (bridge.getLong(result.ptr) == 0L) { - break - } - println(entry.d_name) - } - - } - } - } finally { - closedir(dirp) - } - - -} \ No newline at end of file diff --git a/experiments/MemLayout/src/_2/main.kt b/experiments/MemLayout/src/_2/main.kt deleted file mode 100644 index 55cfecab65e..00000000000 --- a/experiments/MemLayout/src/_2/main.kt +++ /dev/null @@ -1,242 +0,0 @@ -package _2 - -import bridge -import kotlin.reflect.KProperty -import java.io.Closeable -import NativeFunction - - -operator fun NativeFunction.invoke(vararg args: Any?): Long { - val convertedArgs = LongArray(args.size) - - val allocatedArgs = mutableListOf>() - args.forEachIndexed { i, arg -> - val convertedArg = when (arg) { - null -> 0L - is Long -> arg - is Ptr<*> -> arg.ptr - is String -> { - val cString = CString.fromString(arg) - allocatedArgs.add(cString) - cString.ptr - } - is Byte -> arg.toLong() - is Char -> arg.toLong() - is Short -> arg.toLong() - is Int -> arg.toLong() - else -> throw NotImplementedError() - } - convertedArgs[i] = convertedArg - } - try { - return bridge.call(this.ptr, *convertedArgs) - } finally { - allocatedArgs.forEach { bridge.free(it.ptr) } - } -} - -open class StructLayout(val size: Int) - -open class Ptr(val ptr: Long) - - -fun alloc(layout: T): HeapPtr { - return HeapPtr(bridge.malloc(layout.size)) -} - -class HeapPtr(ptr: Long) : Ptr(ptr), Closeable { - override fun close() { - free() - } - - fun free() { - bridge.free(ptr) - } - -} - -class ByteField(val offset: Int) { - operator fun getValue(thisRef: Ptr<*>, property: KProperty<*>): Byte { - return bridge.getByte(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: Ptr<*>, property: KProperty<*>, value: Byte) { - bridge.putByte(thisRef.ptr + offset, value) - } -} - -class ShortField(val offset: Int) { - operator fun getValue(thisRef: Ptr<*>, property: KProperty<*>): Short { - return bridge.getShort(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: Ptr<*>, property: KProperty<*>, value: Short) { - bridge.putShort(thisRef.ptr + offset, value) - } -} - - -class IntField(val offset: Int) { - operator fun getValue(thisRef: Ptr<*>, property: KProperty<*>): Int { - return bridge.getInt(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: Ptr<*>, property: KProperty<*>, value: Int) { - bridge.putInt(thisRef.ptr + offset, value) - } -} - - -class LongField(val offset: Int) { - operator fun getValue(thisRef: Ptr<*>, property: KProperty<*>): Long { - return bridge.getLong(thisRef.ptr + offset) - } - - operator fun setValue(thisRef: Ptr<*>, property: KProperty<*>, value: Long) { - bridge.putLong(thisRef.ptr + offset, value) - } -} - -class PtrField(val offset: Int) { - operator fun getValue(thisRef: Ptr<*>, property: KProperty<*>): Ptr { - return Ptr(bridge.getLong(thisRef.ptr + offset)) - } - - operator fun setValue(thisRef: Ptr<*>, property: KProperty<*>, value: Ptr) { - bridge.putLong(thisRef.ptr + offset, value.ptr) - } -} - -class StructField(val offset: Int) { - operator fun getValue(thisRef: Ptr<*>, property: KProperty<*>) = Ptr(thisRef.ptr + offset) -} - -fun byteAt(offset: Int) = ByteField(offset) -fun shortAt(offset: Int) = ShortField(offset) -fun intAt(offset: Int) = IntField(offset) -fun longAt(offset: Int) = LongField(offset) -fun ptrAt(offset: Int) = PtrField(offset) -fun structAt(offset: Int) = StructField(offset) - -class StructArray(val elemLayout: T, length: Int) : StructLayout(elemLayout.size * length) - -class PtrToStructArray(ptr: Long, val elemLayout: StructLayout) : Ptr>(ptr) { - operator fun get(index: Int) = Ptr(ptr + elemLayout.size * index) -} - -fun allocArray(layout: StructArray) = PtrToStructArray(alloc(layout).ptr, layout.elemLayout) -fun allocArray(elemLayout: T, length: Int) = allocArray(StructArray(elemLayout, length)) - -object IntBox : StructLayout(4) -var Ptr.value by intAt(0) - -class PtrBox : StructLayout(8) -var Ptr>.value by ptrAt(0) - -class CString(length: Int) : StructLayout(length + 1) { - - companion object { - - fun fromString(str: String): Ptr { - val bytes = str.toByteArray(); // FIXME: encoding - val result = alloc(CString(bytes.size)) - - bytes.forEachIndexed { i, byte -> - result[i] = byte - } - result[bytes.size] = 0.toByte() - return result - } - } -} - -operator fun Ptr.get(index: Int) = bridge.getByte(ptr + index) -operator fun Ptr.set(index: Int, value: Byte) = bridge.putByte(ptr + index, value) - -fun Ptr.toKotlinString(): String { - - var length = 0 - while (this[length] != 0.toByte()) { - ++length - } - - val bytes = ByteArray(length) - for (i in 0 .. length-1) { - bytes.set(i, this[i]) - } - - return String(bytes) // FIXME: encoding -} - -object timespec : StructLayout(16); - -val Ptr.tv_sec by longAt(0) -val Ptr.tv_usec by longAt(8) - -object stat64 : StructLayout(144); - -val Ptr.st_dev by intAt(0) -val Ptr.st_mode by shortAt(4) -val Ptr.st_nlink by shortAt(6) -val Ptr.st_ino by longAt(8) -val Ptr.st_atimespec by structAt(32) -val Ptr.st_mtimespec by structAt(48) -val Ptr.st_ctimespec by structAt(64) -val Ptr.st_birthtimespec by structAt(80) -val Ptr.st_size by longAt(96) - -val stat64Fun = NativeFunction.lookup("stat\$INODE64")!! - -object dirent64 : StructLayout(1048); -val Ptr.d_ino by longAt(0) -val Ptr.d_seekoff by longAt(8) -val Ptr.d_reclen by shortAt(16) -val Ptr.d_namelen by shortAt(18) -val Ptr.d_type by byteAt(20) -val Ptr.d_name by structAt(21) - -val opendir = NativeFunction.lookup("opendir")!! -val readdir_r64 = NativeFunction.lookup("readdir_r\$INODE64")!! -val closedir = NativeFunction.lookup("closedir")!! - -fun main(args: Array) { - - val array = allocArray(IntBox, 5) - array[0].value = 5 - array[1].value = 6 - - println(array[0].value) - println(array[1].value) - - alloc(stat64).use { s -> - val res = stat64Fun("/etc/passwd", s) - println(res) - with(s) { - println("st_dev=$st_dev") - println("st_mode=$st_mode") - println("st_nlink=$st_nlink") - println("st_ino=$st_ino") - println("st_mtimespec.tv_sec=${st_mtimespec.tv_sec}") - println("st_size=$st_size") - } - } - - val dirp = opendir("/tmp") - try { - alloc(dirent64).use { entry -> - alloc(PtrBox()).use { result -> - - while (true) { - val errno = readdir_r64(dirp, entry, result) - if (result.value.ptr == 0L) { - break - } - println(entry.d_name.toKotlinString()) - } - - } - } - } finally { - closedir(dirp) - } -}; \ No newline at end of file diff --git a/experiments/MemLayout/src/bridge.kt b/experiments/MemLayout/src/bridge.kt deleted file mode 100644 index 5261bf22059..00000000000 --- a/experiments/MemLayout/src/bridge.kt +++ /dev/null @@ -1,64 +0,0 @@ -import sun.misc.Unsafe - -object bridge { - - init { - System.loadLibrary("bridge") - } - - fun lookup(name: String): Long { - return findSym(name) - } - - fun call(funcPtr: Long, vararg args: Long): Long { - when (args.size) { - 0 -> return call0(funcPtr) - 1 -> return call1(funcPtr, args[0]) - 2 -> return call2(funcPtr, args[0], args[1]) - 3 -> return call3(funcPtr, args[0], args[1], args[2]) - 4 -> return call4(funcPtr, args[0], args[1], args[2], args[3]) - else -> throw NotImplementedError() - } - } - - private external fun findSym(name: String): Long - private external fun call0(ptr: Long): Long - private external fun call1(ptr: Long, arg1: Long): Long - private external fun call2(ptr: Long, arg1: Long, arg2: Long): Long - private external fun call3(ptr: Long, arg1: Long, arg2: Long, arg3: Long): Long - private external fun call4(ptr: Long, arg1: Long, arg2: Long, arg3: Long, arg4: Long): Long - - fun malloc(size: Int): Long = unsafe.allocateMemory(size.toLong()) - fun free(ptr: Long) = unsafe.freeMemory(ptr) - - fun getLong(ptr: Long): Long = unsafe.getLong(ptr) - fun putLong(ptr: Long, value: Long) = unsafe.putLong(ptr, value) - - fun getInt(ptr: Long): Int = unsafe.getInt(ptr) - fun putInt(ptr: Long, value: Int) = unsafe.putInt(ptr, value) - - fun getShort(ptr: Long): Short = unsafe.getShort(ptr) - fun putShort(ptr: Long, value: Short) = unsafe.putShort(ptr, value) - - fun getByte(ptr: Long): Byte = unsafe.getByte(ptr) - fun putByte(ptr: Long, value: Byte) = unsafe.putByte(ptr, value) - - private val unsafe = with(Unsafe::class.java.getDeclaredField("theUnsafe")) { - isAccessible = true - return@with this.get(null) as Unsafe - } -} - -class NativeFunction(val ptr: Long) { - - companion object { - fun lookup(name: String): NativeFunction? { - val funcPtr = bridge.lookup(name) - return if (funcPtr == 0L) { - null - } else { - NativeFunction(funcPtr) - } - } - } -} \ No newline at end of file diff --git a/experiments/dwarf-2/2-functions.c b/experiments/dwarf-2/2-functions.c deleted file mode 100644 index 917262e4b86..00000000000 --- a/experiments/dwarf-2/2-functions.c +++ /dev/null @@ -1,7 +0,0 @@ -int foo() { - return 0; -} - -int bar() { - return 0; -} diff --git a/experiments/dwarf-2/Makefile b/experiments/dwarf-2/Makefile deleted file mode 100644 index 6727a0d342a..00000000000 --- a/experiments/dwarf-2/Makefile +++ /dev/null @@ -1,34 +0,0 @@ - -LLVM_VERSION=3.6 - -CLANG=clang-mp-${LLVM_VERSION} -LLVM_AS=llvm-as-mp-${LLVM_VERSION} -LLVM_LC=llc-mp-${LLVM_VERSION} -LLVM_DWARF_DUMP=llvm-dwarfdump-mp-${LLVM_VERSION} -TRANSLATOR_JAR=../translator/build/libs/translator-1.0.jar - -# Here used manually edited ll from kt -#%.ll:%.kt -# $(JAVA) -cp ${TRANSLATO_JAR} $< > $@ -%.o:%.c -%.ll:%.c - ${CLANG} -emit-llvm -g -S -o $@ $< - -%.bc:%.ll - ${LLVM_AS} -o $@ $< - -%.s:%.bc - ${LLVM_LC} -o $@ $< - -%.asc:%.o - ${LLVM_DWARF_DUMP} $< > $@ - -debug:debug.o classfields_1.o - -all:main.asc classfields_1.asc 2-functions.asc - -clean: - ${RM} *.o *.asc *.bc *.s main.ll - -.PHONY: clean all -.PRECIOUS:%.ll %.bc %.s %.o debug diff --git a/experiments/dwarf-2/classfields_1.ll b/experiments/dwarf-2/classfields_1.ll deleted file mode 100644 index cdd951e9c4c..00000000000 --- a/experiments/dwarf-2/classfields_1.ll +++ /dev/null @@ -1,79 +0,0 @@ -@exceptions.str.1 = private unnamed_addr constant [59 x i8] c"Exception in thread main kotlin.KotlinNullPointerException\00", align 1 -declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) -declare i8* @malloc_heap(i32) -declare i32 @printf(i8*, ...) -declare void @abort() -%class.Nothing = type { } -%class.WithFields = type { i32, i32 } -define weak void @WithFields_Int(%class.WithFields* %classvariable.this, i32 %WithFields.i) #0 -{ -%classvariable.this.addr = alloca %class.WithFields, align 8 -%WithFields.i.addr = alloca i32, align 4 -store i32 %WithFields.i, i32* %WithFields.i.addr, align 4 -%var2 = load i32* %WithFields.i.addr, align 4 -%var3 = getelementptr inbounds %class.WithFields* %classvariable.this.addr, i32 0, i32 0 -store i32 %var2, i32* %var3, align 4 -%var4 = bitcast %class.WithFields* %classvariable.this to i8* -%var5 = bitcast %class.WithFields* %classvariable.this.addr to i8* -call void @llvm.memcpy.p0i8.p0i8.i64(i8* %var4, i8* %var5, i64 8, i32 4, i1 false) -%var6 = getelementptr inbounds %class.WithFields* %classvariable.this, i32 0, i32 1 -%var7 = getelementptr inbounds %class.WithFields* %classvariable.this, i32 0, i32 0 -%var8 = load i32* %var6, align 4 -%var9 = load i32* %var7, align 4 -store i32 %var9, i32* %var6, align 4 -ret void -unreachable -} -define weak i32 @test_field_assignment_Int(i32 %test_field_assignment.i) #0 -{ -%test_field_assignment.i.addr = alloca i32, align 4 -store i32 %test_field_assignment.i, i32* %test_field_assignment.i.addr, align 4 -%var10 = load i32* %test_field_assignment.i.addr, align 4 -%var12 = call i8* @malloc_heap(i32 8) -%var11 = bitcast i8* %var12 to %class.WithFields* -%var13 = alloca %class.WithFields*, align 8 -store %class.WithFields* %var11, %class.WithFields** %var13, align 8 -call void @WithFields_Int(%class.WithFields* %var11, i32 %var10) -%managed.unique.0.test_field_assignment.k = alloca %class.WithFields*, align 8 -%var14 = load %class.WithFields** %managed.unique.0.test_field_assignment.k, align 8 -%var15 = load %class.WithFields** %var13, align 8 -store %class.WithFields* %var15, %class.WithFields** %managed.unique.0.test_field_assignment.k, align 8 -%var16 = load %class.WithFields** %managed.unique.0.test_field_assignment.k, align 8 -%var17 = getelementptr inbounds %class.WithFields* %var16, i32 0, i32 1 -%var18 = load i32* %var17, align 4 -ret i32 %var18 -unreachable -} -define weak i32 @test_simple_field() #0 -{ -%var20 = call i8* @malloc_heap(i32 8) -%var19 = bitcast i8* %var20 to %class.WithFields* -%var21 = alloca %class.WithFields*, align 8 -store %class.WithFields* %var19, %class.WithFields** %var21, align 8 -call void @WithFields_Int(%class.WithFields* %var19, i32 1) -%managed.unique.1.test_simple_field.i = alloca %class.WithFields*, align 8 -%var22 = load %class.WithFields** %managed.unique.1.test_simple_field.i, align 8 -%var23 = load %class.WithFields** %var21, align 8 -store %class.WithFields* %var23, %class.WithFields** %managed.unique.1.test_simple_field.i, align 8 -%var24 = load %class.WithFields** %managed.unique.1.test_simple_field.i, align 8 -%var25 = getelementptr inbounds %class.WithFields* %var24, i32 0, i32 1 -%var26 = load i32* %var25, align 4 -ret i32 %var26 -unreachable -} - -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!1, !2} -!llvm.ident = !{!3} - -!0 = distinct !{!"0x11\000x801\00cotkat 1.0 3015852d7a7854269c4d3e906a7b97bf0d365a94\000\00\000\00\001", !4, !6, !6} -!1 = !{i32 2, !"Dwarf Version", i32 2} -!2 = !{i32 2, !"Debug Info Version", i32 2} -!3 =!{!"LLVM (http://llvm.org/): LLVM version 3.6.2 Optimized build. Built Jul 28 2016 (03:09:45). Default target: x86_64-apple-darwin15.6.0 Host CPU: core-avx2"} -!4 = !{!"classfields_1.kt", !"../translator/"} -!5 = !{!"0x2e\00\00test_simple_field_Int\00test_simple_field_Int\00\001\000\001\000\000\000\001", !4, !6, null, i32 (i32)* @test_field_assignment_Int, null, null, null, !7 } ; [DW_TAG_subprogram] -!6 = !{!"0x29", !4} ; what is this ? -!7 = !{} ; Huh?! -!8 = !{!"0x15\00\000\000\000\000\000\000", null, null, null, !9, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ] -!9 = !{!10} -!10 = !{!"0x24\00int\000\0032\0032\000\000\005", null, null} ; [ DW_TAG_base_type ] [int] [line 0, size 32, align 32, offset 0, enc DW_ATE_signed] diff --git a/experiments/dwarf-2/debug.c b/experiments/dwarf-2/debug.c deleted file mode 100644 index 963adff2385..00000000000 --- a/experiments/dwarf-2/debug.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - -extern int test_field_assignment_Int(int); - -void *malloc_heap() { - return malloc(64); -} - -int -main() { - return test_field_assignment_Int(1); -} diff --git a/experiments/dwarf-2/main.c b/experiments/dwarf-2/main.c deleted file mode 100644 index 4cce7f667ff..00000000000 --- a/experiments/dwarf-2/main.c +++ /dev/null @@ -1,3 +0,0 @@ -int main() { - return 0; -} diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/project.pbxproj b/experiments/ffi_on_ios/Hello.xcodeproj/project.pbxproj deleted file mode 100644 index 99a8f266da4..00000000000 --- a/experiments/ffi_on_ios/Hello.xcodeproj/project.pbxproj +++ /dev/null @@ -1,342 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 2CC8B4111DB0D107006B77F5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CC8B4101DB0D107006B77F5 /* main.m */; }; - 2CC8B4141DB0D107006B77F5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CC8B4131DB0D107006B77F5 /* AppDelegate.m */; }; - 2CC8B4171DB0D107006B77F5 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2CC8B4161DB0D107006B77F5 /* ViewController.m */; }; - 2CC8B41A1DB0D107006B77F5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CC8B4181DB0D107006B77F5 /* Main.storyboard */; }; - 2CC8B41D1DB0D107006B77F5 /* Hello.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 2CC8B41B1DB0D107006B77F5 /* Hello.xcdatamodeld */; }; - 2CC8B41F1DB0D107006B77F5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2CC8B41E1DB0D107006B77F5 /* Assets.xcassets */; }; - 2CC8B4221DB0D107006B77F5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2CC8B4201DB0D107006B77F5 /* LaunchScreen.storyboard */; }; - 2CC8B42A1DB1057C006B77F5 /* libffi.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2CC8B4291DB1057C006B77F5 /* libffi.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 2CC8B40C1DB0D107006B77F5 /* Hello.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Hello.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 2CC8B4101DB0D107006B77F5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 2CC8B4121DB0D107006B77F5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 2CC8B4131DB0D107006B77F5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 2CC8B4151DB0D107006B77F5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 2CC8B4161DB0D107006B77F5 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 2CC8B4191DB0D107006B77F5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 2CC8B41C1DB0D107006B77F5 /* Hello.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Hello.xcdatamodel; sourceTree = ""; }; - 2CC8B41E1DB0D107006B77F5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 2CC8B4211DB0D107006B77F5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 2CC8B4231DB0D107006B77F5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 2CC8B4291DB1057C006B77F5 /* libffi.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libffi.a; path = "../../../libffi/libffi/build/Release-iphoneos/libffi.a"; sourceTree = ""; }; - 2CC8B42B1DB10591006B77F5 /* ffi.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ffi.h; path = "../../../libffi/libffi/build_iphoneos-armv7/include/ffi.h"; sourceTree = ""; }; - 2CC8B42C1DB10598006B77F5 /* ffitarget.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ffitarget.h; path = "../../../libffi/libffi/build_iphoneos-armv7/include/ffitarget.h"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 2CC8B4091DB0D107006B77F5 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2CC8B42A1DB1057C006B77F5 /* libffi.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 2CC8B4031DB0D107006B77F5 = { - isa = PBXGroup; - children = ( - 2CC8B40E1DB0D107006B77F5 /* Hello */, - 2CC8B40D1DB0D107006B77F5 /* Products */, - ); - sourceTree = ""; - }; - 2CC8B40D1DB0D107006B77F5 /* Products */ = { - isa = PBXGroup; - children = ( - 2CC8B40C1DB0D107006B77F5 /* Hello.app */, - ); - name = Products; - sourceTree = ""; - }; - 2CC8B40E1DB0D107006B77F5 /* Hello */ = { - isa = PBXGroup; - children = ( - 2CC8B42C1DB10598006B77F5 /* ffitarget.h */, - 2CC8B4291DB1057C006B77F5 /* libffi.a */, - 2CC8B42B1DB10591006B77F5 /* ffi.h */, - 2CC8B4121DB0D107006B77F5 /* AppDelegate.h */, - 2CC8B4131DB0D107006B77F5 /* AppDelegate.m */, - 2CC8B4151DB0D107006B77F5 /* ViewController.h */, - 2CC8B4161DB0D107006B77F5 /* ViewController.m */, - 2CC8B4181DB0D107006B77F5 /* Main.storyboard */, - 2CC8B41E1DB0D107006B77F5 /* Assets.xcassets */, - 2CC8B4201DB0D107006B77F5 /* LaunchScreen.storyboard */, - 2CC8B4231DB0D107006B77F5 /* Info.plist */, - 2CC8B41B1DB0D107006B77F5 /* Hello.xcdatamodeld */, - 2CC8B40F1DB0D107006B77F5 /* Supporting Files */, - ); - path = Hello; - sourceTree = ""; - }; - 2CC8B40F1DB0D107006B77F5 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 2CC8B4101DB0D107006B77F5 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 2CC8B40B1DB0D107006B77F5 /* Hello */ = { - isa = PBXNativeTarget; - buildConfigurationList = 2CC8B4261DB0D107006B77F5 /* Build configuration list for PBXNativeTarget "Hello" */; - buildPhases = ( - 2CC8B4081DB0D107006B77F5 /* Sources */, - 2CC8B4091DB0D107006B77F5 /* Frameworks */, - 2CC8B40A1DB0D107006B77F5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Hello; - productName = Hello; - productReference = 2CC8B40C1DB0D107006B77F5 /* Hello.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 2CC8B4041DB0D107006B77F5 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0800; - ORGANIZATIONNAME = jetbrains; - TargetAttributes = { - 2CC8B40B1DB0D107006B77F5 = { - CreatedOnToolsVersion = 8.0; - DevelopmentTeam = 4UM54CUD63; - ProvisioningStyle = Automatic; - }; - }; - }; - buildConfigurationList = 2CC8B4071DB0D107006B77F5 /* Build configuration list for PBXProject "Hello" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 2CC8B4031DB0D107006B77F5; - productRefGroup = 2CC8B40D1DB0D107006B77F5 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 2CC8B40B1DB0D107006B77F5 /* Hello */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 2CC8B40A1DB0D107006B77F5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2CC8B4221DB0D107006B77F5 /* LaunchScreen.storyboard in Resources */, - 2CC8B41F1DB0D107006B77F5 /* Assets.xcassets in Resources */, - 2CC8B41A1DB0D107006B77F5 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 2CC8B4081DB0D107006B77F5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 2CC8B4171DB0D107006B77F5 /* ViewController.m in Sources */, - 2CC8B4141DB0D107006B77F5 /* AppDelegate.m in Sources */, - 2CC8B41D1DB0D107006B77F5 /* Hello.xcdatamodeld in Sources */, - 2CC8B4111DB0D107006B77F5 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 2CC8B4181DB0D107006B77F5 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 2CC8B4191DB0D107006B77F5 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 2CC8B4201DB0D107006B77F5 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 2CC8B4211DB0D107006B77F5 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 2CC8B4241DB0D107006B77F5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 2CC8B4251DB0D107006B77F5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 2CC8B4271DB0D107006B77F5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 4UM54CUD63; - INFOPLIST_FILE = Hello/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.jetbrains.HelloXXX; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 2CC8B4281DB0D107006B77F5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 4UM54CUD63; - INFOPLIST_FILE = Hello/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.jetbrains.HelloXXX; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 2CC8B4071DB0D107006B77F5 /* Build configuration list for PBXProject "Hello" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2CC8B4241DB0D107006B77F5 /* Debug */, - 2CC8B4251DB0D107006B77F5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2CC8B4261DB0D107006B77F5 /* Build configuration list for PBXNativeTarget "Hello" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 2CC8B4271DB0D107006B77F5 /* Debug */, - 2CC8B4281DB0D107006B77F5 /* Release */, - ); - defaultConfigurationIsVisible = 0; - }; -/* End XCConfigurationList section */ - -/* Begin XCVersionGroup section */ - 2CC8B41B1DB0D107006B77F5 /* Hello.xcdatamodeld */ = { - isa = XCVersionGroup; - children = ( - 2CC8B41C1DB0D107006B77F5 /* Hello.xcdatamodel */, - ); - currentVersion = 2CC8B41C1DB0D107006B77F5 /* Hello.xcdatamodel */; - path = Hello.xcdatamodeld; - sourceTree = ""; - versionGroupType = wrapper.xcdatamodel; - }; -/* End XCVersionGroup section */ - }; - rootObject = 2CC8B4041DB0D107006B77F5 /* Project object */; -} diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 6f82f678a3a..00000000000 --- a/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/xcuserdata/jetbrains.xcuserdatad/UserInterfaceState.xcuserstate b/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/xcuserdata/jetbrains.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index d69bd1e88b4..00000000000 Binary files a/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/xcuserdata/jetbrains.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/xcuserdata/jetbrains.xcuserdatad/WorkspaceSettings.xcsettings b/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/xcuserdata/jetbrains.xcuserdatad/WorkspaceSettings.xcsettings deleted file mode 100644 index dd7403bf66e..00000000000 --- a/experiments/ffi_on_ios/Hello.xcodeproj/project.xcworkspace/xcuserdata/jetbrains.xcuserdatad/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,16 +0,0 @@ - - - - - BuildLocationStyle - UseAppPreferences - CustomBuildLocationType - RelativeToDerivedData - DerivedDataLocationStyle - Default - IssueFilterStyle - ShowActiveSchemeOnly - LiveSourceIssuesEnabled - - - diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index fe2b4541512..00000000000 --- a/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcschemes/Hello.xcscheme b/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcschemes/Hello.xcscheme deleted file mode 100644 index 8677ede27f7..00000000000 --- a/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcschemes/Hello.xcscheme +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcschemes/xcschememanagement.plist b/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 6f6ae1bd8ba..00000000000 --- a/experiments/ffi_on_ios/Hello.xcodeproj/xcuserdata/jetbrains.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - Hello.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 2CC8B40B1DB0D107006B77F5 - - primary - - - - - diff --git a/experiments/ffi_on_ios/Hello/AppDelegate.h b/experiments/ffi_on_ios/Hello/AppDelegate.h deleted file mode 100644 index 945203d1b3a..00000000000 --- a/experiments/ffi_on_ios/Hello/AppDelegate.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// AppDelegate.h -// Hello -// -// Created by jetbrains on 14/10/16. -// Copyright © 2016 jetbrains. All rights reserved. -// - -#import -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@property (readonly, strong) NSPersistentContainer *persistentContainer; - -- (void)saveContext; - - -@end - diff --git a/experiments/ffi_on_ios/Hello/AppDelegate.m b/experiments/ffi_on_ios/Hello/AppDelegate.m deleted file mode 100644 index adf4e044179..00000000000 --- a/experiments/ffi_on_ios/Hello/AppDelegate.m +++ /dev/null @@ -1,97 +0,0 @@ -// -// AppDelegate.m -// Hello -// -// Created by jetbrains on 14/10/16. -// Copyright © 2016 jetbrains. All rights reserved. -// - -#import "AppDelegate.h" - -@interface AppDelegate () - -@end - -@implementation AppDelegate - - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - return YES; -} - - -- (void)applicationWillResignActive:(UIApplication *)application { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. -} - - -- (void)applicationDidEnterBackground:(UIApplication *)application { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - - -- (void)applicationWillEnterForeground:(UIApplication *)application { - // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. -} - - -- (void)applicationDidBecomeActive:(UIApplication *)application { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - - -- (void)applicationWillTerminate:(UIApplication *)application { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - // Saves changes in the application's managed object context before the application terminates. - [self saveContext]; -} - - -#pragma mark - Core Data stack - -@synthesize persistentContainer = _persistentContainer; - -- (NSPersistentContainer *)persistentContainer { - // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it. - @synchronized (self) { - if (_persistentContainer == nil) { - _persistentContainer = [[NSPersistentContainer alloc] initWithName:@"Hello"]; - [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) { - if (error != nil) { - // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - - /* - Typical reasons for an error here include: - * The parent directory does not exist, cannot be created, or disallows writing. - * The persistent store is not accessible, due to permissions or data protection when the device is locked. - * The device is out of space. - * The store could not be migrated to the current model version. - Check the error message to determine what the actual problem was. - */ - NSLog(@"Unresolved error %@, %@", error, error.userInfo); - abort(); - } - }]; - } - } - - return _persistentContainer; -} - -#pragma mark - Core Data Saving support - -- (void)saveContext { - NSManagedObjectContext *context = self.persistentContainer.viewContext; - NSError *error = nil; - if ([context hasChanges] && ![context save:&error]) { - // Replace this implementation with code to handle the error appropriately. - // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. - NSLog(@"Unresolved error %@, %@", error, error.userInfo); - abort(); - } -} - -@end diff --git a/experiments/ffi_on_ios/Hello/Assets.xcassets/AppIcon.appiconset/Contents.json b/experiments/ffi_on_ios/Hello/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index b8236c65348..00000000000 --- a/experiments/ffi_on_ios/Hello/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/experiments/ffi_on_ios/Hello/Base.lproj/LaunchScreen.storyboard b/experiments/ffi_on_ios/Hello/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index fdf3f97d1b6..00000000000 --- a/experiments/ffi_on_ios/Hello/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/experiments/ffi_on_ios/Hello/Base.lproj/Main.storyboard b/experiments/ffi_on_ios/Hello/Base.lproj/Main.storyboard deleted file mode 100644 index e15e3b70969..00000000000 --- a/experiments/ffi_on_ios/Hello/Base.lproj/Main.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/experiments/ffi_on_ios/Hello/Hello.xcdatamodeld/.xccurrentversion b/experiments/ffi_on_ios/Hello/Hello.xcdatamodeld/.xccurrentversion deleted file mode 100644 index 8827676e3c6..00000000000 --- a/experiments/ffi_on_ios/Hello/Hello.xcdatamodeld/.xccurrentversion +++ /dev/null @@ -1,8 +0,0 @@ - - - - - _XCCurrentVersionName - Hello.xcdatamodel - - diff --git a/experiments/ffi_on_ios/Hello/Hello.xcdatamodeld/Hello.xcdatamodel/contents b/experiments/ffi_on_ios/Hello/Hello.xcdatamodeld/Hello.xcdatamodel/contents deleted file mode 100644 index ad82c3b89c8..00000000000 --- a/experiments/ffi_on_ios/Hello/Hello.xcdatamodeld/Hello.xcdatamodel/contents +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/experiments/ffi_on_ios/Hello/Info.plist b/experiments/ffi_on_ios/Hello/Info.plist deleted file mode 100644 index 38e98af23d3..00000000000 --- a/experiments/ffi_on_ios/Hello/Info.plist +++ /dev/null @@ -1,38 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/experiments/ffi_on_ios/Hello/ViewController.h b/experiments/ffi_on_ios/Hello/ViewController.h deleted file mode 100644 index 582c398f68d..00000000000 --- a/experiments/ffi_on_ios/Hello/ViewController.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// ViewController.h -// Hello -// -// Created by jetbrains on 14/10/16. -// Copyright © 2016 jetbrains. All rights reserved. -// - -#import - -@interface ViewController : UIViewController - - -@end - diff --git a/experiments/ffi_on_ios/Hello/ViewController.m b/experiments/ffi_on_ios/Hello/ViewController.m deleted file mode 100644 index a4bff943fa8..00000000000 --- a/experiments/ffi_on_ios/Hello/ViewController.m +++ /dev/null @@ -1,98 +0,0 @@ -// -// ViewController.m -// Hello -// -// Created by jetbrains on 14/10/16. -// Copyright © 2016 jetbrains. All rights reserved. -// - -#import "ViewController.h" -#import "ffi.h" - -@interface ViewController () - -@property (strong, nonatomic) IBOutlet UILabel *helloLabel; - -@end - -@implementation ViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 50)]; - label.text = @"Initialized!"; - self.helloLabel = label; - [self.view addSubview:label]; - - [self addMyButton]; -} - - -- (void)addMyButton{ // Method for creating button, with background image and other properties - UIButton *playButton = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - playButton.frame = CGRectMake(110.0, 160.0, 100.0, 30.0); - [playButton setTitle:@"Start" forState:UIControlStateNormal]; - [playButton addTarget:self action:@selector(playAction:) forControlEvents:UIControlEventTouchUpInside]; - [self.view addSubview:playButton]; -} - -/* Acts like puts with the file given at time of enclosure. */ -void puts_binding(ffi_cif *cif, void *ret, void* args[], - void *stream) -{ - *(ffi_arg *)ret = fputs(*(char **)args[0], (FILE *)stream); -} - -typedef int (*puts_t)(char *); - -int test() -{ - ffi_cif cif; - ffi_type *args[1]; - ffi_closure *closure; - - void *bound_puts; - int rc; - - /* Allocate closure and bound_puts */ - closure = ffi_closure_alloc(sizeof(ffi_closure), &bound_puts); - - if (closure) - { - /* Initialize the argument info vectors */ - args[0] = &ffi_type_pointer; - - /* Initialize the cif */ - if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, - &ffi_type_sint, args) == FFI_OK) - { - /* Initialize the closure, setting stream to stdout */ - if (ffi_prep_closure_loc(closure, &cif, puts_binding, - stdout, bound_puts) == FFI_OK) - { - rc = ((puts_t)bound_puts)("Hello World!"); - /* rc now holds the result of the call to fputs */ - } - } - } - - /* Deallocate both closure, and bound_puts */ - ffi_closure_free(closure); - - return 0; -} - --(void) playAction:(UIButton*)sender { - self.helloLabel.text = @"Running..."; - test(); -} - - -- (void)didReceiveMemoryWarning { - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - - -@end diff --git a/experiments/ffi_on_ios/Hello/main.m b/experiments/ffi_on_ios/Hello/main.m deleted file mode 100644 index c34c137d2ee..00000000000 --- a/experiments/ffi_on_ios/Hello/main.m +++ /dev/null @@ -1,16 +0,0 @@ -// -// main.m -// Hello -// -// Created by jetbrains on 14/10/16. -// Copyright © 2016 jetbrains. All rights reserved. -// - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/experiments/lifetime/src/main/d/lifetime.d b/experiments/lifetime/src/main/d/lifetime.d deleted file mode 100644 index 042eefc50a4..00000000000 --- a/experiments/lifetime/src/main/d/lifetime.d +++ /dev/null @@ -1,117 +0,0 @@ -/** - * The D language investigations: - * here life events except perhaps allocator stage () - * # dmd -v -vgc -I/opt/local//libexec/dmd-bootstrap/include/druntime/import -I/opt/local/libexec/dmd-bootstrap/include/phobos -L-L/opt/local/libexec/dmd-bootstrap/lib lifetime.d - * Expected output for - * bash-3.2$ dmd --version - * DMD64 D Compiler v2.070-devel - * Copyright (c) 1999-2015 by Digital Mars written by Walter Bright - * - - * bash-3.2$ ./lifetime -A::static_this: start -A::static_this: end -main:start -(4557316096)lifetime.A::this: start -(4557316096)lifetime.A::this: end -(4557316112)lifetime.A::this: start -(4557316112)lifetime.A::this: end -inner scope started -(140734540366608)lifetime.A::this: start -(140734540366608)lifetime.A::this: end -(140734540366608)lifetime.A::~this: start -(140734540366608)lifetime.A::~this: end -inner scope ended -(4557316096)lifetime.A::~this: start -(4557316096)lifetime.A::~this: end -scopedAllocations::called -scopedAllocations::start -(140734540366432)lifetime.A::this: start -(140734540366432)lifetime.A::this: end -(140734540366464)lifetime.A::this: start -(140734540366464)lifetime.A::this: end -(140734540366496)lifetime.A::this: start -(140734540366496)lifetime.A::this: end -scopedAllocations::end -(140734540366496)lifetime.A::~this: start -(140734540366496)lifetime.A::~this: end -(140734540366464)lifetime.A::~this: start -(140734540366464)lifetime.A::~this: end -(140734540366432)lifetime.A::~this: start -(140734540366432)lifetime.A::~this: end -scopedAllocations::returned -main:end -A::~static this: start -A::~static this: end -(4557316112)lifetime.A::~this: start -(4557316112)lifetime.A::~this: end - */ -import object; -import std.string; -import std.stdio; -import std.typecons; - -class A { - static this() { - writeln("A::static_this: start"); - writeln("A::static_this: end"); - } - this() { - trace("this: start", this); - trace("this: end", this); - } - - ~this() { - trace("~this: start", this); - trace("~this: end", this); - } - - static ~this() { - writeln("A::~static this: start"); - writeln("A::~static this: end"); - } -} - -void trace(string msg, Object obj) { - write("("); - write(obj.toHash()); - write(")"); - write(obj.classinfo.toString()); - write("::"); - writeln(msg); -} - - -void scopedAllocations() { - writeln("scopedAllocations::start"); - auto a = scoped!A(); - auto b = scoped!A(); - auto c = scoped!A(); - writeln("scopedAllocations::end"); -} - -void main() { - writeln("main:start"); - auto a = new A(); - auto c = new A(); - auto d = Object.factory("A"); - { - writeln("inner scope started"); - auto b = scoped!A(); - } - writeln("inner scope ended"); - delete a; - writeln("scopedAllocations::called"); - scopedAllocations(); - writeln("scopedAllocations::returned"); - writeln("main:end"); -} - -extern(C) { - /** - * ABI compatibility, known bug in 2.70 :) - */ - void __dmd_personality_v0(){} - void _d_throwdwarf(){} - void __dmd_begin_catch(){} -} diff --git a/experiments/lifetime/src/main/go/lifetime.go b/experiments/lifetime/src/main/go/lifetime.go deleted file mode 100644 index f747312fd62..00000000000 --- a/experiments/lifetime/src/main/go/lifetime.go +++ /dev/null @@ -1,50 +0,0 @@ -/** - * Go doesn't have object life event's, but it has defered execution et the "end of scope" -bash-3.2$ /usr/local/go/bin/go build lifetime.go -bash-3.2$ ./lifetime -main: started -defer-foo1: started -defer-foo1: ended -defer-foo0: started -defer-foo0: ended -inner-main: started -inner-main: ended -main: ended -defer-inner-main: started -defer-inner-main: ended -defer-main: started -defer-main: ended - */ -package main - -import "fmt" - -func foo() { - defer func() { - fmt.Println("defer-foo0: started"); - fmt.Println("defer-foo0: ended"); - }() - defer func() { - fmt.Println("defer-foo1: started"); - fmt.Println("defer-foo1: ended"); - }() - -} - -func main() { - fmt.Println("main: started"); - foo() - defer func() { - fmt.Println("defer-main: started"); - fmt.Println("defer-main: ended"); - }() - { - fmt.Println("inner-main: started"); - defer func(){ - fmt.Println("defer-inner-main: started"); - fmt.Println("defer-inner-main: ended"); - }() - } - fmt.Println("inner-main: ended"); - fmt.Println("main: ended"); -} diff --git a/experiments/lifetime/src/main/rust/lifetime.rs b/experiments/lifetime/src/main/rust/lifetime.rs deleted file mode 100644 index 75492a95d75..00000000000 --- a/experiments/lifetime/src/main/rust/lifetime.rs +++ /dev/null @@ -1,40 +0,0 @@ -/** - * In terms of C++, rust lack of constuctor ... as alternative there is Default traits to - * initilize object with some default values - * bash-3.2$ rustc -A unused_variables lifetime.rs - * - * bash-3.2$ ./lifetime -main started -scope started -B(0x7fff571df328)::drop -scope ended -main ended -B(0x7fff571df3a0)::drop -B(0x7fff571df3a8)::drop - */ - -struct A; - -struct B; - - -impl Drop for B { - fn drop(&mut self) { - println! ("B({:p})::drop", self); - } -} - -fn main() { - println!("main started"); - let x = A; - let a = B; - let b = B; - println!("x:{:p}, a:{:p}, b:{:p}", &x, &a, &b); - println!("scope started"); - { - let c = B; - println!("c:{:p}", &c); - } - println!("scope ended"); - println!("main ended"); -} diff --git a/experiments/placer/Makefile b/experiments/placer/Makefile deleted file mode 100644 index c464265ed0d..00000000000 --- a/experiments/placer/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -CXXFLAGS = -std=c++11 -Wall -Werror -CC=$(CXX) #change linker to c++ - -ifneq ($(OPT), ) -CXXFLAGS := $(CXXFLAGS) -O2 -else -CXXFLAGS := $(CXXFLAGS) -g2 -endif - -all: placer - -run: placer - ./placer -clean: - $(RM) *.o placer - -placer: placer.o - $(CXX) $(CXXFLAGS) placer.o -o placer - -place.o: placer.cc layout.h - $(CXX) $(CXXFLAGS) -c placer.cc - -.PHONY: all run clean diff --git a/experiments/placer/layout.h b/experiments/placer/layout.h deleted file mode 100644 index 386d860617d..00000000000 --- a/experiments/placer/layout.h +++ /dev/null @@ -1,457 +0,0 @@ -#pragma once - -#include -#include -#include - -#include -#include -#include - -class Container; -class TypeInfo; - -// Could be made 64-bit for large memory configs. -typedef uint32_t container_offset_t; - -// Header of every object. -struct ObjHeader { - const TypeInfo* type_info_; - container_offset_t container_offset_negative_; -}; - -// Header of value type array objects. -struct ArrayHeader : public ObjHeader { - uint32_t count_; -}; - -// Header of all container objects. Contains reference counter. -struct ContainerHeader { - // Reference counter of container. Maybe use some upper bit of counter for - // container type (for polymorphism in ::Release()). - uint32_t ref_count_; -}; - -struct ArenaContainerHeader : public ContainerHeader { - // Current allocation limit. - uint8_t* current_; - // Allocation end. Maybe consider having chunked backing storage - // at cost of smarter ::Release() polymorphic on container type. - uint8_t* end_; -}; - - -// Thos two opeations are implemented by translator when storing references -// to objects. -inline void AddRef(ContainerHeader* header) { - // Looking at container type we may want to skip AddRef() totally - // (non-escaping stack objects). - header->ref_count_++; -} - -inline void Release(ContainerHeader* header) { - // Looking at container type we may want to skip Release() totally - // (non-escaping stack objects). - if (--header->ref_count_ == 0) { - free(header); - } -} - -// Class representing arbitrary placement container. -class Container { - protected: - // Data where everything is being stored. - ContainerHeader* header_; - - void SetMeta(ObjHeader* obj, const TypeInfo* type_info) { - obj->container_offset_negative_ = - reinterpret_cast(obj) - reinterpret_cast(header_); - obj->type_info_ = type_info; - } - - public: - // Increment reference counter associated with container. - void AddRef() { - if (header_) ::AddRef(header_); - } - - // Decrement reference counter associated with container. - // For objects whith tricky lifetime (such as ones shared between threads objects) - // individual container per object (ObjectContainer) shall be created. - // As an alternative, such objects could be evacuated from short-lived containers. - void Release() { - if (header_) ::Release(header_); - } -}; - -// Container for a single object. -class ObjectContainer : public Container { - public: - explicit ObjectContainer(int size) { - header_ = reinterpret_cast( - calloc(size + sizeof(ContainerHeader), 1)); - header_->ref_count_ = 1; - } - - // Object container shalln't have any dtor, as it's being freed by ::Release(). - - void* GetPlace() const { - return reinterpret_cast(header_) + sizeof(ContainerHeader); - } -}; - -// Class representing arena-style placement container. -// Container is used for reference counting, -// and it is assumed that objects with related placement will share container. Only -// whole container can be freed, individual objects are not taken into account. -class ArenaContainer : public Container { - public: - explicit ArenaContainer(int size) { - ArenaContainerHeader* header = reinterpret_cast( - calloc(size + sizeof(ArenaContainerHeader), 1)); - header_ = header; - header->ref_count_ = 1; - header->current_ = reinterpret_cast(header_) + sizeof(ArenaContainerHeader); - header->end_ = header->current_ + size; - } - - ~ArenaContainer() { - if (header_) { - assert(header_->ref_count_ == 0); - Dispose(); - } - } - - // Allocation function. - void* Place(int size) { - ArenaContainerHeader* header = reinterpret_cast(header_); - if (header->current_ + size > header->end_) { - return nullptr; - } - void* result = header->current_; - header->current_ += size; - return result; - } - - // Place individual object in this container. - ObjHeader* PlaceObject(const TypeInfo* type_info); - - // Places an array of certain type in this container. Note that array_type_info - // is type info for an array, not for an individual element. Also note that exactly - // same operation could be used to place strings. - ArrayHeader* PlaceArray(const TypeInfo* array_type_info, int count); - - // Dispose whole container ignoring non-zero refcount. Use with care. - void Dispose() { - if (header_) { - free(header_); - header_ = nullptr; - } - } -}; - -// Raw reference to data, meaning T*, invented only for cleaness of intentions. -template -class RawRef { - private: - T* ptr_; - public: - RawRef(T* ptr) : ptr_(ptr) {} - const T& get() const { return *ptr_; } - void set(const T& value) { *ptr_ = value; } -}; - -// Object reference, adds reference counting in container and type information. -class AnyObjRef { - protected: - ObjHeader* ptr_; - - explicit AnyObjRef(ObjHeader* ptr) : ptr_(ptr) { - if (ptr_) { - AddRef(container_header()); - } - } - - public: - ~AnyObjRef() { - if (ptr_) { - Release(container_header()); - } - } - - ContainerHeader* container_header() const { - return reinterpret_cast( - reinterpret_cast(ptr_) - ptr_->container_offset_negative_); - } - - const TypeInfo* type_info() const { - return ptr_->type_info_; - } - - // Accesses raw data inside object specified by offset. Typing by M is optional and - // will be replaced by translator typing. - template - RawRef at() const { - return RawRef( - reinterpret_cast(reinterpret_cast(any_ref()) + offset)); - } - - // Assign reference to certain object. Releases currently held object in its container and - // adds reference to container storing given object. - void Assign(const AnyObjRef& other) { - // TODO: optimize for an important case where containers match? - if (ptr_) { - Release(container_header()); - } - ptr_ = other.ptr_; - if (ptr_) { - AddRef(container_header()); - } - } - - // Returns pointer to the raw data referred by this reference. - uint8_t* any_ref() const { - if (!ptr_) return nullptr; - return reinterpret_cast(ptr_) + sizeof(ObjHeader); - } - - // Uses pointer stored in object's field to create a reference to that object. - AnyObjRef any_obj_at(int offset) const { - assert(ptr_); - return AnyObjRef(*reinterpret_cast(any_ref() + offset)); - } - - // Checks if given reference has null value. - bool null() const { return ptr_ == nullptr; } -}; - -// Returns typeinfo for array of type T. Specialize for types which are allowed as array elements. -template -const TypeInfo* GetArrayTypeInfo() { - return nullptr; -} - -// Reference to an object with particular memory layout specified by T. -// In real runtime will be compile time only type, on runtime all references are -// AnyObjRef. -template -class ObjRef : public AnyObjRef { - private: - explicit ObjRef(ObjHeader* ptr) : AnyObjRef(ptr) {} - - // Reference to raw data in owned class. - T* ref() const { - if (!ptr_) return nullptr; - return reinterpret_cast(any_ref()); - } - - template friend class ArrayRef; - - public: - // Assigns reference, compile time type-safe. - ObjRef(const ObjRef& other) : AnyObjRef(nullptr) { - Assign(other); - } - void Assign(const ObjRef& other) { - AnyObjRef::Assign(other); - } - - // Copies data bits to another place, reference counting is properly accounted for - // by consulting type information. - void CopyTo(ObjRef other) const; - - // Clones object to given container. - ObjRef Clone(ArenaContainer* container) { - ObjRef result = Alloc(container); - CopyTo(result); - return result; - } - - // Takes typed object reference at offset. - template - ObjRef obj_at() const { - return ObjRef(reinterpret_cast(any_ref() + offset)); - } - - // Allocates properly typed object in container. - static ObjRef Alloc(ArenaContainer* container) { - return ObjRef(container->PlaceObject(T::GetTypeInfo())); - } -}; - -// This is an array of value types only, no object references here. -template -class ArrayRef : public AnyObjRef { - protected: - explicit ArrayRef(ArrayHeader* ptr) : AnyObjRef(ptr) {} - ArrayHeader* header() { return reinterpret_cast(ptr_); } - - public: - static ArrayRef Alloc(ArenaContainer* container, int count) { - auto result = ArrayRef(container->PlaceArray(GetArrayTypeInfo(), count)); - result.header()->count_ = count; - return result; - } - - RawRef element_at(int index) const { - assert(header() && index >= 0 && index < header()->count_); - return reinterpret_cast(any_ref() + index * sizeof(T)); - } -}; - -// All names in system are stored as hashes (or maybe, for debug builds, -// as pointers to uniqued C strings containing names?). -typedef uint64_t name_hash_t; - -// An element of sorted by hash in-place array representing methods. -struct MethodTableRecord { - name_hash_t name_signature_; - void* method_entry_point_; -}; - -// An element of sorted by hash in-place array representing field offsets. -struct FieldTableRecord { - name_hash_t name_signature_; - int field_offset_; -}; - -// This class represents runtime type information and by itself is compile time -// constant. -class TypeInfo { - private: - name_hash_t name_; - int size_; - const TypeInfo* super_type_; - const int* obj_offsets_; - int obj_offsets_count_; - TypeInfo* const* implemented_interfaces_; - int implemented_interfaces_count_; - const MethodTableRecord* methods_; - int methods_count_; - const FieldTableRecord* fields_; - int fields_count_; - public: - TypeInfo(name_hash_t name, int size, const TypeInfo* super_type, - std::initializer_list obj_offsets, - std::initializer_list implemented_interfaces, - std::initializer_list methods, - std::initializer_list fields) - : name_(name), size_(size), super_type_(super_type), - obj_offsets_(obj_offsets.begin()), obj_offsets_count_(obj_offsets.size()), - implemented_interfaces_(implemented_interfaces.begin()), - implemented_interfaces_count_(implemented_interfaces.size()), - methods_(methods.begin()), methods_count_(methods.size()), - fields_(fields.begin()), fields_count_(fields.size()) {} - - name_hash_t name() const { return name_; } - int size() const { return size_; } - const TypeInfo* super_type() const { return super_type_; } - const int* obj_offsets(int* count) const { - *count = obj_offsets_count_; - return obj_offsets_; - } -}; - -inline ObjHeader* ArenaContainer::PlaceObject(const TypeInfo* type_info) { - int size = type_info->size() + sizeof(ObjHeader); - ObjHeader* result = reinterpret_cast(Place(size)); - if (!result) { - return nullptr; - } - SetMeta(result, type_info); - return result; -} - -inline ArrayHeader* ArenaContainer::PlaceArray(const TypeInfo* type_info, int count) { - int size = sizeof(ArrayHeader) + type_info->size() * count; - ArrayHeader* result = reinterpret_cast(Place(size)); - if (!result) { - return nullptr; - } - SetMeta(result, type_info); - result->count_ = count; - return result; -} - -template -inline void ObjRef::CopyTo(ObjRef other) const { - assert(!other.null()); - assert(other.type_info()->size() == type_info()->size()); - if (ref()) { - memcpy(other.ref(), ref(), sizeof(T)); - int obj_offsets_count = 0; - const int* obj_offsets = ptr_->type_info_->obj_offsets(&obj_offsets_count); - for (int i = 0; i < obj_offsets_count; ++i) { - AnyObjRef any = other.any_obj_at(obj_offsets[i]); - if (!any.null()) { - AddRef(any.container_header()); - } - } - } else { - // TODO: shall we do anything if copy from/to null? - } -} - - -// This is magic for compile-time hash computation. Not needed in real translator. -static constexpr uint32_t crc_table[256] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, - 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, - 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, - 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, - 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, - 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, - 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, - 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, - 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, - 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, - 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, - 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, - 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, - 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, - 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, - 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, - 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, - 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d -}; - -template -constexpr uint32_t crc32(const char * str) { - return (crc32(str) >> 8) ^ crc_table[(crc32(str) ^ str[idx]) & 0x000000FF]; -} - -// Stop-recursion function -template<> -constexpr uint32_t crc32(const char * str) { - return 0xFFFFFFFF; -} - -template -constexpr name_hash_t NameHash(char const (&name)[len_plus_one]) { - return crc32(name) ^ 0xFFFFFFFF; -} diff --git a/experiments/placer/placer.cc b/experiments/placer/placer.cc deleted file mode 100644 index c78e6db578a..00000000000 --- a/experiments/placer/placer.cc +++ /dev/null @@ -1,111 +0,0 @@ -#include -#include -#include -#include - -#include -#include - -#include "layout.h" - -struct List { - static const TypeInfo* GetTypeInfo() { - const static TypeInfo result = { - NameHash("List"), sizeof(List), nullptr, {0, 8}, - {}, // implemented interfaces - {}, // methods - {} // fields - }; - return &result; - } - - ObjRef next_; - ObjRef prev_; - int data_; -}; - -void UpdateElement(ObjRef element) { - element.at().set - (element.at().get() + 10); -} - -void DoNotUpdateElement(ObjRef element) { - element.at().set - (element.at().get() + 100); -} - -constexpr int next_offset = offsetof(struct List, next_); -constexpr int data_offset = offsetof(struct List, data_); - -void ReturnByValue(ObjRef value) { - value.at().set(239); -} - -ObjRef ReturnByRef(ArenaContainer* container) { - ObjRef result(ObjRef::Alloc(container)); - result.at().set(30); - return result; -} - -void test_placer() { - ArenaContainer heap(1024); - { - ObjRef head(ObjRef::Alloc(&heap)); - head.at().set(1); - ObjRef cur(head); - for (int i = 0; i < 10; ++i) { - cur.at, next_offset>().set(ObjRef::Alloc(&heap)); - cur.Assign(cur.at, next_offset>().get()); - cur.at().set(i + 2); - } - - // Pass by reference. - cur.Assign(head); - while (!cur.null()) { - UpdateElement(cur); - cur.Assign(cur.at, next_offset>().get()); - } - - // Pass by value. - cur.Assign(head); - while (!cur.null()) { - // We could place clone on stack as well. - DoNotUpdateElement(cur.Clone(&heap)); - cur.Assign(cur.at, next_offset>().get()); - } - - // Return by value is trivial in this system. CopyTo() into provided container. - ObjRef value(ObjRef::Alloc(&heap)); - ReturnByValue(value); - printf("By value is %d\n", value.at().get()); - - // Return by references assumes passing of container where results to be allocated. - value = ReturnByRef(&heap /* or stack container */); - printf("By ref is %d\n", value.at().get()); - - // Dump results. - cur.Assign(head); - // Pass by reference. - while (!cur.null()) { - UpdateElement(cur); - cur.Assign(cur.at, next_offset>().get()); - } - // Pass by value. - while (!cur.null()) { - // We could place clone on stack as well. - DoNotUpdateElement(cur.Clone(&heap)); - cur.Assign(cur.at, next_offset>().get()); - } - cur.Assign(head); - while (!cur.null()) { - printf("next is %d\n", cur.at().get()); - cur.Assign(cur.at, next_offset>().get()); - } - } - heap.Dispose(); -} - -int main() { - test_placer(); - return 0; -} diff --git a/gradle.properties b/gradle.properties index 00427b8eba0..fadd2b4537e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,19 @@ +# +# Copyright 2010-2017 JetBrains s.r.o. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + kotlin_version=1.1.0 llvmVersion = 3.9.0 minMacOsVersion = 10.10 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3bbb04dc650..3abc1a19bfc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,3 +1,19 @@ +# +# Copyright 2010-2017 JetBrains s.r.o. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + #Thu Oct 27 13:47:42 MSK 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists diff --git a/runtime/build.gradle b/runtime/build.gradle index 9167c1b51ac..d386d4ed0cf 100644 --- a/runtime/build.gradle +++ b/runtime/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import org.jetbrains.kotlin.CompileCppToBitcode // TODO: consider using some Gradle plugins to build and test diff --git a/runtime/src/launcher/cpp/launcher.cpp b/runtime/src/launcher/cpp/launcher.cpp index fcbc098a306..dc0d2b75f85 100644 --- a/runtime/src/launcher/cpp/launcher.cpp +++ b/runtime/src/launcher/cpp/launcher.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "Memory.h" #include "Natives.h" #include "Runtime.h" diff --git a/runtime/src/launcher/kotlin/konan/start.kt b/runtime/src/launcher/kotlin/konan/start.kt index 9012016d6bc..d61fb04d097 100644 --- a/runtime/src/launcher/kotlin/konan/start.kt +++ b/runtime/src/launcher/kotlin/konan/start.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import konan.internal.ExportForCppRuntime external fun main(args: Array) diff --git a/runtime/src/main/cpp/Arrays.cpp b/runtime/src/main/cpp/Arrays.cpp index 89dcd783143..37905a56f47 100644 --- a/runtime/src/main/cpp/Arrays.cpp +++ b/runtime/src/main/cpp/Arrays.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include diff --git a/runtime/src/main/cpp/Assert.cpp b/runtime/src/main/cpp/Assert.cpp index 7de799a9a55..e9b198455d9 100644 --- a/runtime/src/main/cpp/Assert.cpp +++ b/runtime/src/main/cpp/Assert.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include diff --git a/runtime/src/main/cpp/Assert.h b/runtime/src/main/cpp/Assert.h index 54a193a2e67..c86923f9a69 100644 --- a/runtime/src/main/cpp/Assert.h +++ b/runtime/src/main/cpp/Assert.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_ASSERT_H #define RUNTIME_ASSERT_H diff --git a/runtime/src/main/cpp/Common.h b/runtime/src/main/cpp/Common.h index 287344d2193..8295fa4e685 100644 --- a/runtime/src/main/cpp/Common.h +++ b/runtime/src/main/cpp/Common.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_COMMON_H #define RUNTIME_COMMON_H diff --git a/runtime/src/main/cpp/Exceptions.cpp b/runtime/src/main/cpp/Exceptions.cpp index bc4ed164c5e..07373082c8c 100644 --- a/runtime/src/main/cpp/Exceptions.cpp +++ b/runtime/src/main/cpp/Exceptions.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/runtime/src/main/cpp/Exceptions.h b/runtime/src/main/cpp/Exceptions.h index 2d96907deb5..eaf8345685a 100644 --- a/runtime/src/main/cpp/Exceptions.h +++ b/runtime/src/main/cpp/Exceptions.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_EXCEPTIONS_H #define RUNTIME_EXCEPTIONS_H diff --git a/runtime/src/main/cpp/Interop.cpp b/runtime/src/main/cpp/Interop.cpp index 37652e4332b..e5c7850f3f2 100644 --- a/runtime/src/main/cpp/Interop.cpp +++ b/runtime/src/main/cpp/Interop.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/runtime/src/main/cpp/KString.cpp b/runtime/src/main/cpp/KString.cpp index acf910c8d1b..284e8244897 100644 --- a/runtime/src/main/cpp/KString.cpp +++ b/runtime/src/main/cpp/KString.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/runtime/src/main/cpp/KString.h b/runtime/src/main/cpp/KString.h index 93c2006ecba..da9e54d13cb 100644 --- a/runtime/src/main/cpp/KString.h +++ b/runtime/src/main/cpp/KString.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_STRING_H #define RUNTIME_STRING_H diff --git a/runtime/src/main/cpp/Memory.cpp b/runtime/src/main/cpp/Memory.cpp index 1165202fdbb..9d107785656 100644 --- a/runtime/src/main/cpp/Memory.cpp +++ b/runtime/src/main/cpp/Memory.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/runtime/src/main/cpp/Memory.h b/runtime/src/main/cpp/Memory.h index 0751150d349..46203b30128 100644 --- a/runtime/src/main/cpp/Memory.h +++ b/runtime/src/main/cpp/Memory.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_MEMORY_H #define RUNTIME_MEMORY_H diff --git a/runtime/src/main/cpp/Natives.cpp b/runtime/src/main/cpp/Natives.cpp index 75c3bb5ad01..f9ffea8f0a8 100644 --- a/runtime/src/main/cpp/Natives.cpp +++ b/runtime/src/main/cpp/Natives.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/runtime/src/main/cpp/Natives.h b/runtime/src/main/cpp/Natives.h index ea90bd600ca..42addafe0da 100644 --- a/runtime/src/main/cpp/Natives.h +++ b/runtime/src/main/cpp/Natives.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_NATIVES_H #define RUNTIME_NATIVES_H diff --git a/runtime/src/main/cpp/Operator.cpp b/runtime/src/main/cpp/Operator.cpp index d24244a8466..6795eaa3d6f 100644 --- a/runtime/src/main/cpp/Operator.cpp +++ b/runtime/src/main/cpp/Operator.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include "Natives.h" diff --git a/runtime/src/main/cpp/Runtime.cpp b/runtime/src/main/cpp/Runtime.cpp index 963ffb547d9..0bae57e3a7f 100644 --- a/runtime/src/main/cpp/Runtime.cpp +++ b/runtime/src/main/cpp/Runtime.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include diff --git a/runtime/src/main/cpp/Runtime.h b/runtime/src/main/cpp/Runtime.h index 0c0f0a2df0c..a6253b6496c 100644 --- a/runtime/src/main/cpp/Runtime.h +++ b/runtime/src/main/cpp/Runtime.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_RUNTIME_H #define RUNTIME_RUNTIME_H diff --git a/runtime/src/main/cpp/ToString.cpp b/runtime/src/main/cpp/ToString.cpp index aab67b32f8b..013e6e5bd0f 100644 --- a/runtime/src/main/cpp/ToString.cpp +++ b/runtime/src/main/cpp/ToString.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include diff --git a/runtime/src/main/cpp/TypeInfo.cpp b/runtime/src/main/cpp/TypeInfo.cpp index 8524f532266..ab41308bf5b 100644 --- a/runtime/src/main/cpp/TypeInfo.cpp +++ b/runtime/src/main/cpp/TypeInfo.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "Assert.h" #include "TypeInfo.h" diff --git a/runtime/src/main/cpp/TypeInfo.h b/runtime/src/main/cpp/TypeInfo.h index e34a6c0b225..536b9088d78 100644 --- a/runtime/src/main/cpp/TypeInfo.h +++ b/runtime/src/main/cpp/TypeInfo.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_TYPEINFO_H #define RUNTIME_TYPEINFO_H diff --git a/runtime/src/main/cpp/Types.cpp b/runtime/src/main/cpp/Types.cpp index 740125447ef..6dfd78bd731 100644 --- a/runtime/src/main/cpp/Types.cpp +++ b/runtime/src/main/cpp/Types.cpp @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "Types.h" #include "Exceptions.h" diff --git a/runtime/src/main/cpp/Types.h b/runtime/src/main/cpp/Types.h index 06e5eea7788..e7a314d43dc 100644 --- a/runtime/src/main/cpp/Types.h +++ b/runtime/src/main/cpp/Types.h @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef RUNTIME_TYPES_H #define RUNTIME_TYPES_H diff --git a/runtime/src/main/kotlin/konan/Annotations.kt b/runtime/src/main/kotlin/konan/Annotations.kt index eed960a52b4..b20002f2279 100644 --- a/runtime/src/main/kotlin/konan/Annotations.kt +++ b/runtime/src/main/kotlin/konan/Annotations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan /** diff --git a/runtime/src/main/kotlin/konan/internal/Annotations.kt b/runtime/src/main/kotlin/konan/internal/Annotations.kt index 1991475948d..b45e99c4adb 100644 --- a/runtime/src/main/kotlin/konan/internal/Annotations.kt +++ b/runtime/src/main/kotlin/konan/internal/Annotations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal /** diff --git a/runtime/src/main/kotlin/konan/internal/Boxing.kt b/runtime/src/main/kotlin/konan/internal/Boxing.kt index 7dc4f6fbdc3..41f055ef942 100644 --- a/runtime/src/main/kotlin/konan/internal/Boxing.kt +++ b/runtime/src/main/kotlin/konan/internal/Boxing.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal // TODO: cache some boxes. diff --git a/runtime/src/main/kotlin/konan/internal/Char.kt b/runtime/src/main/kotlin/konan/internal/Char.kt index d3efcc388b6..8d5e4cb8467 100644 --- a/runtime/src/main/kotlin/konan/internal/Char.kt +++ b/runtime/src/main/kotlin/konan/internal/Char.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.text /** diff --git a/runtime/src/main/kotlin/konan/internal/DefaultArgumentMarker.kt b/runtime/src/main/kotlin/konan/internal/DefaultArgumentMarker.kt index 457b7598a9b..528cda13557 100644 --- a/runtime/src/main/kotlin/konan/internal/DefaultArgumentMarker.kt +++ b/runtime/src/main/kotlin/konan/internal/DefaultArgumentMarker.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal @ExportForCompiler diff --git a/runtime/src/main/kotlin/konan/internal/Function.kt b/runtime/src/main/kotlin/konan/internal/Function.kt index bbf99bed16d..370eb8123e9 100644 --- a/runtime/src/main/kotlin/konan/internal/Function.kt +++ b/runtime/src/main/kotlin/konan/internal/Function.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal /** diff --git a/runtime/src/main/kotlin/konan/internal/GC.kt b/runtime/src/main/kotlin/konan/internal/GC.kt index e2c775cca5b..149a7fe510e 100644 --- a/runtime/src/main/kotlin/konan/internal/GC.kt +++ b/runtime/src/main/kotlin/konan/internal/GC.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal // Cycle garbage collector interface. diff --git a/runtime/src/main/kotlin/konan/internal/InteropBoxing.kt b/runtime/src/main/kotlin/konan/internal/InteropBoxing.kt index 6da63966143..593a2c60d1d 100644 --- a/runtime/src/main/kotlin/konan/internal/InteropBoxing.kt +++ b/runtime/src/main/kotlin/konan/internal/InteropBoxing.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal import kotlinx.cinterop.* diff --git a/runtime/src/main/kotlin/konan/internal/Intrinsics.kt b/runtime/src/main/kotlin/konan/internal/Intrinsics.kt index cf48c5599de..c36eda7a23d 100644 --- a/runtime/src/main/kotlin/konan/internal/Intrinsics.kt +++ b/runtime/src/main/kotlin/konan/internal/Intrinsics.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal import kotlinx.cinterop.CPointer diff --git a/runtime/src/main/kotlin/konan/internal/KPropertyImpl.kt b/runtime/src/main/kotlin/konan/internal/KPropertyImpl.kt index 0b899b0f1d6..25c1ffbfe7f 100644 --- a/runtime/src/main/kotlin/konan/internal/KPropertyImpl.kt +++ b/runtime/src/main/kotlin/konan/internal/KPropertyImpl.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal import kotlin.reflect.KProperty0 diff --git a/runtime/src/main/kotlin/konan/internal/Ref.kt b/runtime/src/main/kotlin/konan/internal/Ref.kt index a9e2b70bcae..a042ad58c79 100644 --- a/runtime/src/main/kotlin/konan/internal/Ref.kt +++ b/runtime/src/main/kotlin/konan/internal/Ref.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal /** diff --git a/runtime/src/main/kotlin/konan/internal/RuntimeUtils.kt b/runtime/src/main/kotlin/konan/internal/RuntimeUtils.kt index 61b5b4788e8..3a7e5ec9c6b 100644 --- a/runtime/src/main/kotlin/konan/internal/RuntimeUtils.kt +++ b/runtime/src/main/kotlin/konan/internal/RuntimeUtils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal @ExportForCppRuntime diff --git a/runtime/src/main/kotlin/konan/internal/Strings.kt b/runtime/src/main/kotlin/konan/internal/Strings.kt index 1f4d63d8819..09070fceb20 100644 --- a/runtime/src/main/kotlin/konan/internal/Strings.kt +++ b/runtime/src/main/kotlin/konan/internal/Strings.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.text /** diff --git a/runtime/src/main/kotlin/konan/internal/Undefined.kt b/runtime/src/main/kotlin/konan/internal/Undefined.kt index 660dbfa5e6c..43288e67126 100644 --- a/runtime/src/main/kotlin/konan/internal/Undefined.kt +++ b/runtime/src/main/kotlin/konan/internal/Undefined.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package konan.internal /** diff --git a/runtime/src/main/kotlin/kotlin/Annotation.kt b/runtime/src/main/kotlin/kotlin/Annotation.kt index a9f5a9703dc..f1fa46d5c7c 100644 --- a/runtime/src/main/kotlin/kotlin/Annotation.kt +++ b/runtime/src/main/kotlin/kotlin/Annotation.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Annotations.kt b/runtime/src/main/kotlin/kotlin/Annotations.kt index e85f569e528..a7d057fb019 100644 --- a/runtime/src/main/kotlin/kotlin/Annotations.kt +++ b/runtime/src/main/kotlin/kotlin/Annotations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin import kotlin.annotation.AnnotationRetention.BINARY diff --git a/runtime/src/main/kotlin/kotlin/Any.kt b/runtime/src/main/kotlin/kotlin/Any.kt index 445f2f1e3f8..a3281624e3f 100644 --- a/runtime/src/main/kotlin/kotlin/Any.kt +++ b/runtime/src/main/kotlin/kotlin/Any.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Array.kt b/runtime/src/main/kotlin/kotlin/Array.kt index a77f6d55484..d2a065e2290 100644 --- a/runtime/src/main/kotlin/kotlin/Array.kt +++ b/runtime/src/main/kotlin/kotlin/Array.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin import konan.internal.ExportForCompiler diff --git a/runtime/src/main/kotlin/kotlin/Arrays.kt b/runtime/src/main/kotlin/kotlin/Arrays.kt index f285aa9ebd0..270b1512f99 100644 --- a/runtime/src/main/kotlin/kotlin/Arrays.kt +++ b/runtime/src/main/kotlin/kotlin/Arrays.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin import kotlin.collections.* diff --git a/runtime/src/main/kotlin/kotlin/Assertions.kt b/runtime/src/main/kotlin/kotlin/Assertions.kt index 9a8a42f09ea..fe340810bfd 100644 --- a/runtime/src/main/kotlin/kotlin/Assertions.kt +++ b/runtime/src/main/kotlin/kotlin/Assertions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Boolean.kt b/runtime/src/main/kotlin/kotlin/Boolean.kt index df6a7456091..c8e3c597214 100644 --- a/runtime/src/main/kotlin/kotlin/Boolean.kt +++ b/runtime/src/main/kotlin/kotlin/Boolean.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Char.kt b/runtime/src/main/kotlin/kotlin/Char.kt index dbe0451d4d5..aa43a20f740 100644 --- a/runtime/src/main/kotlin/kotlin/Char.kt +++ b/runtime/src/main/kotlin/kotlin/Char.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/CharSequence.kt b/runtime/src/main/kotlin/kotlin/CharSequence.kt index c75f3812087..b3942a6cb94 100644 --- a/runtime/src/main/kotlin/kotlin/CharSequence.kt +++ b/runtime/src/main/kotlin/kotlin/CharSequence.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Comparable.kt b/runtime/src/main/kotlin/kotlin/Comparable.kt index 0199dda2ad0..9a489f55524 100644 --- a/runtime/src/main/kotlin/kotlin/Comparable.kt +++ b/runtime/src/main/kotlin/kotlin/Comparable.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin import kotlin.comparisons.Comparator diff --git a/runtime/src/main/kotlin/kotlin/Enum.kt b/runtime/src/main/kotlin/kotlin/Enum.kt index f5be2beff9b..25b42a22525 100644 --- a/runtime/src/main/kotlin/kotlin/Enum.kt +++ b/runtime/src/main/kotlin/kotlin/Enum.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Exceptions.kt b/runtime/src/main/kotlin/kotlin/Exceptions.kt index 92b1c313a79..ec0d36151ee 100644 --- a/runtime/src/main/kotlin/kotlin/Exceptions.kt +++ b/runtime/src/main/kotlin/kotlin/Exceptions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin public open class Error : Throwable { diff --git a/runtime/src/main/kotlin/kotlin/Experimental.kt b/runtime/src/main/kotlin/kotlin/Experimental.kt index ba82125f1ab..88c4f66217b 100644 --- a/runtime/src/main/kotlin/kotlin/Experimental.kt +++ b/runtime/src/main/kotlin/kotlin/Experimental.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + /** * Empty package to avoid unresolved reference errors in bitwiseOp tests * (e.g. external_codegen_box_binaryOp/bitwiseOp.kt). diff --git a/runtime/src/main/kotlin/kotlin/Function.kt b/runtime/src/main/kotlin/kotlin/Function.kt index b640706adc2..491c26f0d73 100644 --- a/runtime/src/main/kotlin/kotlin/Function.kt +++ b/runtime/src/main/kotlin/kotlin/Function.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Functions.kt b/runtime/src/main/kotlin/kotlin/Functions.kt index b4e056de963..a2a455f16de 100644 --- a/runtime/src/main/kotlin/kotlin/Functions.kt +++ b/runtime/src/main/kotlin/kotlin/Functions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin // (0..22).joinToString("\n") { i -> "interface Function$i<${(1..i).joinToString("") { j -> "in P$j, " }}out R> : Function {\n operator fun invoke(${(1..i).joinToString { j -> "p$j: P$j" }}): R\n}\n" } diff --git a/runtime/src/main/kotlin/kotlin/Lazy.kt b/runtime/src/main/kotlin/kotlin/Lazy.kt index c2c286b3057..3a290a55b0b 100644 --- a/runtime/src/main/kotlin/kotlin/Lazy.kt +++ b/runtime/src/main/kotlin/kotlin/Lazy.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin import kotlin.reflect.KProperty diff --git a/runtime/src/main/kotlin/kotlin/Nothing.kt b/runtime/src/main/kotlin/kotlin/Nothing.kt index bcba68c33aa..f5e6d10d80d 100644 --- a/runtime/src/main/kotlin/kotlin/Nothing.kt +++ b/runtime/src/main/kotlin/kotlin/Nothing.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Number.kt b/runtime/src/main/kotlin/kotlin/Number.kt index f64a974ec87..95aed6c7e46 100644 --- a/runtime/src/main/kotlin/kotlin/Number.kt +++ b/runtime/src/main/kotlin/kotlin/Number.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Numbers.kt b/runtime/src/main/kotlin/kotlin/Numbers.kt index 3d0e5f8b6bd..b58f913021a 100644 --- a/runtime/src/main/kotlin/kotlin/Numbers.kt +++ b/runtime/src/main/kotlin/kotlin/Numbers.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Primitives.kt b/runtime/src/main/kotlin/kotlin/Primitives.kt index 417da260a97..9d58db20dda 100644 --- a/runtime/src/main/kotlin/kotlin/Primitives.kt +++ b/runtime/src/main/kotlin/kotlin/Primitives.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/String.kt b/runtime/src/main/kotlin/kotlin/String.kt index d0a2b1d759b..74ff0defbdd 100644 --- a/runtime/src/main/kotlin/kotlin/String.kt +++ b/runtime/src/main/kotlin/kotlin/String.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin diff --git a/runtime/src/main/kotlin/kotlin/Throwable.kt b/runtime/src/main/kotlin/kotlin/Throwable.kt index cbcdd9f001d..b316b1f8593 100644 --- a/runtime/src/main/kotlin/kotlin/Throwable.kt +++ b/runtime/src/main/kotlin/kotlin/Throwable.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/Unit.kt b/runtime/src/main/kotlin/kotlin/Unit.kt index b5c859f84f5..71ffe1a3543 100644 --- a/runtime/src/main/kotlin/kotlin/Unit.kt +++ b/runtime/src/main/kotlin/kotlin/Unit.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin public object Unit { diff --git a/runtime/src/main/kotlin/kotlin/annotation/Annotations.kt b/runtime/src/main/kotlin/kotlin/annotation/Annotations.kt index e466d0d198b..78008c28cfd 100644 --- a/runtime/src/main/kotlin/kotlin/annotation/Annotations.kt +++ b/runtime/src/main/kotlin/kotlin/annotation/Annotations.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2015 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/runtime/src/main/kotlin/kotlin/collections/AbstractCollection.kt b/runtime/src/main/kotlin/kotlin/collections/AbstractCollection.kt index 06f08215415..d90b065087a 100644 --- a/runtime/src/main/kotlin/kotlin/collections/AbstractCollection.kt +++ b/runtime/src/main/kotlin/kotlin/collections/AbstractCollection.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections public abstract class AbstractCollection protected constructor() : Collection { diff --git a/runtime/src/main/kotlin/kotlin/collections/AbstractIterator.kt b/runtime/src/main/kotlin/kotlin/collections/AbstractIterator.kt index 7f30b156c70..98546d90f73 100644 --- a/runtime/src/main/kotlin/kotlin/collections/AbstractIterator.kt +++ b/runtime/src/main/kotlin/kotlin/collections/AbstractIterator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections diff --git a/runtime/src/main/kotlin/kotlin/collections/AbstractList.kt b/runtime/src/main/kotlin/kotlin/collections/AbstractList.kt index 3268818e609..6454ab26565 100644 --- a/runtime/src/main/kotlin/kotlin/collections/AbstractList.kt +++ b/runtime/src/main/kotlin/kotlin/collections/AbstractList.kt @@ -1,7 +1,18 @@ /* - * Based on GWT AbstractList - * Copyright 2007 Google Inc. -*/ + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package kotlin.collections public abstract class AbstractList protected constructor() : AbstractCollection(), List { diff --git a/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt b/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt index 5777a67d24d..d5ce146864b 100644 --- a/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt +++ b/runtime/src/main/kotlin/kotlin/collections/ArrayList.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections class ArrayList private constructor( diff --git a/runtime/src/main/kotlin/kotlin/collections/ArrayUtil.kt b/runtime/src/main/kotlin/kotlin/collections/ArrayUtil.kt index dff4cd24fc0..390712df1dd 100644 --- a/runtime/src/main/kotlin/kotlin/collections/ArrayUtil.kt +++ b/runtime/src/main/kotlin/kotlin/collections/ArrayUtil.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Arrays.kt b/runtime/src/main/kotlin/kotlin/collections/Arrays.kt index 34a5d403781..ac128edead7 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Arrays.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Arrays.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/runtime/src/main/kotlin/kotlin/collections/Collection.kt b/runtime/src/main/kotlin/kotlin/collections/Collection.kt index bfdf0dbbd1c..ff941956b1b 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Collection.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Collection.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Collections.kt b/runtime/src/main/kotlin/kotlin/collections/Collections.kt index 7ea66f91060..35f3fc33034 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Collections.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Collections.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections import kotlin.comparisons.* diff --git a/runtime/src/main/kotlin/kotlin/collections/Grouping.kt b/runtime/src/main/kotlin/kotlin/collections/Grouping.kt index 96ab0aa5c1f..1c4064b38b6 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Grouping.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Grouping.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/HashMap.kt b/runtime/src/main/kotlin/kotlin/collections/HashMap.kt index 534f2134b20..50512327ea5 100644 --- a/runtime/src/main/kotlin/kotlin/collections/HashMap.kt +++ b/runtime/src/main/kotlin/kotlin/collections/HashMap.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections class HashMap private constructor( diff --git a/runtime/src/main/kotlin/kotlin/collections/HashSet.kt b/runtime/src/main/kotlin/kotlin/collections/HashSet.kt index faa477b5e7a..05c728554e6 100644 --- a/runtime/src/main/kotlin/kotlin/collections/HashSet.kt +++ b/runtime/src/main/kotlin/kotlin/collections/HashSet.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections class HashSet internal constructor( diff --git a/runtime/src/main/kotlin/kotlin/collections/IndexedValue.kt b/runtime/src/main/kotlin/kotlin/collections/IndexedValue.kt index 7259c82a2b4..4eace943c73 100644 --- a/runtime/src/main/kotlin/kotlin/collections/IndexedValue.kt +++ b/runtime/src/main/kotlin/kotlin/collections/IndexedValue.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/IntUtil.kt b/runtime/src/main/kotlin/kotlin/collections/IntUtil.kt index 5990a1b84a6..bf83cd20092 100644 --- a/runtime/src/main/kotlin/kotlin/collections/IntUtil.kt +++ b/runtime/src/main/kotlin/kotlin/collections/IntUtil.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections fun Int.highestOneBit() : Int { diff --git a/runtime/src/main/kotlin/kotlin/collections/Iterables.kt b/runtime/src/main/kotlin/kotlin/collections/Iterables.kt index 5cc6005f25a..7ca467c1945 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Iterables.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Iterables.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Iterator.kt b/runtime/src/main/kotlin/kotlin/collections/Iterator.kt index 92c2d9d70dc..ac672155bb5 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Iterator.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Iterator.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Iterators.kt b/runtime/src/main/kotlin/kotlin/collections/Iterators.kt index dbf0c4d7aeb..a68b4e04a26 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Iterators.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Iterators.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** An iterator over a sequence of values of type `Byte`. */ diff --git a/runtime/src/main/kotlin/kotlin/collections/List.kt b/runtime/src/main/kotlin/kotlin/collections/List.kt index 9b937282367..ffe0e0e1a41 100644 --- a/runtime/src/main/kotlin/kotlin/collections/List.kt +++ b/runtime/src/main/kotlin/kotlin/collections/List.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Map.kt b/runtime/src/main/kotlin/kotlin/collections/Map.kt index e4604df020e..e0f05684d9f 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Map.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Map.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/MapAccessors.kt b/runtime/src/main/kotlin/kotlin/collections/MapAccessors.kt index 5e2847903a3..373efe65ad4 100644 --- a/runtime/src/main/kotlin/kotlin/collections/MapAccessors.kt +++ b/runtime/src/main/kotlin/kotlin/collections/MapAccessors.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections import kotlin.reflect.KProperty diff --git a/runtime/src/main/kotlin/kotlin/collections/MapWithDefault.kt b/runtime/src/main/kotlin/kotlin/collections/MapWithDefault.kt index 6d26218751d..956034c5a21 100644 --- a/runtime/src/main/kotlin/kotlin/collections/MapWithDefault.kt +++ b/runtime/src/main/kotlin/kotlin/collections/MapWithDefault.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Maps.kt b/runtime/src/main/kotlin/kotlin/collections/Maps.kt index ccb7bcb9bbf..679e613af3c 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Maps.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Maps.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections private object EmptyMap : Map { diff --git a/runtime/src/main/kotlin/kotlin/collections/MutableCollections.kt b/runtime/src/main/kotlin/kotlin/collections/MutableCollections.kt index 6de07232967..00dfef90ad7 100644 --- a/runtime/src/main/kotlin/kotlin/collections/MutableCollections.kt +++ b/runtime/src/main/kotlin/kotlin/collections/MutableCollections.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections import kotlin.comparisons.* diff --git a/runtime/src/main/kotlin/kotlin/collections/RandomAccess.kt b/runtime/src/main/kotlin/kotlin/collections/RandomAccess.kt index 78bb8027619..dc49997d308 100644 --- a/runtime/src/main/kotlin/kotlin/collections/RandomAccess.kt +++ b/runtime/src/main/kotlin/kotlin/collections/RandomAccess.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections public interface RandomAccess diff --git a/runtime/src/main/kotlin/kotlin/collections/ReversedViews.kt b/runtime/src/main/kotlin/kotlin/collections/ReversedViews.kt index 23365319b09..d2b93dedee1 100644 --- a/runtime/src/main/kotlin/kotlin/collections/ReversedViews.kt +++ b/runtime/src/main/kotlin/kotlin/collections/ReversedViews.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections private open class ReversedListReadOnly(private val delegate: List) : AbstractList() { diff --git a/runtime/src/main/kotlin/kotlin/collections/Set.kt b/runtime/src/main/kotlin/kotlin/collections/Set.kt index 1073b69e8a7..c34331a8830 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Set.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Set.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections /** diff --git a/runtime/src/main/kotlin/kotlin/collections/Sets.kt b/runtime/src/main/kotlin/kotlin/collections/Sets.kt index c9262500d1d..d77bbdc871c 100644 --- a/runtime/src/main/kotlin/kotlin/collections/Sets.kt +++ b/runtime/src/main/kotlin/kotlin/collections/Sets.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.collections diff --git a/runtime/src/main/kotlin/kotlin/comparisons/Comparisons.kt b/runtime/src/main/kotlin/kotlin/comparisons/Comparisons.kt index ca60cf17cbc..64bada21be8 100644 --- a/runtime/src/main/kotlin/kotlin/comparisons/Comparisons.kt +++ b/runtime/src/main/kotlin/kotlin/comparisons/Comparisons.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.comparisons interface Comparator { diff --git a/runtime/src/main/kotlin/kotlin/internal/Annotations.kt b/runtime/src/main/kotlin/kotlin/internal/Annotations.kt index 83f2baad656..35f4720517c 100644 --- a/runtime/src/main/kotlin/kotlin/internal/Annotations.kt +++ b/runtime/src/main/kotlin/kotlin/internal/Annotations.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.internal /** diff --git a/runtime/src/main/kotlin/kotlin/internal/progressionUtil.kt b/runtime/src/main/kotlin/kotlin/internal/progressionUtil.kt index d92be24c5c0..58cbf584c25 100644 --- a/runtime/src/main/kotlin/kotlin/internal/progressionUtil.kt +++ b/runtime/src/main/kotlin/kotlin/internal/progressionUtil.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.internal // a mod b (in arithmetical sense) diff --git a/runtime/src/main/kotlin/kotlin/io/Console.kt b/runtime/src/main/kotlin/kotlin/io/Console.kt index 2e90baf0bd3..fa956d5b029 100644 --- a/runtime/src/main/kotlin/kotlin/io/Console.kt +++ b/runtime/src/main/kotlin/kotlin/io/Console.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.io @SymbolName("Kotlin_io_Console_print") diff --git a/runtime/src/main/kotlin/kotlin/properties/Delegates.kt b/runtime/src/main/kotlin/kotlin/properties/Delegates.kt index 0353d3b6b18..b2bd1e4eb75 100644 --- a/runtime/src/main/kotlin/kotlin/properties/Delegates.kt +++ b/runtime/src/main/kotlin/kotlin/properties/Delegates.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.properties import kotlin.reflect.KProperty diff --git a/runtime/src/main/kotlin/kotlin/properties/Interfaces.kt b/runtime/src/main/kotlin/kotlin/properties/Interfaces.kt index b8034216340..39faf05290d 100644 --- a/runtime/src/main/kotlin/kotlin/properties/Interfaces.kt +++ b/runtime/src/main/kotlin/kotlin/properties/Interfaces.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.properties import kotlin.reflect.KProperty diff --git a/runtime/src/main/kotlin/kotlin/properties/ObservableProperty.kt b/runtime/src/main/kotlin/kotlin/properties/ObservableProperty.kt index cb3eb98026b..1b52ba64e1e 100644 --- a/runtime/src/main/kotlin/kotlin/properties/ObservableProperty.kt +++ b/runtime/src/main/kotlin/kotlin/properties/ObservableProperty.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.properties import kotlin.reflect.KProperty diff --git a/runtime/src/main/kotlin/kotlin/ranges/ProgressionIterators.kt b/runtime/src/main/kotlin/kotlin/ranges/ProgressionIterators.kt index 96c55429576..0f21f61b096 100644 --- a/runtime/src/main/kotlin/kotlin/ranges/ProgressionIterators.kt +++ b/runtime/src/main/kotlin/kotlin/ranges/ProgressionIterators.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.ranges /** diff --git a/runtime/src/main/kotlin/kotlin/ranges/Progressions.kt b/runtime/src/main/kotlin/kotlin/ranges/Progressions.kt index 97c4085618a..932639b382e 100644 --- a/runtime/src/main/kotlin/kotlin/ranges/Progressions.kt +++ b/runtime/src/main/kotlin/kotlin/ranges/Progressions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.ranges import kotlin.internal.getProgressionLastElement diff --git a/runtime/src/main/kotlin/kotlin/ranges/Range.kt b/runtime/src/main/kotlin/kotlin/ranges/Range.kt index 9bd141fd53b..5bf08f2d042 100644 --- a/runtime/src/main/kotlin/kotlin/ranges/Range.kt +++ b/runtime/src/main/kotlin/kotlin/ranges/Range.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.ranges /** diff --git a/runtime/src/main/kotlin/kotlin/ranges/Ranges.kt b/runtime/src/main/kotlin/kotlin/ranges/Ranges.kt index 753e80e49cc..4f43689a8d9 100644 --- a/runtime/src/main/kotlin/kotlin/ranges/Ranges.kt +++ b/runtime/src/main/kotlin/kotlin/ranges/Ranges.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.ranges /** diff --git a/runtime/src/main/kotlin/kotlin/ranges/_Ranges.kt b/runtime/src/main/kotlin/kotlin/ranges/_Ranges.kt index 5d81d75c1b2..aaa9ac1bdee 100644 --- a/runtime/src/main/kotlin/kotlin/ranges/_Ranges.kt +++ b/runtime/src/main/kotlin/kotlin/ranges/_Ranges.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.ranges /** diff --git a/runtime/src/main/kotlin/kotlin/reflect/KAnnotatedElement.kt b/runtime/src/main/kotlin/kotlin/reflect/KAnnotatedElement.kt index 33dab89392f..083b6b9d51e 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KAnnotatedElement.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KAnnotatedElement.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.reflect /** diff --git a/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt b/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt index 933391f745a..6fbab69ad53 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.reflect /** diff --git a/runtime/src/main/kotlin/kotlin/reflect/KFunction.kt b/runtime/src/main/kotlin/kotlin/reflect/KFunction.kt index 08988b4c1a5..c8da98d702b 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KFunction.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KFunction.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.reflect interface KFunction : KCallable diff --git a/runtime/src/main/kotlin/kotlin/reflect/KFunctions.kt b/runtime/src/main/kotlin/kotlin/reflect/KFunctions.kt index 2b2b6efa5fa..2c6b4e8aca5 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KFunctions.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KFunctions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.reflect // (0..22).joinToString("\n") { i -> "interface KFunction$i<${(1..i).joinToString("") { j -> "in P$j, " }}out R> : Function$i<${(1..i).joinToString("") { j -> "P$j, " }}R>, KFunction\n" } diff --git a/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt b/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt index 97b734a5dfd..81ca27a0131 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.reflect /** diff --git a/runtime/src/main/kotlin/kotlin/sequences/Sequence.kt b/runtime/src/main/kotlin/kotlin/sequences/Sequence.kt index 5af3b1d32b2..88f38a25e9f 100644 --- a/runtime/src/main/kotlin/kotlin/sequences/Sequence.kt +++ b/runtime/src/main/kotlin/kotlin/sequences/Sequence.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.sequences /** diff --git a/runtime/src/main/kotlin/kotlin/sequences/Sequences.kt b/runtime/src/main/kotlin/kotlin/sequences/Sequences.kt index 42b2f624a6b..7751b5aaf06 100644 --- a/runtime/src/main/kotlin/kotlin/sequences/Sequences.kt +++ b/runtime/src/main/kotlin/kotlin/sequences/Sequences.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.sequences import kotlin.comparisons.* diff --git a/runtime/src/main/kotlin/kotlin/text/Appendable.kt b/runtime/src/main/kotlin/kotlin/text/Appendable.kt index 94250bad486..0a442504d39 100644 --- a/runtime/src/main/kotlin/kotlin/text/Appendable.kt +++ b/runtime/src/main/kotlin/kotlin/text/Appendable.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.text interface Appendable { diff --git a/runtime/src/main/kotlin/kotlin/text/Char.kt b/runtime/src/main/kotlin/kotlin/text/Char.kt index 274394e6c54..f4f03be830e 100644 --- a/runtime/src/main/kotlin/kotlin/text/Char.kt +++ b/runtime/src/main/kotlin/kotlin/text/Char.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.text /** diff --git a/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt b/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt index 7e358005244..f4d70993cac 100644 --- a/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt +++ b/runtime/src/main/kotlin/kotlin/text/StringBuilder.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.text import kotlin.collections.* diff --git a/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt b/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt index c8d872e8c0d..077bee7be14 100644 --- a/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt +++ b/runtime/src/main/kotlin/kotlin/text/StringNumberConversions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.text /** diff --git a/runtime/src/main/kotlin/kotlin/text/Strings.kt b/runtime/src/main/kotlin/kotlin/text/Strings.kt index ee4742a36e7..e97752a1e4a 100644 --- a/runtime/src/main/kotlin/kotlin/text/Strings.kt +++ b/runtime/src/main/kotlin/kotlin/text/Strings.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2016 JetBrains s.r.o. + * Copyright 2010-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/runtime/src/main/kotlin/kotlin/util/Preconditions.kt b/runtime/src/main/kotlin/kotlin/util/Preconditions.kt index d7dd0290437..d67abeb9579 100644 --- a/runtime/src/main/kotlin/kotlin/util/Preconditions.kt +++ b/runtime/src/main/kotlin/kotlin/util/Preconditions.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/util/Sort.kt b/runtime/src/main/kotlin/kotlin/util/Sort.kt index 009fd5342c9..7e5107eedc3 100644 --- a/runtime/src/main/kotlin/kotlin/util/Sort.kt +++ b/runtime/src/main/kotlin/kotlin/util/Sort.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin.util import kotlin.comparisons.* diff --git a/runtime/src/main/kotlin/kotlin/util/Standard.kt b/runtime/src/main/kotlin/kotlin/util/Standard.kt index 9fe0eb82ad5..c3d39f92bd1 100644 --- a/runtime/src/main/kotlin/kotlin/util/Standard.kt +++ b/runtime/src/main/kotlin/kotlin/util/Standard.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/runtime/src/main/kotlin/kotlin/util/Tuples.kt b/runtime/src/main/kotlin/kotlin/util/Tuples.kt index 96ce97bacca..b6176e1f6bd 100644 --- a/runtime/src/main/kotlin/kotlin/util/Tuples.kt +++ b/runtime/src/main/kotlin/kotlin/util/Tuples.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package kotlin /** diff --git a/samples/csvparser/CsvParser.kt b/samples/csvparser/CsvParser.kt index 2e195b1e72c..ed6d41dd9bb 100644 --- a/samples/csvparser/CsvParser.kt +++ b/samples/csvparser/CsvParser.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import kotlinx.cinterop.* import stdio.* diff --git a/samples/gitchurn/src/main.kt b/samples/gitchurn/src/main.kt index f35cc3a52a8..0f3e32e9568 100644 --- a/samples/gitchurn/src/main.kt +++ b/samples/gitchurn/src/main.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + fun main(args: Array) { org.konan.libgit.main(args) } \ No newline at end of file diff --git a/samples/gitchurn/src/org/konan/libgit/GitChurn.kt b/samples/gitchurn/src/org/konan/libgit/GitChurn.kt index 85e4eae0c36..d8056b08e82 100644 --- a/samples/gitchurn/src/org/konan/libgit/GitChurn.kt +++ b/samples/gitchurn/src/org/konan/libgit/GitChurn.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/gitchurn/src/org/konan/libgit/GitCommit.kt b/samples/gitchurn/src/org/konan/libgit/GitCommit.kt index 98342780353..09ace0d1e3e 100644 --- a/samples/gitchurn/src/org/konan/libgit/GitCommit.kt +++ b/samples/gitchurn/src/org/konan/libgit/GitCommit.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/gitchurn/src/org/konan/libgit/GitDiff.kt b/samples/gitchurn/src/org/konan/libgit/GitDiff.kt index 828541857d4..2bcbd0fd81b 100644 --- a/samples/gitchurn/src/org/konan/libgit/GitDiff.kt +++ b/samples/gitchurn/src/org/konan/libgit/GitDiff.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/gitchurn/src/org/konan/libgit/GitRemote.kt b/samples/gitchurn/src/org/konan/libgit/GitRemote.kt index 0436cafb7b6..6f14a028e1b 100644 --- a/samples/gitchurn/src/org/konan/libgit/GitRemote.kt +++ b/samples/gitchurn/src/org/konan/libgit/GitRemote.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/gitchurn/src/org/konan/libgit/GitRepository.kt b/samples/gitchurn/src/org/konan/libgit/GitRepository.kt index 2c19bcbb29d..d2f9c08f692 100644 --- a/samples/gitchurn/src/org/konan/libgit/GitRepository.kt +++ b/samples/gitchurn/src/org/konan/libgit/GitRepository.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/gitchurn/src/org/konan/libgit/GitTree.kt b/samples/gitchurn/src/org/konan/libgit/GitTree.kt index a275ffb2fa1..8a06143c825 100644 --- a/samples/gitchurn/src/org/konan/libgit/GitTree.kt +++ b/samples/gitchurn/src/org/konan/libgit/GitTree.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/gitchurn/src/org/konan/libgit/git.kt b/samples/gitchurn/src/org/konan/libgit/git.kt index a1d378ac746..2a2aa6b0e1a 100644 --- a/samples/gitchurn/src/org/konan/libgit/git.kt +++ b/samples/gitchurn/src/org/konan/libgit/git.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.konan.libgit import kotlinx.cinterop.* diff --git a/samples/opengl/OpenGlTeapot.kt b/samples/opengl/OpenGlTeapot.kt index 56abd7b2e7a..beaba3965b9 100644 --- a/samples/opengl/OpenGlTeapot.kt +++ b/samples/opengl/OpenGlTeapot.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import kotlinx.cinterop.* import opengl.* diff --git a/samples/socket/EchoServer.kt b/samples/socket/EchoServer.kt index 9a7ba69bad9..39c75c1f233 100644 --- a/samples/socket/EchoServer.kt +++ b/samples/socket/EchoServer.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import kotlinx.cinterop.* import sockets.* diff --git a/samples/tetris/Tetris.kt b/samples/tetris/Tetris.kt index 051eb60fe56..482659a9698 100644 --- a/samples/tetris/Tetris.kt +++ b/samples/tetris/Tetris.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import kotlinx.cinterop.* import sdl.* diff --git a/settings.gradle b/settings.gradle index 2576a33e043..abe51da00eb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + include ':dependencies' include ':Interop:Indexer' include ':Interop:StubGenerator' diff --git a/third-party/binaries/jfrog-apple-darwin-x86_64 b/third-party/binaries/jfrog-apple-darwin-x86_64 deleted file mode 100755 index 1a44f29070a..00000000000 Binary files a/third-party/binaries/jfrog-apple-darwin-x86_64 and /dev/null differ diff --git a/third-party/ios/libffi b/third-party/ios/libffi deleted file mode 160000 index 284900b7403..00000000000 --- a/third-party/ios/libffi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 284900b74030d725da528461e53dc2354c1dca6a diff --git a/third-party/ios/setenv-ios.sh b/third-party/ios/setenv-ios.sh deleted file mode 100755 index 18aa618af84..00000000000 --- a/third-party/ios/setenv-ios.sh +++ /dev/null @@ -1,290 +0,0 @@ -#!/usr/bin/env bash - -# Use as 'source setenv-ios.sh device|simulator'. - -# ==================================================================== -# Sets the cross compile environment for Xcode/iOS -# Based upon OpenSSL's setenv-ios.sh (by TH, JW, and SM). -# -# Crypto++ Library is copyrighted as a compilation and (as of version 5.6.2) -# licensed under the Boost Software License 1.0, while the individual files -# in the compilation are all public domain. -# -# See http://www.cryptopp.com/wiki/iOS_(Command_Line) for more details -# ==================================================================== - -######################################### -##### Clear old options ##### -######################################### - -unset IS_CROSS_COMPILE - -unset IS_IOS -unset IS_ANDROID -unset IS_ARM_EMBEDDED - -unset IOS_ARCH -unset IOS_FLAGS -unset IOS_SYSROOT - -######################################### -##### User configurable options ##### -######################################### - -# Define SETENV_VERBOSE=1 to print the configuration, including exported variables. -SETENV_VERBOSE=1 - -# For various SDKs, see https://groups.google.com/d/msg/cryptopp-users/8Z0qfwAjSbA/nKYbhTNBBgAJ - -######################################## -##### Command line ##### -######################################## - -for ARG in "$@" -do - CL=$(echo $ARG | tr '[A-Z]' '[a-z]') - - # i386 (simulator) - if [ "$CL" == "i386" ]; then - IOS_ARCH=i386 - fi - - # x86_64 (simulator) - if [ "$CL" == "x86_64" ]; then - IOS_ARCH=x86_64 - fi - - # ARMv5 - if [ "$CL" == "armv5" ]; then - IOS_ARCH=armv5 - fi - - # ARMv6 - if [ "$CL" == "armv6" ]; then - IOS_ARCH=armv6 - fi - - # ARMv7 - if [ "$CL" == "armv7" ]; then - IOS_ARCH=armv7 - fi - - # ARMv7s - if [ "$CL" == "armv7s" ]; then - IOS_ARCH=armv7s - fi - - # ARM64 - if [ "$CL" == "arm64" ]; then - IOS_ARCH=arm64 - fi - - # iPhone - if [ "$CL" == "iphone" ] || [ "$CL" == "iphoneos" ]; then - APPLE_SDK=iPhoneOS - fi - - # iPhone Simulator - if [ "$CL" == "simulator" ] || [ "$CL" == "iphonesimulator" ]; then - APPLE_SDK=iPhoneSimulator - fi - - # Watch - if [ "$CL" == "watch" ] || [ "$CL" == "watchos" ] || [ "$CL" == "applewatch" ]; then - APPLE_SDK=WatchOS - fi - - # Watch Simulator - if [ "$CL" == "watchsimulator" ]; then - APPLE_SDK=WatchSimulator - fi - - # Apple TV - if [ "$CL" == "tv" ] || [ "$CL" == "appletv" ] || [ "$CL" == "appletvos" ]; then - APPLE_SDK=AppleTVOS - fi - - # Apple TV Simulator - if [ "$CL" == "tvsimulator" ] || [ "$CL" == "appletvsimulator" ]; then - APPLE_SDK=AppleTVSimulator - fi - -done - -# Defaults if not set -if [ -z "$APPLE_SDK" ]; then - APPLE_SDK=iPhoneOS -fi - -if [ -z "$IOS_ARCH" ]; then - if [ "$APPLE_SDK" == "iPhoneOS" ]; then - IOS_ARCH=armv7 - elif [ "$APPLE_SDK" == "iPhoneSimulator" ]; then - IOS_ARCH=i386 - elif [ "$APPLE_SDK" == "AppleTVOS" ]; then - IOS_ARCH=arm64 - elif [ "$APPLE_SDK" == "WatchOS" ]; then - IOS_ARCH=armv7 - fi - - # TODO: fill in missing simulator architectures -fi - -# Allow a user override? I think we should be doing this. The use case is: -# move /Applications/Xcode somewhere else for a side-by-side installation. -# These sorts of tricks are a required procedure on Apple's gear: -# http://stackoverflow.com/questions/11651773/install-simulator-sdk-4-3-to-xcode-4-4-on-mountain-lion -if [ -z "$XCODE_DEVELOPER" ]; then - XCODE_DEVELOPER=$(xcode-select -print-path 2>/dev/null) -fi - -if [ ! -d "$XCODE_DEVELOPER" ]; then - echo "ERROR: unable to find XCODE_DEVELOPER directory." - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -# Default toolchain location -XCODE_TOOLCHAIN="$XCODE_DEVELOPER/usr/bin" - -if [ ! -d "$XCODE_TOOLCHAIN" ]; then - echo "ERROR: unable to find XCODE_TOOLCHAIN directory." - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -# XCODE_DEVELOPER_TOP is the top of the development tools tree -XCODE_DEVELOPER_TOP="$XCODE_DEVELOPER/Platforms/$APPLE_SDK.platform/Developer" - -if [ ! -d "$XCODE_DEVELOPER_TOP" ]; then - echo "ERROR: unable to find XCODE_DEVELOPER_TOP directory." - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -# IOS_TOOLCHAIN is the location of the actual compiler tools. -if [ -d "$XCODE_DEVELOPER/Toolchains/XcodeDefault.xctoolchain/usr/bin/" ]; then - IOS_TOOLCHAIN="$XCODE_DEVELOPER/Toolchains/XcodeDefault.xctoolchain/usr/bin/" -elif [ -d "$XCODE_DEVELOPER_TOP/usr/bin/" ]; then - IOS_TOOLCHAIN="$XCODE_DEVELOPER_TOP/usr/bin/" -fi - -if [ -z "$IOS_TOOLCHAIN" ] || [ ! -d "$IOS_TOOLCHAIN" ]; then - echo "ERROR: unable to find Xcode cross-compiler tools." - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -# -# XCODE_SDK is the SDK name/version being used - adjust the list as appropriate. -# For example, remove 4.3, 6.2, and 6.1 if they are not installed. We go back to -# the 1.0 SDKs because Apple WatchOS uses low numbers, like 2.0 and 2.1. -unset XCODE_SDK -for i in $(seq -f "%.1f" 20.0 -0.1 1.0) -do - if [ -d "$XCODE_DEVELOPER/Platforms/$APPLE_SDK.platform/Developer/SDKs/$APPLE_SDK$i.sdk" ]; then - XCODE_SDK="$APPLE_SDK$i.sdk" - break - fi -done - -# Error checking -if [ -z "$XCODE_SDK" ]; then - echo "ERROR: unable to find a SDK." - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -# Simulator fixup. LD fails to link dylib. -if [ "$APPLE_SDK" == "iPhoneSimulator" ] && [ "$IOS_ARCH" == "i386" ]; then - IOS_FLAGS=-miphoneos-version-min=5 -fi - -# ARMv7s fixup. Xcode 4/iOS 6 -if [ "$IOS_ARCH" == "armv7s" ]; then - IOS_FLAGS=-miphoneos-version-min=6 -fi - -# ARM64 fixup. Xcode 5/iOS 7 -if [ "$IOS_ARCH" == "arm64" ]; then - IOS_FLAGS=-miphoneos-version-min=7 -fi - -# ARM64 Simulator fixup. Under Xcode 6/iOS 8, it uses x86_64 and not i386 -if [ "$IOS_ARCH" == "x86_64" ]; then - IOS_FLAGS=-miphoneos-version-min=8 -fi - -# Simulator uses i386 or x86_64, Device uses ARMv5, ARMv6, ARMv7, or ARMv7s -# -# Apple deprecated ARMv5 at iOS 4.0, and ARMv6 at iOS 5.0 -# http://stackoverflow.com/questions/7488657/how-to-build-for-armv6-and-armv7-architectures-with-ios-5 - -echo "Configuring for $APPLE_SDK ($IOS_ARCH)" - -# Used by the GNUmakefile-cross -export IS_IOS=1 -export IOS_ARCH -export IOS_FLAGS -export IOS_SYSROOT="$XCODE_DEVELOPER_TOP/SDKs/$XCODE_SDK" - -####################################### -##### Verbose ##### -####################################### - -if [ "$SETENV_VERBOSE" == "1" ]; then - - echo "XCODE_SDK:" $XCODE_SDK - echo "XCODE_DEVELOPER: $XCODE_DEVELOPER" - echo "XCODE_TOOLCHAIN: $XCODE_TOOLCHAIN" - echo "XCODE_DEVELOPER_TOP: $XCODE_DEVELOPER_TOP" - echo "IOS_ARCH: $IOS_ARCH" - echo "IOS_TOOLCHAIN: $IOS_TOOLCHAIN" - echo "IOS_FLAGS: $IOS_FLAGS" - echo "IOS_SYSROOT: $IOS_SYSROOT" -fi - -######################################## -##### Path with Toolchains ##### -######################################## - -# Only modify/export PATH if IOS_TOOLCHAIN good -if [ ! -z "$IOS_TOOLCHAIN" ] && [ ! -z "$XCODE_TOOLCHAIN" ]; then - - # And only modify PATH if IOS_TOOLCHAIN is not present - TOOL_PATH="$IOS_TOOLCHAIN:$XCODE_TOOLCHAIN" - LEN=${#TOOL_PATH} - SUBSTR=${PATH:0:$LEN} - if [ "$SUBSTR" != "$TOOL_PATH" ]; then - export PATH="$TOOL_PATH":"$PATH" - fi -else - echo "ERROR: unable to set new PATH." - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -######################################## -##### Tool Test Time ##### -######################################## - -# Test for various tools needed during cross compilation. -# FOUND_ALL starts high, and pushes low on failure -FOUND_ALL=1 - -# Apple's embedded g++ cannot compile integer.cpp -TOOLS=(clang clang++ ar ranlib libtool ld) -for tool in ${TOOLS[@]} -do - if [ ! -e "$IOS_TOOLCHAIN/$tool" ] && [ ! -e "$XCODE_TOOLCHAIN/$tool" ]; then - echo "ERROR: unable to find $tool at IOS_TOOLCHAIN or XCODE_TOOLCHAIN" - FOUND_ALL=0 - fi -done - -if [ "$FOUND_ALL" -eq "0" ]; then - [ "$0" = "$BASH_SOURCE" ] && exit 1 || return 1 -fi - -echo -echo "*******************************************************************************" -echo "It looks the the environment is set correctly. Your next step is" -echo "build the library with 'make -f GNUmakefile-cross'" -echo "*******************************************************************************" -echo - -[ "$0" = "$BASH_SOURCE" ] && exit 0 || return 0 diff --git a/tools/helpers/build.gradle b/tools/helpers/build.gradle index 7b3f1db81e9..de1081f282e 100644 --- a/tools/helpers/build.gradle +++ b/tools/helpers/build.gradle @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import org.jetbrains.kotlin.NativeInteropPlugin import org.jetbrains.kotlin.RunInteropKonanTest import org.jetbrains.kotlin.RunKonanTest diff --git a/tools/helpers/src/main/kotlin/DependencyDownloader.kt b/tools/helpers/src/main/kotlin/DependencyDownloader.kt index c1f83946563..07a1e6cd743 100644 --- a/tools/helpers/src/main/kotlin/DependencyDownloader.kt +++ b/tools/helpers/src/main/kotlin/DependencyDownloader.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.konan import java.io.* diff --git a/tools/helpers/src/main/kotlin/Helper0.kt b/tools/helpers/src/main/kotlin/Helper0.kt index 58f4a44157f..668f999db1b 100644 --- a/tools/helpers/src/main/kotlin/Helper0.kt +++ b/tools/helpers/src/main/kotlin/Helper0.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.konan import java.io.File diff --git a/tools/helpers/src/main/kotlin/main.kt b/tools/helpers/src/main/kotlin/main.kt index 7a3de7faf4a..d5b3d50ffd3 100644 --- a/tools/helpers/src/main/kotlin/main.kt +++ b/tools/helpers/src/main/kotlin/main.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.kotlin.konan import java.io.File