Skip to content

Conversation

@jfperusse
Copy link

Here's the op_halt patch updated for Lua 5.4.4.

It was tested successfully with vscode-debuggee.lua.

We could confirm the performance gain and that breakpoints and stepping through the code is working fine.

/* LUA_HALT { */
// note: duplicated in ldo.c due to dependency tangle (below requires lopcodes.h and lobject.h)
#define GET_REAL_INSTR(i,p) (GET_OPCODE(i) == OP_HALT ? (p->halts[GETARG_Bx(i)].orig) : (i))
#define vmfetchResume() { \
Copy link
Author

@jfperusse jfperusse Apr 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm seeing random cases where stepping after a halt does not resume properly, as if it ends up offset. This will require further investigation.

dumpByte(D, f->numparams);
dumpByte(D, f->is_vararg);
dumpByte(D, f->maxstacksize);
dumpCode(D, f);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an issue with the patch and the code ends up being dumped twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant