MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / codeunexpval

Function codeunexpval

third-party/lua-5.3.5/src/lcode.c:1004–1010  ·  view source on GitHub ↗

** Emit code for unary expressions that "produce values" ** (everything but 'not'). ** Expression to produce final result will be encoded in 'e'. */

Source from the content-addressed store, hash-verified

1002** Expression to produce final result will be encoded in 'e'.
1003*/
1004static void codeunexpval (FuncState *fs, OpCode op, expdesc *e, int line) {
1005 int r = luaK_exp2anyreg(fs, e); /* opcodes operate only on registers */
1006 freeexp(fs, e);
1007 e->u.info = luaK_codeABC(fs, op, 0, r, 0); /* generate opcode */
1008 e->k = VRELOCABLE; /* all those operations are relocatable */
1009 luaK_fixline(fs, line);
1010}
1011
1012
1013/*

Callers 1

luaK_prefixFunction · 0.70

Calls 4

luaK_exp2anyregFunction · 0.70
freeexpFunction · 0.70
luaK_codeABCFunction · 0.70
luaK_fixlineFunction · 0.70

Tested by

no test coverage detected