An undefined value. Use Undef() as the initial value followed by one or more SetElement ops to initialize a struct. Pseudocode example: r0 = set_element undef MyStruct, "field1", f1 r1 = set_element r0, "field2", f2 # r1 now has new struct value with two fields set W
| 252 | |
| 253 | @final |
| 254 | class Undef(Value): |
| 255 | """An undefined value. |
| 256 | |
| 257 | Use Undef() as the initial value followed by one or more SetElement |
| 258 | ops to initialize a struct. Pseudocode example: |
| 259 | |
| 260 | r0 = set_element undef MyStruct, "field1", f1 |
| 261 | r1 = set_element r0, "field2", f2 |
| 262 | # r1 now has new struct value with two fields set |
| 263 | |
| 264 | Warning: Always initialize undefined values before using them, |
| 265 | as otherwise the values are garbage. You shouldn't expect that |
| 266 | undefined values are zeroed, in particular. |
| 267 | """ |
| 268 | |
| 269 | def __init__(self, rtype: RType) -> None: |
| 270 | self.type = rtype |
| 271 | |
| 272 | |
| 273 | class Op(Value): |
no outgoing calls
searching dependent graphs…