MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / codearith

Function codearith

lib/lua/src/lcode.c:1502–1508  ·  view source on GitHub ↗

** Code arithmetic operators ('+', '-', ...). If second operand is a ** constant in the proper range, use variant opcodes with K operands. */

Source from the content-addressed store, hash-verified

1500** constant in the proper range, use variant opcodes with K operands.
1501*/
1502static void codearith (FuncState *fs, BinOpr opr,
1503 expdesc *e1, expdesc *e2, int flip, int line) {
1504 if (tonumeral(e2, NULL) && luaK_exp2K(fs, e2)) /* K operand? */
1505 codebinK(fs, opr, e1, e2, flip, line);
1506 else /* 'e2' is neither an immediate nor a K operand */
1507 codebinNoK(fs, opr, e1, e2, flip, line);
1508}
1509
1510
1511/*

Callers 2

codecommutativeFunction · 0.85
luaK_posfixFunction · 0.85

Calls 4

tonumeralFunction · 0.85
luaK_exp2KFunction · 0.85
codebinKFunction · 0.85
codebinNoKFunction · 0.85

Tested by

no test coverage detected