Skip to content

Commit bce52aa

Browse files
committed
Remove temporary bridge rules from #traverseProjection
The two bridge rules added in bed3503 (Union-unwrap for Field, and bare-value-to-Range for PointerOffset) treated a symptom rather than the root cause. The real issue is in how removeIndexTail and #typeProjection interact during pointer construction and PtrToPtr casts for slice types. Removing these rules exposes the underlying stuck state so the proper fix can be validated against it. See #1011 for the planned structural fix.
1 parent c7c7548 commit bce52aa

1 file changed

Lines changed: 0 additions & 28 deletions

File tree

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

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -509,16 +509,6 @@ The following rule resolves this situation by using the head element.
509509
=> #traverseProjection(DEST, VALUE, projectionElemField(IDX, TY) PROJS, CTXTS) ... </k> // TODO mark context?
510510
[preserves-definedness, priority(100)]
511511
512-
// Temporary bridge rule: after PointerOffset lifts a single value to Range(ListItem(...)),
513-
// unwrap a Union head element so the existing Union + Field rules below can keep running.
514-
rule <k> #traverseProjection(
515-
DEST,
516-
Range(ListItem(Union(_, _) #as VALUE) _REST:List),
517-
projectionElemField(IDX, TY) PROJS,
518-
CTXTS
519-
)
520-
=> #traverseProjection(DEST, VALUE, projectionElemField(IDX, TY) PROJS, CTXTS) ... </k> // TODO mark context?
521-
[preserves-definedness, priority(100)]
522512
```
523513

524514
#### Unions
@@ -660,24 +650,6 @@ Similar to `ConstantIndex`, the slice _end_ index may count from the _end_ or t
660650
andBool START <=Int size(ELEMENTS) -Int END
661651
[preserves-definedness] // Indexes checked to be in range for ELEMENTS
662652
663-
// Temporary bridge rule: PointerOffset is implemented below in terms of Range slicing, so
664-
// lift a single non-Range value to Range(ListItem(...)) to reuse that shared path.
665-
rule <k> #traverseProjection(
666-
DEST,
667-
VAL,
668-
PointerOffset(OFFSET, ORIGIN_LENGTH) PROJS,
669-
CTXTS
670-
)
671-
=> #traverseProjection(
672-
DEST,
673-
Range(ListItem(VAL)),
674-
PointerOffset(OFFSET, ORIGIN_LENGTH) PROJS,
675-
CTXTS
676-
)
677-
...
678-
</k>
679-
requires notBool isRange(VAL)
680-
[preserves-definedness, priority(100)]
681653
682654
rule <k> #traverseProjection(
683655
DEST,

0 commit comments

Comments
 (0)