MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / optimizechoice

Function optimizechoice

other_src/lua/src/lpeg.cpp:919–929  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917
918
919static void optimizechoice (Instruction *p) {
920 assert(p->i.code == IChoice);
921 if (isfixcheck(p + 1)) {
922 int lc = sizei(p + 1);
923 rotate(p, lc, 1);
924 assert(isfixcheck(p) && (p + lc)->i.code == IChoice);
925 (p + lc)->i.aux = op_step(p);
926 check2test(p, (p + lc)->i.offset);
927 (p + lc)->i.offset -= lc;
928 }
929}
930
931
932/*

Callers 3

diff_lFunction · 0.85
basicUnionFunction · 0.85
optionalsFunction · 0.85

Calls 3

sizeiFunction · 0.85
rotateFunction · 0.85
check2testFunction · 0.85

Tested by

no test coverage detected