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

Function codebitwise

third-party/lua-5.4.6/src/lcode.c:1535–1546  ·  view source on GitHub ↗

** Code bitwise operations; they are all commutative, so the function ** tries to put an integer constant as the 2nd operand (a K operand). */

Source from the content-addressed store, hash-verified

1533** tries to put an integer constant as the 2nd operand (a K operand).
1534*/
1535static void codebitwise (FuncState *fs, BinOpr opr,
1536 expdesc *e1, expdesc *e2, int line) {
1537 int flip = 0;
1538 if (e1->k == VKINT) {
1539 swapexps(e1, e2); /* 'e2' will be the constant operand */
1540 flip = 1;
1541 }
1542 if (e2->k == VKINT && luaK_exp2K(fs, e2)) /* K operand? */
1543 codebinK(fs, opr, e1, e2, flip, line);
1544 else /* no constants */
1545 codebinNoK(fs, opr, e1, e2, flip, line);
1546}
1547
1548
1549/*

Callers 1

luaK_posfixFunction · 0.70

Calls 4

swapexpsFunction · 0.70
luaK_exp2KFunction · 0.70
codebinKFunction · 0.70
codebinNoKFunction · 0.70

Tested by

no test coverage detected