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

Function codebitwise

third-party/lua-5.5.0/src/lcode.c:1616–1627  ·  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

1614** tries to put an integer constant as the 2nd operand (a K operand).
1615*/
1616static void codebitwise (FuncState *fs, BinOpr opr,
1617 expdesc *e1, expdesc *e2, int line) {
1618 int flip = 0;
1619 if (e1->k == VKINT) {
1620 swapexps(e1, e2); /* 'e2' will be the constant operand */
1621 flip = 1;
1622 }
1623 if (e2->k == VKINT && luaK_exp2K(fs, e2)) /* K operand? */
1624 codebinK(fs, opr, e1, e2, flip, line);
1625 else /* no constants */
1626 codebinNoK(fs, opr, e1, e2, flip, line);
1627}
1628
1629
1630/*

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