| 1284 | void DeclareVariable(GluaDecompileContextP ctx, Function* F, std::string name, int reg); |
| 1285 | |
| 1286 | std::string GetR(GluaDecompileContextP ctx, Function* F, int r) { |
| 1287 | if (IS_TABLE(r)) { |
| 1288 | PrintTable(ctx, F, r, 0); |
| 1289 | if (ctx->error.length()>0) return nullptr; |
| 1290 | } |
| 1291 | UnsetPending(ctx, F, r); |
| 1292 | if (ctx->error.length()>0) return nullptr; |
| 1293 | |
| 1294 | if (F->R[r].length()<1) { |
| 1295 | char sb[] = { "R%rrrrr%_PC%pcccccccc%" }; |
| 1296 | sprintf(sb, "R%d_PC%d", r, F->pc); |
| 1297 | DeclareVariable(ctx, F, sb, r); |
| 1298 | }//dirty hack , some numeric FOR loops may cause error |
| 1299 | return F->R[r]; |
| 1300 | } |
| 1301 | |
| 1302 | void DeclareVariable(GluaDecompileContextP ctx, Function* F, std::string name, int reg) { |
| 1303 | IS_VARIABLE(reg) = 1; |
no test coverage detected