Skip to content

Commit

Permalink
al valid frame fix
Browse files Browse the repository at this point in the history
  • Loading branch information
702fbtngus committed Jul 31, 2024
1 parent 517e71d commit ad520f1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions spectec/src/il2al/translate.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,9 @@ let translate_context_winstr winstr =
letI (translate_exp name, getCurFrameE () ~note:name.note) ~at:at;
letI (translate_exp arity, arityE (translate_exp name) ~note:arity.note) ~at:at;
insert_assert inner_exp;
popI (translate_exp inner_exp) ~at:at;
]
@ insert_pop (inner_exp) @
[
insert_assert winstr;
exitI atom ~at:at
]
Expand Down Expand Up @@ -1106,10 +1108,10 @@ let translate_context ctx vs =
letI (translate_exp instrs, contE label ~note:instrs.note) ~at:at;
exitI atom ~at:at
]
| Il.CaseE ([{it = Il.Atom "FRAME_"; at=at'; _} as atom]::_, { it = Il.TupE [ n; f; _hole ]; _ }) ->
let frame = VarE "f" $$ at' % labelT in
| Il.CaseE ([{it = Il.Atom "FRAME_"; _} as atom]::_, { it = Il.TupE [ n; f; _hole ]; _ }) ->
let frame = translate_exp f in
[
letI (frame, getCurFrameE () ~note:f.note) ~at:at;
letI (frame, getCurFrameE () ~note:frameT) ~at:at;
letI (translate_exp n, arityE frame ~note:n.note) ~at:at;
exitI atom ~at:at
]
Expand Down

0 comments on commit ad520f1

Please sign in to comment.