MCPcopy Create free account
hub / github.com/ArduPilot/ardupilot / codeunexpval

Function codeunexpval

libraries/AP_Scripting/lua/src/lcode.c:1011–1017  ·  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

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

Callers 1

luaK_prefixFunction · 0.85

Calls 4

luaK_exp2anyregFunction · 0.85
freeexpFunction · 0.85
luaK_codeABCFunction · 0.85
luaK_fixlineFunction · 0.85

Tested by

no test coverage detected