mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-10 00:21:27 +00:00
Compare commits
1 Commits
rr/pdn_byt
...
push/ic/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54fca7b460 |
@@ -192,7 +192,7 @@ extra["versions.kotlinx-collections-immutable-jvm"] = immutablesVersion
|
||||
extra["versions.ktor-network"] = "1.0.1"
|
||||
|
||||
if (!project.hasProperty("versions.kotlin-native")) {
|
||||
extra["versions.kotlin-native"] = "1.5.20-dev-5613"
|
||||
extra["versions.kotlin-native"] = "1.5.20-dev-4865"
|
||||
}
|
||||
|
||||
val intellijUltimateEnabled by extra(project.kotlinBuildProperties.intellijUltimateEnabled)
|
||||
@@ -368,8 +368,7 @@ val gradlePluginProjects = listOf(
|
||||
":kotlin-annotation-processing-gradle",
|
||||
":kotlin-noarg",
|
||||
":kotlin-sam-with-receiver",
|
||||
":kotlin-parcelize-compiler",
|
||||
":kotlin-lombok"
|
||||
":kotlin-parcelize-compiler"
|
||||
)
|
||||
|
||||
apply {
|
||||
@@ -578,6 +577,26 @@ allprojects {
|
||||
}
|
||||
}
|
||||
|
||||
if ((gradle.startParameter as? org.gradle.api.internal.StartParameterInternal)?.isConfigurationCache != true) {
|
||||
// TODO: remove it once Gradle is bumped to 6.8:
|
||||
// See https://docs.gradle.org/6.8/release-notes.html#more-cache-hits-when-empty-directories-are-present
|
||||
gradle.buildFinished {
|
||||
val taskGraph = gradle?.taskGraph
|
||||
if (taskGraph != null) {
|
||||
taskGraph.allTasks
|
||||
.filterIsInstance<SourceTask>()
|
||||
.filter { it.didWork }
|
||||
.forEach {
|
||||
it.source.visit {
|
||||
if (file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
logger.warn("Empty source directories may cause build cache misses: " + file.absolutePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gradle.taskGraph.whenReady {
|
||||
fun Boolean.toOnOff(): String = if (this) "on" else "off"
|
||||
val profile = if (isTeamcityBuild) "CI" else "Local"
|
||||
|
||||
@@ -118,8 +118,7 @@ fun DependencyHandler.projectArchives(name: String): ProjectDependency = project
|
||||
fun Project.testApiJUnit5(
|
||||
vintageEngine: Boolean = false,
|
||||
runner: Boolean = false,
|
||||
suiteApi: Boolean = false,
|
||||
jupiterParams: Boolean = false
|
||||
suiteApi: Boolean = false
|
||||
) {
|
||||
with(dependencies) {
|
||||
val platformVersion = commonVer("org.junit", "junit-bom")
|
||||
@@ -128,11 +127,6 @@ fun Project.testApiJUnit5(
|
||||
if (vintageEngine) {
|
||||
testApi("org.junit.vintage:junit-vintage-engine:$platformVersion")
|
||||
}
|
||||
|
||||
if (jupiterParams) {
|
||||
testApi("org.junit.jupiter:junit-jupiter-params:$platformVersion")
|
||||
}
|
||||
|
||||
val componentsVersion = commonVer("org.junit.platform", "")
|
||||
|
||||
val components = mutableListOf(
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
package plugins
|
||||
|
||||
import PublishToMavenLocalSerializable
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.attributes.Usage
|
||||
@@ -14,10 +13,10 @@ import org.gradle.api.plugins.JavaBasePlugin
|
||||
import org.gradle.api.publish.PublishingExtension
|
||||
import org.gradle.api.publish.maven.MavenPublication
|
||||
import org.gradle.api.publish.maven.plugins.MavenPublishPlugin
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenLocal
|
||||
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.kotlin.dsl.*
|
||||
import org.gradle.plugins.signing.Sign
|
||||
import org.gradle.plugins.signing.SigningExtension
|
||||
import org.gradle.plugins.signing.SigningPlugin
|
||||
import java.util.*
|
||||
@@ -28,6 +27,7 @@ class KotlinBuildPublishingPlugin @Inject constructor(
|
||||
) : Plugin<Project> {
|
||||
override fun apply(target: Project): Unit = with(target) {
|
||||
apply<MavenPublishPlugin>()
|
||||
apply<SigningPlugin>()
|
||||
|
||||
val publishedRuntime = configurations.maybeCreate(RUNTIME_CONFIGURATION).apply {
|
||||
isCanBeConsumed = false
|
||||
@@ -132,40 +132,32 @@ fun Project.configureDefaultPublishing() {
|
||||
}
|
||||
}
|
||||
|
||||
val signingRequired = project.providers.gradleProperty("signingRequired").forUseAtConfigurationTime().orNull?.toBoolean()
|
||||
?: project.providers.gradleProperty("isSonatypeRelease").forUseAtConfigurationTime().orNull?.toBoolean() ?: false
|
||||
|
||||
if (signingRequired) {
|
||||
apply<SigningPlugin>()
|
||||
configureSigning()
|
||||
}
|
||||
configureSigning()
|
||||
|
||||
tasks.register("install") {
|
||||
dependsOn(tasks.named("publishToMavenLocal"))
|
||||
}
|
||||
|
||||
// workaround for Gradle configuration cache
|
||||
// TODO: remove it when https://github.com/gradle/gradle/pull/16945 merged into used in build Gradle version
|
||||
tasks.withType(PublishToMavenLocal::class.java) {
|
||||
val originalTask = this
|
||||
val serializablePublishTask =
|
||||
tasks.register(originalTask.name + "Serializable", PublishToMavenLocalSerializable::class.java) {
|
||||
publication = originalTask.publication
|
||||
}
|
||||
originalTask.onlyIf { false }
|
||||
originalTask.dependsOn(serializablePublishTask)
|
||||
}
|
||||
|
||||
tasks.withType<PublishToMavenRepository>()
|
||||
.matching { it.name.endsWith("PublicationTo${KotlinBuildPublishingPlugin.REPOSITORY_NAME}Repository") }
|
||||
.all { configureRepository() }
|
||||
}
|
||||
|
||||
private fun Project.configureSigning() {
|
||||
val signingRequired = provider {
|
||||
project.findProperty("signingRequired")?.toString()?.toBoolean()
|
||||
?: project.property("isSonatypeRelease") as Boolean
|
||||
}
|
||||
|
||||
configure<SigningExtension> {
|
||||
setRequired(signingRequired)
|
||||
sign(extensions.getByType<PublishingExtension>().publications) // all publications
|
||||
useGpgCmd()
|
||||
}
|
||||
|
||||
tasks.withType<Sign>().configureEach {
|
||||
setOnlyIf { signingRequired.get() }
|
||||
}
|
||||
}
|
||||
|
||||
fun TaskProvider<PublishToMavenRepository>.configureRepository() =
|
||||
@@ -189,4 +181,4 @@ private fun PublishToMavenRepository.configureRepository() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,22 +7,13 @@
|
||||
// usages in build scripts are not tracked properly
|
||||
@file:Suppress("unused")
|
||||
|
||||
import org.gradle.api.InvalidUserDataException
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.gradle.api.artifacts.ProjectDependency
|
||||
import org.gradle.api.file.FileSystemOperations
|
||||
import org.gradle.api.internal.tasks.testing.filter.DefaultTestFilter
|
||||
import org.gradle.api.publish.internal.PublishOperation
|
||||
import org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal
|
||||
import org.gradle.api.publish.maven.internal.publisher.MavenNormalizedPublication
|
||||
import org.gradle.api.publish.maven.internal.publisher.MavenPublisher
|
||||
import org.gradle.api.publish.maven.internal.publisher.ValidatingMavenPublisher
|
||||
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
import org.gradle.api.tasks.TaskProvider
|
||||
import org.gradle.api.tasks.testing.Test
|
||||
import org.gradle.internal.serialization.Cached
|
||||
import org.gradle.kotlin.dsl.extra
|
||||
import org.gradle.kotlin.dsl.project
|
||||
import org.gradle.kotlin.dsl.support.serviceOf
|
||||
@@ -47,7 +38,6 @@ val kotlinGradlePluginAndItsRequired = arrayOf(
|
||||
":kotlin-compiler-runner",
|
||||
":kotlin-daemon-embeddable",
|
||||
":kotlin-daemon-client",
|
||||
":kotlin-project-model",
|
||||
":kotlin-gradle-plugin-api",
|
||||
":kotlin-gradle-plugin",
|
||||
":kotlin-gradle-plugin-model",
|
||||
@@ -289,30 +279,3 @@ fun Task.useAndroidSdk() {
|
||||
fun Task.useAndroidJar() {
|
||||
TaskUtils.useAndroidJar(this)
|
||||
}
|
||||
|
||||
// Workaround to make PublishToMavenLocal compatible with Gradle configuration cache
|
||||
// TODO: remove it when https://github.com/gradle/gradle/pull/16945 merged into used in build Gradle version
|
||||
abstract class PublishToMavenLocalSerializable : AbstractPublishToMaven() {
|
||||
private val normalizedPublication = Cached.of { this.computeNormalizedPublication() }
|
||||
|
||||
private fun computeNormalizedPublication(): MavenNormalizedPublication {
|
||||
val publicationInternal: MavenPublicationInternal = publicationInternal
|
||||
?: throw InvalidUserDataException("The 'publication' property is required")
|
||||
duplicatePublicationTracker.checkCanPublishToMavenLocal(publicationInternal)
|
||||
return publicationInternal.asNormalisedPublication()
|
||||
}
|
||||
|
||||
@TaskAction
|
||||
open fun publish() {
|
||||
val normalizedPublication = normalizedPublication.get()
|
||||
object : PublishOperation(normalizedPublication.name, "mavenLocal") {
|
||||
override fun publish() {
|
||||
val localPublisher = mavenPublishers.getLocalPublisher(
|
||||
temporaryDirFactory
|
||||
)
|
||||
val validatingPublisher: MavenPublisher = ValidatingMavenPublisher(localPublisher)
|
||||
validatingPublisher.publish(normalizedPublication, null)
|
||||
}
|
||||
}.run()
|
||||
}
|
||||
}
|
||||
@@ -87,4 +87,4 @@ open class SamTypeFactory {
|
||||
companion object {
|
||||
val INSTANCE = SamTypeFactory()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,14 +158,7 @@ public class ClosureCodegen extends MemberCodegen<KtElement> {
|
||||
for (int i = 0; i < superInterfaceTypes.size(); i++) {
|
||||
KotlinType superInterfaceType = superInterfaceTypes.get(i);
|
||||
sw.writeInterface();
|
||||
Type superInterfaceAsmType;
|
||||
if (samType != null && superInterfaceType.getConstructor() == samType.getType().getConstructor()) {
|
||||
superInterfaceAsmType = typeMapper.mapSupertype(superInterfaceType, null);
|
||||
sw.writeAsmType(superInterfaceAsmType);
|
||||
} else {
|
||||
superInterfaceAsmType = typeMapper.mapSupertype(superInterfaceType, sw);
|
||||
}
|
||||
superInterfaceAsmTypes[i] = superInterfaceAsmType.getInternalName();
|
||||
superInterfaceAsmTypes[i] = typeMapper.mapSupertype(superInterfaceType, sw).getInternalName();
|
||||
sw.writeInterfaceEnd();
|
||||
}
|
||||
|
||||
|
||||
@@ -999,7 +999,7 @@ class CoroutineTransformerMethodVisitor(
|
||||
else -> next = next.next
|
||||
}
|
||||
}
|
||||
return null
|
||||
return next
|
||||
}
|
||||
|
||||
// It's necessary to preserve some sensible invariants like there should be no jump in the middle of try-catch-block
|
||||
|
||||
@@ -39,7 +39,7 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt
|
||||
|
||||
override fun transform(internalClassName: String, node: MethodNode) {
|
||||
val interpreter = RedundantBoxingInterpreter(node.instructions, generationState)
|
||||
val frames = analyze(internalClassName, node, interpreter)
|
||||
val frames = MethodTransformer.analyze(internalClassName, node, interpreter)
|
||||
|
||||
interpretPopInstructionsForBoxedValues(interpreter, node, frames)
|
||||
|
||||
@@ -168,8 +168,7 @@ class RedundantBoxingMethodTransformer(private val generationState: GenerationSt
|
||||
val frame = frames[i] ?: continue
|
||||
val insn = insnList[i]
|
||||
if ((insn.opcode == Opcodes.ASTORE || insn.opcode == Opcodes.ALOAD) &&
|
||||
(insn as VarInsnNode).`var` == localVariableNode.index
|
||||
) {
|
||||
(insn as VarInsnNode).`var` == localVariableNode.index) {
|
||||
if (insn.getOpcode() == Opcodes.ASTORE) {
|
||||
values.add(frame.top()!!)
|
||||
} else {
|
||||
|
||||
@@ -27,19 +27,19 @@ import org.jetbrains.org.objectweb.asm.commons.Method
|
||||
import java.util.*
|
||||
|
||||
private val EXTERNAL_SOURCES_KINDS = arrayOf(
|
||||
JvmDeclarationOriginKind.CLASS_MEMBER_DELEGATION_TO_DEFAULT_IMPL,
|
||||
JvmDeclarationOriginKind.DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL,
|
||||
JvmDeclarationOriginKind.DELEGATION,
|
||||
JvmDeclarationOriginKind.BRIDGE
|
||||
JvmDeclarationOriginKind.CLASS_MEMBER_DELEGATION_TO_DEFAULT_IMPL,
|
||||
JvmDeclarationOriginKind.DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL,
|
||||
JvmDeclarationOriginKind.DELEGATION,
|
||||
JvmDeclarationOriginKind.BRIDGE
|
||||
)
|
||||
|
||||
private val PREDEFINED_SIGNATURES = listOf(
|
||||
"getClass()Ljava/lang/Class;",
|
||||
"notify()V",
|
||||
"notifyAll()V",
|
||||
"wait()V",
|
||||
"wait(J)V",
|
||||
"wait(JI)V"
|
||||
"getClass()Ljava/lang/Class;",
|
||||
"notify()V",
|
||||
"notifyAll()V",
|
||||
"wait()V",
|
||||
"wait(J)V",
|
||||
"wait(JI)V"
|
||||
).map { signature ->
|
||||
RawSignature(signature.substringBefore('('), signature.substring(signature.indexOf('(')), MemberKind.METHOD)
|
||||
}
|
||||
@@ -77,7 +77,8 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
val elements = LinkedHashSet<PsiElement>()
|
||||
if (noOwnImplementations) {
|
||||
elements.addIfNotNull(data.classOrigin.element)
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
for (origin in data.signatureOrigins) {
|
||||
var element = origin.element
|
||||
|
||||
@@ -95,9 +96,9 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
}
|
||||
|
||||
override fun onClassDone(
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>
|
||||
) {
|
||||
reportDiagnosticsTasks.add {
|
||||
reportClashingWithPredefinedSignatures(classOrigin, classInternalName, signatures)
|
||||
@@ -106,9 +107,9 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
}
|
||||
|
||||
private fun reportClashingWithPredefinedSignatures(
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>
|
||||
) {
|
||||
for (predefinedSignature in PREDEFINED_SIGNATURES) {
|
||||
if (!signatures.containsKey(predefinedSignature)) continue
|
||||
@@ -121,9 +122,9 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
}
|
||||
|
||||
private fun reportClashingSignaturesInHierarchy(
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
signatures: MultiMap<RawSignature, JvmDeclarationOrigin>
|
||||
) {
|
||||
val descriptor = classOrigin.descriptor
|
||||
if (descriptor !is ClassDescriptor) return
|
||||
@@ -140,7 +141,9 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
for ((rawSignature, origins) in groupedBySignature.entrySet()) {
|
||||
if (origins.size <= 1) continue
|
||||
|
||||
when (val diagnostic = computeDiagnosticToReport(classOrigin, classInternalName, rawSignature, origins)) {
|
||||
val diagnostic = computeDiagnosticToReport(classOrigin, classInternalName, rawSignature, origins)
|
||||
|
||||
when (diagnostic) {
|
||||
is ConflictingDeclarationError.AccidentalOverride -> {
|
||||
diagnostics.report(ErrorsJvm.ACCIDENTAL_OVERRIDE.on(diagnostic.element, diagnostic.data))
|
||||
}
|
||||
@@ -153,17 +156,16 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
|
||||
private sealed class ConflictingDeclarationError(val element: PsiElement, val data: ConflictingJvmDeclarationsData) {
|
||||
class AccidentalOverride(element: PsiElement, data: ConflictingJvmDeclarationsData) :
|
||||
ConflictingDeclarationError(element, data)
|
||||
|
||||
ConflictingDeclarationError(element, data)
|
||||
class ConflictingInheritedJvmDeclarations(element: PsiElement, data: ConflictingJvmDeclarationsData) :
|
||||
ConflictingDeclarationError(element, data)
|
||||
ConflictingDeclarationError(element, data)
|
||||
}
|
||||
|
||||
private fun computeDiagnosticToReport(
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
rawSignature: RawSignature,
|
||||
origins: Collection<JvmDeclarationOrigin>
|
||||
classOrigin: JvmDeclarationOrigin,
|
||||
classInternalName: String,
|
||||
rawSignature: RawSignature,
|
||||
origins: Collection<JvmDeclarationOrigin>
|
||||
): ConflictingDeclarationError? {
|
||||
var memberElement: PsiElement? = null
|
||||
var ownNonFakeCount = 0
|
||||
@@ -209,17 +211,19 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
if (member is PropertyDescriptor) {
|
||||
processMember(member.getter)
|
||||
processMember(member.setter)
|
||||
} else if (member is FunctionDescriptor) {
|
||||
}
|
||||
else if (member is FunctionDescriptor) {
|
||||
val signatures =
|
||||
if (member.kind == FAKE_OVERRIDE)
|
||||
member.overriddenTreeUniqueAsSequence(useOriginal = true)
|
||||
// drop the root (itself)
|
||||
.drop(1)
|
||||
.mapTo(HashSet()) { it.asRawSignature() }
|
||||
else
|
||||
setOf(member.asRawSignature())
|
||||
if (member.kind == FAKE_OVERRIDE)
|
||||
member.overriddenTreeUniqueAsSequence(useOriginal = true)
|
||||
// drop the root (itself)
|
||||
.drop(1)
|
||||
.mapTo(HashSet()) { it.asRawSignature() }
|
||||
else
|
||||
setOf(member.asRawSignature())
|
||||
|
||||
signatures.forEach { rawSignature ->
|
||||
signatures.forEach {
|
||||
rawSignature ->
|
||||
groupedBySignature.putValue(rawSignature, OtherOrigin(member))
|
||||
}
|
||||
}
|
||||
@@ -228,10 +232,10 @@ class BuilderFactoryForDuplicateSignatureDiagnostics(
|
||||
descriptor.defaultType.memberScope.getContributedDescriptors().forEach(::processMember)
|
||||
descriptor.getParentJavaStaticClassScope()?.run {
|
||||
getContributedDescriptors(DescriptorKindFilter.FUNCTIONS)
|
||||
.filter {
|
||||
it is FunctionDescriptor && DescriptorVisibilities.isVisibleIgnoringReceiver(it, descriptor)
|
||||
}
|
||||
.forEach(::processMember)
|
||||
.filter {
|
||||
it is FunctionDescriptor && DescriptorVisibilities.isVisibleIgnoringReceiver(it, descriptor)
|
||||
}
|
||||
.forEach(::processMember)
|
||||
}
|
||||
|
||||
return groupedBySignature
|
||||
|
||||
@@ -87,6 +87,11 @@ fun CallableMemberDescriptor.createTypeParameterWithNewName(
|
||||
return newDescriptor
|
||||
}
|
||||
|
||||
fun KotlinType.removeExternalProjections(): KotlinType {
|
||||
val newArguments = arguments.map { TypeProjectionImpl(Variance.INVARIANT, it.type) }
|
||||
return replace(newArguments)
|
||||
}
|
||||
|
||||
fun isInlineClassConstructorAccessor(descriptor: FunctionDescriptor): Boolean =
|
||||
descriptor is AccessorForConstructorDescriptor &&
|
||||
descriptor.calleeDescriptor.constructedClass.isInlineClass()
|
||||
|
||||
20
compiler/cli/cli-js-klib/build.gradle.kts
Normal file
20
compiler/cli/cli-js-klib/build.gradle.kts
Normal file
@@ -0,0 +1,20 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile(project(":compiler:cli"))
|
||||
compile(project(":compiler:ir.serialization.js"))
|
||||
compileOnly(project(":compiler:ir.tree.persistent"))
|
||||
runtimeOnly(project(":kotlin-reflect"))
|
||||
if (Platform[193].orLower()) {
|
||||
compile(intellijDep()) { includeJars("picocontainer", rootProject = rootProject) }
|
||||
}
|
||||
compile(intellijDep()) { includeJars("trove4j", "guava", "jdom", rootProject = rootProject) }
|
||||
compile(intellijCoreDep()) { includeJars("intellij-core") }
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
}
|
||||
153
compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt
Normal file
153
compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt
Normal file
@@ -0,0 +1,153 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
// Internal CLI for building JS IR libraries
|
||||
|
||||
package org.jetbrains.kotlin.ir.backend.js
|
||||
|
||||
import com.intellij.openapi.Disposable
|
||||
import com.intellij.openapi.vfs.StandardFileSystems
|
||||
import com.intellij.openapi.vfs.VirtualFileManager
|
||||
import com.intellij.psi.PsiManager
|
||||
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
|
||||
import org.jetbrains.kotlin.cli.common.messages.*
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.EnvironmentConfigFiles
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.config.*
|
||||
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
||||
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
|
||||
import org.jetbrains.kotlin.library.resolver.KotlinLibraryResolveResult
|
||||
import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.multiplatform.isCommonSource
|
||||
import org.jetbrains.kotlin.serialization.js.ModuleKind
|
||||
import org.jetbrains.kotlin.util.Logger
|
||||
import java.io.File
|
||||
|
||||
fun buildConfiguration(environment: KotlinCoreEnvironment, moduleName: String): CompilerConfiguration {
|
||||
val runtimeConfiguration = environment.configuration.copy()
|
||||
runtimeConfiguration.put(CommonConfigurationKeys.MODULE_NAME, moduleName)
|
||||
runtimeConfiguration.put(JSConfigurationKeys.MODULE_KIND, ModuleKind.PLAIN)
|
||||
runtimeConfiguration.put(
|
||||
CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY,
|
||||
PrintingMessageCollector(System.err, MessageRenderer.PLAIN_RELATIVE_PATHS, false)
|
||||
)
|
||||
|
||||
runtimeConfiguration.languageVersionSettings = LanguageVersionSettingsImpl(
|
||||
LanguageVersion.LATEST_STABLE, ApiVersion.LATEST_STABLE,
|
||||
specificFeatures = mapOf(
|
||||
LanguageFeature.AllowContractsForCustomFunctions to LanguageFeature.State.ENABLED,
|
||||
LanguageFeature.MultiPlatformProjects to LanguageFeature.State.ENABLED
|
||||
),
|
||||
analysisFlags = mapOf(
|
||||
AnalysisFlags.useExperimental to listOf(
|
||||
"kotlin.RequiresOptIn",
|
||||
"kotlin.contracts.ExperimentalContracts",
|
||||
"kotlin.ExperimentalMultiplatform",
|
||||
),
|
||||
AnalysisFlags.allowResultReturnType to true
|
||||
)
|
||||
)
|
||||
|
||||
return runtimeConfiguration
|
||||
}
|
||||
|
||||
@Suppress("RedundantSamConstructor")
|
||||
private val environment =
|
||||
KotlinCoreEnvironment.createForProduction(Disposable { }, CompilerConfiguration(), EnvironmentConfigFiles.JS_CONFIG_FILES)
|
||||
|
||||
fun createPsiFile(fileName: String): KtFile {
|
||||
val psiManager = PsiManager.getInstance(environment.project)
|
||||
val fileSystem = VirtualFileManager.getInstance().getFileSystem(StandardFileSystems.FILE_PROTOCOL)
|
||||
|
||||
val file = fileSystem.findFileByPath(fileName) ?: error("File not found: $fileName")
|
||||
|
||||
return psiManager.findFile(file) as KtFile
|
||||
}
|
||||
|
||||
|
||||
fun buildKLib(
|
||||
moduleName: String,
|
||||
sources: List<String>,
|
||||
outputPath: String,
|
||||
allDependencies: KotlinLibraryResolveResult,
|
||||
commonSources: List<String>
|
||||
) {
|
||||
val configuration = buildConfiguration(environment, moduleName)
|
||||
generateKLib(
|
||||
project = environment.project,
|
||||
files = sources.map { source ->
|
||||
val file = createPsiFile(source)
|
||||
if (source in commonSources) {
|
||||
file.isCommonSource = true
|
||||
}
|
||||
file
|
||||
},
|
||||
analyzer = AnalyzerWithCompilerReport(configuration),
|
||||
configuration = configuration,
|
||||
allDependencies = allDependencies,
|
||||
friendDependencies = emptyList(),
|
||||
irFactory = PersistentIrFactory(), // TODO: IrFactoryImpl?
|
||||
outputKlibPath = outputPath,
|
||||
nopack = true
|
||||
)
|
||||
}
|
||||
|
||||
private fun listOfKtFilesFrom(paths: List<String>): List<String> {
|
||||
val currentDir = File("")
|
||||
return paths.flatMap { path ->
|
||||
File(path)
|
||||
.walkTopDown()
|
||||
.filter { it.extension == "kt" }
|
||||
.map { it.relativeToOrSelf(currentDir).path }
|
||||
.asIterable()
|
||||
}.distinct()
|
||||
}
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val inputFiles = mutableListOf<String>()
|
||||
var outputPath: String? = null
|
||||
val dependencies = mutableListOf<String>()
|
||||
val commonSources = mutableListOf<String>()
|
||||
var moduleName: String? = null
|
||||
|
||||
var index = 0
|
||||
while (index < args.size) {
|
||||
val arg = args[index++]
|
||||
|
||||
when (arg) {
|
||||
"-n" -> moduleName = args[index++]
|
||||
"-o" -> outputPath = args[index++]
|
||||
"-d" -> dependencies += args[index++]
|
||||
"-c" -> commonSources += args[index++]
|
||||
else -> inputFiles += arg
|
||||
}
|
||||
}
|
||||
|
||||
if (outputPath == null) {
|
||||
error("Please set path to .klm file: `-o some/dir/module-name.klm`")
|
||||
}
|
||||
|
||||
if (moduleName == null) {
|
||||
error("Please set module name: `-n module-name`")
|
||||
}
|
||||
|
||||
val resolvedLibraries = jsResolveLibraries(
|
||||
dependencies, emptyList(), messageCollectorLogger(MessageCollector.NONE)
|
||||
)
|
||||
|
||||
buildKLib(moduleName, listOfKtFilesFrom(inputFiles), outputPath, resolvedLibraries, listOfKtFilesFrom(commonSources))
|
||||
}
|
||||
|
||||
// Copied here from `K2JsIrCompiler` instead of reusing in order to avoid circular dependencies between Gradle tasks
|
||||
private fun messageCollectorLogger(collector: MessageCollector) = object : Logger {
|
||||
override fun warning(message: String)= collector.report(CompilerMessageSeverity.STRONG_WARNING, message)
|
||||
override fun error(message: String) = collector.report(CompilerMessageSeverity.ERROR, message)
|
||||
override fun log(message: String) = collector.report(CompilerMessageSeverity.LOGGING, message)
|
||||
override fun fatal(message: String): Nothing {
|
||||
collector.report(CompilerMessageSeverity.ERROR, message)
|
||||
(collector as? GroupingMessageCollector)?.flush()
|
||||
kotlin.error(message)
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,6 @@ dependencies {
|
||||
compile(project(":compiler:backend-common"))
|
||||
compile(project(":compiler:ir.backend.common"))
|
||||
compile(project(":compiler:ir.serialization.js"))
|
||||
compile(project(":compiler:ir.tree.impl"))
|
||||
compile(project(":compiler:backend.js"))
|
||||
compile(project(":compiler:backend.wasm"))
|
||||
compile(project(":js:js.translator"))
|
||||
|
||||
@@ -17,8 +17,7 @@ import org.jetbrains.kotlin.cli.common.ExitCode.COMPILATION_ERROR
|
||||
import org.jetbrains.kotlin.cli.common.ExitCode.OK
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.DCE_RUNTIME_DIAGNOSTIC_EXCEPTION
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.DCE_RUNTIME_DIAGNOSTIC_LOG
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.*
|
||||
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot
|
||||
import org.jetbrains.kotlin.cli.common.extensions.ScriptEvaluationExtension
|
||||
import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport
|
||||
@@ -39,7 +38,6 @@ import org.jetbrains.kotlin.incremental.js.IncrementalDataProvider
|
||||
import org.jetbrains.kotlin.incremental.js.IncrementalNextRoundChecker
|
||||
import org.jetbrains.kotlin.incremental.js.IncrementalResultsConsumer
|
||||
import org.jetbrains.kotlin.ir.backend.js.*
|
||||
import org.jetbrains.kotlin.ir.declarations.impl.IrFactoryImpl
|
||||
import org.jetbrains.kotlin.ir.declarations.persistent.PersistentIrFactory
|
||||
import org.jetbrains.kotlin.js.config.*
|
||||
import org.jetbrains.kotlin.library.KLIB_FILE_EXTENSION
|
||||
@@ -232,7 +230,6 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
AnalyzerWithCompilerReport(config.configuration),
|
||||
config.configuration,
|
||||
PhaseConfig(wasmPhases),
|
||||
IrFactoryImpl,
|
||||
allDependencies = resolvedLibraries,
|
||||
friendDependencies = friendDependencies,
|
||||
exportedDeclarations = setOf(FqName("main"))
|
||||
@@ -259,7 +256,6 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
AnalyzerWithCompilerReport(config.configuration),
|
||||
config.configuration,
|
||||
phaseConfig,
|
||||
if (arguments.irDceDriven) PersistentIrFactory() else IrFactoryImpl,
|
||||
allDependencies = resolvedLibraries,
|
||||
friendDependencies = friendDependencies,
|
||||
mainArguments = mainCallArguments,
|
||||
|
||||
@@ -4,6 +4,7 @@ package com.intellij;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.AbstractExtensionPointBean;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.util.ReflectionUtil;
|
||||
@@ -92,8 +93,7 @@ public abstract class DynamicBundle extends AbstractBundle {
|
||||
public static final DynamicBundle INSTANCE = new DynamicBundle("") {
|
||||
};
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static class LanguageBundleEP extends com.intellij.openapi.extensions.AbstractExtensionPointBean {
|
||||
public static class LanguageBundleEP extends AbstractExtensionPointBean {
|
||||
public static final ExtensionPointName<LanguageBundleEP> EP_NAME = ExtensionPointName.create("com.intellij.languageBundle");
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class CodeAnalysisMeasurement(private val lines: Int?, val milliseconds: Long) :
|
||||
override fun render(): String = formatMeasurement("ANALYZE", milliseconds, lines)
|
||||
}
|
||||
|
||||
class CodeGenerationMeasurement(private val lines: Int?, val milliseconds: Long) : PerformanceMeasurement {
|
||||
class CodeGenerationMeasurement(private val lines: Int?, private val milliseconds: Long) : PerformanceMeasurement {
|
||||
override fun render(): String = formatMeasurement("GENERATE", milliseconds, lines)
|
||||
}
|
||||
|
||||
|
||||
@@ -33,11 +33,13 @@ import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.extensions.ExtensionsArea
|
||||
import com.intellij.openapi.fileTypes.PlainTextFileType
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.roots.LanguageLevelProjectExtension
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.openapi.vfs.*
|
||||
import com.intellij.openapi.vfs.impl.ZipHandler
|
||||
import com.intellij.pom.java.LanguageLevel
|
||||
import com.intellij.psi.PsiElementFinder
|
||||
import com.intellij.psi.PsiManager
|
||||
import com.intellij.psi.impl.JavaClassSupersImpl
|
||||
@@ -92,7 +94,6 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer
|
||||
import org.jetbrains.kotlin.resolve.ModuleAnnotationsResolver
|
||||
import org.jetbrains.kotlin.resolve.extensions.ExtraImportsProviderExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.SyntheticJavaResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
|
||||
@@ -576,7 +577,6 @@ class KotlinCoreEnvironment private constructor(
|
||||
fun registerPluginExtensionPoints(project: MockProject) {
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
SyntheticJavaResolveExtension.registerExtensionPoint(project)
|
||||
ClassBuilderInterceptorExtension.registerExtensionPoint(project)
|
||||
AnalysisHandlerExtension.registerExtensionPoint(project)
|
||||
PackageFragmentProviderExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -96,7 +96,6 @@ import org.jetbrains.kotlin.psi.KtFile
|
||||
import org.jetbrains.kotlin.resolve.CodeAnalyzerInitializer
|
||||
import org.jetbrains.kotlin.resolve.ModuleAnnotationsResolver
|
||||
import org.jetbrains.kotlin.resolve.extensions.ExtraImportsProviderExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.SyntheticJavaResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.extensions.SyntheticResolveExtension
|
||||
import org.jetbrains.kotlin.resolve.jvm.KotlinJavaPsiFacade
|
||||
import org.jetbrains.kotlin.resolve.jvm.extensions.AnalysisHandlerExtension
|
||||
@@ -570,7 +569,6 @@ class KotlinCoreEnvironment private constructor(
|
||||
fun registerPluginExtensionPoints(project: MockProject) {
|
||||
ExpressionCodegenExtension.registerExtensionPoint(project)
|
||||
SyntheticResolveExtension.registerExtensionPoint(project)
|
||||
SyntheticJavaResolveExtension.registerExtensionPoint(project)
|
||||
ClassBuilderInterceptorExtension.registerExtensionPoint(project)
|
||||
AnalysisHandlerExtension.registerExtensionPoint(project)
|
||||
PackageFragmentProviderExtension.registerExtensionPoint(project)
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
package org.jetbrains.kotlin.cli.jvm.compiler
|
||||
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.util.Disposer
|
||||
import com.intellij.openapi.vfs.*
|
||||
import com.intellij.psi.PsiElementFinder
|
||||
import com.intellij.psi.PsiJavaModule
|
||||
@@ -37,7 +36,8 @@ import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
|
||||
import org.jetbrains.kotlin.cli.common.checkKotlinPackageUsage
|
||||
import org.jetbrains.kotlin.cli.common.config.addKotlinSourceRoot
|
||||
import org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.*
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.OUTPUT
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.WARNING
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||
import org.jetbrains.kotlin.cli.common.messages.OutputMessageUtil
|
||||
import org.jetbrains.kotlin.cli.common.output.writeAll
|
||||
@@ -304,11 +304,6 @@ object KotlinToJVMBytecodeCompiler {
|
||||
val project = environment.project
|
||||
val performanceManager = environment.configuration.get(CLIConfigurationKeys.PERF_MANAGER)
|
||||
|
||||
environment.messageCollector.report(
|
||||
STRONG_WARNING,
|
||||
"ATTENTION!\n This build uses in-dev FIR: \n -Xuse-fir"
|
||||
)
|
||||
|
||||
PsiElementFinder.EP.getPoint(project).unregisterExtension(JavaElementFinder::class.java)
|
||||
|
||||
val projectConfiguration = environment.configuration
|
||||
@@ -432,9 +427,6 @@ object KotlinToJVMBytecodeCompiler {
|
||||
performanceManager?.notifyGenerationFinished()
|
||||
ProgressIndicatorAndCompilationCanceledStatus.checkCanceled()
|
||||
outputs[module] = generationState
|
||||
|
||||
PsiElementFinder.EP.getPoint(project).unregisterExtension(JavaElementFinder::class.java)
|
||||
Disposer.dispose(environment.project)
|
||||
}
|
||||
|
||||
val mainClassFqName: FqName? =
|
||||
|
||||
@@ -62,9 +62,8 @@ class K2MetadataCompiler : CLICompiler<K2MetadataCompilerArguments>() {
|
||||
val pluginLoadResult = loadPlugins(paths, arguments, configuration)
|
||||
if (pluginLoadResult != ExitCode.OK) return pluginLoadResult
|
||||
|
||||
val commonSources = arguments.commonSources?.toSet() ?: emptySet()
|
||||
for (arg in arguments.freeArgs) {
|
||||
configuration.addKotlinSourceRoot(arg, isCommon = arg in commonSources)
|
||||
configuration.addKotlinSourceRoot(arg, isCommon = true)
|
||||
}
|
||||
if (arguments.classpath != null) {
|
||||
configuration.addJvmClasspathRoots(arguments.classpath!!.split(File.pathSeparatorChar).map(::File))
|
||||
|
||||
@@ -367,14 +367,8 @@ object KotlinCompilerClient {
|
||||
}
|
||||
|
||||
|
||||
private fun startDaemon(
|
||||
compilerId: CompilerId,
|
||||
daemonJVMOptions: DaemonJVMOptions,
|
||||
daemonOptions: DaemonOptions,
|
||||
reportingTargets: DaemonReportingTargets
|
||||
): Boolean {
|
||||
val daemonJavaExecutable = compilerId.javaExecutable
|
||||
?: File(File(CompilerSystemProperties.JAVA_HOME.safeValue, "bin"), "java")
|
||||
private fun startDaemon(compilerId: CompilerId, daemonJVMOptions: DaemonJVMOptions, daemonOptions: DaemonOptions, reportingTargets: DaemonReportingTargets): Boolean {
|
||||
val javaExecutable = File(File(CompilerSystemProperties.JAVA_HOME.safeValue, "bin"), "java")
|
||||
val serverHostname = CompilerSystemProperties.JAVA_RMI_SERVER_HOSTNAME.value ?: error("${CompilerSystemProperties.JAVA_RMI_SERVER_HOSTNAME.property} is not set!")
|
||||
val platformSpecificOptions = listOf(
|
||||
// hide daemon window
|
||||
@@ -386,7 +380,7 @@ object KotlinCompilerClient {
|
||||
listOf("--illegal-access=permit")
|
||||
else emptyList()
|
||||
val args = listOf(
|
||||
daemonJavaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||
javaExecutable.absolutePath, "-cp", compilerId.compilerClasspath.joinToString(File.pathSeparator)) +
|
||||
platformSpecificOptions +
|
||||
daemonJVMOptions.mappers.flatMap { it.toArgs("-") } +
|
||||
javaIllegalAccessWorkaround +
|
||||
|
||||
@@ -49,7 +49,7 @@ suspend fun walkDaemonsAsync(
|
||||
useRMI: Boolean = true,
|
||||
useSockets: Boolean = true
|
||||
): List<DaemonWithMetadataAsync> { // TODO: replace with Deferred<List<DaemonWithMetadataAsync>> and use mapNotNullAsync to speed this up
|
||||
val classPathDigest = compilerId.digest()
|
||||
val classPathDigest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString()
|
||||
val portExtractor = makePortFromRunFilenameExtractor(classPathDigest)
|
||||
return registryDir.walk().toList() // list, since walk returns Sequence and Sequence.map{...} is not inline => coroutines dont work
|
||||
.map { Pair(it, portExtractor(it.name)) }
|
||||
|
||||
@@ -217,7 +217,7 @@ class CompileServiceRMIWrapper(val server: CompileServiceServerSide, daemonOptio
|
||||
runFileDir,
|
||||
makeRunFilenameString(
|
||||
timestamp = "%tFT%<tH-%<tM-%<tS.%<tLZ".format(Calendar.getInstance(TimeZone.getTimeZone("Z"))),
|
||||
digest = compilerId.digest(),
|
||||
digest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString(),
|
||||
port = port.toString()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -55,7 +55,7 @@ fun walkDaemons(registryDir: File,
|
||||
filter: (File, Int) -> Boolean = { _, _ -> true },
|
||||
report: (DaemonReportCategory, String) -> Unit = { _, _ -> }
|
||||
): Sequence<DaemonWithMetadata> {
|
||||
val classPathDigest = compilerId.digest()
|
||||
val classPathDigest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString()
|
||||
val portExtractor = makePortFromRunFilenameExtractor(classPathDigest)
|
||||
return registryDir.walk()
|
||||
.map { Pair(it, portExtractor(it.name)) }
|
||||
|
||||
@@ -231,38 +231,12 @@ fun ByteArray.toHexString(): String = joinToString("", transform = { "%02x".form
|
||||
|
||||
data class CompilerId(
|
||||
var compilerClasspath: List<String> = listOf(),
|
||||
var compilerVersion: String = "",
|
||||
var javaExecutable: File? = null
|
||||
var compilerVersion: String = ""
|
||||
) : OptionsGroup {
|
||||
|
||||
override val mappers: List<PropMapper<*, *, *>>
|
||||
get() = listOf(
|
||||
PropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::compilerClasspath,
|
||||
toString = { it.joinToString(File.pathSeparator) },
|
||||
fromString = { it.trimQuotes().split(File.pathSeparator) }
|
||||
),
|
||||
StringPropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::compilerVersion
|
||||
),
|
||||
PropMapper(
|
||||
dest = this,
|
||||
prop = CompilerId::javaExecutable,
|
||||
toString = { it?.absolutePath },
|
||||
fromString = { File(it.trimQuotes()) },
|
||||
skipIf = { it == null }
|
||||
)
|
||||
)
|
||||
|
||||
fun digest(): String = compilerClasspath
|
||||
.map { File(it).absolutePath }
|
||||
.run {
|
||||
javaExecutable?.let { plus(it.absolutePath) } ?: this
|
||||
}
|
||||
.distinctStringsDigest()
|
||||
.toHexString()
|
||||
get() = listOf(PropMapper(this, CompilerId::compilerClasspath, toString = { it.joinToString(File.pathSeparator) }, fromString = { it.trimQuotes().split(File.pathSeparator) }),
|
||||
StringPropMapper(this, CompilerId::compilerVersion))
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@@ -271,15 +245,6 @@ data class CompilerId(
|
||||
@JvmStatic
|
||||
fun makeCompilerId(paths: Iterable<File>): CompilerId =
|
||||
CompilerId(compilerClasspath = paths.map { it.absolutePath })
|
||||
|
||||
@JvmStatic
|
||||
fun makeCompilerId(
|
||||
paths: Iterable<File>,
|
||||
javaExecutable: File
|
||||
): CompilerId = CompilerId(
|
||||
compilerClasspath = paths.map { it.absolutePath },
|
||||
javaExecutable = javaExecutable
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.daemon
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import com.intellij.openapi.util.io.FileUtilRt
|
||||
import junit.framework.TestCase
|
||||
@@ -278,129 +277,6 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getJdk8Location() = System.getenv("JDK_18") ?: System.getenv("JAVA_HOME")
|
||||
|
||||
fun testNewDaemonIsNotStartedForSameJavaExecutable() {
|
||||
withFlagFile(getTestName(true), "-client1.alive") { flagFile1 ->
|
||||
withFlagFile(getTestName(true), "-client2.alive") { flagFile2 ->
|
||||
val daemonOptions = makeTestDaemonOptions(getTestName(true))
|
||||
val compilerIdJdk8 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(getJdk8Location()).resolve("bin/java")
|
||||
)
|
||||
|
||||
withLogFile("kotlin-daemon-test-1") { logFile ->
|
||||
val daemonJVMOptions = makeTestDaemonJvmOptions(logFile)
|
||||
assertTrue(logFile.length() == 0L)
|
||||
|
||||
val daemon1 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile1,
|
||||
daemonJVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemon1)
|
||||
logFile.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
|
||||
val daemon2 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile2,
|
||||
daemonJVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemon2)
|
||||
|
||||
val logContent = logFile.readText().lines()
|
||||
assert(
|
||||
logContent.filter { it.contains("INFO: starting daemon") }.size == 1
|
||||
) {
|
||||
"Second daemon instance was started!"
|
||||
}
|
||||
assert(
|
||||
logContent.filter {
|
||||
it.contains("INFO: Registered a client alive file: ${flagFile2.absolutePath}")
|
||||
}.size == 1
|
||||
) {
|
||||
"Second client was not connected to the same instance!"
|
||||
}
|
||||
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk8, daemonOptions)
|
||||
|
||||
Thread.sleep(100)
|
||||
|
||||
logFile.assertLogContainsSequence("Shutdown started")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ignored on Windows OS due to https://bugs.openjdk.java.net/browse/JDK-8189953 bug in JDK 9
|
||||
// Should be unignored once JDK10+ will be available by default on CI agents
|
||||
fun testNewDaemonIsStartedOnJavaExecutableChange() {
|
||||
if (SystemInfo.isWindows) return
|
||||
|
||||
withFlagFile(getTestName(true), "-client1.alive") { flagFile1 ->
|
||||
withFlagFile(getTestName(true), "-client2.alive") { flagFile2 ->
|
||||
val daemonOptions = makeTestDaemonOptions(getTestName(true))
|
||||
val compilerIdJdk8 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(getJdk8Location()).resolve("bin/java")
|
||||
)
|
||||
val compilerIdJdk9 = CompilerId.makeCompilerId(
|
||||
compilerClassPath +
|
||||
File(KotlinIntegrationTestBase.getCompilerLib(), "kotlin-compiler-sources.jar"),
|
||||
File(System.getenv("JDK_9")).resolve("bin/java")
|
||||
)
|
||||
|
||||
withLogFile("kotlin-daemon-test-1") { logFile1 ->
|
||||
withLogFile("kotlin-daemon-test-2") { logFile2 ->
|
||||
val daemonJdk8JVMOptions = makeTestDaemonJvmOptions(logFile1)
|
||||
assertTrue(logFile1.length() == 0L)
|
||||
val daemonJdk9JVMOptions = makeTestDaemonJvmOptions(logFile2)
|
||||
assertTrue(logFile2.length() == 0L)
|
||||
|
||||
val daemonJdk7 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk8,
|
||||
flagFile1,
|
||||
daemonJdk8JVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemonJdk7)
|
||||
logFile1.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
val daemonJdk9 = KotlinCompilerClient.connectToCompileService(
|
||||
compilerIdJdk9,
|
||||
flagFile2,
|
||||
daemonJdk9JVMOptions,
|
||||
daemonOptions,
|
||||
DaemonReportingTargets(out = System.err),
|
||||
autostart = true
|
||||
)
|
||||
assertNotNull("failed to connect daemon", daemonJdk9)
|
||||
logFile2.assertLogContainsSequence("INFO: starting daemon")
|
||||
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk8, daemonOptions)
|
||||
KotlinCompilerClient.shutdownCompileService(compilerIdJdk9, daemonOptions)
|
||||
|
||||
Thread.sleep(100)
|
||||
|
||||
logFile1.assertLogContainsSequence("Shutdown started")
|
||||
logFile2.assertLogContainsSequence("Shutdown started")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun testDaemonRunError() {
|
||||
withFlagFile(getTestName(true), ".alive") { flagFile ->
|
||||
val daemonOptions = DaemonOptions(shutdownDelayMilliseconds = 1, verbose = true, runFilesPath = File(testTempDir, getTestName(true)).absolutePath)
|
||||
|
||||
@@ -243,7 +243,7 @@ abstract class CompileServiceImplBase(
|
||||
runFileDir,
|
||||
makeRunFilenameString(
|
||||
timestamp = "%tFT%<tH-%<tM-%<tS.%<tLZ".format(Calendar.getInstance(TimeZone.getTimeZone("Z"))),
|
||||
digest = compilerId.digest(),
|
||||
digest = compilerId.compilerClasspath.map { File(it).absolutePath }.distinctStringsDigest().toHexString(),
|
||||
port = port.toString()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -56,11 +56,6 @@ public class FirLoadCompiledKotlinGenerated extends AbstractFirLoadCompiledKotli
|
||||
runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInAnnotationArguments.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("AnnotationInArray.kt")
|
||||
public void testAnnotationInArray() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledKotlin/annotations/AnnotationInArray.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ClassLiteralArguments.kt")
|
||||
public void testClassLiteralArguments() throws Exception {
|
||||
runTest("compiler/testData/loadJava/compiledKotlin/annotations/ClassLiteralArguments.kt");
|
||||
|
||||
@@ -29,11 +29,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("annotationUsedAsAnnotationArgument.kt")
|
||||
public void testAnnotationUsedAsAnnotationArgument() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("asImports.kt")
|
||||
public void testAsImports() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/asImports.kt");
|
||||
@@ -179,11 +174,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/ft.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceDeclaration.kt")
|
||||
public void testFunInterfaceDeclaration() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/funInterfaceDeclaration.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionTypeAlias.kt")
|
||||
public void testFunctionTypeAlias() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/functionTypeAlias.kt");
|
||||
@@ -506,11 +496,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/ambiguityOnJavaOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("argParamTypeMismatch.kt")
|
||||
public void testArgParamTypeMismatch() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argParamTypeMismatch.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("argumentsOfAnnotations.kt")
|
||||
public void testArgumentsOfAnnotations() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/arguments/argumentsOfAnnotations.kt");
|
||||
@@ -956,11 +941,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/constVal"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("const.kt")
|
||||
public void testConst() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/const.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("constValNotTopLevelOrObject.kt")
|
||||
public void testConstValNotTopLevelOrObject() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/constVal/constValNotTopLevelOrObject.kt");
|
||||
@@ -990,24 +970,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/contracts")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Contracts extends AbstractLazyBodyIsNotTouchedTilContractsPhaseTest {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInContracts() throws Exception {
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/contracts"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("genericContract.kt")
|
||||
public void testGenericContract() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/contracts/genericContract.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/fir/analysis-tests/testData/resolve/delegates")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
@@ -2724,11 +2686,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/doubleGenericDiamond.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fakeTypeMismatchOnExtensionReference.kt")
|
||||
public void testFakeTypeMismatchOnExtensionReference() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/fakeTypeMismatchOnExtensionReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("falseIntersection.kt")
|
||||
public void testFalseIntersection() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/problems/falseIntersection.kt");
|
||||
@@ -2855,21 +2812,11 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/integerLiteralInLhs.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("leakedImplicitType.kt")
|
||||
public void testLeakedImplicitType() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/leakedImplicitType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("referenceToExtension.kt")
|
||||
public void testReferenceToExtension() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/referenceToExtension.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("referenceToField.kt")
|
||||
public void testReferenceToField() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/referenceToField.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/references/simple.kt");
|
||||
@@ -2893,11 +2840,6 @@ public class LazyBodyIsNotTouchedTilContractsPhaseTestGenerated extends Abstract
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolve/samConstructors"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("funInterfaceConstructorReference.kt")
|
||||
public void testFunInterfaceConstructorReference() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConstructors/funInterfaceConstructorReference.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericSam.kt")
|
||||
public void testGenericSam() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolve/samConstructors/genericSam.kt");
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public final val value: R|kotlin/Array<test/Bnno>|
|
||||
public get(): R|kotlin/Array<test/Bnno>|
|
||||
|
||||
public constructor(value: R|kotlin/Array<test/Bnno>|): R|test/Anno|
|
||||
|
||||
}
|
||||
|
||||
@R|test/Anno|(value = <implicitArrayOf>(@R|test/Bnno|(value = String(x)) , @R|test/Bnno|(value = String(y)) )) public final class AnnotationInArray : R|kotlin/Any| {
|
||||
public constructor(): R|test/AnnotationInArray|
|
||||
|
||||
}
|
||||
|
||||
public final annotation class Bnno : R|kotlin/Annotation| {
|
||||
public final val value: R|kotlin/String|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public constructor(value: R|kotlin/String|): R|test/Bnno|
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
@R|kotlin/annotation/Target|(allowedTargets = <implicitArrayOf>(R|kotlin/annotation/AnnotationTarget.TYPE|())) public final annotation class A : R|kotlin/Annotation| {
|
||||
public final annotation class A : R|kotlin/Annotation| {
|
||||
public constructor(): R|test/A|
|
||||
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
FILE: annotationUsedAsAnnotationArgument.kt
|
||||
public final annotation class Ann : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann2 : R|kotlin/Annotation| {
|
||||
public constructor(): R|Ann2| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final annotation class Ann3 : R|kotlin/Annotation| {
|
||||
public constructor(arg: R|kotlin/Int|, s: R|kotlin/String|): R|Ann3| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val arg: R|kotlin/Int| = R|<local>/arg|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final val s: R|kotlin/String| = R|<local>/s|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
@R|Ann3|(@R|Ann3|(@R|Ann|() Int(5), String()) @R|Ann2|() Int(1), String()) public final val a: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
@@ -1,11 +0,0 @@
|
||||
annotation class Ann
|
||||
|
||||
annotation class Ann2
|
||||
|
||||
annotation class Ann3(val arg: Int, val s: String)
|
||||
|
||||
@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann3(
|
||||
<!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann<!> 5, ""
|
||||
)<!> <!ANNOTATION_USED_AS_ANNOTATION_ARGUMENT!>@Ann2<!> 1, ""
|
||||
) val a = 0
|
||||
@@ -15,5 +15,5 @@ class B : A() {
|
||||
}
|
||||
|
||||
fun test(b: B) {
|
||||
b.<!INVISIBLE_REFERENCE!>foo<!>("")
|
||||
b.<!HIDDEN!>foo<!>("")
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
FILE: argParamTypeMismatch.kt
|
||||
public final fun foo(first: R|kotlin/String|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun foo2(first: R|kotlin/String|, second: R|kotlin/Int|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
lval int: R|kotlin/Int| = Int(1)
|
||||
<Inapplicable(INAPPLICABLE): /foo>#(R|<local>/int|)
|
||||
<Inapplicable(INAPPLICABLE): /foo>#(Int(2))
|
||||
<Inapplicable(INAPPLICABLE): /foo>#(R|kotlin/run|<R|kotlin/Int|>(<L> = run@fun <anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ Int(20)
|
||||
}
|
||||
))
|
||||
R|/foo2|(String(asdf), Int(3))
|
||||
<Inapplicable(INAPPLICABLE): /foo2>#(Int(4), String(asdf))
|
||||
<Inapplicable(INAPPLICABLE): /foo2>#(Int(5), Int(6))
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
fun foo(first: String) {}
|
||||
fun foo2(first: String, second: Int) {}
|
||||
|
||||
fun test() {
|
||||
val int = 1
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>int<!>)
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>2<!>)
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>run { 20 }<!>)
|
||||
|
||||
foo2("asdf", 3)
|
||||
foo2(<!ARGUMENT_TYPE_MISMATCH!>4<!>, <!ARGUMENT_TYPE_MISMATCH!>"asdf"<!>)
|
||||
foo2(<!ARGUMENT_TYPE_MISMATCH!>5<!>, 6)
|
||||
}
|
||||
@@ -9,7 +9,7 @@ public @interface Ann {
|
||||
// FILE: main.kt
|
||||
|
||||
@Ann(x = 10, s = "")
|
||||
@Ann(<!ARGUMENT_TYPE_MISMATCH!>10<!>, <!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>@Ann(10, "")<!>
|
||||
@Ann(x = 10, s = "", y = 10)
|
||||
class A
|
||||
|
||||
|
||||
@@ -21,6 +21,6 @@ fun test() {
|
||||
baz(1, "my", "yours")
|
||||
baz(1, z = true)
|
||||
|
||||
baz(0, "", <!ARGUMENT_TYPE_MISMATCH!>false<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>baz<!>(0, "", false)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ fun foo2(block: (C, C) -> Unit) = block(C(0, ""), C(0, ""))
|
||||
fun test() {
|
||||
foo1 { (x, y) -> C(x, y) }
|
||||
foo1 { (x: Int, y: String) -> C(x, y) }
|
||||
foo1 { (<!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>x: String<!>, <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>y: Int<!>) -> C(<!ARGUMENT_TYPE_MISMATCH!>x<!>, <!ARGUMENT_TYPE_MISMATCH!>y<!>) }
|
||||
foo1 { (<!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH{PSI}!>x: String<!>, <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH{PSI}!>y: Int<!>) -> <!INAPPLICABLE_CANDIDATE!>C<!>(x, y) }
|
||||
foo2 { (x, y), (z, w) -> C(x + z, y + w) }
|
||||
foo2 { (x: Int, y: String), (z: Int, w: String) -> C(x + z, y + w) }
|
||||
foo2 { (<!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>x: String<!>, <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>y: Int<!>), (<!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>z: String<!>, <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>w: Int<!>) -> C(<!ARGUMENT_TYPE_MISMATCH!>x + z<!>, <!ARGUMENT_TYPE_MISMATCH!>y + w<!>) }
|
||||
foo2 { (<!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH{PSI}!>x: String<!>, <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH{PSI}!>y: Int<!>), (<!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH{PSI}!>z: String<!>, <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH{PSI}!>w: Int<!>) -> <!INAPPLICABLE_CANDIDATE!>C<!>(x + z, y + w) }
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ fun takeAny(x: Any) {}
|
||||
fun takeString(x: String) {}
|
||||
|
||||
fun test_0() {
|
||||
1L
|
||||
1l
|
||||
1
|
||||
10000000000
|
||||
}
|
||||
@@ -17,9 +17,9 @@ fun test_1() {
|
||||
}
|
||||
|
||||
fun test_2() {
|
||||
takeInt(<!ARGUMENT_TYPE_MISMATCH!>10000000000<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(10000000000)
|
||||
takeLong(10000000000)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1000<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000)
|
||||
}
|
||||
|
||||
fun test_3() {
|
||||
@@ -35,14 +35,14 @@ fun test_4() {
|
||||
}
|
||||
|
||||
fun test_5() {
|
||||
takeString(<!ARGUMENT_TYPE_MISMATCH!>1<!>)
|
||||
takeString(<!ARGUMENT_TYPE_MISMATCH!>run { 1 }<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeString<!>(1)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeString<!>(run { 1 })
|
||||
}
|
||||
|
||||
annotation class Ann(val x: Byte)
|
||||
|
||||
@Ann(10)
|
||||
fun test_6() {
|
||||
@Ann(<!ARGUMENT_TYPE_MISMATCH!>300<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>@Ann(300)<!>
|
||||
val x = ""
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ public @interface Ann {
|
||||
@Ann("a", "b")
|
||||
fun test_1() {}
|
||||
|
||||
@Ann(<!ARGUMENT_TYPE_MISMATCH!>arrayOf("a", "b")<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>@Ann(arrayOf("a", "b"))<!>
|
||||
fun test_2() {}
|
||||
|
||||
@Ann(*arrayOf("a", "b"))
|
||||
|
||||
@@ -13,6 +13,6 @@ fun takeOutA(array: Array<out A>) {}
|
||||
|
||||
fun test(array: Array<B>) {
|
||||
A.take(array)
|
||||
takeA(<!ARGUMENT_TYPE_MISMATCH!>array<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeA<!>(array)
|
||||
takeOutA(array)
|
||||
}
|
||||
|
||||
@@ -31,33 +31,33 @@ fun test_3() {
|
||||
fun takeByte(b: Byte) {}
|
||||
|
||||
fun test_4() {
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1 + 1<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1 + 127<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1 - 1<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>-100 - 100<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>10 * 10<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>100 * 100<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + 1)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + 127)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 - 1)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(-100 - 100)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(10 * 10)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 * 100)
|
||||
<!UNRESOLVED_REFERENCE!>taleByte<!>(10 / 10)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>100 % 10<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1000 % 10<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1000 and 100<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>128 and 511<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>100 or 100<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1000 or 0<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>511 xor 511<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>512 xor 511<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 % 10)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 % 10)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 and 100)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(128 and 511)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 or 100)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 or 0)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(511 xor 511)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(512 xor 511)
|
||||
}
|
||||
|
||||
fun test_5() {
|
||||
takeByte(-1)
|
||||
takeByte(+1)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1.inv()<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1.inv())
|
||||
}
|
||||
|
||||
fun test_6() {
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>run { 127 + 1 }<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>1 + run { 1 }<!>)
|
||||
takeByte(<!ARGUMENT_TYPE_MISMATCH!>run { 1 + 1 }<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(run { 127 + 1 })
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + run { 1 })
|
||||
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(run { 1 + 1 })
|
||||
1 + 1
|
||||
run { 1 }
|
||||
1 + run { 1 }
|
||||
|
||||
@@ -8,10 +8,10 @@ fun test() {
|
||||
foo(third = false, second = 2.71, fourth = "?!", first = 0)
|
||||
|
||||
foo(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>0.0<!>, <!ARGUMENT_TYPE_MISMATCH!>false<!>, <!ARGUMENT_TYPE_MISMATCH!>0<!>, "")
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>(0.0, false, 0, "")
|
||||
foo(1, 2.0, third = true, "")
|
||||
foo(second = 0.0, first = 0, fourth = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
foo(first = <!ARGUMENT_TYPE_MISMATCH!>0.0<!>, second = <!ARGUMENT_TYPE_MISMATCH!>0<!>, third = <!ARGUMENT_TYPE_MISMATCH!>""<!>, fourth = <!ARGUMENT_TYPE_MISMATCH!>false<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>(first = 0.0, second = 0, third = "", fourth = false)
|
||||
foo(first = 0, second = 0.0, third = false, fourth = "", <!ARGUMENT_PASSED_TWICE!>first<!> = 1)
|
||||
foo(0, 0.0, false, <!NAMED_PARAMETER_NOT_FOUND!>foth<!> = ""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ FILE: stringTemplates.kt
|
||||
public final fun foo(s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(a: R|A|): R|kotlin/Unit| {
|
||||
R|/foo|(<strcat>(R|<local>/a|))
|
||||
R|/foo|(<strcat>(R|<local>/a|.R|kotlin/Any.toString|()))
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ fun test() {
|
||||
foo(1, "my", "yours")
|
||||
foo(1, *arrayOf("my", "yours"))
|
||||
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
foo(1, <!ARGUMENT_TYPE_MISMATCH!>2<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>("")
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>(1, 2)
|
||||
|
||||
bar(1, z = true, y = *arrayOf("my", "yours"))
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ fun bar(x: B) {}
|
||||
|
||||
fun test(c: C) {
|
||||
// Argument mapping error
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>""<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>foo<!>("")
|
||||
|
||||
// Ambiguity
|
||||
<!OVERLOAD_RESOLUTION_AMBIGUITY!>bar<!>(c)
|
||||
|
||||
@@ -191,68 +191,63 @@ digraph complex_kt {
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
56 [label="Enter block"];
|
||||
57 [label="Access variable this@R|/firstIsInstanceOrNull|"];
|
||||
58 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
|
||||
59 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
57 [label="Enter block"];
|
||||
58 [label="Access variable this@R|/firstIsInstanceOrNull|"];
|
||||
59 [label="Function call: this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()"];
|
||||
60 [label="Variable declaration: lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>|"];
|
||||
60 [label="Enter while loop"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
61 [label="Enter while loop"];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
62 [label="Enter loop condition"];
|
||||
63 [label="Access variable R|<local>/<iterator>|"];
|
||||
64 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
65 [label="Exit loop condition"];
|
||||
}
|
||||
61 [label="Enter loop condition"];
|
||||
62 [label="Access variable R|<local>/<iterator>|"];
|
||||
63 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
64 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
65 [label="Enter loop block"];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
66 [label="Enter loop block"];
|
||||
66 [label="Enter block"];
|
||||
67 [label="Access variable R|<local>/<iterator>|"];
|
||||
68 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
|
||||
69 [label="Variable declaration: lval element: R|kotlin/Any?|"];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
67 [label="Enter block"];
|
||||
68 [label="Access variable R|<local>/<iterator>|"];
|
||||
69 [label="Function call: R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()"];
|
||||
70 [label="Variable declaration: lval element: R|kotlin/Any?|"];
|
||||
70 [label="Enter when"];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
71 [label="Enter when"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
72 [label="Enter when branch condition "];
|
||||
73 [label="Access variable R|<local>/element|"];
|
||||
74 [label="Type operator: (R|<local>/element| is R|T|)"];
|
||||
75 [label="Exit when branch condition"];
|
||||
}
|
||||
76 [label="Synthetic else branch"];
|
||||
77 [label="Enter when branch result"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
78 [label="Enter block"];
|
||||
79 [label="Access variable R|<local>/element|"];
|
||||
80 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
|
||||
81 [label="Stub" style="filled" fillcolor=gray];
|
||||
82 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
83 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
84 [label="Exit when"];
|
||||
71 [label="Enter when branch condition "];
|
||||
72 [label="Access variable R|<local>/element|"];
|
||||
73 [label="Type operator: (R|<local>/element| is R|T|)"];
|
||||
74 [label="Exit when branch condition"];
|
||||
}
|
||||
85 [label="Exit block"];
|
||||
75 [label="Synthetic else branch"];
|
||||
76 [label="Enter when branch result"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
77 [label="Enter block"];
|
||||
78 [label="Access variable R|<local>/element|"];
|
||||
79 [label="Jump: ^firstIsInstanceOrNull R|<local>/element|"];
|
||||
80 [label="Stub" style="filled" fillcolor=gray];
|
||||
81 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
82 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
83 [label="Exit when"];
|
||||
}
|
||||
86 [label="Exit loop block"];
|
||||
84 [label="Exit block"];
|
||||
}
|
||||
87 [label="Exit whileloop"];
|
||||
85 [label="Exit loop block"];
|
||||
}
|
||||
88 [label="Exit block"];
|
||||
86 [label="Exit whileloop"];
|
||||
}
|
||||
89 [label="Const: Null(null)"];
|
||||
90 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
|
||||
91 [label="Stub" style="filled" fillcolor=gray];
|
||||
92 [label="Exit block" style="filled" fillcolor=gray];
|
||||
87 [label="Const: Null(null)"];
|
||||
88 [label="Jump: ^firstIsInstanceOrNull Null(null)"];
|
||||
89 [label="Stub" style="filled" fillcolor=gray];
|
||||
90 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
93 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
|
||||
91 [label="Exit function firstIsInstanceOrNull" style="filled" fillcolor=red];
|
||||
}
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
@@ -263,8 +258,8 @@ digraph complex_kt {
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
65 -> {87 66};
|
||||
64 -> {86 65};
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
@@ -273,26 +268,24 @@ digraph complex_kt {
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {77 76};
|
||||
76 -> {84};
|
||||
74 -> {76 75};
|
||||
75 -> {83};
|
||||
76 -> {77};
|
||||
77 -> {78};
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
80 -> {93};
|
||||
79 -> {91};
|
||||
79 -> {80} [style=dotted];
|
||||
80 -> {81} [style=dotted];
|
||||
81 -> {82} [style=dotted];
|
||||
82 -> {83} [style=dotted];
|
||||
83 -> {84} [style=dotted];
|
||||
83 -> {84};
|
||||
84 -> {85};
|
||||
85 -> {86};
|
||||
86 -> {62} [color=green style=dashed];
|
||||
85 -> {61} [color=green style=dashed];
|
||||
86 -> {87};
|
||||
87 -> {88};
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {93};
|
||||
88 -> {91};
|
||||
88 -> {89} [style=dotted];
|
||||
89 -> {90} [style=dotted];
|
||||
90 -> {91} [style=dotted];
|
||||
91 -> {92} [style=dotted];
|
||||
92 -> {93} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
@@ -25,16 +25,13 @@ FILE: complex.kt
|
||||
|
||||
}
|
||||
public final inline fun <reified T : R|kotlin/Any|> R|kotlin/collections/List<*>|.firstIsInstanceOrNull(): R|T?| {
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>| = this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval element: R|kotlin/Any?| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()
|
||||
when () {
|
||||
(R|<local>/element| is R|T|) -> {
|
||||
^firstIsInstanceOrNull R|<local>/element|
|
||||
}
|
||||
lval <iterator>: R|kotlin/collections/Iterator<kotlin/Any?>| = this@R|/firstIsInstanceOrNull|.R|SubstitutionOverride<kotlin/collections/List.iterator: R|kotlin/collections/Iterator<CapturedType(*)>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval element: R|kotlin/Any?| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|kotlin/Any?|>|()
|
||||
when () {
|
||||
(R|<local>/element| is R|T|) -> {
|
||||
^firstIsInstanceOrNull R|<local>/element|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ fun test_4(x: Any, y: Any) {
|
||||
}
|
||||
|
||||
)
|
||||
takeInt(<!ARGUMENT_TYPE_MISMATCH!>x<!>) // Bad
|
||||
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(x) // Bad
|
||||
takeInt(y) // OK
|
||||
takeInt(a) // Bad
|
||||
}
|
||||
|
||||
@@ -19,78 +19,85 @@ digraph initBlockAndInPlaceLambda_kt {
|
||||
|
||||
subgraph cluster_2 {
|
||||
color=red
|
||||
4 [label="Enter class C" style="filled" fillcolor=red];
|
||||
5 [label="Part of class initialization"];
|
||||
6 [label="Exit class C" style="filled" fillcolor=red];
|
||||
4 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
5 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
4 -> {5} [color=green];
|
||||
5 -> {6} [style=dotted];
|
||||
5 -> {10} [color=green];
|
||||
5 -> {10} [style=dashed];
|
||||
4 -> {5};
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
7 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
8 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
9 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
6 [label="Enter class C" style="filled" fillcolor=red];
|
||||
7 [label="Part of class initialization"];
|
||||
8 [label="Exit class C" style="filled" fillcolor=red];
|
||||
}
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
6 -> {7} [color=green];
|
||||
7 -> {8} [style=dotted];
|
||||
7 -> {12} [color=green];
|
||||
7 -> {12} [style=dashed];
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
10 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
11 [label="Enter block"];
|
||||
12 [label="Access variable R|<local>/a|"];
|
||||
13 [label="Access variable R|/A.b|"];
|
||||
14 [label="Enter safe call"];
|
||||
15 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
23 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
24 [label="Enter block"];
|
||||
25 [label="Access variable R|<local>/a|"];
|
||||
26 [label="Access variable R|<local>/it|"];
|
||||
27 [label="Function call: R|/C.C|(...)"];
|
||||
28 [label="Exit block"];
|
||||
}
|
||||
29 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
16 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
17 [label="Postponed exit from lambda"];
|
||||
18 [label="Function call: $subj$.R|kotlin/let|<R|B|, R|C|>(...)"];
|
||||
19 [label="Exit safe call"];
|
||||
20 [label="Variable declaration: lval c: R|C?|"];
|
||||
21 [label="Exit block"];
|
||||
}
|
||||
22 [label="Exit init block" style="filled" fillcolor=red];
|
||||
9 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
10 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
11 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
9 -> {10};
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
12 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
color=blue
|
||||
13 [label="Enter block"];
|
||||
14 [label="Access variable R|<local>/a|"];
|
||||
15 [label="Access variable R|/A.b|"];
|
||||
16 [label="Enter safe call"];
|
||||
17 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
25 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
26 [label="Enter block"];
|
||||
27 [label="Access variable R|<local>/a|"];
|
||||
28 [label="Access variable R|<local>/it|"];
|
||||
29 [label="Function call: R|/C.C|(...)"];
|
||||
30 [label="Exit block"];
|
||||
}
|
||||
31 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
18 [label="Call arguments union" style="filled" fillcolor=yellow];
|
||||
19 [label="Postponed exit from lambda"];
|
||||
20 [label="Function call: $subj$.R|kotlin/let|<R|B|, R|C|>(...)"];
|
||||
21 [label="Exit safe call"];
|
||||
22 [label="Variable declaration: lval c: R|C?|"];
|
||||
23 [label="Exit block"];
|
||||
}
|
||||
24 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
12 -> {13};
|
||||
13 -> {14 19};
|
||||
13 -> {14};
|
||||
14 -> {15};
|
||||
15 -> {23};
|
||||
15 -> {17} [color=red];
|
||||
15 -> {23} [style=dashed];
|
||||
16 -> {18} [color=red];
|
||||
17 -> {18} [color=green];
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
15 -> {16 21};
|
||||
16 -> {17};
|
||||
17 -> {25};
|
||||
17 -> {19} [color=red];
|
||||
17 -> {25} [style=dashed];
|
||||
18 -> {20} [color=red];
|
||||
19 -> {20} [color=green];
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
22 -> {6} [color=green];
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
24 -> {8} [color=green];
|
||||
25 -> {26};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {29};
|
||||
29 -> {16} [color=red];
|
||||
29 -> {17} [color=green];
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {18} [color=red];
|
||||
31 -> {19} [color=green];
|
||||
|
||||
}
|
||||
|
||||
@@ -44,20 +44,27 @@ digraph innerClassInAnonymousObject_kt {
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
14 [label="Enter property" style="filled" fillcolor=red];
|
||||
15 [label="Exit anonymous object"];
|
||||
16 [label="Exit property" style="filled" fillcolor=red];
|
||||
14 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
15 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
|
||||
subgraph cluster_6 {
|
||||
color=red
|
||||
16 [label="Enter property" style="filled" fillcolor=red];
|
||||
17 [label="Exit anonymous object"];
|
||||
18 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
12 [label="Enter class <anonymous object>" style="filled" fillcolor=red];
|
||||
13 [label="Exit class <anonymous object>" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
14 -> {0 5 8} [color=red];
|
||||
15 -> {16};
|
||||
15 -> {0 12} [color=green];
|
||||
15 -> {0 12} [style=dashed];
|
||||
16 -> {17};
|
||||
16 -> {0 5 8} [color=red];
|
||||
17 -> {18};
|
||||
17 -> {0 12} [color=green];
|
||||
17 -> {0 12} [style=dashed];
|
||||
12 -> {13} [color=green];
|
||||
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ digraph jumps_kt {
|
||||
}
|
||||
51 [label="Variable declaration: lval y: R|kotlin/Int?|"];
|
||||
52 [label="Access variable R|<local>/y|"];
|
||||
53 [label="Function call: R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()"];
|
||||
53 [label="Function call: R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()"];
|
||||
54 [label="Exit block"];
|
||||
}
|
||||
55 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE: jumps.kt
|
||||
}
|
||||
}
|
||||
|
||||
R|<local>/y|.<Inapplicable(UNSAFE_CALL): kotlin/Int.inc>#()
|
||||
R|<local>/y|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/Int.inc>#()
|
||||
}
|
||||
public final fun test_3(x: R|kotlin/Int?|): R|kotlin/Unit| {
|
||||
while(Boolean(true)) {
|
||||
|
||||
@@ -5,19 +5,26 @@ digraph lambdaAsReturnOfLambda_kt {
|
||||
|
||||
subgraph cluster_0 {
|
||||
color=red
|
||||
14 [label="Enter property" style="filled" fillcolor=red];
|
||||
15 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_1 {
|
||||
14 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
15 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
|
||||
subgraph cluster_1 {
|
||||
color=red
|
||||
16 [label="Enter property" style="filled" fillcolor=red];
|
||||
17 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_2 {
|
||||
color=blue
|
||||
0 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_2 {
|
||||
subgraph cluster_3 {
|
||||
color=blue
|
||||
1 [label="Enter block"];
|
||||
2 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_3 {
|
||||
subgraph cluster_4 {
|
||||
color=blue
|
||||
8 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_4 {
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
9 [label="Enter block"];
|
||||
10 [label="Access variable R|<local>/foo|"];
|
||||
@@ -36,15 +43,15 @@ digraph lambdaAsReturnOfLambda_kt {
|
||||
}
|
||||
7 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
16 [label="Postponed exit from lambda"];
|
||||
17 [label="Function call: R|/run|<R|(kotlin/String) -> kotlin/Unit|>(...)"];
|
||||
18 [label="Exit property" style="filled" fillcolor=red];
|
||||
18 [label="Postponed exit from lambda"];
|
||||
19 [label="Function call: R|/run|<R|(kotlin/String) -> kotlin/Unit|>(...)"];
|
||||
20 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
14 -> {15};
|
||||
15 -> {16 0};
|
||||
15 -> {0} [style=dashed];
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
17 -> {18 0};
|
||||
17 -> {0} [style=dashed];
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
0 -> {1};
|
||||
1 -> {2};
|
||||
2 -> {3 8};
|
||||
@@ -60,39 +67,39 @@ digraph lambdaAsReturnOfLambda_kt {
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
|
||||
subgraph cluster_5 {
|
||||
subgraph cluster_6 {
|
||||
color=red
|
||||
19 [label="Enter function bar" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
21 [label="Enter function bar" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
20 [label="Enter block"];
|
||||
21 [label="Exit block"];
|
||||
22 [label="Enter block"];
|
||||
23 [label="Exit block"];
|
||||
}
|
||||
22 [label="Exit function bar" style="filled" fillcolor=red];
|
||||
24 [label="Exit function bar" style="filled" fillcolor=red];
|
||||
}
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
|
||||
subgraph cluster_7 {
|
||||
color=red
|
||||
23 [label="Enter function run" style="filled" fillcolor=red];
|
||||
subgraph cluster_8 {
|
||||
color=blue
|
||||
24 [label="Enter block"];
|
||||
25 [label="Function call: R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
26 [label="Jump: ^run R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
27 [label="Stub" style="filled" fillcolor=gray];
|
||||
28 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
29 [label="Exit function run" style="filled" fillcolor=red];
|
||||
}
|
||||
22 -> {23};
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
25 [label="Enter function run" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
26 [label="Enter block"];
|
||||
27 [label="Function call: R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
28 [label="Jump: ^run R|<local>/block|.R|SubstitutionOverride<kotlin/Function0.invoke: R|R|>|()"];
|
||||
29 [label="Stub" style="filled" fillcolor=gray];
|
||||
30 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
31 [label="Exit function run" style="filled" fillcolor=red];
|
||||
}
|
||||
25 -> {26};
|
||||
26 -> {29};
|
||||
26 -> {27} [style=dotted];
|
||||
27 -> {28} [style=dotted];
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {31};
|
||||
28 -> {29} [style=dotted];
|
||||
29 -> {30} [style=dotted];
|
||||
30 -> {31} [style=dotted];
|
||||
|
||||
}
|
||||
|
||||
@@ -118,49 +118,44 @@ digraph loops_kt {
|
||||
subgraph cluster_13 {
|
||||
color=blue
|
||||
37 [label="Enter block"];
|
||||
38 [label="Const: Int(0)"];
|
||||
39 [label="Const: Int(5)"];
|
||||
40 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
42 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
subgraph cluster_14 {
|
||||
color=blue
|
||||
38 [label="Enter block"];
|
||||
39 [label="Const: Int(0)"];
|
||||
40 [label="Const: Int(5)"];
|
||||
41 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...)"];
|
||||
42 [label="Function call: Int(0).R|kotlin/Int.rangeTo|(...).R|kotlin/ranges/IntProgression.iterator|()"];
|
||||
43 [label="Variable declaration: lval <iterator>: R|kotlin/collections/IntIterator|"];
|
||||
43 [label="Enter while loop"];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
44 [label="Enter while loop"];
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
45 [label="Enter loop condition"];
|
||||
46 [label="Access variable R|<local>/<iterator>|"];
|
||||
47 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
48 [label="Exit loop condition"];
|
||||
}
|
||||
44 [label="Enter loop condition"];
|
||||
45 [label="Access variable R|<local>/<iterator>|"];
|
||||
46 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()"];
|
||||
47 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_16 {
|
||||
color=blue
|
||||
48 [label="Enter loop block"];
|
||||
subgraph cluster_17 {
|
||||
color=blue
|
||||
49 [label="Enter loop block"];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
50 [label="Enter block"];
|
||||
51 [label="Access variable R|<local>/<iterator>|"];
|
||||
52 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
53 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
54 [label="Access variable R|<local>/x|"];
|
||||
55 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
56 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
|
||||
57 [label="Exit block"];
|
||||
}
|
||||
58 [label="Exit loop block"];
|
||||
49 [label="Enter block"];
|
||||
50 [label="Access variable R|<local>/<iterator>|"];
|
||||
51 [label="Function call: R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()"];
|
||||
52 [label="Variable declaration: lval i: R|kotlin/Int|"];
|
||||
53 [label="Access variable R|<local>/x|"];
|
||||
54 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
55 [label="Variable declaration: lval y: R|kotlin/Boolean|"];
|
||||
56 [label="Exit block"];
|
||||
}
|
||||
59 [label="Exit whileloop"];
|
||||
57 [label="Exit loop block"];
|
||||
}
|
||||
60 [label="Exit block"];
|
||||
58 [label="Exit whileloop"];
|
||||
}
|
||||
61 [label="Access variable R|<local>/x|"];
|
||||
62 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
63 [label="Exit block"];
|
||||
59 [label="Access variable R|<local>/x|"];
|
||||
60 [label="Type operator: (R|<local>/x| is R|kotlin/String|)"];
|
||||
61 [label="Exit block"];
|
||||
}
|
||||
64 [label="Exit function testFor" style="filled" fillcolor=red];
|
||||
62 [label="Exit function testFor" style="filled" fillcolor=red];
|
||||
}
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
@@ -173,8 +168,8 @@ digraph loops_kt {
|
||||
44 -> {45};
|
||||
45 -> {46};
|
||||
46 -> {47};
|
||||
47 -> {48};
|
||||
48 -> {59 49};
|
||||
47 -> {58 48};
|
||||
48 -> {49};
|
||||
49 -> {50};
|
||||
50 -> {51};
|
||||
51 -> {52};
|
||||
@@ -183,226 +178,226 @@ digraph loops_kt {
|
||||
54 -> {55};
|
||||
55 -> {56};
|
||||
56 -> {57};
|
||||
57 -> {58};
|
||||
58 -> {45} [color=green style=dashed];
|
||||
57 -> {44} [color=green style=dashed];
|
||||
58 -> {59};
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
61 -> {62};
|
||||
62 -> {63};
|
||||
63 -> {64};
|
||||
|
||||
subgraph cluster_19 {
|
||||
subgraph cluster_18 {
|
||||
color=red
|
||||
65 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_20 {
|
||||
63 [label="Enter function testWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
66 [label="Enter block"];
|
||||
subgraph cluster_21 {
|
||||
64 [label="Enter block"];
|
||||
subgraph cluster_20 {
|
||||
color=blue
|
||||
67 [label="Enter while loop"];
|
||||
65 [label="Enter while loop"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
66 [label="Enter loop condition"];
|
||||
67 [label="Const: Boolean(true)"];
|
||||
68 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
68 [label="Enter loop condition"];
|
||||
69 [label="Const: Boolean(true)"];
|
||||
70 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
71 [label="Enter loop block"];
|
||||
subgraph cluster_24 {
|
||||
69 [label="Enter loop block"];
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
72 [label="Enter block"];
|
||||
73 [label="Const: Int(1)"];
|
||||
74 [label="Exit block"];
|
||||
70 [label="Enter block"];
|
||||
71 [label="Const: Int(1)"];
|
||||
72 [label="Exit block"];
|
||||
}
|
||||
75 [label="Exit loop block"];
|
||||
73 [label="Exit loop block"];
|
||||
}
|
||||
76 [label="Exit whileloop" style="filled" fillcolor=gray];
|
||||
74 [label="Exit whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
77 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
78 [label="Exit block" style="filled" fillcolor=gray];
|
||||
75 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
76 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
79 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
77 [label="Exit function testWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
63 -> {64};
|
||||
64 -> {65};
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
68 -> {74} [style=dotted];
|
||||
69 -> {70};
|
||||
70 -> {71};
|
||||
70 -> {76} [style=dotted];
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {74};
|
||||
74 -> {75};
|
||||
75 -> {68} [color=green style=dashed];
|
||||
73 -> {66} [color=green style=dashed];
|
||||
74 -> {75} [style=dotted];
|
||||
75 -> {76} [style=dotted];
|
||||
76 -> {77} [style=dotted];
|
||||
77 -> {78} [style=dotted];
|
||||
78 -> {79} [style=dotted];
|
||||
|
||||
subgraph cluster_25 {
|
||||
subgraph cluster_24 {
|
||||
color=red
|
||||
80 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_26 {
|
||||
78 [label="Enter function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_25 {
|
||||
color=blue
|
||||
81 [label="Enter block"];
|
||||
subgraph cluster_27 {
|
||||
79 [label="Enter block"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
82 [label="Enter while loop"];
|
||||
80 [label="Enter while loop"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
81 [label="Enter loop condition"];
|
||||
82 [label="Const: Boolean(true)"];
|
||||
83 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_28 {
|
||||
color=blue
|
||||
83 [label="Enter loop condition"];
|
||||
84 [label="Const: Boolean(true)"];
|
||||
85 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
86 [label="Enter loop block"];
|
||||
subgraph cluster_30 {
|
||||
84 [label="Enter loop block"];
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
87 [label="Enter block"];
|
||||
subgraph cluster_31 {
|
||||
85 [label="Enter block"];
|
||||
subgraph cluster_30 {
|
||||
color=blue
|
||||
88 [label="Enter when"];
|
||||
86 [label="Enter when"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
87 [label="Enter when branch condition "];
|
||||
88 [label="Access variable R|<local>/b|"];
|
||||
89 [label="Exit when branch condition"];
|
||||
}
|
||||
90 [label="Synthetic else branch"];
|
||||
91 [label="Enter when branch result"];
|
||||
subgraph cluster_32 {
|
||||
color=blue
|
||||
89 [label="Enter when branch condition "];
|
||||
90 [label="Access variable R|<local>/b|"];
|
||||
91 [label="Exit when branch condition"];
|
||||
92 [label="Enter block"];
|
||||
93 [label="Jump: break@@@[Boolean(true)] "];
|
||||
94 [label="Stub" style="filled" fillcolor=gray];
|
||||
95 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
92 [label="Synthetic else branch"];
|
||||
93 [label="Enter when branch result"];
|
||||
subgraph cluster_33 {
|
||||
color=blue
|
||||
94 [label="Enter block"];
|
||||
95 [label="Jump: break@@@[Boolean(true)] "];
|
||||
96 [label="Stub" style="filled" fillcolor=gray];
|
||||
97 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
98 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
99 [label="Exit when"];
|
||||
96 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
97 [label="Exit when"];
|
||||
}
|
||||
100 [label="Exit block"];
|
||||
98 [label="Exit block"];
|
||||
}
|
||||
101 [label="Exit loop block"];
|
||||
99 [label="Exit loop block"];
|
||||
}
|
||||
102 [label="Exit whileloop"];
|
||||
100 [label="Exit whileloop"];
|
||||
}
|
||||
103 [label="Const: Int(1)"];
|
||||
104 [label="Exit block"];
|
||||
101 [label="Const: Int(1)"];
|
||||
102 [label="Exit block"];
|
||||
}
|
||||
105 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
103 [label="Exit function testWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
}
|
||||
78 -> {79};
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
81 -> {82};
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
83 -> {100} [style=dotted];
|
||||
84 -> {85};
|
||||
85 -> {86};
|
||||
85 -> {102} [style=dotted];
|
||||
86 -> {87};
|
||||
87 -> {88};
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
91 -> {93 92};
|
||||
92 -> {99};
|
||||
93 -> {94};
|
||||
94 -> {95};
|
||||
95 -> {102};
|
||||
89 -> {91 90};
|
||||
90 -> {97};
|
||||
91 -> {92};
|
||||
92 -> {93};
|
||||
93 -> {100};
|
||||
93 -> {94} [style=dotted];
|
||||
94 -> {95} [style=dotted];
|
||||
95 -> {96} [style=dotted];
|
||||
96 -> {97} [style=dotted];
|
||||
97 -> {98} [style=dotted];
|
||||
98 -> {99} [style=dotted];
|
||||
99 -> {100};
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {81} [color=green style=dashed];
|
||||
100 -> {101};
|
||||
101 -> {83} [color=green style=dashed];
|
||||
101 -> {102};
|
||||
102 -> {103};
|
||||
103 -> {104};
|
||||
104 -> {105};
|
||||
|
||||
subgraph cluster_34 {
|
||||
subgraph cluster_33 {
|
||||
color=red
|
||||
106 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_35 {
|
||||
104 [label="Enter function testWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_34 {
|
||||
color=blue
|
||||
107 [label="Enter block"];
|
||||
subgraph cluster_36 {
|
||||
105 [label="Enter block"];
|
||||
subgraph cluster_35 {
|
||||
color=blue
|
||||
108 [label="Enter while loop"];
|
||||
106 [label="Enter while loop"];
|
||||
subgraph cluster_36 {
|
||||
color=blue
|
||||
107 [label="Enter loop condition"];
|
||||
108 [label="Const: Boolean(false)"];
|
||||
109 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_37 {
|
||||
color=blue
|
||||
109 [label="Enter loop condition"];
|
||||
110 [label="Const: Boolean(false)"];
|
||||
111 [label="Exit loop condition"];
|
||||
}
|
||||
subgraph cluster_38 {
|
||||
color=blue
|
||||
112 [label="Enter loop block" style="filled" fillcolor=gray];
|
||||
subgraph cluster_39 {
|
||||
110 [label="Enter loop block" style="filled" fillcolor=gray];
|
||||
subgraph cluster_38 {
|
||||
color=blue
|
||||
113 [label="Enter block" style="filled" fillcolor=gray];
|
||||
114 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
115 [label="Exit block" style="filled" fillcolor=gray];
|
||||
111 [label="Enter block" style="filled" fillcolor=gray];
|
||||
112 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
113 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
116 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
114 [label="Exit loop block" style="filled" fillcolor=gray];
|
||||
}
|
||||
117 [label="Exit whileloop"];
|
||||
115 [label="Exit whileloop"];
|
||||
}
|
||||
118 [label="Const: Int(1)"];
|
||||
119 [label="Exit block"];
|
||||
116 [label="Const: Int(1)"];
|
||||
117 [label="Exit block"];
|
||||
}
|
||||
120 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
|
||||
118 [label="Exit function testWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
104 -> {105};
|
||||
105 -> {106};
|
||||
106 -> {107};
|
||||
107 -> {108};
|
||||
108 -> {109};
|
||||
109 -> {110};
|
||||
110 -> {111};
|
||||
111 -> {117};
|
||||
109 -> {115};
|
||||
109 -> {110} [style=dotted];
|
||||
110 -> {111} [style=dotted];
|
||||
111 -> {112} [style=dotted];
|
||||
112 -> {113} [style=dotted];
|
||||
113 -> {114} [style=dotted];
|
||||
114 -> {115} [style=dotted];
|
||||
115 -> {116} [style=dotted];
|
||||
116 -> {109} [color=green style=dotted];
|
||||
114 -> {107} [color=green style=dotted];
|
||||
115 -> {116};
|
||||
116 -> {117};
|
||||
117 -> {118};
|
||||
118 -> {119};
|
||||
119 -> {120};
|
||||
|
||||
subgraph cluster_40 {
|
||||
subgraph cluster_39 {
|
||||
color=red
|
||||
121 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_41 {
|
||||
119 [label="Enter function testDoWhileTrue" style="filled" fillcolor=red];
|
||||
subgraph cluster_40 {
|
||||
color=blue
|
||||
122 [label="Enter block"];
|
||||
subgraph cluster_42 {
|
||||
120 [label="Enter block"];
|
||||
subgraph cluster_41 {
|
||||
color=blue
|
||||
123 [label="Enter do-while loop"];
|
||||
subgraph cluster_43 {
|
||||
121 [label="Enter do-while loop"];
|
||||
subgraph cluster_42 {
|
||||
color=blue
|
||||
124 [label="Enter loop block"];
|
||||
subgraph cluster_44 {
|
||||
122 [label="Enter loop block"];
|
||||
subgraph cluster_43 {
|
||||
color=blue
|
||||
125 [label="Enter block"];
|
||||
126 [label="Const: Int(1)"];
|
||||
127 [label="Exit block"];
|
||||
123 [label="Enter block"];
|
||||
124 [label="Const: Int(1)"];
|
||||
125 [label="Exit block"];
|
||||
}
|
||||
128 [label="Exit loop block"];
|
||||
126 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_45 {
|
||||
subgraph cluster_44 {
|
||||
color=blue
|
||||
129 [label="Enter loop condition"];
|
||||
130 [label="Const: Boolean(true)"];
|
||||
131 [label="Exit loop condition"];
|
||||
127 [label="Enter loop condition"];
|
||||
128 [label="Const: Boolean(true)"];
|
||||
129 [label="Exit loop condition"];
|
||||
}
|
||||
132 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
130 [label="Exit do-whileloop" style="filled" fillcolor=gray];
|
||||
}
|
||||
133 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
134 [label="Exit block" style="filled" fillcolor=gray];
|
||||
131 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
132 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
135 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
133 [label="Exit function testDoWhileTrue" style="filled" fillcolor=red style="filled" fillcolor=gray];
|
||||
}
|
||||
119 -> {120};
|
||||
120 -> {121};
|
||||
121 -> {122};
|
||||
122 -> {123};
|
||||
123 -> {124};
|
||||
@@ -411,128 +406,128 @@ digraph loops_kt {
|
||||
126 -> {127};
|
||||
127 -> {128};
|
||||
128 -> {129};
|
||||
129 -> {130};
|
||||
130 -> {131};
|
||||
129 -> {130} [style=dotted];
|
||||
129 -> {122} [color=green style=dashed];
|
||||
130 -> {131} [style=dotted];
|
||||
131 -> {132} [style=dotted];
|
||||
131 -> {124} [color=green style=dashed];
|
||||
132 -> {133} [style=dotted];
|
||||
133 -> {134} [style=dotted];
|
||||
134 -> {135} [style=dotted];
|
||||
|
||||
subgraph cluster_46 {
|
||||
subgraph cluster_45 {
|
||||
color=red
|
||||
136 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_47 {
|
||||
134 [label="Enter function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
subgraph cluster_46 {
|
||||
color=blue
|
||||
137 [label="Enter block"];
|
||||
subgraph cluster_48 {
|
||||
135 [label="Enter block"];
|
||||
subgraph cluster_47 {
|
||||
color=blue
|
||||
138 [label="Enter do-while loop"];
|
||||
subgraph cluster_49 {
|
||||
136 [label="Enter do-while loop"];
|
||||
subgraph cluster_48 {
|
||||
color=blue
|
||||
139 [label="Enter loop block"];
|
||||
subgraph cluster_50 {
|
||||
137 [label="Enter loop block"];
|
||||
subgraph cluster_49 {
|
||||
color=blue
|
||||
140 [label="Enter block"];
|
||||
subgraph cluster_51 {
|
||||
138 [label="Enter block"];
|
||||
subgraph cluster_50 {
|
||||
color=blue
|
||||
141 [label="Enter when"];
|
||||
139 [label="Enter when"];
|
||||
subgraph cluster_51 {
|
||||
color=blue
|
||||
140 [label="Enter when branch condition "];
|
||||
141 [label="Access variable R|<local>/b|"];
|
||||
142 [label="Exit when branch condition"];
|
||||
}
|
||||
143 [label="Synthetic else branch"];
|
||||
144 [label="Enter when branch result"];
|
||||
subgraph cluster_52 {
|
||||
color=blue
|
||||
142 [label="Enter when branch condition "];
|
||||
143 [label="Access variable R|<local>/b|"];
|
||||
144 [label="Exit when branch condition"];
|
||||
145 [label="Enter block"];
|
||||
146 [label="Jump: break@@@[Boolean(true)] "];
|
||||
147 [label="Stub" style="filled" fillcolor=gray];
|
||||
148 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
145 [label="Synthetic else branch"];
|
||||
146 [label="Enter when branch result"];
|
||||
subgraph cluster_53 {
|
||||
color=blue
|
||||
147 [label="Enter block"];
|
||||
148 [label="Jump: break@@@[Boolean(true)] "];
|
||||
149 [label="Stub" style="filled" fillcolor=gray];
|
||||
150 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
151 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
152 [label="Exit when"];
|
||||
149 [label="Exit when branch result" style="filled" fillcolor=gray];
|
||||
150 [label="Exit when"];
|
||||
}
|
||||
153 [label="Exit block"];
|
||||
151 [label="Exit block"];
|
||||
}
|
||||
154 [label="Exit loop block"];
|
||||
152 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_54 {
|
||||
subgraph cluster_53 {
|
||||
color=blue
|
||||
155 [label="Enter loop condition"];
|
||||
156 [label="Const: Boolean(true)"];
|
||||
157 [label="Exit loop condition"];
|
||||
153 [label="Enter loop condition"];
|
||||
154 [label="Const: Boolean(true)"];
|
||||
155 [label="Exit loop condition"];
|
||||
}
|
||||
158 [label="Exit do-whileloop"];
|
||||
156 [label="Exit do-whileloop"];
|
||||
}
|
||||
159 [label="Const: Int(1)"];
|
||||
160 [label="Exit block"];
|
||||
157 [label="Const: Int(1)"];
|
||||
158 [label="Exit block"];
|
||||
}
|
||||
161 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
159 [label="Exit function testDoWhileTrueWithBreak" style="filled" fillcolor=red];
|
||||
}
|
||||
134 -> {135};
|
||||
135 -> {136};
|
||||
136 -> {137};
|
||||
137 -> {138};
|
||||
138 -> {139};
|
||||
139 -> {140};
|
||||
140 -> {141};
|
||||
141 -> {142};
|
||||
142 -> {143};
|
||||
143 -> {144};
|
||||
144 -> {146 145};
|
||||
145 -> {152};
|
||||
146 -> {147};
|
||||
147 -> {148};
|
||||
148 -> {158};
|
||||
142 -> {144 143};
|
||||
143 -> {150};
|
||||
144 -> {145};
|
||||
145 -> {146};
|
||||
146 -> {156};
|
||||
146 -> {147} [style=dotted];
|
||||
147 -> {148} [style=dotted];
|
||||
148 -> {149} [style=dotted];
|
||||
149 -> {150} [style=dotted];
|
||||
150 -> {151} [style=dotted];
|
||||
151 -> {152} [style=dotted];
|
||||
150 -> {151};
|
||||
151 -> {152};
|
||||
152 -> {153};
|
||||
153 -> {154};
|
||||
154 -> {155};
|
||||
155 -> {156};
|
||||
155 -> {156} [style=dotted];
|
||||
155 -> {137} [color=green style=dashed];
|
||||
156 -> {157};
|
||||
157 -> {158} [style=dotted];
|
||||
157 -> {139} [color=green style=dashed];
|
||||
157 -> {158};
|
||||
158 -> {159};
|
||||
159 -> {160};
|
||||
160 -> {161};
|
||||
|
||||
subgraph cluster_55 {
|
||||
subgraph cluster_54 {
|
||||
color=red
|
||||
162 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_56 {
|
||||
160 [label="Enter function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
subgraph cluster_55 {
|
||||
color=blue
|
||||
163 [label="Enter block"];
|
||||
subgraph cluster_57 {
|
||||
161 [label="Enter block"];
|
||||
subgraph cluster_56 {
|
||||
color=blue
|
||||
164 [label="Enter do-while loop"];
|
||||
subgraph cluster_58 {
|
||||
162 [label="Enter do-while loop"];
|
||||
subgraph cluster_57 {
|
||||
color=blue
|
||||
165 [label="Enter loop block"];
|
||||
subgraph cluster_59 {
|
||||
163 [label="Enter loop block"];
|
||||
subgraph cluster_58 {
|
||||
color=blue
|
||||
166 [label="Enter block"];
|
||||
167 [label="Const: Int(1)"];
|
||||
168 [label="Exit block"];
|
||||
164 [label="Enter block"];
|
||||
165 [label="Const: Int(1)"];
|
||||
166 [label="Exit block"];
|
||||
}
|
||||
169 [label="Exit loop block"];
|
||||
167 [label="Exit loop block"];
|
||||
}
|
||||
subgraph cluster_60 {
|
||||
subgraph cluster_59 {
|
||||
color=blue
|
||||
170 [label="Enter loop condition"];
|
||||
171 [label="Const: Boolean(false)"];
|
||||
172 [label="Exit loop condition"];
|
||||
168 [label="Enter loop condition"];
|
||||
169 [label="Const: Boolean(false)"];
|
||||
170 [label="Exit loop condition"];
|
||||
}
|
||||
173 [label="Exit do-whileloop"];
|
||||
171 [label="Exit do-whileloop"];
|
||||
}
|
||||
174 [label="Const: Int(1)"];
|
||||
175 [label="Exit block"];
|
||||
172 [label="Const: Int(1)"];
|
||||
173 [label="Exit block"];
|
||||
}
|
||||
176 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
174 [label="Exit function testDoWhileFalse" style="filled" fillcolor=red];
|
||||
}
|
||||
160 -> {161};
|
||||
161 -> {162};
|
||||
162 -> {163};
|
||||
163 -> {164};
|
||||
164 -> {165};
|
||||
@@ -542,11 +537,9 @@ digraph loops_kt {
|
||||
168 -> {169};
|
||||
169 -> {170};
|
||||
170 -> {171};
|
||||
170 -> {163} [color=green style=dotted];
|
||||
171 -> {172};
|
||||
172 -> {173};
|
||||
172 -> {165} [color=green style=dotted];
|
||||
173 -> {174};
|
||||
174 -> {175};
|
||||
175 -> {176};
|
||||
|
||||
}
|
||||
|
||||
@@ -14,13 +14,10 @@ FILE: loops.kt
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
public final fun testFor(x: R|kotlin/Any?|): R|kotlin/Unit| {
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval y: R|kotlin/Boolean| = (R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(0).R|kotlin/Int.rangeTo|(Int(5)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
lval y: R|kotlin/Boolean| = (R|<local>/x| is R|kotlin/String|)
|
||||
}
|
||||
|
||||
(R|<local>/x| is R|kotlin/String|)
|
||||
|
||||
@@ -27,8 +27,8 @@ digraph postponedLambdaInConstructor_kt {
|
||||
}
|
||||
5 -> {6} [color=green];
|
||||
6 -> {7} [style=dotted];
|
||||
6 -> {27} [color=green];
|
||||
6 -> {27} [style=dashed];
|
||||
6 -> {29} [color=green];
|
||||
6 -> {29} [style=dashed];
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
@@ -88,28 +88,35 @@ digraph postponedLambdaInConstructor_kt {
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
27 [label="Enter property" style="filled" fillcolor=red];
|
||||
28 [label="Access variable R|<local>/s|"];
|
||||
29 [label="Exit property" style="filled" fillcolor=red];
|
||||
27 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
28 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
27 -> {28};
|
||||
28 -> {29};
|
||||
29 -> {7} [color=green];
|
||||
|
||||
subgraph cluster_9 {
|
||||
color=red
|
||||
30 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_10 {
|
||||
color=blue
|
||||
31 [label="Enter block"];
|
||||
32 [label="Function call: this@R|/B|.R|/B.foo|()"];
|
||||
33 [label="Exit block"];
|
||||
}
|
||||
34 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
29 [label="Enter property" style="filled" fillcolor=red];
|
||||
30 [label="Access variable R|<local>/s|"];
|
||||
31 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {32};
|
||||
31 -> {7} [color=green];
|
||||
|
||||
subgraph cluster_10 {
|
||||
color=red
|
||||
32 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_11 {
|
||||
color=blue
|
||||
33 [label="Enter block"];
|
||||
34 [label="Function call: this@R|/B|.R|/B.foo|()"];
|
||||
35 [label="Exit block"];
|
||||
}
|
||||
36 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
32 -> {33};
|
||||
33 -> {34};
|
||||
34 -> {35};
|
||||
35 -> {36};
|
||||
|
||||
}
|
||||
|
||||
@@ -21,298 +21,312 @@ digraph propertiesAndInitBlocks_kt {
|
||||
|
||||
subgraph cluster_2 {
|
||||
color=red
|
||||
5 [label="Enter property" style="filled" fillcolor=red];
|
||||
6 [label="Const: Int(1)"];
|
||||
7 [label="Exit property" style="filled" fillcolor=red];
|
||||
5 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
6 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
5 -> {6};
|
||||
6 -> {7};
|
||||
|
||||
subgraph cluster_3 {
|
||||
color=red
|
||||
8 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_4 {
|
||||
color=blue
|
||||
9 [label="Enter block"];
|
||||
10 [label="Const: Int(1)"];
|
||||
11 [label="Jump: ^ Int(1)"];
|
||||
12 [label="Stub" style="filled" fillcolor=gray];
|
||||
13 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
14 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
7 [label="Enter property" style="filled" fillcolor=red];
|
||||
8 [label="Const: Int(1)"];
|
||||
9 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
7 -> {8};
|
||||
8 -> {9};
|
||||
9 -> {10};
|
||||
10 -> {11};
|
||||
11 -> {14};
|
||||
11 -> {12} [style=dotted];
|
||||
12 -> {13} [style=dotted];
|
||||
13 -> {14} [style=dotted];
|
||||
|
||||
subgraph cluster_5 {
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
15 [label="Enter function setter" style="filled" fillcolor=red];
|
||||
subgraph cluster_6 {
|
||||
10 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
16 [label="Enter block"];
|
||||
17 [label="Const: Int(1)"];
|
||||
18 [label="Assignment: F|/x2|"];
|
||||
19 [label="Exit block"];
|
||||
11 [label="Enter block"];
|
||||
12 [label="Const: Int(1)"];
|
||||
13 [label="Jump: ^ Int(1)"];
|
||||
14 [label="Stub" style="filled" fillcolor=gray];
|
||||
15 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
20 [label="Exit function setter" style="filled" fillcolor=red];
|
||||
16 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
10 -> {11};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
13 -> {16};
|
||||
13 -> {14} [style=dotted];
|
||||
14 -> {15} [style=dotted];
|
||||
15 -> {16} [style=dotted];
|
||||
|
||||
subgraph cluster_6 {
|
||||
color=red
|
||||
17 [label="Enter function setter" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
18 [label="Enter block"];
|
||||
19 [label="Const: Int(1)"];
|
||||
20 [label="Assignment: F|/x2|"];
|
||||
21 [label="Exit block"];
|
||||
}
|
||||
22 [label="Exit function setter" style="filled" fillcolor=red];
|
||||
}
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
|
||||
subgraph cluster_7 {
|
||||
color=red
|
||||
21 [label="Enter property" style="filled" fillcolor=red];
|
||||
22 [label="Const: Int(1)"];
|
||||
23 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
20 -> {21};
|
||||
21 -> {22};
|
||||
22 -> {23};
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
35 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
36 [label="Enter block"];
|
||||
37 [label="Const: Int(1)"];
|
||||
38 [label="Const: Int(1)"];
|
||||
39 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
|
||||
40 [label="Variable declaration: lval c: R|kotlin/Int|"];
|
||||
41 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
42 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
43 [label="Stub" style="filled" fillcolor=gray];
|
||||
44 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
45 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
23 [label="Enter property" style="filled" fillcolor=red];
|
||||
24 [label="Const: Int(1)"];
|
||||
25 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
23 -> {24};
|
||||
24 -> {25};
|
||||
|
||||
subgraph cluster_9 {
|
||||
color=red
|
||||
37 [label="Enter function foo" style="filled" fillcolor=red];
|
||||
subgraph cluster_10 {
|
||||
color=blue
|
||||
38 [label="Enter block"];
|
||||
39 [label="Const: Int(1)"];
|
||||
40 [label="Const: Int(1)"];
|
||||
41 [label="Function call: Int(1).R|kotlin/Int.plus|(...)"];
|
||||
42 [label="Variable declaration: lval c: R|kotlin/Int|"];
|
||||
43 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
44 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
45 [label="Stub" style="filled" fillcolor=gray];
|
||||
46 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
47 [label="Exit function foo" style="filled" fillcolor=red];
|
||||
}
|
||||
35 -> {36};
|
||||
36 -> {37};
|
||||
37 -> {38};
|
||||
38 -> {39};
|
||||
39 -> {40};
|
||||
40 -> {41};
|
||||
41 -> {42};
|
||||
42 -> {45} [label=onUncaughtException];
|
||||
42 -> {43} [style=dotted];
|
||||
43 -> {44} [style=dotted];
|
||||
42 -> {43};
|
||||
43 -> {44};
|
||||
44 -> {47} [label=onUncaughtException];
|
||||
44 -> {45} [style=dotted];
|
||||
|
||||
subgraph cluster_10 {
|
||||
color=red
|
||||
46 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
47 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
48 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
46 -> {47};
|
||||
47 -> {48};
|
||||
45 -> {46} [style=dotted];
|
||||
46 -> {47} [style=dotted];
|
||||
|
||||
subgraph cluster_11 {
|
||||
color=red
|
||||
49 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_12 {
|
||||
color=blue
|
||||
50 [label="Enter block"];
|
||||
51 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
52 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
53 [label="Stub" style="filled" fillcolor=gray];
|
||||
54 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
55 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
56 [label="Exit init block" style="filled" fillcolor=red];
|
||||
48 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
49 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
50 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
48 -> {49};
|
||||
49 -> {50};
|
||||
50 -> {51};
|
||||
|
||||
subgraph cluster_12 {
|
||||
color=red
|
||||
51 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_13 {
|
||||
color=blue
|
||||
52 [label="Enter block"];
|
||||
53 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
54 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
55 [label="Stub" style="filled" fillcolor=gray];
|
||||
56 [label="Const: Int(1)" style="filled" fillcolor=gray];
|
||||
57 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
58 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
51 -> {52};
|
||||
52 -> {56} [label=onUncaughtException];
|
||||
52 -> {53} [style=dotted];
|
||||
53 -> {54} [style=dotted];
|
||||
52 -> {53};
|
||||
53 -> {54};
|
||||
54 -> {58} [label=onUncaughtException];
|
||||
54 -> {55} [style=dotted];
|
||||
55 -> {56} [style=dotted];
|
||||
56 -> {34} [color=green];
|
||||
56 -> {57} [style=dotted];
|
||||
57 -> {58} [style=dotted];
|
||||
58 -> {36} [color=green];
|
||||
|
||||
subgraph cluster_13 {
|
||||
subgraph cluster_14 {
|
||||
color=red
|
||||
57 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_14 {
|
||||
59 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
58 [label="Enter block"];
|
||||
59 [label="Exit local class <getter>"];
|
||||
60 [label="Exit block"];
|
||||
60 [label="Enter block"];
|
||||
61 [label="Exit local class <getter>"];
|
||||
62 [label="Exit block"];
|
||||
}
|
||||
61 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
63 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
subgraph cluster_15 {
|
||||
color=blue
|
||||
62 [label="Enter class GetterLocalClass" style="filled" fillcolor=red];
|
||||
63 [label="Part of class initialization"];
|
||||
64 [label="Exit class GetterLocalClass" style="filled" fillcolor=red];
|
||||
}
|
||||
57 -> {58};
|
||||
58 -> {59};
|
||||
58 -> {65 68} [color=red];
|
||||
59 -> {60};
|
||||
59 -> {65 62} [color=green];
|
||||
59 -> {65 62} [style=dashed];
|
||||
60 -> {61};
|
||||
62 -> {63} [color=green];
|
||||
63 -> {64} [style=dotted];
|
||||
63 -> {68} [color=green];
|
||||
63 -> {68} [style=dashed];
|
||||
|
||||
subgraph cluster_16 {
|
||||
color=red
|
||||
65 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
66 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
67 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
color=blue
|
||||
64 [label="Enter class GetterLocalClass" style="filled" fillcolor=red];
|
||||
65 [label="Part of class initialization"];
|
||||
66 [label="Exit class GetterLocalClass" style="filled" fillcolor=red];
|
||||
}
|
||||
65 -> {66};
|
||||
66 -> {67};
|
||||
59 -> {60};
|
||||
60 -> {61};
|
||||
60 -> {67 70} [color=red];
|
||||
61 -> {62};
|
||||
61 -> {67 64} [color=green];
|
||||
61 -> {67 64} [style=dashed];
|
||||
62 -> {63};
|
||||
64 -> {65} [color=green];
|
||||
65 -> {66} [style=dotted];
|
||||
65 -> {70} [color=green];
|
||||
65 -> {70} [style=dashed];
|
||||
|
||||
subgraph cluster_17 {
|
||||
color=red
|
||||
68 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_18 {
|
||||
color=blue
|
||||
69 [label="Enter block"];
|
||||
70 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
71 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
72 [label="Stub" style="filled" fillcolor=gray];
|
||||
73 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
74 [label="Exit init block" style="filled" fillcolor=red];
|
||||
67 [label="Enter function <init>" style="filled" fillcolor=red];
|
||||
68 [label="Delegated constructor call: super<R|kotlin/Any|>()"];
|
||||
69 [label="Exit function <init>" style="filled" fillcolor=red];
|
||||
}
|
||||
67 -> {68};
|
||||
68 -> {69};
|
||||
69 -> {70};
|
||||
70 -> {71};
|
||||
71 -> {74} [label=onUncaughtException];
|
||||
71 -> {72} [style=dotted];
|
||||
72 -> {73} [style=dotted];
|
||||
73 -> {74} [style=dotted];
|
||||
74 -> {64} [color=green];
|
||||
|
||||
subgraph cluster_19 {
|
||||
subgraph cluster_18 {
|
||||
color=red
|
||||
75 [label="Enter property" style="filled" fillcolor=red];
|
||||
76 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_20 {
|
||||
70 [label="Enter init block" style="filled" fillcolor=red];
|
||||
subgraph cluster_19 {
|
||||
color=blue
|
||||
24 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
25 [label="Enter block"];
|
||||
26 [label="Exit local class <anonymous>"];
|
||||
27 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
28 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
29 [label="Stub" style="filled" fillcolor=gray];
|
||||
30 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
71 [label="Enter block"];
|
||||
72 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
73 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
74 [label="Stub" style="filled" fillcolor=gray];
|
||||
75 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
76 [label="Exit init block" style="filled" fillcolor=red];
|
||||
}
|
||||
70 -> {71};
|
||||
71 -> {72};
|
||||
72 -> {73};
|
||||
73 -> {76} [label=onUncaughtException];
|
||||
73 -> {74} [style=dotted];
|
||||
74 -> {75} [style=dotted];
|
||||
75 -> {76} [style=dotted];
|
||||
76 -> {66} [color=green];
|
||||
|
||||
subgraph cluster_20 {
|
||||
color=red
|
||||
77 [label="Enter property" style="filled" fillcolor=red];
|
||||
78 [label="Postponed enter to lambda"];
|
||||
subgraph cluster_21 {
|
||||
color=blue
|
||||
26 [label="Enter function anonymousFunction" style="filled" fillcolor=red];
|
||||
subgraph cluster_22 {
|
||||
color=blue
|
||||
32 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
33 [label="Part of class initialization"];
|
||||
34 [label="Exit class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
27 [label="Enter block"];
|
||||
28 [label="Exit local class <anonymous>"];
|
||||
29 [label="Function call: R|java/lang/Exception.Exception|()"];
|
||||
30 [label="Throw: throw R|java/lang/Exception.Exception|()"];
|
||||
31 [label="Stub" style="filled" fillcolor=gray];
|
||||
32 [label="Exit block" style="filled" fillcolor=gray];
|
||||
}
|
||||
31 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
77 [label="Postponed exit from lambda"];
|
||||
78 [label="Function call: R|/run|(...)"];
|
||||
79 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
75 -> {76};
|
||||
76 -> {24};
|
||||
76 -> {77} [color=red];
|
||||
76 -> {24} [style=dashed];
|
||||
77 -> {78};
|
||||
78 -> {79};
|
||||
24 -> {31 25};
|
||||
25 -> {26};
|
||||
25 -> {35 46 49} [color=red];
|
||||
26 -> {27};
|
||||
26 -> {46 32} [color=green];
|
||||
26 -> {46 32} [style=dashed];
|
||||
27 -> {28};
|
||||
28 -> {79} [label=onUncaughtException];
|
||||
28 -> {29} [style=dotted];
|
||||
29 -> {30} [style=dotted];
|
||||
30 -> {31} [style=dotted];
|
||||
31 -> {77} [color=green];
|
||||
31 -> {24} [color=green style=dashed];
|
||||
32 -> {33} [color=green];
|
||||
33 -> {34} [style=dotted];
|
||||
33 -> {49} [color=green];
|
||||
33 -> {49} [style=dashed];
|
||||
|
||||
subgraph cluster_23 {
|
||||
color=red
|
||||
80 [label="Enter property" style="filled" fillcolor=red];
|
||||
subgraph cluster_24 {
|
||||
color=blue
|
||||
81 [label="Try expression enter"];
|
||||
subgraph cluster_25 {
|
||||
subgraph cluster_23 {
|
||||
color=blue
|
||||
82 [label="Try main block enter"];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
83 [label="Enter block"];
|
||||
84 [label="Const: Int(1)"];
|
||||
85 [label="Exit block"];
|
||||
}
|
||||
86 [label="Try main block exit"];
|
||||
34 [label="Enter class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
35 [label="Part of class initialization"];
|
||||
36 [label="Exit class InitializerLocalClass" style="filled" fillcolor=red];
|
||||
}
|
||||
33 [label="Exit function anonymousFunction" style="filled" fillcolor=red];
|
||||
}
|
||||
79 [label="Postponed exit from lambda"];
|
||||
80 [label="Function call: R|/run|(...)"];
|
||||
81 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
77 -> {78};
|
||||
78 -> {26};
|
||||
78 -> {79} [color=red];
|
||||
78 -> {26} [style=dashed];
|
||||
79 -> {80};
|
||||
80 -> {81};
|
||||
26 -> {33 27};
|
||||
27 -> {28};
|
||||
27 -> {37 48 51} [color=red];
|
||||
28 -> {29};
|
||||
28 -> {48 34} [color=green];
|
||||
28 -> {48 34} [style=dashed];
|
||||
29 -> {30};
|
||||
30 -> {81} [label=onUncaughtException];
|
||||
30 -> {31} [style=dotted];
|
||||
31 -> {32} [style=dotted];
|
||||
32 -> {33} [style=dotted];
|
||||
33 -> {79} [color=green];
|
||||
33 -> {26} [color=green style=dashed];
|
||||
34 -> {35} [color=green];
|
||||
35 -> {36} [style=dotted];
|
||||
35 -> {51} [color=green];
|
||||
35 -> {51} [style=dashed];
|
||||
|
||||
subgraph cluster_24 {
|
||||
color=red
|
||||
82 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
83 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
82 -> {83};
|
||||
|
||||
subgraph cluster_25 {
|
||||
color=red
|
||||
84 [label="Enter property" style="filled" fillcolor=red];
|
||||
subgraph cluster_26 {
|
||||
color=blue
|
||||
85 [label="Try expression enter"];
|
||||
subgraph cluster_27 {
|
||||
color=blue
|
||||
87 [label="Catch enter"];
|
||||
86 [label="Try main block enter"];
|
||||
subgraph cluster_28 {
|
||||
color=blue
|
||||
88 [label="Enter block"];
|
||||
89 [label="Const: Int(2)"];
|
||||
90 [label="Exit block"];
|
||||
87 [label="Enter block"];
|
||||
88 [label="Const: Int(1)"];
|
||||
89 [label="Exit block"];
|
||||
}
|
||||
91 [label="Catch exit"];
|
||||
90 [label="Try main block exit"];
|
||||
}
|
||||
subgraph cluster_29 {
|
||||
color=blue
|
||||
92 [label="Enter finally"];
|
||||
91 [label="Catch enter"];
|
||||
subgraph cluster_30 {
|
||||
color=blue
|
||||
93 [label="Enter block"];
|
||||
94 [label="Const: Int(0)"];
|
||||
95 [label="Exit block"];
|
||||
92 [label="Enter block"];
|
||||
93 [label="Const: Int(2)"];
|
||||
94 [label="Exit block"];
|
||||
}
|
||||
96 [label="Exit finally"];
|
||||
95 [label="Catch exit"];
|
||||
}
|
||||
97 [label="Try expression exit"];
|
||||
subgraph cluster_31 {
|
||||
color=blue
|
||||
96 [label="Enter finally"];
|
||||
subgraph cluster_32 {
|
||||
color=blue
|
||||
97 [label="Enter block"];
|
||||
98 [label="Const: Int(0)"];
|
||||
99 [label="Exit block"];
|
||||
}
|
||||
100 [label="Exit finally"];
|
||||
}
|
||||
101 [label="Try expression exit"];
|
||||
}
|
||||
98 [label="Exit property" style="filled" fillcolor=red];
|
||||
102 [label="Exit property" style="filled" fillcolor=red];
|
||||
}
|
||||
80 -> {81};
|
||||
81 -> {82 87};
|
||||
81 -> {92} [label=onUncaughtException];
|
||||
82 -> {83};
|
||||
83 -> {84};
|
||||
84 -> {85};
|
||||
85 -> {86};
|
||||
86 -> {92 87};
|
||||
85 -> {86 91};
|
||||
85 -> {96} [label=onUncaughtException];
|
||||
86 -> {87};
|
||||
87 -> {88};
|
||||
87 -> {92} [label=onUncaughtException];
|
||||
88 -> {89};
|
||||
89 -> {90};
|
||||
90 -> {91};
|
||||
90 -> {96 91};
|
||||
91 -> {92};
|
||||
91 -> {96} [label=onUncaughtException];
|
||||
92 -> {93};
|
||||
93 -> {94};
|
||||
94 -> {95};
|
||||
95 -> {96};
|
||||
96 -> {97};
|
||||
96 -> {98} [label=onUncaughtException];
|
||||
97 -> {98};
|
||||
98 -> {99};
|
||||
99 -> {100};
|
||||
100 -> {101};
|
||||
100 -> {102} [label=onUncaughtException];
|
||||
101 -> {102};
|
||||
|
||||
}
|
||||
|
||||
@@ -33,58 +33,72 @@ digraph safeCalls_kt {
|
||||
|
||||
subgraph cluster_4 {
|
||||
color=red
|
||||
8 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
subgraph cluster_5 {
|
||||
color=blue
|
||||
9 [label="Enter block"];
|
||||
10 [label="Access variable R|<local>/x|"];
|
||||
11 [label="Enter safe call"];
|
||||
12 [label="Function call: $subj$.R|/A.foo|()"];
|
||||
13 [label="Exit safe call"];
|
||||
14 [label="Enter safe call"];
|
||||
15 [label="Function call: $subj$.R|/A.bar|()"];
|
||||
16 [label="Exit safe call"];
|
||||
17 [label="Exit block"];
|
||||
}
|
||||
18 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
8 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
9 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
8 -> {9};
|
||||
9 -> {10};
|
||||
10 -> {11 13};
|
||||
11 -> {12};
|
||||
12 -> {13};
|
||||
13 -> {14 16};
|
||||
14 -> {15};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18};
|
||||
|
||||
subgraph cluster_5 {
|
||||
color=red
|
||||
10 [label="Enter function getter" style="filled" fillcolor=red];
|
||||
11 [label="Exit function getter" style="filled" fillcolor=red];
|
||||
}
|
||||
10 -> {11};
|
||||
|
||||
subgraph cluster_6 {
|
||||
color=red
|
||||
19 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
12 [label="Enter function test_1" style="filled" fillcolor=red];
|
||||
subgraph cluster_7 {
|
||||
color=blue
|
||||
20 [label="Enter block"];
|
||||
21 [label="Access variable R|<local>/x|"];
|
||||
22 [label="Enter safe call"];
|
||||
23 [label="Access variable R|/B.foo|"];
|
||||
24 [label="Exit safe call"];
|
||||
25 [label="Enter safe call"];
|
||||
26 [label="Access variable R|/B.bar|"];
|
||||
27 [label="Exit safe call"];
|
||||
28 [label="Exit block"];
|
||||
13 [label="Enter block"];
|
||||
14 [label="Access variable R|<local>/x|"];
|
||||
15 [label="Enter safe call"];
|
||||
16 [label="Function call: $subj$.R|/A.foo|()"];
|
||||
17 [label="Exit safe call"];
|
||||
18 [label="Enter safe call"];
|
||||
19 [label="Function call: $subj$.R|/A.bar|()"];
|
||||
20 [label="Exit safe call"];
|
||||
21 [label="Exit block"];
|
||||
}
|
||||
29 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
22 [label="Exit function test_1" style="filled" fillcolor=red];
|
||||
}
|
||||
12 -> {13};
|
||||
13 -> {14};
|
||||
14 -> {15 17};
|
||||
15 -> {16};
|
||||
16 -> {17};
|
||||
17 -> {18 20};
|
||||
18 -> {19};
|
||||
19 -> {20};
|
||||
20 -> {21};
|
||||
21 -> {22 24};
|
||||
22 -> {23};
|
||||
21 -> {22};
|
||||
|
||||
subgraph cluster_8 {
|
||||
color=red
|
||||
23 [label="Enter function test_2" style="filled" fillcolor=red];
|
||||
subgraph cluster_9 {
|
||||
color=blue
|
||||
24 [label="Enter block"];
|
||||
25 [label="Access variable R|<local>/x|"];
|
||||
26 [label="Enter safe call"];
|
||||
27 [label="Access variable R|/B.foo|"];
|
||||
28 [label="Exit safe call"];
|
||||
29 [label="Enter safe call"];
|
||||
30 [label="Access variable R|/B.bar|"];
|
||||
31 [label="Exit safe call"];
|
||||
32 [label="Exit block"];
|
||||
}
|
||||
33 [label="Exit function test_2" style="filled" fillcolor=red];
|
||||
}
|
||||
23 -> {24};
|
||||
24 -> {25 27};
|
||||
25 -> {26};
|
||||
24 -> {25};
|
||||
25 -> {26 28};
|
||||
26 -> {27};
|
||||
27 -> {28};
|
||||
28 -> {29};
|
||||
28 -> {29 31};
|
||||
29 -> {30};
|
||||
30 -> {31};
|
||||
31 -> {32};
|
||||
32 -> {33};
|
||||
|
||||
}
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
FILE: const.kt
|
||||
public final const val a: R|kotlin/String| = String(something)
|
||||
public get(): R|kotlin/String|
|
||||
public final const val b: <ERROR TYPE REF: Cannot infer variable type without initializer / getter / delegate>
|
||||
public get(): <ERROR TYPE REF: Cannot infer variable type without initializer / getter / delegate>
|
||||
public final const val c: R|kotlin/Nothing?| = Null(null)
|
||||
public get(): R|kotlin/Nothing?|
|
||||
public final const val d: R|ForConst.Companion| = Q|ForConst|
|
||||
public get(): R|ForConst.Companion|
|
||||
public final const val e: R|kotlin/String| = Q|ForConst|.R|/ForConst.Companion.one|()
|
||||
public get(): R|kotlin/String|
|
||||
public final const val f: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(2)).R|kotlin/Int.times|(Int(3)).R|kotlin/Int.div|(Int(4)).R|kotlin/Int.rem|(Int(5)).R|kotlin/Int.minus|(Int(1))
|
||||
public get(): R|kotlin/Int|
|
||||
public final const val g: R|kotlin/String| = <strcat>(String(string ), R|/f|)
|
||||
public get(): R|kotlin/String|
|
||||
public final const val h: R|kotlin/String| = String(string).R|kotlin/String.plus|(R|/g|)
|
||||
public get(): R|kotlin/String|
|
||||
public final const val i: R|kotlin/String| = Q|ForConst|.R|/ForConst.Companion.one|().R|kotlin/String.plus|(String(one))
|
||||
public get(): R|kotlin/String|
|
||||
public final const val j: R|kotlin/Int| = Int(4).R|kotlin/Int.times|(Q|ForConst|.R|/ForConst.Companion.two|())
|
||||
public get(): R|kotlin/Int|
|
||||
public final val k: R|kotlin/Int| = Int(3).R|kotlin/Int.minus|(Q|ForConst|.R|/ForConst.Companion.two|())
|
||||
public get(): R|kotlin/Int|
|
||||
public final const val l: R|kotlin/Int| = R|/k|
|
||||
public get(): R|kotlin/Int|
|
||||
public final class ForConst : R|kotlin/Any| {
|
||||
public constructor(): R|ForConst| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|ForConst.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun one(): R|kotlin/String| {
|
||||
^one String(1)
|
||||
}
|
||||
|
||||
public final fun two(): R|kotlin/Int| {
|
||||
^two Int(2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private final const val MAJOR_BITS: R|kotlin/Int| = Int(3)
|
||||
private get(): R|kotlin/Int|
|
||||
private final const val MINOR_BITS: R|kotlin/Int| = Int(4)
|
||||
private get(): R|kotlin/Int|
|
||||
private final const val PATCH_BITS: R|kotlin/Int| = Int(7)
|
||||
private get(): R|kotlin/Int|
|
||||
private final const val MAJOR_MASK: R|kotlin/Int| = Int(1).R|kotlin/Int.shl|(R|/MAJOR_BITS|).R|kotlin/Int.minus|(Int(1))
|
||||
private get(): R|kotlin/Int|
|
||||
private final const val MINOR_MASK: R|kotlin/Int| = Int(1).R|kotlin/Int.shl|(R|/MINOR_BITS|).R|kotlin/Int.minus|(Int(1))
|
||||
private get(): R|kotlin/Int|
|
||||
private final const val PATCH_MASK: R|kotlin/Int| = Int(1).R|kotlin/Int.shl|(R|/PATCH_BITS|).R|kotlin/Int.minus|(Int(1))
|
||||
private get(): R|kotlin/Int|
|
||||
private final const val stringFromJava: R|kotlin/String| = Q|Constants|.R|/Constants.FIRST|.R|kotlin/String.plus|(String(+)).R|kotlin/String.plus|(Q|Constants|.R|/Constants.SECOND|)
|
||||
private get(): R|kotlin/String|
|
||||
@@ -1,36 +0,0 @@
|
||||
// FILE: Constants.java
|
||||
|
||||
public class Constants {
|
||||
public static final String FIRST = "1st";
|
||||
public static final String SECOND = "2nd";
|
||||
}
|
||||
|
||||
// FILE: const.kt
|
||||
const val a = "something"
|
||||
<!MUST_BE_INITIALIZED!><!CONST_VAL_WITHOUT_INITIALIZER!>const<!> val b<!>
|
||||
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val c = null
|
||||
<!TYPE_CANT_BE_USED_FOR_CONST_VAL!>const<!> val d = ForConst
|
||||
const val e = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>ForConst.one()<!>
|
||||
const val f = ((1 + 2) * 3) / 4 % 5 - 1
|
||||
const val g = "string $f"
|
||||
const val h = "string" + g
|
||||
const val i = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>ForConst.one() + "one"<!>
|
||||
const val j = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>4 * ForConst.two()<!>
|
||||
val k = 3 - ForConst.two()
|
||||
const val l = <!CONST_VAL_WITH_NON_CONST_INITIALIZER!>k<!>
|
||||
|
||||
class ForConst{
|
||||
companion object {
|
||||
fun one(): String = "1"
|
||||
fun two(): Int = 2
|
||||
}
|
||||
}
|
||||
|
||||
private const val MAJOR_BITS = 3
|
||||
private const val MINOR_BITS = 4
|
||||
private const val PATCH_BITS = 7
|
||||
private const val MAJOR_MASK = (1 shl MAJOR_BITS) - 1 // False positive error
|
||||
private const val MINOR_MASK = (1 shl MINOR_BITS) - 1 // False positive error
|
||||
private const val PATCH_MASK = (1 shl PATCH_BITS) - 1 // False positive error
|
||||
|
||||
private const val stringFromJava = Constants.FIRST + "+" + Constants.SECOND
|
||||
@@ -1,35 +0,0 @@
|
||||
FILE: genericContract.kt
|
||||
public final inline fun <reified T> requreIsInstance(value: R|kotlin/Any|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
{
|
||||
when () {
|
||||
(R|<local>/value| !is R|T|) -> {
|
||||
throw R|java/lang/IllegalArgumentException.IllegalArgumentException|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_1(s: R|kotlin/Any|): R|kotlin/Unit| {
|
||||
R|/requreIsInstance|<R|kotlin/String|>(R|<local>/s|)
|
||||
R|<local>/s|.R|kotlin/String.length|
|
||||
}
|
||||
public final inline fun <reified T> requreIsInstanceOf(value: R|kotlin/Any|, requiredValue: R|T|): R|kotlin/Unit|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(WILDCARD) -> value is T
|
||||
>
|
||||
{
|
||||
when () {
|
||||
(R|<local>/value| !is R|T|) -> {
|
||||
throw R|java/lang/IllegalArgumentException.IllegalArgumentException|()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public final fun test_2(x: R|kotlin/Any|, s: R|kotlin/String|): R|kotlin/Unit| {
|
||||
R|/requreIsInstanceOf|<R|kotlin/String|>(R|<local>/x|, R|<local>/s|)
|
||||
R|<local>/x|.R|kotlin/String.length|
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
inline fun <reified T> requreIsInstance(value: Any) contract [
|
||||
returns() implies (value is T)
|
||||
] {
|
||||
if (value !is T) throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun test_1(s: Any) {
|
||||
requreIsInstance<String>(s)
|
||||
s.length
|
||||
}
|
||||
|
||||
inline fun <reified T> requreIsInstanceOf(value: Any, requiredValue: T) contract [
|
||||
returns() implies (value is T)
|
||||
] {
|
||||
if (value !is T) throw IllegalArgumentException()
|
||||
}
|
||||
|
||||
fun test_2(x: Any, s: String) {
|
||||
requreIsInstanceOf(x, s)
|
||||
x.length
|
||||
}
|
||||
@@ -11,7 +11,7 @@ interface KtLightMethod : PsiElement
|
||||
// With covariant array here we do not visit lambda (it.usage is KtLightMethod) below
|
||||
// Problem disappears if 'out' is removed
|
||||
fun <T> Array<out T>.filterNot(f: (T) -> Boolean): List<T> {
|
||||
return <!RETURN_TYPE_MISMATCH!>this<!>
|
||||
return this
|
||||
}
|
||||
|
||||
fun <T> Array<T>.toList(): List<T>? = null
|
||||
|
||||
@@ -16,7 +16,7 @@ class B3_3 : A3("", true)
|
||||
class B3_4 : <!NONE_APPLICABLE!>A3<!>("", Unit)
|
||||
|
||||
open class A4(val x: Byte)
|
||||
class B4 : A4( <!ARGUMENT_TYPE_MISMATCH!>1 + 1<!>)
|
||||
class B4 : <!INAPPLICABLE_CANDIDATE!>A4<!>( 1 + 1)
|
||||
|
||||
open class A5 {
|
||||
constructor(x: Byte)
|
||||
|
||||
@@ -50,5 +50,5 @@ FILE: annotationArgumentMustBeConst.kt
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
@R|Ann1|(vararg(R|/foo|, R|/foo|.R|kotlin/String.plus|(R|/bar|), <strcat>(R|/foo|, String( ), R|/bar|), <strcat>(R|/baz|(), String( )))) @R|Ann2|(<implicitArrayOf>(R|/bar|, R|/baz|(), R|/bar|.R|kotlin/Int.plus|(R|/cnst|))) @R|Ann3|(R|/arr|) public final fun test(): R|kotlin/Unit| {
|
||||
@R|Ann1|(vararg(R|/foo|, R|/foo|.R|kotlin/String.plus|(R|/bar|), <strcat>(R|/foo|.R|kotlin/Any.toString|(), String( ), R|/bar|.R|kotlin/Any.toString|()), <strcat>(R|/baz|().R|kotlin/Any.toString|(), String( )))) @R|Ann2|(<implicitArrayOf>(R|/bar|, R|/baz|(), R|/bar|.R|kotlin/Int.plus|(R|/cnst|))) @R|Ann3|(R|/arr|) public final fun test(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class E<T> {
|
||||
// selection of the proper constructor
|
||||
// but a type mismatch for the first
|
||||
// argument
|
||||
constructor(e: T, i: Int) : this(<!ARGUMENT_TYPE_MISMATCH!>i<!>, 10) {}
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10) {}
|
||||
}
|
||||
|
||||
class I<T> {
|
||||
@@ -33,7 +33,7 @@ class I<T> {
|
||||
// selection of the proper constructor
|
||||
// but a type mismatch for the first
|
||||
// argument
|
||||
constructor(e: T, i: Int) : this(<!ARGUMENT_TYPE_MISMATCH!>i<!>, 10)
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10)
|
||||
}
|
||||
|
||||
class J<T> {
|
||||
|
||||
@@ -7,9 +7,9 @@ class A {
|
||||
class B(other: B = <!NO_THIS!>this<!>)
|
||||
|
||||
class C() {
|
||||
constructor(x: Int) : this({
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>({
|
||||
val a = 10
|
||||
<!ARGUMENT_TYPE_MISMATCH, INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
|
||||
<!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
|
||||
}) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ fun foo() {
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Ann<!>
|
||||
|
||||
@Ann class Local {
|
||||
// There should also be NESTED_CLASS_NOT_ALLOWED report here.
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation <!NESTED_CLASS_NOT_ALLOWED!>class Nested<!><!>
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR{LT}!>// There should also be NESTED_CLASS_NOT_ALLOWED report here.
|
||||
<!LOCAL_ANNOTATION_CLASS_ERROR{PSI}!>annotation <!NESTED_CLASS_NOT_ALLOWED!>class Nested<!><!><!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@ interface B {
|
||||
}
|
||||
|
||||
interface G<X> {
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>X<!>> boo: Double where X : A, X : B
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>A<!>> bal: Double where A : B
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>Y<!>> bas: Double where Y : B, <!NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER!>X<!> : B
|
||||
val <X> boo: Double where X : A, X : B
|
||||
val <A> bal: Double where A : B
|
||||
val <Y> bas: Double where Y : B, <!NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER!>X<!> : B
|
||||
}
|
||||
|
||||
class C() : A(), B
|
||||
@@ -62,8 +62,8 @@ fun <T> test2(t : T)
|
||||
t.bar()
|
||||
}
|
||||
|
||||
val t1 = test2<A>(<!ARGUMENT_TYPE_MISMATCH!>A()<!>)
|
||||
val t2 = test2<B>(<!ARGUMENT_TYPE_MISMATCH!>C()<!>)
|
||||
val t1 = <!INAPPLICABLE_CANDIDATE!>test2<!><A>(A())
|
||||
val t2 = <!INAPPLICABLE_CANDIDATE!>test2<!><B>(C())
|
||||
val t3 = test2<C>(C())
|
||||
|
||||
val <<!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>T<!>, <!TYPE_PARAMETER_OF_PROPERTY_NOT_USED_IN_RECEIVER!>B : T<!>> x : Int = 0
|
||||
val <T, B : T> x : Int = 0
|
||||
|
||||
@@ -26,7 +26,7 @@ class G<E : <!FINAL_UPPER_BOUND!>Double<!>>(val balue: E) : F<E>(balue) {
|
||||
override var rest: E = balue
|
||||
}
|
||||
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : F<E>(<!ARGUMENT_TYPE_MISMATCH!>balue<!>) {
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : <!INAPPLICABLE_CANDIDATE!>F<E><!>(balue) {
|
||||
override var rest: E = balue // no report because of INAPPLICABLE_CANDIDATE
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class G<E : <!FINAL_UPPER_BOUND!>Double<!>>(val balue: E) : F<E>(balue) {
|
||||
override fun rest(): E = balue
|
||||
}
|
||||
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : F<E>(<!ARGUMENT_TYPE_MISMATCH!>balue<!>) {
|
||||
class H<E : <!FINAL_UPPER_BOUND!>String<!>>(val balue: E) : <!INAPPLICABLE_CANDIDATE!>F<E><!>(balue) {
|
||||
override fun rest(): E = balue // no report because of INAPPLICABLE_CANDIDATE
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ open class J() : S() {
|
||||
}
|
||||
|
||||
open class Base<T : X, Z : T> {
|
||||
open fun kek(): Z = <!RETURN_TYPE_MISMATCH!>Z()<!>
|
||||
open fun kek(): Z = Z()
|
||||
}
|
||||
|
||||
open class GoodDerrived : Base<Y, W>() {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
sealed class A
|
||||
|
||||
val b = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
val b = <!HIDDEN!>A<!>()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FILE: KotlinImporterComponent.kt
|
||||
@R|simulation/State|(name = String(AutoImportedSourceRoots)) public final class KotlinImporterComponent : R|kotlin/Any| {
|
||||
@R|State|(name = String(AutoImportedSourceRoots)) public final class KotlinImporterComponent : R|kotlin/Any| {
|
||||
public constructor(): R|simulation/KotlinImporterComponent| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// FILE: simulation/State.java
|
||||
// FILE: State.java
|
||||
|
||||
package simulation;
|
||||
package simulation
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface State {
|
||||
|
||||
@@ -21,7 +21,7 @@ val a = <!TYPE_ARGUMENTS_NOT_ALLOWED!>rest<Int><!>.<!UNRESOLVED_REFERENCE!>MyCla
|
||||
val b = Best.<!UNRESOLVED_REFERENCE!>MyClass<!><String>
|
||||
|
||||
class B<E>
|
||||
class C<F<!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!> <!SYNTAX!>:<!> <!SYNTAX!>B<!><!SYNTAX!><<!><!SYNTAX!>F<!><!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!><!SYNTAX!>(<!><!SYNTAX!>)<!>
|
||||
class C<F<!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!> <!SYNTAX{PSI}!>:<!> <!SYNTAX{PSI}!>B<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>F<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>(<!><!SYNTAX{PSI}!>)<!>
|
||||
|
||||
fun <G> gest() {}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ FILE: upperBoundViolated.kt
|
||||
lval b1: R|B<kotlin/Int>| = R|/B.B|<R|kotlin/Int|>()
|
||||
lval b2: R|B<C>| = R|/B.B|<R|C|>()
|
||||
lval b3: R|B<kotlin/Any?>| = R|/B.B|<R|kotlin/Any?|>()
|
||||
lval b4: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/B.B|<<ERROR TYPE REF: Symbol not found for UnexistingType>>().<Unresolved name: NL>#(ERROR_EXPR(No right operand)).<Unresolved name: Int>#(<Call has no callee>#()).<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
lval b4: R|B<A>| = R|/B.B|<<ERROR TYPE REF: Symbol not found for UnexistingType>>()
|
||||
lval b5: R|B<B<ERROR CLASS: Symbol not found for UnexistingType>>| = R|/B.B|<R|B<ERROR CLASS: Symbol not found for UnexistingType>|>()
|
||||
R|/fest|<R|kotlin/Boolean|>()
|
||||
R|/fest|<R|C|>()
|
||||
@@ -58,8 +58,8 @@ FILE: upperBoundViolated.kt
|
||||
|
||||
}
|
||||
public final typealias NL<K> = R|NumColl<kotlin/collections/List<K>>|
|
||||
public final val test7: R|ERROR CLASS: Unresolved name: NumberPhile| = R|/NumColl.NumColl|<R|kotlin/Int|>().<Unresolved name: NumberPhile>#(ERROR_EXPR(No right operand))
|
||||
public get(): R|ERROR CLASS: Unresolved name: NumberPhile|
|
||||
public final val test7: R|NumColl<kotlin/collections/List<kotlin/Int>>| = R|/NumColl.NumColl|<R|kotlin/Int|>()
|
||||
public get(): R|NumColl<kotlin/collections/List<kotlin/Int>>|
|
||||
public final val test8: R|NumColl<kotlin/collections/List<kotlin/String>>| = R|/NumColl.NumColl|<R|kotlin/String|>()
|
||||
public get(): R|NumColl<kotlin/collections/List<kotlin/String>>|
|
||||
public final class NumberPhile<T : R|kotlin/Number|> : R|kotlin/Any| {
|
||||
@@ -70,5 +70,5 @@ FILE: upperBoundViolated.kt
|
||||
}
|
||||
public final val np1: R|NumberPhile<kotlin/Int>| = R|/NumberPhile.NumberPhile|<R|kotlin/Int|>(Int(10))
|
||||
public get(): R|NumberPhile<kotlin/Int>|
|
||||
public final val np2: R|NumberPhile<kotlin/Number>| = <Inapplicable(INAPPLICABLE): /NumberPhile.NumberPhile>#<R|kotlin/Number|>(String(Test))
|
||||
public get(): R|NumberPhile<kotlin/Number>|
|
||||
public final val np2: R|NumberPhile<kotlin/String>| = <Inapplicable(INAPPLICABLE): /NumberPhile.NumberPhile>#<R|kotlin/String|>(String(Test))
|
||||
public get(): R|NumberPhile<kotlin/String>|
|
||||
|
||||
@@ -14,7 +14,7 @@ fun test() {
|
||||
val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
|
||||
val b2 = B<C>()
|
||||
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()<!UNRESOLVED_REFERENCE!>NL<!><!SYNTAX!><<!>Int<!SYNTAX!>><!>()NumberPhile<!SYNTAX!><!>
|
||||
val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()
|
||||
val b5 = B<<!UPPER_BOUND_VIOLATED!>B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>><!>>()
|
||||
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
|
||||
fest<C>()
|
||||
@@ -40,9 +40,9 @@ fun <K, L : K> rest() {
|
||||
|
||||
class NumColl<T : Collection<Number>>
|
||||
typealias NL<K> = NumColl<List<K>>
|
||||
val test7 = NL<Int>()<!UNRESOLVED_REFERENCE!>NumberPhile<!><!SYNTAX!><!>
|
||||
val test7 = NL<Int>()
|
||||
val test8 = NL<String>()
|
||||
|
||||
class NumberPhile<T: Number>(x: T)
|
||||
val np1 = NumberPhile(10)
|
||||
val np2 = NumberPhile(<!ARGUMENT_TYPE_MISMATCH!>"Test"<!>)
|
||||
val np2 = <!INAPPLICABLE_CANDIDATE!>NumberPhile<!>("Test")
|
||||
|
||||
@@ -18,5 +18,5 @@ fun test() {
|
||||
useEnum(TestEnum.THIRD)
|
||||
|
||||
useVararg(TestEnum.FIRST, TestEnum.SECOND)
|
||||
useVararg(<!ARGUMENT_TYPE_MISMATCH!>1<!>, <!ARGUMENT_TYPE_MISMATCH!>2<!>, <!ARGUMENT_TYPE_MISMATCH!>3<!>, <!ARGUMENT_TYPE_MISMATCH!>4<!>, <!ARGUMENT_TYPE_MISMATCH!>5<!>)
|
||||
<!INAPPLICABLE_CANDIDATE!>useVararg<!>(1, 2, 3, 4, 5)
|
||||
}
|
||||
|
||||
@@ -20,13 +20,10 @@ FILE: enumValues.kt
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval values: R|kotlin/Array<MyEnum>| = Q|MyEnum|.R|/MyEnum.values|()
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
||||
R|<local>/value|.R|/MyEnum.bar|()
|
||||
}
|
||||
|
||||
lval <iterator>: R|kotlin/collections/Iterator<MyEnum>| = R|<local>/values|.R|SubstitutionOverride<kotlin/Array.iterator: R|kotlin/collections/Iterator<MyEnum>|>|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval value: R|MyEnum| = R|<local>/<iterator>|.R|SubstitutionOverride<kotlin/collections/Iterator.next: R|MyEnum|>|()
|
||||
R|<local>/value|.R|/MyEnum.bar|()
|
||||
}
|
||||
|
||||
lval first: R|MyEnum| = Q|MyEnum|.R|/MyEnum.valueOf|(String(FIRST))
|
||||
|
||||
@@ -18,10 +18,10 @@ FILE: errCallable.kt
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval x: R|ERROR CLASS: Unresolved reference: Nested| = ::<Unresolved reference: Nested>#
|
||||
lval x: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved name: Nested>#
|
||||
}
|
||||
|
||||
}
|
||||
public final fun R|Your|.foo(): R|kotlin/Unit| {
|
||||
lval x: R|ERROR CLASS: Unresolved reference: Nested| = ::<Unresolved reference: Nested>#
|
||||
lval x: <ERROR TYPE REF: No result type for initializer> = ::<Unresolved name: Nested>#
|
||||
}
|
||||
|
||||
@@ -18,5 +18,5 @@ FILE: typeParameters.kt
|
||||
}
|
||||
public final fun main(fooImpl: R|FooImpl|, bar: R|Bar|): R|kotlin/Unit| {
|
||||
lval a: R|FooImpl| = R|/foo|<R|FooImpl|>(R|<local>/fooImpl|)
|
||||
lval b: R|Foo| = <Inapplicable(INAPPLICABLE): /foo>#<R|Foo|>(R|<local>/bar|)
|
||||
lval b: R|Bar| = <Inapplicable(INAPPLICABLE): /foo>#<R|Bar|>(R|<local>/bar|)
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@ fun <T : Foo> foo(t: T) = t
|
||||
|
||||
fun main(fooImpl: FooImpl, bar: Bar) {
|
||||
val a = foo(fooImpl)
|
||||
val b = foo(<!ARGUMENT_TYPE_MISMATCH!>bar<!>)
|
||||
val b = <!INAPPLICABLE_CANDIDATE!>foo<!>(bar)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ fun <T : Foo> foo(t: T) = t
|
||||
|
||||
|
||||
fun main(fooImpl: FooImpl, fooBarImpl: FooBarImpl) {
|
||||
val a = foo<FooImpl>(<!ARGUMENT_TYPE_MISMATCH!>fooBarImpl<!>)
|
||||
val a = <!INAPPLICABLE_CANDIDATE!>foo<!><FooImpl>(fooBarImpl)
|
||||
val b = foo<Foo>(fooImpl)
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
class Bar {
|
||||
operator fun invoke(): Foo { return <!RETURN_TYPE_MISMATCH!>this<!> } // (1)
|
||||
operator fun invoke(): Foo { return this } // (1)
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ fun x() {
|
||||
class Foo {
|
||||
|
||||
|
||||
operator fun Bar.invoke(): Foo { return <!RETURN_TYPE_MISMATCH!>this<!> } // (2)
|
||||
operator fun Bar.invoke(): Foo { return this } // (2)
|
||||
|
||||
val x: Bar = Bar()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
class Bar {
|
||||
fun FooBar.invoke(): Bar = <!RETURN_TYPE_MISMATCH!>this<!>
|
||||
fun FooBar.invoke(): Bar = this
|
||||
}
|
||||
|
||||
class Buz
|
||||
|
||||
@@ -17,11 +17,11 @@ FILE: lambda.kt
|
||||
}
|
||||
)
|
||||
R|/itIs|(<L> = itIs@fun <anonymous>(it: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
|
||||
^ <strcat>(String(this is ), R|<local>/it|, String( test))
|
||||
^ <strcat>(String(this is ), R|<local>/it|.R|kotlin/Any.toString|(), String( test))
|
||||
}
|
||||
)
|
||||
R|/multipleArgs|(<L> = multipleArgs@fun <anonymous>(a: R|kotlin/String|, b: R|kotlin/String|): R|kotlin/String| <inline=NoInline> {
|
||||
^ <strcat>(String(This is test of ), R|<local>/a|, String(, ), R|<local>/b|)
|
||||
^ <strcat>(String(This is test of ), R|<local>/a|.R|kotlin/Any.toString|(), String(, ), R|<local>/b|.R|kotlin/Any.toString|())
|
||||
}
|
||||
)
|
||||
lval s: R|kotlin/String| = fun <anonymous>(): R|kotlin/String| <inline=Unknown> {
|
||||
|
||||
@@ -11,8 +11,8 @@ open class Outer {
|
||||
|
||||
class Derived : Outer() {
|
||||
fun foo() {
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
super.<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
super.<!HIDDEN!>PrivateInner<!>()
|
||||
|
||||
Outer.ProtectedNested()
|
||||
super.ProtectedInner()
|
||||
@@ -23,11 +23,11 @@ class Derived : Outer() {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
Outer.<!INVISIBLE_REFERENCE!>PrivateNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>PrivateInner<!>()
|
||||
Outer.<!HIDDEN!>PrivateNested<!>()
|
||||
Outer().<!HIDDEN!>PrivateInner<!>()
|
||||
|
||||
Outer.<!INVISIBLE_REFERENCE!>ProtectedNested<!>()
|
||||
Outer().<!INVISIBLE_REFERENCE!>ProtectedInner<!>()
|
||||
Outer.<!HIDDEN!>ProtectedNested<!>()
|
||||
Outer().<!HIDDEN!>ProtectedInner<!>()
|
||||
|
||||
Outer.PublicNested()
|
||||
Outer().PublicInner()
|
||||
|
||||
@@ -9,21 +9,21 @@ private class Private {
|
||||
bar()
|
||||
Nested()
|
||||
fromCompanion()
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
}
|
||||
|
||||
inner class Inner {
|
||||
fun foo() {
|
||||
bar()
|
||||
fromCompanion()
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
}
|
||||
}
|
||||
|
||||
private class Nested {
|
||||
fun foo() {
|
||||
fromCompanion()
|
||||
NotCompanion.<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
NotCompanion.<!HIDDEN!>foo<!>() // hidden
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ fun withLocals() {
|
||||
|
||||
Local().baz()
|
||||
|
||||
Local().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Local().<!HIDDEN!>bar<!>() // hidden
|
||||
}
|
||||
|
||||
fun test() {
|
||||
@@ -62,14 +62,14 @@ fun test() {
|
||||
Private().baz()
|
||||
Private().Inner()
|
||||
|
||||
Private().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Private.<!INVISIBLE_REFERENCE!>Nested<!>() // hidden
|
||||
Private.<!INVISIBLE_REFERENCE!>fromCompanion<!>() // hidden
|
||||
Private().<!HIDDEN!>bar<!>() // hidden
|
||||
Private.<!HIDDEN!>Nested<!>() // hidden
|
||||
Private.<!HIDDEN!>fromCompanion<!>() // hidden
|
||||
}
|
||||
|
||||
// FILE: second.kt
|
||||
|
||||
fun secondTest() {
|
||||
<!INVISIBLE_REFERENCE!>foo<!>() // hidden
|
||||
<!INVISIBLE_REFERENCE!>Private<!>() // hidden
|
||||
<!HIDDEN!>foo<!>() // hidden
|
||||
<!HIDDEN!>Private<!>() // hidden
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Derived : Protected() {
|
||||
fun foo() {
|
||||
bar()
|
||||
Nested().foo()
|
||||
Nested().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Nested().<!HIDDEN!>bar<!>() // hidden
|
||||
|
||||
fromCompanion()
|
||||
protectedFromCompanion()
|
||||
@@ -48,8 +48,8 @@ fun test() {
|
||||
Protected().baz()
|
||||
Protected().Inner()
|
||||
|
||||
Protected().<!INVISIBLE_REFERENCE!>bar<!>() // hidden
|
||||
Protected.<!INVISIBLE_REFERENCE!>Nested<!>() // hidden
|
||||
Protected().<!HIDDEN!>bar<!>() // hidden
|
||||
Protected.<!HIDDEN!>Nested<!>() // hidden
|
||||
}
|
||||
|
||||
open class Generic<T>(val x: T) {
|
||||
|
||||
@@ -36,7 +36,7 @@ FILE: test.kt
|
||||
lval bar: R|kotlin/CharSequence?| = R|<local>/x|?.{ $subj$.R|/SomeClass.bar| }
|
||||
when () {
|
||||
!=(R|<local>/bar|, Null(null)) -> {
|
||||
R|<local>/x|.R|/SomeClass.bar|.<Inapplicable(UNSAFE_CALL): kotlin/CharSequence.length>#
|
||||
R|<local>/x|.R|/SomeClass.bar|.<Inapplicable(INAPPLICABLE_WRONG_RECEIVER): kotlin/CharSequence.length>#
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,13 +66,10 @@ FILE: CanBeValChecker.kt
|
||||
public final fun stackOverflowBug(): R|kotlin/Unit| {
|
||||
lvar a: R|kotlin/Int|
|
||||
R|<local>/a| = Int(1)
|
||||
{
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(10)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|kotlin/io/print|(R|<local>/i|)
|
||||
}
|
||||
|
||||
lval <iterator>: R|kotlin/collections/IntIterator| = Int(1).R|kotlin/Int.rangeTo|(Int(10)).R|kotlin/ranges/IntProgression.iterator|()
|
||||
while(R|<local>/<iterator>|.R|kotlin/collections/Iterator.hasNext|()) {
|
||||
lval i: R|kotlin/Int| = R|<local>/<iterator>|.R|kotlin/collections/IntIterator.next|()
|
||||
R|kotlin/io/print|(R|<local>/i|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FILE: StringTemplate.kt
|
||||
public abstract interface IC : R|kotlin/Any| {
|
||||
public open fun toString(x: R|kotlin/String|): R|kotlin/String| {
|
||||
^toString <strcat>(String(IC), R|<local>/x|)
|
||||
^toString <strcat>(String(IC), R|<local>/x|.R|kotlin/Any.toString|())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ FILE: RedundantExplicitTypeChecker.kt
|
||||
|
||||
}
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
lval s: R|kotlin/String| = <strcat>(String(Hello ), Int(10).R|kotlin/Int.plus|(Int(1)))
|
||||
lval s: R|kotlin/String| = <strcat>(String(Hello ), Int(10).R|kotlin/Int.plus|(Int(1)).R|kotlin/Any.toString|())
|
||||
lval str: R|kotlin/String?| = String()
|
||||
lval o: R|Obj| = Q|Obj|
|
||||
lval p: R|Point| = R|/PointImpl.PointImpl|(Int(1), Int(2))
|
||||
|
||||
@@ -5,7 +5,7 @@ interface I {
|
||||
}
|
||||
|
||||
class A {
|
||||
fun too(): <!NOT_AN_ANNOTATION_CLASS, NOT_AN_ANNOTATION_CLASS!>@Annotation<!> Unit {}
|
||||
fun too(): @Annotation Unit {}
|
||||
|
||||
fun foo(): <!REDUNDANT_RETURN_UNIT_TYPE!>Unit<!>
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ FILE: RedundantSetterParameterTypeChecker.kt
|
||||
public final var x: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
public set(param: R|kotlin/String|): R|kotlin/Unit| {
|
||||
F|/x| = <strcat>(R|<local>/param|, String( ))
|
||||
F|/x| = <strcat>(R|<local>/param|.R|kotlin/Any.toString|(), String( ))
|
||||
}
|
||||
public final class My : R|kotlin/Any| {
|
||||
public constructor(): R|My| {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
FILE: RedundantSingleExpressionStringTemplateChecker.kt
|
||||
public final val x: R|kotlin/String| = String(Hello)
|
||||
public get(): R|kotlin/String|
|
||||
public final val y: R|kotlin/String| = <strcat>(R|/x|)
|
||||
public final val y: R|kotlin/String| = <strcat>(R|/x|.R|kotlin/Any.toString|())
|
||||
public get(): R|kotlin/String|
|
||||
public final val z: R|kotlin/String| = <strcat>(R|/y|.R|kotlin/Any.hashCode|())
|
||||
public final val z: R|kotlin/String| = <strcat>(R|/y|.R|kotlin/Any.hashCode|().R|kotlin/Any.toString|())
|
||||
public get(): R|kotlin/String|
|
||||
public final fun toString(x: R|kotlin/String|): R|kotlin/String| {
|
||||
^toString <strcat>(String(IC), R|<local>/x|)
|
||||
^toString <strcat>(String(IC), R|<local>/x|.R|kotlin/Any.toString|())
|
||||
}
|
||||
public final data class ProductGroup : R|kotlin/Any| {
|
||||
public constructor(short_name: R|kotlin/String|, parent: R|ProductGroup?|): R|ProductGroup| {
|
||||
@@ -24,7 +24,7 @@ FILE: RedundantSingleExpressionStringTemplateChecker.kt
|
||||
this@R|/ProductGroup|.R|/ProductGroup.short_name|
|
||||
}
|
||||
else -> {
|
||||
<strcat>(this@R|/ProductGroup|.R|/ProductGroup.parent|.R|/ProductGroup.name|, String( ), this@R|/ProductGroup|.R|/ProductGroup.short_name|)
|
||||
<strcat>(this@R|/ProductGroup|.R|/ProductGroup.parent|.R|/ProductGroup.name|.R|kotlin/Any.toString|(), String( ), this@R|/ProductGroup|.R|/ProductGroup.short_name|.R|kotlin/Any.toString|())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ open class J {
|
||||
}
|
||||
|
||||
var buf = 0
|
||||
<!GETTER_VISIBILITY_DIFFERS_FROM_PROPERTY_VISIBILITY!>private<!> get() = 42
|
||||
private get() = 42
|
||||
protected set(value) {
|
||||
field = value
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ FILE: NotNullTypeChain.kt
|
||||
public final val list1: R|kotlin/collections/List<kotlin/Int>| = R|kotlin/collections/listOf|<R|kotlin/Int|>(Int(1))
|
||||
public get(): R|kotlin/collections/List<kotlin/Int>|
|
||||
public final val list: R|kotlin/collections/List<kotlin/String>| = R|/list1|.R|kotlin/collections/orEmpty|<R|kotlin/Int|>().R|kotlin/collections/map|<R|kotlin/Int|, R|kotlin/String|>(<L> = map@fun <anonymous>(it: R|kotlin/Int|): R|kotlin/String| <inline=Inline, kind=UNKNOWN> {
|
||||
^ <strcat>(R|<local>/it|)
|
||||
^ <strcat>(R|<local>/it|.R|kotlin/Any.toString|())
|
||||
}
|
||||
)
|
||||
public get(): R|kotlin/collections/List<kotlin/String>|
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user