MCPcopy Create free account
hub / github.com/danomatika/ofxLua / codebitwise

Function codebitwise

libs/lua/lcode.c:1531–1542  ·  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

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

Callers 1

luaK_posfixFunction · 0.85

Calls 4

swapexpsFunction · 0.85
luaK_exp2KFunction · 0.85
codebinKFunction · 0.85
codebinNoKFunction · 0.85

Tested by

no test coverage detected