Pseudocode: Generate instructions for unresolved array assignments
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
== A ==
|
||||
class A
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== foo ==
|
||||
fun foo(a: A) {
|
||||
a[1] = 2
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(a: A)
|
||||
magic[FAKE_INITIALIZER](a: A) -> <v0>
|
||||
w(a|<v0>)
|
||||
2 mark({ a[1] = 2 })
|
||||
mark(a[1])
|
||||
error(a[1], No resolved call)
|
||||
r(a) -> <v1>
|
||||
r(1) -> <v2>
|
||||
magic[UNRESOLVED_CALL](a[1]|<v1>, <v2>) -> <v3>
|
||||
r(2) -> <v4>
|
||||
magic[UNRESOLVED_CALL](a[1] = 2|<v3>, <v4>) -> <v5>
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
Reference in New Issue
Block a user