[FIR] FirRenderer: render name for scripts

A script name is important information, so it is better to render it.
This also will fix the inconsistency with redundant space after 'SCRIPT:'.
This commit is contained in:
Dmitrii Gridin
2023-09-18 16:46:59 +02:00
committed by Space Team
parent c6bb9af823
commit 12dc6b1ebc
291 changed files with 2096 additions and 2226 deletions
@@ -8,9 +8,9 @@ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] argsFromFunction.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-argsFromFunction.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Int| {
^foo R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
}
}
@@ -10,7 +10,7 @@ FIR element rendered:
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] argsFromInit.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-argsFromInit.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
@@ -25,4 +25,4 @@ FILE: [ResolvedTo(IMPORTS)] argsFromInit.kts
)
}
}
}
@@ -8,7 +8,7 @@ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] argsFromMemberFunction.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-argsFromMemberFunction.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
@@ -20,4 +20,4 @@ FILE: [ResolvedTo(IMPORTS)] argsFromMemberFunction.kts
R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
}
}
}
@@ -8,7 +8,7 @@ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] argsFromMemberProperty.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-argsFromMemberProperty.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
@@ -21,4 +21,4 @@ FILE: [ResolvedTo(IMPORTS)] argsFromMemberProperty.kts
^ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
}
}
}
@@ -8,8 +8,8 @@ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] argsFromProperty.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-argsFromProperty.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(BODY_RESOLVE)] val bar: R|kotlin/Int| = R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
@@ -8,11 +8,11 @@ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] argsFromStatement.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(BODY_RESOLVE)]
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-argsFromStatement.kts>
[ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(BODY_RESOLVE)] val $$result: <ERROR TYPE REF: Unresolved name: foo> = <Unresolved name: foo>#(<L> = [ResolvedTo(BODY_RESOLVE)] foo@fun <anonymous>(): R|kotlin/Int| <inline=Unknown> {
^ R|<local>/args|.R|SubstitutionOverride<kotlin/Array.size: R|kotlin/Int|>|
}
)
public [ResolvedTo(BODY_RESOLVE)] get(): <ERROR TYPE REF: Unresolved name: foo>
public [ResolvedTo(BODY_RESOLVE)] get(): <ERROR TYPE REF: Unresolved name: foo>
@@ -8,7 +8,7 @@ Int(1)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] callArgumentScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-callArgumentScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(CONTRACTS)] fun y([ResolvedTo(CONTRACTS)] a: R|kotlin/Int|): R|kotlin/Unit| {
@@ -16,4 +16,4 @@ FILE: [ResolvedTo(IMPORTS)] callArgumentScript.kts
public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| {
R|/y|(Int(1))
}
}
@@ -8,7 +8,7 @@ R|/foo|()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructorScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-callInsideLambdaInsideSuperCallAndExplicitConstructorScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public open [ResolvedTo(STATUS)] class B : R|kotlin/Any| {
@@ -29,4 +29,4 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructo
}
public final [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Unit| {
}
}
@@ -8,11 +8,11 @@ R|/foo|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] callOnePropertyFromAnother.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-callOnePropertyFromAnother.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] val foo: R|kotlin/String| = String(foo)
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/String|
public final [ResolvedTo(BODY_RESOLVE)] val bar: R|kotlin/String| = R|/foo|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/String|
@@ -8,7 +8,7 @@ R|kotlin/Int|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] calllTypeArgumentsScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-calllTypeArgumentsScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> y(): R|kotlin/Unit| {
@@ -16,4 +16,4 @@ FILE: [ResolvedTo(IMPORTS)] calllTypeArgumentsScript.kts
public final [ResolvedTo(BODY_RESOLVE)] fun x(): R|kotlin/Unit| {
R|/y|<R|kotlin/Int|>()
}
}
@@ -4,7 +4,7 @@ FIR source kind: KtRealSourceElementKind
FIR element rendered:
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(BODY_RESOLVE)]
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-compoundAssignOnVarScript.kts>
[ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] var i: R|kotlin/Int| = Int(1)
@@ -16,11 +16,11 @@ SCRIPT: [ResolvedTo(BODY_RESOLVE)]
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] compoundAssignOnVarScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(BODY_RESOLVE)]
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-compoundAssignOnVarScript.kts>
[ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] var i: R|kotlin/Int| = Int(1)
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Int|
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] set([ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] value: R|kotlin/Int|): R|kotlin/Unit|
R|/i| = R|/i|.R|kotlin/Int.plus|(Int(1))
R|/i| = R|/i|.R|kotlin/Int.plus|(Int(1))
@@ -8,7 +8,7 @@ R|<local>/<array>|.R|SubstitutionOverride</MyMap.set: R|kotlin/Unit|>|(R|<local>
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] compoundAssignWithArrayAccessConventionScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-compoundAssignWithArrayAccessConventionScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public abstract [ResolvedTo(STATUS)] interface MyMap<[ResolvedTo(STATUS)] K, [ResolvedTo(STATUS)] V> : R|kotlin/Any| {
@@ -26,4 +26,4 @@ FILE: [ResolvedTo(IMPORTS)] compoundAssignWithArrayAccessConventionScript.kts
}
Unit
}
}
@@ -8,7 +8,7 @@ R|<local>/m|.R|SubstitutionOverride</MyMap.get: R|A|>|(String(a)).R|/A.plusAssig
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] compoundAssignWithArrayGetConventionScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-compoundAssignWithArrayGetConventionScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
@@ -24,4 +24,4 @@ FILE: [ResolvedTo(IMPORTS)] compoundAssignWithArrayGetConventionScript.kts
public final [ResolvedTo(BODY_RESOLVE)] fun test([ResolvedTo(BODY_RESOLVE)] m: R|MyMap<kotlin/String, A>|): R|kotlin/Unit| {
R|<local>/m|.R|SubstitutionOverride</MyMap.get: R|A|>|(String(a)).R|/A.plusAssign|(Int(1))
Unit
}
}
@@ -8,7 +8,7 @@ super<R|B|>(Int(1))
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] constructorDelegationSuperCallScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-constructorDelegationSuperCallScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public open [ResolvedTo(STATUS)] class B : R|kotlin/Any| {
@@ -23,4 +23,4 @@ FILE: [ResolvedTo(IMPORTS)] constructorDelegationSuperCallScript.kts
super<R|B|>(Int(1))
}
}
}
@@ -8,7 +8,7 @@ Int(1)String(2)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] functionCallArgumentListScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-functionCallArgumentListScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(CONTRACTS)] fun callMe([ResolvedTo(CONTRACTS)] x: R|kotlin/Int|, [ResolvedTo(CONTRACTS)] y: R|kotlin/String|): R|kotlin/Unit| {
@@ -16,4 +16,4 @@ FILE: [ResolvedTo(IMPORTS)] functionCallArgumentListScript.kts
public final [ResolvedTo(BODY_RESOLVE)] fun foo(): R|kotlin/Unit| {
R|/callMe|(Int(1), String(2))
}
}
@@ -8,9 +8,9 @@ Int(1)String(2)
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] invokeCallArgumentListScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-invokeCallArgumentListScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(BODY_RESOLVE)] fun foo([ResolvedTo(BODY_RESOLVE)] f: R|(kotlin/Int, kotlin/String) -> kotlin/Unit|): R|kotlin/Unit| {
R|<local>/f|.R|SubstitutionOverride<kotlin/Function2.invoke: R|kotlin/Unit|>|(Int(1), String(2))
}
}
@@ -8,7 +8,7 @@ R|/A.prop|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCallScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-qualifiedCallInsideSuperCallScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
@@ -39,4 +39,4 @@ FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCallScript.kts
)
}
}
}
@@ -10,7 +10,7 @@ FILE: [ResolvedTo(IMPORTS)] setOperatorScript.kts
package test
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(BODY_RESOLVE)]
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-setOperatorScript.kts>
[ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(STATUS)] class B : R|kotlin/Any| {
@@ -44,4 +44,4 @@ FILE: [ResolvedTo(IMPORTS)] setOperatorScript.kts
R|<local>/<unary>|
}
public [ResolvedTo(BODY_RESOLVE)] get(): R|test/B|
public [ResolvedTo(BODY_RESOLVE)] get(): R|test/B|
@@ -8,7 +8,7 @@ R|A|
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] superTypeScript.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(TYPES)]
SCRIPT: [ResolvedTo(TYPES)] <script-superTypeScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public abstract [ResolvedTo(STATUS)] interface A : R|kotlin/Any| {
@@ -19,4 +19,4 @@ FILE: [ResolvedTo(IMPORTS)] superTypeScript.kts
super<R|kotlin/Any|>()
}
}
}
@@ -9,7 +9,7 @@ public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|kotlin/Int| = R|/foo|()
FIR FILE:
FILE: [ResolvedTo(IMPORTS)] syntheticResultDeclaration.kts
context(<script>@R|kotlin/script/templates/standard/ScriptTemplateWithArgs|)
SCRIPT: [ResolvedTo(BODY_RESOLVE)]
SCRIPT: [ResolvedTo(BODY_RESOLVE)] <script-syntheticResultDeclaration.kts>
[ResolvedTo(BODY_RESOLVE)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun foo(): R|kotlin/Int| {
@@ -17,4 +17,4 @@ FILE: [ResolvedTo(IMPORTS)] syntheticResultDeclaration.kts
}
public final [ResolvedTo(BODY_RESOLVE)] val $$result: R|kotlin/Int| = R|/foo|()
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|
public [ResolvedTo(BODY_RESOLVE)] get(): R|kotlin/Int|