File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -205,20 +205,25 @@ getVal va = do
205205 tell [AssignRaw rVal (ProjectLVal va FieldValue )]
206206 return rVal
207207
208+ -- | Special case projection for self-references
209+ projectLVal VarFunSelfRef FieldTypLev = ProjectState MonPC
210+ projectLVal VarFunSelfRef FieldValLev = ProjectState MonPC
211+ projectLVal va field = ProjectLVal va field
212+
208213-- | Generate instructions assigning the value label of the given runtime LVal
209214-- to a new Raw variable.
210215getValLbl :: VarAccess -> TM RawVar
211216getValLbl va = do
212217 rValLbl <- freshRawVarWith " _vlbl_"
213- tell [AssignRaw rValLbl (ProjectLVal va FieldValLev )]
218+ tell [AssignRaw rValLbl (projectLVal va FieldValLev )]
214219 return rValLbl
215220
216221-- | Generate instructions assigning the type label of the given runtime LVal
217222-- to a new Raw variable.
218223getTyLbl :: VarAccess -> TM RawVar
219224getTyLbl va = do
220- rTyLbl <- freshRawVarWith " _tlbl_"
221- tell [AssignRaw rTyLbl (ProjectLVal va FieldTypLev )]
225+ rTyLbl <- freshRawVarWith " _tlbl_"
226+ tell [AssignRaw rTyLbl (projectLVal va FieldTypLev )]
222227 return rTyLbl
223228
224229-- | Generate instructions assigning the current PC label to a new Raw variable.
Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ guessType = \case
243243 -- Revision 2023-08: Added missing cases
244244 ProjField _ _ -> Nothing
245245 ProjIdx _ _ -> Nothing
246+ ProjectLVal VarFunSelfRef FieldValue -> Just RawFunction
246247 ProjectLVal _ FieldValLev -> Just RawLevel
247248 ProjectLVal _ FieldTypLev -> Just RawLevel
248249 ProjectLVal _ FieldValue -> Nothing
You can’t perform that action at this time.
0 commit comments