| 1718 | } |
| 1719 | |
| 1720 | void DeclarePendingLocals(GluaDecompileContextP ctx, Function* F) { |
| 1721 | std::stringstream str; |
| 1722 | if (SET_SIZE(F->tpend)>0) { |
| 1723 | if (ctx->guess_locals) { |
| 1724 | clear_sstream(str); |
| 1725 | str << "-- WARNING: pending registers."; |
| 1726 | } |
| 1727 | else { |
| 1728 | ListItem* walk = F->tpend->list.head; |
| 1729 | clear_sstream(str); |
| 1730 | str << "-- WARNING: pending registers. Declaring locals."; |
| 1731 | AddStatement(ctx, F, str); |
| 1732 | while (walk) { |
| 1733 | int reg = lua_cast(IntSetItem*, walk)->value; |
| 1734 | std::string s(REGISTER(reg)); |
| 1735 | GetR(ctx, F, reg); |
| 1736 | DeclareLocal(ctx, F, reg, s); |
| 1737 | walk = walk->next; |
| 1738 | } |
| 1739 | } |
| 1740 | } |
| 1741 | } |
| 1742 | |
| 1743 | Proto* toproto(lua_State* L, int i); |
| 1744 |
no test coverage detected