diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java index efa4573db75..5f75095c988 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/JetElementInstructionImpl.java @@ -16,6 +16,7 @@ package org.jetbrains.jet.lang.cfg.pseudocode; +import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetElement; @@ -32,4 +33,8 @@ public abstract class JetElementInstructionImpl extends InstructionImpl implemen public JetElement getElement() { return element; } + + protected String render(PsiElement element) { + return element.getText().replaceAll("\\s+", " "); + } } diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java index 0a9ae9a625a..d3ef2c32587 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/LocalFunctionDeclarationInstruction.java @@ -59,7 +59,7 @@ public class LocalFunctionDeclarationInstruction extends InstructionWithNext { @Override public String toString() { - return "d" + "(" + element.getText() + ")"; + return "d" + "(" + render(element) + ")"; } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java index 7724d8dec77..4def5d96ae4 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/ReadValueInstruction.java @@ -32,7 +32,7 @@ public class ReadValueInstruction extends InstructionWithNext { @Override public String toString() { - return "r(" + element.getText() + ")"; + return "r(" + render(element) + ")"; } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java index c3fc7b8824d..77e7482118a 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/UnsupportedElementInstruction.java @@ -32,7 +32,7 @@ public class UnsupportedElementInstruction extends InstructionWithNext { @Override public String toString() { - return "unsupported(" + element + " : " + element.getText() + ")"; + return "unsupported(" + element + " : " + render(element) + ")"; } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java index 2ad143591b1..f65d71ef4f3 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/VariableDeclarationInstruction.java @@ -19,7 +19,6 @@ package org.jetbrains.jet.lang.cfg.pseudocode; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetDeclaration; import org.jetbrains.jet.lang.psi.JetParameter; -import org.jetbrains.jet.lang.psi.JetProperty; import org.jetbrains.jet.lang.psi.JetVariableDeclaration; public class VariableDeclarationInstruction extends InstructionWithNext { @@ -42,7 +41,7 @@ public class VariableDeclarationInstruction extends InstructionWithNext { @Override public String toString() { - return "v(" + element.getText() + ")"; + return "v(" + render(element) + ")"; } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java index 9c8a09a5bba..ce26a5c8734 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/WriteValueInstruction.java @@ -45,7 +45,7 @@ public class WriteValueInstruction extends InstructionWithNext { JetNamedDeclaration value = (JetNamedDeclaration) lValue; return "w(" + value.getName() + ")"; } - return "w(" + lValue.getText() + ")"; + return "w(" + render(lValue) + ")"; } @NotNull diff --git a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions.kt b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions.kt index 7ee063bd298..c987d81e5d5 100644 --- a/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions.kt +++ b/compiler/frontend/src/org/jetbrains/jet/lang/cfg/pseudocode/instructions.kt @@ -31,7 +31,7 @@ class CallInstruction( override fun createCopy() = CallInstruction(element, resolvedCall) - override fun toString() = "call(${element.getText()}, ${resolvedCall.getResultingDescriptor()!!.getName()})" + override fun toString() = "call(${render(element)}, ${resolvedCall.getResultingDescriptor()!!.getName()})" } class CompilationErrorInstruction( @@ -45,5 +45,5 @@ class CompilationErrorInstruction( override fun createCopy() = CompilationErrorInstruction(element, message) - override fun toString() = "error(${element.getText()}, $message)" + override fun toString() = "error(${render(element)}, $message)" } \ No newline at end of file diff --git a/compiler/testData/cfg/AnonymousInitializers.instructions b/compiler/testData/cfg/AnonymousInitializers.instructions index 44774306bc1..7c4f80d9bd4 100644 --- a/compiler/testData/cfg/AnonymousInitializers.instructions +++ b/compiler/testData/cfg/AnonymousInitializers.instructions @@ -16,26 +16,25 @@ class AnonymousInitializers() { } --------------------- L0: - NEXT:[v(val k = 34)] PREV:[] - v(val k = 34) NEXT:[r(34)] PREV:[] - r(34) NEXT:[w(k)] PREV:[v(val k = 34)] - w(k) NEXT:[v(val i: Int)] PREV:[r(34)] - v(val i: Int) NEXT:[r(12)] PREV:[w(k)] - r(12) NEXT:[w($i)] PREV:[v(val i: Int)] - w($i) NEXT:[v(val j: Int get() = 20) ] PREV:[r(12)] - v(val j: Int - get() = 20) NEXT:[jmp?(L2)] PREV:[w($i)] - jmp?(L2) NEXT:[r(13), d(get() = 20)] PREV:[v(val j: Int get() = 20) ] - d(get() = 20) NEXT:[] PREV:[jmp?(L2)] + NEXT:[v(val k = 34)] PREV:[] + v(val k = 34) NEXT:[r(34)] PREV:[] + r(34) NEXT:[w(k)] PREV:[v(val k = 34)] + w(k) NEXT:[v(val i: Int)] PREV:[r(34)] + v(val i: Int) NEXT:[r(12)] PREV:[w(k)] + r(12) NEXT:[w($i)] PREV:[v(val i: Int)] + w($i) NEXT:[v(val j: Int get() = 20)] PREV:[r(12)] + v(val j: Int get() = 20) NEXT:[jmp?(L2)] PREV:[w($i)] + jmp?(L2) NEXT:[r(13), d(get() = 20)] PREV:[v(val j: Int get() = 20)] + d(get() = 20) NEXT:[] PREV:[jmp?(L2)] L2: - r(13) NEXT:[w($i)] PREV:[jmp?(L2)] - w($i) NEXT:[] PREV:[r(13)] + r(13) NEXT:[w($i)] PREV:[jmp?(L2)] + w($i) NEXT:[] PREV:[r(13)] L1: - NEXT:[] PREV:[w($i)] + NEXT:[] PREV:[w($i)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, , d(get() = 20)] + NEXT:[] PREV:[, , d(get() = 20)] L3: NEXT:[r(20)] PREV:[] r(20) NEXT:[] PREV:[] diff --git a/compiler/testData/cfg/Finally.instructions b/compiler/testData/cfg/Finally.instructions index 240ee1b8076..692426a56f6 100644 --- a/compiler/testData/cfg/Finally.instructions +++ b/compiler/testData/cfg/Finally.instructions @@ -82,35 +82,27 @@ fun t3() { } --------------------- L0: - NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] - jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[] - r(1) NEXT:[jmp?(L3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] - jmp?(L3) NEXT:[r({ () => if (2 > 3) { retur..), d({ () => if (2 > 3) { retur..)] PREV:[r(1)] - d({ () => - if (2 > 3) { - return@ - } - }) NEXT:[] PREV:[jmp?(L3)] + NEXT:[jmp?(L2 [onExceptionToFinallyBlock])] PREV:[] + jmp?(L2 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[] + r(1) NEXT:[jmp?(L3)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + jmp?(L3) NEXT:[r({ () => if (2 > 3) { return@ } }), d({ () => if (2 > 3) { return@ } })] PREV:[r(1)] + d({ () => if (2 > 3) { return@ } }) NEXT:[] PREV:[jmp?(L3)] L3: - r({ () => - if (2 > 3) { - return@ - } - }) NEXT:[jmp(L8 [skipFinallyToErrorBlock])] PREV:[jmp?(L3)] - jmp(L8 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r({ () => if (2 > 3) { retur..)] + r({ () => if (2 > 3) { return@ } }) NEXT:[jmp(L8 [skipFinallyToErrorBlock])] PREV:[jmp?(L3)] + jmp(L8 [skipFinallyToErrorBlock]) NEXT:[r(2)] PREV:[r({ () => if (2 > 3) { return@ } })] L2 [onExceptionToFinallyBlock]: L9 [start finally]: - r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] + r(2) NEXT:[jmp(error)] PREV:[jmp?(L2 [onExceptionToFinallyBlock])] L10 [finish finally]: - jmp(error) NEXT:[] PREV:[r(2)] + jmp(error) NEXT:[] PREV:[r(2)] L8 [skipFinallyToErrorBlock]: - r(2) NEXT:[] PREV:[jmp(L8 [skipFinallyToErrorBlock])] + r(2) NEXT:[] PREV:[jmp(L8 [skipFinallyToErrorBlock])] L1: - NEXT:[] PREV:[r(2)] + NEXT:[] PREV:[r(2)] error: - NEXT:[] PREV:[jmp(error)] + NEXT:[] PREV:[jmp(error)] sink: - NEXT:[] PREV:[, , d({ () => if (2 > 3) { retur..)] + NEXT:[] PREV:[, , d({ () => if (2 > 3) { return@ } })] L4: NEXT:[r(2)] PREV:[] r(2) NEXT:[r(3)] PREV:[] @@ -169,35 +161,17 @@ fun t4() { } --------------------- L0: - NEXT:[jmp?(L2)] PREV:[] - jmp?(L2) NEXT:[r({ () => try { 1 if (2 > 3)..), d({ () => try { 1 if (2 > 3)..)] PREV:[] - d({ () => - try { - 1 - if (2 > 3) { - return@ - } - } finally { - 2 - } - }) NEXT:[] PREV:[jmp?(L2)] + NEXT:[jmp?(L2)] PREV:[] + jmp?(L2) NEXT:[r({ () => try { 1 if (2 > 3) { return@ } } finally { 2 } }), d({ () => try { 1 if (2 > 3) { return@ } } finally { 2 } })] PREV:[] + d({ () => try { 1 if (2 > 3) { return@ } } finally { 2 } }) NEXT:[] PREV:[jmp?(L2)] L2: - r({ () => - try { - 1 - if (2 > 3) { - return@ - } - } finally { - 2 - } - }) NEXT:[] PREV:[jmp?(L2)] + r({ () => try { 1 if (2 > 3) { return@ } } finally { 2 } }) NEXT:[] PREV:[jmp?(L2)] L1: - NEXT:[] PREV:[r({ () => try { 1 if (2 > 3)..)] + NEXT:[] PREV:[r({ () => try { 1 if (2 > 3) { return@ } } finally { 2 } })] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, , d({ () => try { 1 if (2 > 3)..)] + NEXT:[] PREV:[, , d({ () => try { 1 if (2 > 3) { return@ } } finally { 2 } })] L3: NEXT:[jmp?(L5 [onExceptionToFinallyBlock])] PREV:[] jmp?(L5 [onExceptionToFinallyBlock]) NEXT:[r(2), r(1)] PREV:[] diff --git a/compiler/testData/cfg/LocalDeclarations.instructions b/compiler/testData/cfg/LocalDeclarations.instructions index 910a1b9a76f..736cde0b113 100644 --- a/compiler/testData/cfg/LocalDeclarations.instructions +++ b/compiler/testData/cfg/LocalDeclarations.instructions @@ -55,29 +55,19 @@ fun test1() { } --------------------- L0: - NEXT:[v(val a = object { val x : I..)] PREV:[] - v(val a = object { - val x : Int - { - $x = 1 - } - }) NEXT:[v(val x : Int)] PREV:[] - v(val x : Int) NEXT:[r(1)] PREV:[v(val a = object { val x : I..)] - r(1) NEXT:[w($x)] PREV:[v(val x : Int)] - w($x) NEXT:[r(object { val x : Int { $x ..)] PREV:[r(1)] - r(object { - val x : Int - { - $x = 1 - } - }) NEXT:[w(a)] PREV:[w($x)] - w(a) NEXT:[] PREV:[r(object { val x : Int { $x ..)] + NEXT:[v(val a = object { val x : Int { $x = 1 } })] PREV:[] + v(val a = object { val x : Int { $x = 1 } }) NEXT:[v(val x : Int)] PREV:[] + v(val x : Int) NEXT:[r(1)] PREV:[v(val a = object { val x : Int { $x = 1 } })] + r(1) NEXT:[w($x)] PREV:[v(val x : Int)] + w($x) NEXT:[r(object { val x : Int { $x = 1 } })] PREV:[r(1)] + r(object { val x : Int { $x = 1 } }) NEXT:[w(a)] PREV:[w($x)] + w(a) NEXT:[] PREV:[r(object { val x : Int { $x = 1 } })] L1: - NEXT:[] PREV:[w(a)] + NEXT:[] PREV:[w(a)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == O == object O { @@ -108,26 +98,22 @@ fun test2() { } --------------------- L0: - NEXT:[v(val b = 1)] PREV:[] - v(val b = 1) NEXT:[r(1)] PREV:[] - r(1) NEXT:[w(b)] PREV:[v(val b = 1)] - w(b) NEXT:[v(val a = object { val x = b..)] PREV:[r(1)] - v(val a = object { - val x = b - }) NEXT:[v(val x = b)] PREV:[w(b)] - v(val x = b) NEXT:[r(b)] PREV:[v(val a = object { val x = b..)] - r(b) NEXT:[w(x)] PREV:[v(val x = b)] - w(x) NEXT:[r(object { val x = b }) ] PREV:[r(b)] - r(object { - val x = b - }) NEXT:[w(a)] PREV:[w(x)] - w(a) NEXT:[] PREV:[r(object { val x = b }) ] + NEXT:[v(val b = 1)] PREV:[] + v(val b = 1) NEXT:[r(1)] PREV:[] + r(1) NEXT:[w(b)] PREV:[v(val b = 1)] + w(b) NEXT:[v(val a = object { val x = b })] PREV:[r(1)] + v(val a = object { val x = b }) NEXT:[v(val x = b)] PREV:[w(b)] + v(val x = b) NEXT:[r(b)] PREV:[v(val a = object { val x = b })] + r(b) NEXT:[w(x)] PREV:[v(val x = b)] + w(x) NEXT:[r(object { val x = b })] PREV:[r(b)] + r(object { val x = b }) NEXT:[w(a)] PREV:[w(x)] + w(a) NEXT:[] PREV:[r(object { val x = b })] L1: - NEXT:[] PREV:[w(a)] + NEXT:[] PREV:[w(a)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, ] + NEXT:[] PREV:[, ] ===================== == test3 == fun test3() { @@ -140,32 +126,20 @@ fun test3() { } --------------------- L0: - NEXT:[v(val a = object { val y : I..)] PREV:[] - v(val a = object { - val y : Int - fun inner_bar() { - y = 10 - } - }) NEXT:[v(val y : Int)] PREV:[] - v(val y : Int) NEXT:[jmp?(L2)] PREV:[v(val a = object { val y : I..)] - jmp?(L2) NEXT:[r(object { val y : Int fun i..), d(fun inner_bar() { y = 10 }) ] PREV:[v(val y : Int)] - d(fun inner_bar() { - y = 10 - }) NEXT:[] PREV:[jmp?(L2)] + NEXT:[v(val a = object { val y : Int fun inner_bar() { y = 10 } })] PREV:[] + v(val a = object { val y : Int fun inner_bar() { y = 10 } }) NEXT:[v(val y : Int)] PREV:[] + v(val y : Int) NEXT:[jmp?(L2)] PREV:[v(val a = object { val y : Int fun inner_bar() { y = 10 } })] + jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }), d(fun inner_bar() { y = 10 })] PREV:[v(val y : Int)] + d(fun inner_bar() { y = 10 }) NEXT:[] PREV:[jmp?(L2)] L2: - r(object { - val y : Int - fun inner_bar() { - y = 10 - } - }) NEXT:[w(a)] PREV:[jmp?(L2)] - w(a) NEXT:[] PREV:[r(object { val y : Int fun i..)] + r(object { val y : Int fun inner_bar() { y = 10 } }) NEXT:[w(a)] PREV:[jmp?(L2)] + w(a) NEXT:[] PREV:[r(object { val y : Int fun inner_bar() { y = 10 } })] L1: - NEXT:[] PREV:[w(a)] + NEXT:[] PREV:[w(a)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, , d(fun inner_bar() { y = 10 }) ] + NEXT:[] PREV:[, , d(fun inner_bar() { y = 10 })] L3: NEXT:[r(10)] PREV:[] r(10) NEXT:[w(y)] PREV:[] @@ -208,43 +182,23 @@ fun test4() { } --------------------- L0: - NEXT:[v(val a = object { val x : I..)] PREV:[] - v(val a = object { - val x : Int - val y : Int - { - $x = 1 - } - fun ggg() { - y = 10 - } - }) NEXT:[v(val x : Int)] PREV:[] - v(val x : Int) NEXT:[v(val y : Int)] PREV:[v(val a = object { val x : I..)] - v(val y : Int) NEXT:[r(1)] PREV:[v(val x : Int)] - r(1) NEXT:[w($x)] PREV:[v(val y : Int)] - w($x) NEXT:[jmp?(L2)] PREV:[r(1)] - jmp?(L2) NEXT:[r(object { val x : Int val y..), d(fun ggg() { y = 10 }) ] PREV:[w($x)] - d(fun ggg() { - y = 10 - }) NEXT:[] PREV:[jmp?(L2)] + NEXT:[v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })] PREV:[] + v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) NEXT:[v(val x : Int)] PREV:[] + v(val x : Int) NEXT:[v(val y : Int)] PREV:[v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })] + v(val y : Int) NEXT:[r(1)] PREV:[v(val x : Int)] + r(1) NEXT:[w($x)] PREV:[v(val y : Int)] + w($x) NEXT:[jmp?(L2)] PREV:[r(1)] + jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }), d(fun ggg() { y = 10 })] PREV:[w($x)] + d(fun ggg() { y = 10 }) NEXT:[] PREV:[jmp?(L2)] L2: - r(object { - val x : Int - val y : Int - { - $x = 1 - } - fun ggg() { - y = 10 - } - }) NEXT:[w(a)] PREV:[jmp?(L2)] - w(a) NEXT:[] PREV:[r(object { val x : Int val y..)] + r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) NEXT:[w(a)] PREV:[jmp?(L2)] + w(a) NEXT:[] PREV:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } })] L1: - NEXT:[] PREV:[w(a)] + NEXT:[] PREV:[w(a)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, , d(fun ggg() { y = 10 }) ] + NEXT:[] PREV:[, , d(fun ggg() { y = 10 })] L3: NEXT:[r(10)] PREV:[] r(10) NEXT:[w(y)] PREV:[] @@ -289,53 +243,27 @@ fun test5() { } --------------------- L0: - NEXT:[v(val a = object { var x = 1..)] PREV:[] - v(val a = object { - var x = 1 - { - $x = 2 - } - fun foo() { - x = 3 - } - fun bar() { - x = 4 - } - }) NEXT:[v(var x = 1)] PREV:[] - v(var x = 1) NEXT:[r(1)] PREV:[v(val a = object { var x = 1..)] - r(1) NEXT:[w(x)] PREV:[v(var x = 1)] - w(x) NEXT:[r(2)] PREV:[r(1)] - r(2) NEXT:[w($x)] PREV:[w(x)] - w($x) NEXT:[jmp?(L2)] PREV:[r(2)] - jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 }) ] PREV:[w($x)] - d(fun foo() { - x = 3 - }) NEXT:[] PREV:[jmp?(L2)] + NEXT:[v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })] PREV:[] + v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) NEXT:[v(var x = 1)] PREV:[] + v(var x = 1) NEXT:[r(1)] PREV:[v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })] + r(1) NEXT:[w(x)] PREV:[v(var x = 1)] + w(x) NEXT:[r(2)] PREV:[r(1)] + r(2) NEXT:[w($x)] PREV:[w(x)] + w($x) NEXT:[jmp?(L2)] PREV:[r(2)] + jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] PREV:[w($x)] + d(fun foo() { x = 3 }) NEXT:[] PREV:[jmp?(L2)] L2: - jmp?(L5) NEXT:[r(object { var x = 1 { $x = ..), d(fun bar() { x = 4 }) ] PREV:[jmp?(L2)] - d(fun bar() { - x = 4 - }) NEXT:[] PREV:[jmp?(L5)] + jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }), d(fun bar() { x = 4 })] PREV:[jmp?(L2)] + d(fun bar() { x = 4 }) NEXT:[] PREV:[jmp?(L5)] L5: - r(object { - var x = 1 - { - $x = 2 - } - fun foo() { - x = 3 - } - fun bar() { - x = 4 - } - }) NEXT:[w(a)] PREV:[jmp?(L5)] - w(a) NEXT:[] PREV:[r(object { var x = 1 { $x = ..)] + r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) NEXT:[w(a)] PREV:[jmp?(L5)] + w(a) NEXT:[] PREV:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } })] L1: - NEXT:[] PREV:[w(a)] + NEXT:[] PREV:[w(a)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, , d(fun foo() { x = 3 }) , d(fun bar() { x = 4 }) ] + NEXT:[] PREV:[, , d(fun foo() { x = 3 }), d(fun bar() { x = 4 })] L3: NEXT:[r(3)] PREV:[] r(3) NEXT:[w(x)] PREV:[] diff --git a/compiler/testData/cfg/backingFieldAccess.instructions b/compiler/testData/cfg/backingFieldAccess.instructions index 43fd84396a7..f9b305f06b9 100644 --- a/compiler/testData/cfg/backingFieldAccess.instructions +++ b/compiler/testData/cfg/backingFieldAccess.instructions @@ -9,19 +9,18 @@ class C { } --------------------- L0: - NEXT:[v(val a: Int get() = 1) ] PREV:[] - v(val a: Int - get() = 1) NEXT:[jmp?(L2)] PREV:[] - jmp?(L2) NEXT:[r($a), d(get() = 1)] PREV:[v(val a: Int get() = 1) ] - d(get() = 1) NEXT:[] PREV:[jmp?(L2)] + NEXT:[v(val a: Int get() = 1)] PREV:[] + v(val a: Int get() = 1) NEXT:[jmp?(L2)] PREV:[] + jmp?(L2) NEXT:[r($a), d(get() = 1)] PREV:[v(val a: Int get() = 1)] + d(get() = 1) NEXT:[] PREV:[jmp?(L2)] L2: - r($a) NEXT:[] PREV:[jmp?(L2)] + r($a) NEXT:[] PREV:[jmp?(L2)] L1: - NEXT:[] PREV:[r($a)] + NEXT:[] PREV:[r($a)] error: - NEXT:[] PREV:[] + NEXT:[] PREV:[] sink: - NEXT:[] PREV:[, , d(get() = 1)] + NEXT:[] PREV:[, , d(get() = 1)] L3: NEXT:[r(1)] PREV:[] r(1) NEXT:[] PREV:[]