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