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

Function DeclareLocal

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

Source from the content-addressed store, hash-verified

1703#define TRY(ctx, x) x; if (ctx->error.length()>0) goto errorHandler
1704
1705void DeclareLocal(GluaDecompileContextP ctx, Function* F, int ixx, std::string value) {
1706 if (!IS_VARIABLE(ixx)) {
1707 char x[10] = "";
1708 std::stringstream str;
1709
1710 sprintf(x, "l_%d_%d", ctx->functionnum, ixx);
1711 DeclareVariable(ctx, F, x, ixx);
1712 IS_VARIABLE(ixx) = 1;
1713 clear_sstream(str);
1714 str << "local " << x << " = " << value;
1715 RawAddStatement(F, str);
1716 F->freeLocal++;
1717 }
1718}
1719
1720void DeclarePendingLocals(GluaDecompileContextP ctx, Function* F) {
1721 std::stringstream str;

Callers 4

AssignRegFunction · 0.85
UnsetPendingFunction · 0.85
DeclarePendingLocalsFunction · 0.85
ProcessCodeFunction · 0.85

Calls 3

DeclareVariableFunction · 0.85
RawAddStatementFunction · 0.85
clear_sstreamFunction · 0.70

Tested by

no test coverage detected