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

Function DeclarePendingLocals

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

Source from the content-addressed store, hash-verified

1718}
1719
1720void 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
1743Proto* toproto(lua_State* L, int i);
1744

Callers 1

ProcessCodeFunction · 0.85

Calls 4

AddStatementFunction · 0.85
GetRFunction · 0.85
DeclareLocalFunction · 0.85
clear_sstreamFunction · 0.70

Tested by

no test coverage detected