Skip to content

Commit f45bd7b

Browse files
committed
fix(rt): Clarify struct offsets and add pointer tests
1 parent 635c58b commit f45bd7b

File tree

1 file changed

+1
-1
lines changed
  • kmir/src/kmir/kdist/mir-semantics/rt

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ Pointers to structs with a single zero-offset field are compatible with pointers
8181
orBool #structOffsets(LAYOUT) ==K machineSize(mirInt(0)) .MachineSizes
8282
orBool #structOffsets(LAYOUT) ==K machineSize(0) .MachineSizes
8383
84+
// Extract field offsets from the struct layout when available (Arbitrary only).
8485
syntax MachineSizes ::= #structOffsets ( MaybeLayoutShape ) [function, total]
85-
8686
rule #structOffsets(someLayoutShape(layoutShape(fieldsShapeArbitrary(mk(OFFSETS)), _, _, _, _))) => OFFSETS
8787
rule #structOffsets(_) => .MachineSizes [owise]
8888
```

0 commit comments

Comments
 (0)