| 1256 | } |
| 1257 | |
| 1258 | void DeleteFunction(Function* self) { |
| 1259 | int i; |
| 1260 | DeleteAstStatement(self->funcBlock); |
| 1261 | ClearList(&(self->bools), (ListItemFn)ClearBoolOp); |
| 1262 | /* |
| 1263 | * clean up registers |
| 1264 | */ |
| 1265 | for (i = 0; i < MAXARG_A; i++) { |
| 1266 | if (self->R[i].length()>0) { |
| 1267 | self->R[i].clear(); |
| 1268 | } |
| 1269 | } |
| 1270 | ClearList(&(self->vpend), (ListItemFn)ClearVarListItem); |
| 1271 | DeleteIntSet(self->tpend); |
| 1272 | ClearList(&(self->breaks), nullptr); |
| 1273 | ClearList(&(self->continues), nullptr); |
| 1274 | ClearList(&(self->jmpdests), (ListItemFn)ClearAstStatement); |
| 1275 | DeleteLoopTree(self->loop_tree); |
| 1276 | DeleteIntSet(self->do_opens); |
| 1277 | DeleteIntSet(self->do_closes); |
| 1278 | if (self->funcnumstr.length()>0) { |
| 1279 | self->funcnumstr.clear(); |
| 1280 | } |
| 1281 | delete self; |
| 1282 | } |
| 1283 | |
| 1284 | void DeclareVariable(GluaDecompileContextP ctx, Function* F, std::string name, int reg); |
| 1285 |
no test coverage detected