Skip to content

Commit 395e132

Browse files
committed
feat(rt): support zero-sized constant
1 parent 8ef12df commit 395e132

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • kmir/src/kmir/kdist/mir-semantics/rt

kmir/src/kmir/kdist/mir-semantics/rt/data.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ Constant operands are simply decoded according to their type.
128128
...
129129
</k>
130130
requires typeInfoVoidType =/=K lookupTy(TY)
131+
132+
// Fallback for zero-sized constants whose type metadata was not emitted.
133+
rule <k> operandConstant(constOperand(_, _, mirConst(constantKindZeroSized, TY, _)))
134+
=> Aggregate(variantIdx(0), .List)
135+
...
136+
</k>
137+
requires typeInfoVoidType ==K lookupTy(TY)
131138
```
132139

133140
### Copying and Moving

0 commit comments

Comments
 (0)