Skip to content

Commit

Permalink
temp workaround in listcode() to emit old opcode names for GETTABLE_S…
Browse files Browse the repository at this point in the history
…K, SELF_SK and SETTABLE_SK
  • Loading branch information
Dibyendu Majumdar committed Sep 23, 2016
1 parent dcc8c30 commit af931bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ltests.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,11 @@ static char *buildop (Proto *p, int pc, char *buff) {
Instruction i = p->code[pc];
OpCode o = GET_OPCODE(i);
const char *name = luaP_opnames[o];

/* FIXME Temp hack to output old opcodes so that the tests
do not break */
if (strcmp(name, "GETTABLE_SK") == 0) name = "GETTABLE";
else if (strcmp(name, "SELF_SK") == 0) name = "SELF";
else if (strcmp(name, "SETTABLE_SK") == 0) name = "SETTABLE";
int line = getfuncline(p, pc);
sprintf(buff, "(%4d) %4d - ", line, pc);
switch (getOpMode(o)) {
Expand Down

0 comments on commit af931bf

Please sign in to comment.