168 | 168 |
block'' = substDeclName name newName block'
|
169 | 169 |
in
|
170 | 170 |
foldDeclsRenaming decls id' block''
|
171 | |
|
|
171 |
foldDeclsRenaming ((Reserve name typ _):decls) id block =
|
|
172 |
error ("block-level '" ++ name ++ "' cannot supply initial value")
|
172 | 173 |
|
173 | 174 |
-- this is kind of horrible. that we do it this way, i mean
|
174 | 175 |
substDeclName n1 n2 (Block decls instrs) =
|
|
197 | 198 |
SUB (mapStorageLocationName n1 n2 sl1) (mapStorageLocationName n1 n2 sl2)
|
198 | 199 |
mapInstrName n1 n2 (OR sl1 sl2) =
|
199 | 200 |
OR (mapStorageLocationName n1 n2 sl1) (mapStorageLocationName n1 n2 sl2)
|
|
201 |
mapInstrName n1 n2 (XOR sl1 sl2) =
|
|
202 |
XOR (mapStorageLocationName n1 n2 sl1) (mapStorageLocationName n1 n2 sl2)
|
|
203 |
mapInstrName n1 n2 (SHL sl1 sl2) =
|
|
204 |
SHL (mapStorageLocationName n1 n2 sl1) (mapStorageLocationName n1 n2 sl2)
|
|
205 |
mapInstrName n1 n2 (SHR sl1 sl2) =
|
|
206 |
SHR (mapStorageLocationName n1 n2 sl1) (mapStorageLocationName n1 n2 sl2)
|
|
207 |
mapInstrName n1 n2 (BIT sl1) =
|
|
208 |
BIT (mapStorageLocationName n1 n2 sl1)
|
|
209 |
mapInstrName n1 n2 (JMPVECTOR sl1) =
|
|
210 |
JMPVECTOR (mapStorageLocationName n1 n2 sl1)
|
|
211 |
mapInstrName n1 n2 (DELTA sl1 v) =
|
|
212 |
DELTA (mapStorageLocationName n1 n2 sl1) v
|
200 | 213 |
|
201 | 214 |
{-
|
202 | |
| XOR StorageLocation StorageLocation
|
203 | |
| SHL StorageLocation StorageLocation
|
204 | |
| SHR StorageLocation StorageLocation
|
205 | |
| BIT StorageLocation
|
206 | |
| JMPVECTOR StorageLocation
|
207 | 215 |
| IF InternalID Branch Block Block
|
208 | 216 |
| REPEAT InternalID Branch Block
|
209 | |
| DELTA StorageLocation DataValue
|
210 | 217 |
| WITH WithInstruction Block
|
211 | 218 |
| COPYROUTINE RoutineName StorageLocation
|
212 | 219 |
-}
|