| == C == |
| class C() { |
| val a: Int = 1 |
| |
| companion object { |
| val x : Int |
| |
| init { |
| x = 1 |
| } |
| |
| |
| fun foo() { |
| val b : Int = 1 |
| doSmth(b) |
| } |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| v(val a: Int = 1) |
| r(1) -> <v0> |
| w(a|<v0>) |
| L1: |
| <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == doSmth == |
| fun doSmth(i: Int) {} |
| --------------------- |
| L0: |
| 1 <START> |
| v(i: Int) |
| magic[FAKE_INITIALIZER](i: Int) -> <v0> |
| w(i|<v0>) |
| 2 mark({}) |
| read (Unit) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == test1 == |
| fun test1() { |
| val a = object { |
| val x : Int |
| init { |
| x = 1 |
| } |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| 2 mark({ val a = object { val x : Int init { x = 1 } } }) |
| v(val a = object { val x : Int init { x = 1 } }) |
| mark(object { val x : Int init { x = 1 } }) |
| v(val x : Int) |
| 3 mark({ x = 1 }) |
| magic[IMPLICIT_RECEIVER](x) -> <v0> |
| r(1) -> <v1> |
| w(x|<v0>, <v1>) |
| 2 r(object { val x : Int init { x = 1 } }) -> <v3> |
| w(a|<v3>) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == O == |
| object O { |
| val x : Int |
| init { |
| x = 1 |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| v(val x : Int) |
| 2 mark({ x = 1 }) |
| magic[IMPLICIT_RECEIVER](x) -> <v0> |
| r(1) -> <v1> |
| w(x|<v0>, <v1>) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == test2 == |
| fun test2() { |
| val b = 1 |
| val a = object { |
| val x = b |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| 2 mark({ val b = 1 val a = object { val x = b } }) |
| v(val b = 1) |
| r(1) -> <v0> |
| w(b|<v0>) |
| v(val a = object { val x = b }) |
| mark(object { val x = b }) |
| v(val x = b) |
| r(b) -> <v1> |
| w(x|<v1>) |
| r(object { val x = b }) -> <v2> |
| w(a|<v2>) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == test3 == |
| fun test3() { |
| val a = object { |
| val y : Int |
| fun inner_bar() { |
| y = 10 |
| } |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| 2 mark({ val a = object { val y : Int fun inner_bar() { y = 10 } } }) |
| v(val a = object { val y : Int fun inner_bar() { y = 10 } }) |
| mark(object { val y : Int fun inner_bar() { y = 10 } }) |
| v(val y : Int) |
| jmp?(L2) NEXT:[r(object { val y : Int fun inner_bar() { y = 10 } }) -> <v0>, d(fun inner_bar() { y = 10 })] |
| d(fun inner_bar() { y = 10 }) NEXT:[<SINK>] |
| L2 [after local declaration]: |
| r(object { val y : Int fun inner_bar() { y = 10 } }) -> <v0> PREV:[jmp?(L2)] |
| w(a|<v0>) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>, d(fun inner_bar() { y = 10 })] |
| ===================== |
| == inner_bar == |
| fun inner_bar() { |
| y = 10 |
| } |
| --------------------- |
| L3: |
| 3 <START> |
| 4 mark({ y = 10 }) |
| magic[IMPLICIT_RECEIVER](y) -> <v0> |
| r(10) -> <v1> |
| w(y|<v0>, <v1>) |
| L4: |
| 3 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == test4 == |
| fun test4() { |
| val a = object { |
| val x : Int |
| val y : Int |
| init { |
| x = 1 |
| } |
| fun ggg() { |
| y = 10 |
| } |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| 2 mark({ val a = object { val x : Int val y : Int init { x = 1 } fun ggg() { y = 10 } } }) |
| v(val a = object { val x : Int val y : Int init { x = 1 } fun ggg() { y = 10 } }) |
| mark(object { val x : Int val y : Int init { x = 1 } fun ggg() { y = 10 } }) |
| v(val x : Int) |
| v(val y : Int) |
| 3 mark({ x = 1 }) |
| magic[IMPLICIT_RECEIVER](x) -> <v0> |
| r(1) -> <v1> |
| w(x|<v0>, <v1>) |
| 2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int init { x = 1 } fun ggg() { y = 10 } }) -> <v3>, d(fun ggg() { y = 10 })] |
| d(fun ggg() { y = 10 }) NEXT:[<SINK>] |
| L2 [after local declaration]: |
| r(object { val x : Int val y : Int init { x = 1 } fun ggg() { y = 10 } }) -> <v3> PREV:[jmp?(L2)] |
| w(a|<v3>) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>, d(fun ggg() { y = 10 })] |
| ===================== |
| == ggg == |
| fun ggg() { |
| y = 10 |
| } |
| --------------------- |
| L3: |
| 3 <START> |
| 4 mark({ y = 10 }) |
| magic[IMPLICIT_RECEIVER](y) -> <v0> |
| r(10) -> <v1> |
| w(y|<v0>, <v1>) |
| L4: |
| 3 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == test5 == |
| fun test5() { |
| val a = object { |
| var x = 1 |
| init { |
| x = 2 |
| } |
| fun foo() { |
| x = 3 |
| } |
| fun bar() { |
| x = 4 |
| } |
| } |
| } |
| --------------------- |
| L0: |
| 1 <START> |
| 2 mark({ val a = object { var x = 1 init { x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } }) |
| v(val a = object { var x = 1 init { x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) |
| mark(object { var x = 1 init { x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) |
| v(var x = 1) |
| r(1) -> <v0> |
| w(x|<v0>) |
| 3 mark({ x = 2 }) |
| magic[IMPLICIT_RECEIVER](x) -> <v1> |
| r(2) -> <v2> |
| w(x|<v1>, <v2>) |
| 2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] |
| d(fun foo() { x = 3 }) NEXT:[<SINK>] |
| L2 [after local declaration]: |
| jmp?(L5) NEXT:[r(object { var x = 1 init { x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> <v4>, d(fun bar() { x = 4 })] PREV:[jmp?(L2)] |
| d(fun bar() { x = 4 }) NEXT:[<SINK>] |
| L5 [after local declaration]: |
| r(object { var x = 1 init { x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> <v4> PREV:[jmp?(L5)] |
| w(a|<v4>) |
| L1: |
| 1 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>, d(fun foo() { x = 3 }), d(fun bar() { x = 4 })] |
| ===================== |
| == foo == |
| fun foo() { |
| x = 3 |
| } |
| --------------------- |
| L3: |
| 3 <START> |
| 4 mark({ x = 3 }) |
| magic[IMPLICIT_RECEIVER](x) -> <v0> |
| r(3) -> <v1> |
| w(x|<v0>, <v1>) |
| L4: |
| 3 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |
| == bar == |
| fun bar() { |
| x = 4 |
| } |
| --------------------- |
| L6: |
| 3 <START> |
| 4 mark({ x = 4 }) |
| magic[IMPLICIT_RECEIVER](x) -> <v0> |
| r(4) -> <v1> |
| w(x|<v0>, <v1>) |
| L7: |
| 3 <END> NEXT:[<SINK>] |
| error: |
| <ERROR> PREV:[] |
| sink: |
| <SINK> PREV:[<ERROR>, <END>] |
| ===================== |