MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / DeleteFunction

Function DeleteFunction

src/Chain/libraries/glua/glua_decompile.cpp:1258–1282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258void 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
1284void DeclareVariable(GluaDecompileContextP ctx, Function* F, std::string name, int reg);
1285

Callers 1

ProcessCodeFunction · 0.85

Calls 6

DeleteAstStatementFunction · 0.85
ClearListFunction · 0.85
DeleteIntSetFunction · 0.85
DeleteLoopTreeFunction · 0.85
lengthMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected