Inline properties support in incremental compilation
This commit is contained in:
@@ -31,6 +31,7 @@ import org.jetbrains.kotlin.codegen.intrinsics.IntrinsicArrayConstructorsKt;
|
|||||||
import org.jetbrains.kotlin.codegen.state.GenerationState;
|
import org.jetbrains.kotlin.codegen.state.GenerationState;
|
||||||
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper;
|
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper;
|
||||||
import org.jetbrains.kotlin.descriptors.*;
|
import org.jetbrains.kotlin.descriptors.*;
|
||||||
|
import org.jetbrains.kotlin.incremental.KotlinLookupLocation;
|
||||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache;
|
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache;
|
||||||
import org.jetbrains.kotlin.name.ClassId;
|
import org.jetbrains.kotlin.name.ClassId;
|
||||||
import org.jetbrains.kotlin.name.Name;
|
import org.jetbrains.kotlin.name.Name;
|
||||||
@@ -46,6 +47,7 @@ import org.jetbrains.kotlin.resolve.jvm.AsmTypes;
|
|||||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind;
|
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterKind;
|
||||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature;
|
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodParameterSignature;
|
||||||
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
import org.jetbrains.kotlin.resolve.jvm.jvmSignature.JvmMethodSignature;
|
||||||
|
import org.jetbrains.kotlin.resolve.scopes.MemberScope;
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor;
|
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor;
|
||||||
import org.jetbrains.kotlin.types.expressions.DoubleColonLHS;
|
import org.jetbrains.kotlin.types.expressions.DoubleColonLHS;
|
||||||
import org.jetbrains.kotlin.types.expressions.LabelResolver;
|
import org.jetbrains.kotlin.types.expressions.LabelResolver;
|
||||||
@@ -129,9 +131,31 @@ public class InlineCodegen extends CallGenerator {
|
|||||||
|
|
||||||
if (!(functionDescriptor instanceof FictitiousArrayConstructor)) {
|
if (!(functionDescriptor instanceof FictitiousArrayConstructor)) {
|
||||||
reportIncrementalInfo(functionDescriptor, codegen.getContext().getFunctionDescriptor().getOriginal(), jvmSignature, state);
|
reportIncrementalInfo(functionDescriptor, codegen.getContext().getFunctionDescriptor().getOriginal(), jvmSignature, state);
|
||||||
|
String functionOrAccessorName = typeMapper.mapAsmMethod(function).getName();
|
||||||
|
//track changes for property accessor and @JvmName inline functions/property accessors
|
||||||
|
if(!functionOrAccessorName.equals(functionDescriptor.getName().asString())) {
|
||||||
|
MemberScope scope = getMemberScope(functionDescriptor);
|
||||||
|
if (scope != null) {
|
||||||
|
//Fake lookup to track track changes for property accessors and @JvmName functions/property accessors
|
||||||
|
scope.getContributedFunctions(Name.identifier(functionOrAccessorName), new KotlinLookupLocation(callElement));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private static MemberScope getMemberScope(@NotNull FunctionDescriptor functionOrAccessor) {
|
||||||
|
CallableMemberDescriptor callableMemberDescriptor = JvmCodegenUtil.getDirectMember(functionOrAccessor);
|
||||||
|
DeclarationDescriptor classOrPackageFragment = callableMemberDescriptor.getContainingDeclaration();
|
||||||
|
if (classOrPackageFragment instanceof ClassDescriptor) {
|
||||||
|
return ((ClassDescriptor) classOrPackageFragment).getUnsubstitutedMemberScope();
|
||||||
|
}
|
||||||
|
else if (classOrPackageFragment instanceof PackageFragmentDescriptor) {
|
||||||
|
return ((PackageFragmentDescriptor) classOrPackageFragment).getMemberScope();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void genCallInner(
|
public void genCallInner(
|
||||||
@NotNull Callable callableMethod,
|
@NotNull Callable callableMethod,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package org.jetbrains.kotlin.codegen.inline
|
package org.jetbrains.kotlin.codegen.inline
|
||||||
|
|
||||||
import org.jetbrains.kotlin.codegen.ExpressionCodegen
|
import org.jetbrains.kotlin.codegen.ExpressionCodegen
|
||||||
|
import org.jetbrains.kotlin.codegen.JvmCodegenUtil
|
||||||
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper
|
import org.jetbrains.kotlin.codegen.state.KotlinTypeMapper
|
||||||
import org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
|
import org.jetbrains.kotlin.descriptors.DeclarationDescriptorWithSource
|
||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||||
@@ -26,7 +27,6 @@ import org.jetbrains.kotlin.load.kotlin.VirtualFileKotlinClass
|
|||||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
|
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
|
||||||
import org.jetbrains.kotlin.resolve.source.PsiSourceElement
|
import org.jetbrains.kotlin.resolve.source.PsiSourceElement
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor
|
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedCallableMemberDescriptor
|
||||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedSimpleFunctionDescriptor
|
|
||||||
import org.jetbrains.org.objectweb.asm.Label
|
import org.jetbrains.org.objectweb.asm.Label
|
||||||
import org.jetbrains.org.objectweb.asm.MethodVisitor
|
import org.jetbrains.org.objectweb.asm.MethodVisitor
|
||||||
|
|
||||||
@@ -43,10 +43,11 @@ fun FunctionDescriptor.getClassFilePath(typeMapper: KotlinTypeMapper, cache: Inc
|
|||||||
|
|
||||||
return when (source) {
|
return when (source) {
|
||||||
is KotlinJvmBinaryPackageSourceElement -> {
|
is KotlinJvmBinaryPackageSourceElement -> {
|
||||||
if (this !is DeserializedCallableMemberDescriptor) {
|
val directMember = JvmCodegenUtil.getDirectMember(this)
|
||||||
|
if (directMember !is DeserializedCallableMemberDescriptor) {
|
||||||
throw AssertionError("Expected DeserializedCallableMemberDescriptor, got: $this")
|
throw AssertionError("Expected DeserializedCallableMemberDescriptor, got: $this")
|
||||||
}
|
}
|
||||||
val kotlinClass = source.getContainingBinaryClass(this) ?:
|
val kotlinClass = source.getContainingBinaryClass(directMember) ?:
|
||||||
throw AssertionError("Descriptor $this is not found, in: $source")
|
throw AssertionError("Descriptor $this is not found, in: $source")
|
||||||
if (kotlinClass !is VirtualFileKotlinClass) {
|
if (kotlinClass !is VirtualFileKotlinClass) {
|
||||||
throw AssertionError("Expected VirtualFileKotlinClass, got $kotlinClass")
|
throw AssertionError("Expected VirtualFileKotlinClass, got $kotlinClass")
|
||||||
@@ -54,7 +55,8 @@ fun FunctionDescriptor.getClassFilePath(typeMapper: KotlinTypeMapper, cache: Inc
|
|||||||
kotlinClass.file.canonicalPath!!
|
kotlinClass.file.canonicalPath!!
|
||||||
}
|
}
|
||||||
is KotlinJvmBinarySourceElement -> {
|
is KotlinJvmBinarySourceElement -> {
|
||||||
assert(this is DeserializedSimpleFunctionDescriptor) { "Expected DeserializedSimpleFunctionDescriptor, got: $this" }
|
val directMember = JvmCodegenUtil.getDirectMember(this)
|
||||||
|
assert(directMember is DeserializedCallableMemberDescriptor) { "Expected DeserializedSimpleFunctionDescriptor, got: $this" }
|
||||||
val kotlinClass = source.binaryClass as VirtualFileKotlinClass
|
val kotlinClass = source.binaryClass as VirtualFileKotlinClass
|
||||||
kotlinClass.file.canonicalPath!!
|
kotlinClass.file.canonicalPath!!
|
||||||
}
|
}
|
||||||
|
|||||||
+48
@@ -443,6 +443,18 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassValProperty")
|
||||||
|
public void testInlineClassValProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineClassValProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassVarProperty")
|
||||||
|
public void testInlineClassVarProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineClassVarProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineFunctionRemoved")
|
@TestMetadata("inlineFunctionRemoved")
|
||||||
public void testInlineFunctionRemoved() throws Exception {
|
public void testInlineFunctionRemoved() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionRemoved/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionRemoved/");
|
||||||
@@ -479,6 +491,30 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelFunctionWithJvmName")
|
||||||
|
public void testInlineTopLevelFunctionWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelFunctionWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelValProperty")
|
||||||
|
public void testInlineTopLevelValProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelValProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelValPropertyWithJvmName")
|
||||||
|
public void testInlineTopLevelValPropertyWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelValPropertyWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelVarProperty")
|
||||||
|
public void testInlineTopLevelVarProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelVarProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineTwoFunctionsOneChanged")
|
@TestMetadata("inlineTwoFunctionsOneChanged")
|
||||||
public void testInlineTwoFunctionsOneChanged() throws Exception {
|
public void testInlineTwoFunctionsOneChanged() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/");
|
||||||
@@ -845,6 +881,12 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("topLevelFunctionWithJvmName")
|
||||||
|
public void testTopLevelFunctionWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("topLevelMembersInTwoFiles")
|
@TestMetadata("topLevelMembersInTwoFiles")
|
||||||
public void testTopLevelMembersInTwoFiles() throws Exception {
|
public void testTopLevelMembersInTwoFiles() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/");
|
||||||
@@ -857,6 +899,12 @@ public class ExperimentalIncrementalJpsTestGenerated extends AbstractExperimenta
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("topLevelPropertyWithJvmName")
|
||||||
|
public void testTopLevelPropertyWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelPropertyWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("traitClassObjectConstantChanged")
|
@TestMetadata("traitClassObjectConstantChanged")
|
||||||
public void testTraitClassObjectConstantChanged() throws Exception {
|
public void testTraitClassObjectConstantChanged() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/");
|
||||||
|
|||||||
+48
@@ -443,6 +443,18 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassValProperty")
|
||||||
|
public void testInlineClassValProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineClassValProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineClassVarProperty")
|
||||||
|
public void testInlineClassVarProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineClassVarProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineFunctionRemoved")
|
@TestMetadata("inlineFunctionRemoved")
|
||||||
public void testInlineFunctionRemoved() throws Exception {
|
public void testInlineFunctionRemoved() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionRemoved/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineFunctionRemoved/");
|
||||||
@@ -479,6 +491,30 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelFunctionWithJvmName")
|
||||||
|
public void testInlineTopLevelFunctionWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelFunctionWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelValProperty")
|
||||||
|
public void testInlineTopLevelValProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelValProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelValPropertyWithJvmName")
|
||||||
|
public void testInlineTopLevelValPropertyWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelValPropertyWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("inlineTopLevelVarProperty")
|
||||||
|
public void testInlineTopLevelVarProperty() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTopLevelVarProperty/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineTwoFunctionsOneChanged")
|
@TestMetadata("inlineTwoFunctionsOneChanged")
|
||||||
public void testInlineTwoFunctionsOneChanged() throws Exception {
|
public void testInlineTwoFunctionsOneChanged() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/inlineTwoFunctionsOneChanged/");
|
||||||
@@ -845,6 +881,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("topLevelFunctionWithJvmName")
|
||||||
|
public void testTopLevelFunctionWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelFunctionWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("topLevelMembersInTwoFiles")
|
@TestMetadata("topLevelMembersInTwoFiles")
|
||||||
public void testTopLevelMembersInTwoFiles() throws Exception {
|
public void testTopLevelMembersInTwoFiles() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelMembersInTwoFiles/");
|
||||||
@@ -857,6 +899,12 @@ public class IncrementalJpsTestGenerated extends AbstractIncrementalJpsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("topLevelPropertyWithJvmName")
|
||||||
|
public void testTopLevelPropertyWithJvmName() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/topLevelPropertyWithJvmName/");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("traitClassObjectConstantChanged")
|
@TestMetadata("traitClassObjectConstantChanged")
|
||||||
public void testTraitClassObjectConstantChanged() throws Exception {
|
public void testTraitClassObjectConstantChanged() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/");
|
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/incremental/pureKotlin/traitClassObjectConstantChanged/");
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
class Usage {
|
||||||
|
val x = inline.A().f
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/inline/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/Usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/usage/Usage.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/Usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
class A {
|
||||||
|
inline val f: Int
|
||||||
|
get() = 0
|
||||||
|
}
|
||||||
+6
@@ -0,0 +1,6 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
class A {
|
||||||
|
inline val f: Int
|
||||||
|
get() = 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/inline/A.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
class A {
|
||||||
|
inline var f: Int
|
||||||
|
get() = 0
|
||||||
|
set(p: Int) {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
class A {
|
||||||
|
inline var f: Int
|
||||||
|
get() = 0
|
||||||
|
set(p: Int) {
|
||||||
|
1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun a() {
|
||||||
|
inline.A().f = 1
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package usage2
|
||||||
|
|
||||||
|
fun b() {
|
||||||
|
inline.A().f
|
||||||
|
}
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/InlineKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
@JvmName("test") inline fun g() = 0
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
@JvmName("test") inline fun g() = 1
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
val x = inline.g()
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/InlineKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline val f: Int
|
||||||
|
get() = 0
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline val f: Int
|
||||||
|
get() = 1
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
val x = inline.f
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/InlineKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline val f: Int
|
||||||
|
@JvmName("getG") get() = 0
|
||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline val f: Int
|
||||||
|
@JvmName("getG") get() = 1
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
val x = inline.f
|
||||||
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/InlineKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/inline.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline var f: Int
|
||||||
|
get() = 0
|
||||||
|
set(p: Int) {0}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
inline var f: Int
|
||||||
|
get() = 0
|
||||||
|
set(p: Int) { 1 }
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
fun a() {
|
||||||
|
inline.f = 1
|
||||||
|
}
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
package usage2
|
||||||
|
|
||||||
|
fun b() {
|
||||||
|
inline.f
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/FunctionKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/function.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/inline/FunctionKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/function.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
@JvmName("oldName") fun g() = 0
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package inline
|
||||||
|
|
||||||
|
@JvmName("newName") fun g() = 1
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
val x = inline.g()
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/test/PropertyKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/property.kt
|
||||||
|
End of files
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
Vendored
+22
@@ -0,0 +1,22 @@
|
|||||||
|
================ Step #1 =================
|
||||||
|
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/test/PropertyKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/property.kt
|
||||||
|
End of files
|
||||||
|
Marked as dirty by Kotlin:
|
||||||
|
src/usage.kt
|
||||||
|
Exit code: ADDITIONAL_PASS_REQUIRED
|
||||||
|
------------------------------------------
|
||||||
|
Cleaning output files:
|
||||||
|
out/production/module/META-INF/module.kotlin_module
|
||||||
|
out/production/module/usage/UsageKt.class
|
||||||
|
End of files
|
||||||
|
Compiling files:
|
||||||
|
src/usage.kt
|
||||||
|
End of files
|
||||||
|
Exit code: OK
|
||||||
|
------------------------------------------
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
val g: Int
|
||||||
|
@JvmName("oldName") get() = 0
|
||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
package test
|
||||||
|
|
||||||
|
val g: Int
|
||||||
|
@JvmName("newName") get() = 0
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package usage
|
||||||
|
|
||||||
|
val x = test.g
|
||||||
Reference in New Issue
Block a user