CODEGEN: naive implementation of string_concatination (not tested)
(cherry picked from commit 8e0e9480d7cbec6e640f1b5a8a15af0d2f1bc278)
This commit is contained in:
committed by
vvlevchenko
parent
7a0d0ec5a7
commit
8496a0f2a9
@@ -1,6 +1,7 @@
|
||||
package org.jetbrains.kotlin.cli.bc
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.kotlin.backend.konan.llvm.KonanPlatform
|
||||
import org.jetbrains.kotlin.config.CommonConfigurationKeys
|
||||
import org.jetbrains.kotlin.config.CompilerConfiguration
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.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 org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.resolve.ImportPath
|
||||
import org.jetbrains.kotlin.resolve.PlatformConfigurator
|
||||
import org.jetbrains.kotlin.resolve.TargetPlatform
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
import org.jetbrains.kotlin.storage.LockBasedStorageManager
|
||||
|
||||
class KonanBuiltIns: KotlinBuiltIns {
|
||||
constructor(storageManager: StorageManager) : super(storageManager)
|
||||
|
||||
constructor(storageManager: StorageManager, withModule: Boolean) : this(storageManager) {
|
||||
if (withModule) createBuiltInsModule()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
object KonanPlatform : TargetPlatform("Konan") {
|
||||
override val defaultImports: List<ImportPath> = Default.defaultImports + listOf(
|
||||
ImportPath("kotlin.*"),
|
||||
ImportPath("kotlin.io.*")
|
||||
)
|
||||
|
||||
override val platformConfigurator: PlatformConfigurator = KonanPlatformConfigurator
|
||||
|
||||
val builtIns: KonanBuiltIns = KonanBuiltIns(LockBasedStorageManager.NO_LOCKS, false)
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.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.
|
||||
*/
|
||||
|
||||
// Adapted from JS compiler, but everyhing has been switched off for now.
|
||||
|
||||
package org.jetbrains.kotlin.cli.bc
|
||||
|
||||
import org.jetbrains.kotlin.container.StorageComponentContainer
|
||||
import org.jetbrains.kotlin.container.useImpl
|
||||
import org.jetbrains.kotlin.container.useInstance
|
||||
import org.jetbrains.kotlin.platform.PlatformToKotlinClassMap
|
||||
import org.jetbrains.kotlin.resolve.IdentifierChecker
|
||||
import org.jetbrains.kotlin.resolve.OverloadFilter
|
||||
import org.jetbrains.kotlin.resolve.PlatformConfigurator
|
||||
import org.jetbrains.kotlin.resolve.calls.results.TypeSpecificityComparator
|
||||
import org.jetbrains.kotlin.resolve.scopes.SyntheticConstructorsProvider
|
||||
import org.jetbrains.kotlin.resolve.scopes.SyntheticScopes
|
||||
import org.jetbrains.kotlin.types.DynamicTypesSettings
|
||||
|
||||
|
||||
object KonanPlatformConfigurator : PlatformConfigurator(
|
||||
DynamicTypesSettings(),
|
||||
additionalDeclarationCheckers = listOf(),
|
||||
additionalCallCheckers = listOf(),
|
||||
additionalTypeCheckers = listOf(),
|
||||
additionalClassifierUsageCheckers = listOf(),
|
||||
additionalAnnotationCheckers = listOf(),
|
||||
identifierChecker = IdentifierChecker.DEFAULT,
|
||||
overloadFilter = OverloadFilter.DEFAULT,
|
||||
platformToKotlinClassMap = PlatformToKotlinClassMap.EMPTY
|
||||
) {
|
||||
override fun configureModuleComponents(container: StorageComponentContainer) {
|
||||
container.useInstance(SyntheticScopes.Empty)
|
||||
container.useInstance(SyntheticConstructorsProvider.Empty)
|
||||
container.useInstance(TypeSpecificityComparator.NONE)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,8 @@
|
||||
package org.jetbrains.kotlin.cli.bc
|
||||
|
||||
import org.jetbrains.kotlin.analyzer.AnalysisResult
|
||||
import org.jetbrains.kotlin.backend.konan.llvm.KonanBuiltIns
|
||||
import org.jetbrains.kotlin.backend.konan.llvm.KonanPlatform
|
||||
import org.jetbrains.kotlin.config.CommonConfigurationKeys
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettingsImpl
|
||||
import org.jetbrains.kotlin.context.ContextForNewModule
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.jetbrains.kotlin.cli.bc
|
||||
|
||||
import org.jetbrains.kotlin.backend.konan.llvm.KonanPlatform
|
||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.container.get
|
||||
import org.jetbrains.kotlin.container.useImpl
|
||||
|
||||
Reference in New Issue
Block a user