Skip to content

Commit 652f38d

Browse files
committed
merge upsteam
2 parents 44f6657 + 0bd0823 commit 652f38d

File tree

33 files changed

+119
-196
lines changed

33 files changed

+119
-196
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
- os: macos-latest
2525
platform: darwin-arm64
2626
steps:
27-
- uses: actions/checkout@v3
27+
- uses: actions/checkout@v4
2828
with:
2929
submodules : recursive
3030
- uses: actboy168/setup-luamake@master
3131
- run: luamake lua compile/download_deps.lua
3232
- run: luamake -mode release -platform ${{ matrix.platform }}
33-
- run: npm install -g vsce ovsx
33+
- run: npm install -g @vscode/vsce ovsx
3434
- run: npx vsce publish --target ${{ matrix.platform }} -p ${{ secrets.VSCE_KEY }}
3535
working-directory: publish
3636
continue-on-error: true

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"recommendations": [
33
"actboy168.tasks",
4-
"actboy168.extension-path",
54
"actboy168.lua-debug"
65
]
76
}

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"console": "integratedTerminal",
99
"luaVersion": "lua-latest",
1010
"windows": {
11-
"luaexe": "${command:extensionPath}actboy168.lua-debug-2.0.12-win32-x64/bin/lua-debug.exe"
11+
"luaexe": "${extensionInstallFolder:actboy168.lua-debug}/bin/lua-debug.exe"
1212
},
1313
"linux": {
14-
"luaexe": "${command:extensionPath}actboy168.lua-debug-2.0.12-linux-x64/bin/lua-debug",
14+
"luaexe": "${extensionInstallFolder:actboy168.lua-debug}/bin/lua-debug",
1515
},
1616
"osx": {
17-
"luaexe": "${command:extensionPath}actboy168.lua-debug-2.0.12-darwin-arm64/bin/lua-debug",
17+
"luaexe": "${extensionInstallFolder:actboy168.lua-debug}/bin/lua-debug",
1818
},
1919
"outputCapture": [
2020
],
@@ -34,7 +34,7 @@
3434
"--extensionDevelopmentPath=${workspaceFolder}/extension/"
3535
],
3636
"env": {
37-
"VSCODE_EXTENSION_PATH" : "${command:extensionPath}actboy168.lua-debug-2.0.12"
37+
"VSCODE_EXTENSION_PATH" : "${extensionInstallFolder:actboy168.lua-debug}"
3838
}
3939
}
4040
]

.vscode/tasks.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
"lua",
3333
"compile/copy.lua",
3434
"extension",
35-
"extension",
36-
"${command:extensionPath}"
35+
"${extensionInstallFolder:actboy168.lua-debug}"
3736
]
3837
},
3938
{
@@ -43,8 +42,7 @@
4342
"lua",
4443
"compile/copy.lua",
4544
"publish",
46-
"publish",
47-
"${command:extensionPath}"
45+
"${extensionInstallFolder:actboy168.lua-debug}"
4846
]
4947
}
5048
]

3rd/bee.lua

Submodule bee.lua updated 141 files

3rd/lua/lua-latest/lcode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#define MAXREGS 255
3636

3737

38+
/* (note that expressions VJMP also have jumps.) */
3839
#define hasjumps(e) ((e)->t != (e)->f)
3940

4041

3rd/lua/lua-latest/ldo.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop) {
9494
setsvalue2s(L, oldtop, G(L)->memerrmsg); /* reuse preregistered msg. */
9595
break;
9696
}
97-
case LUA_ERRERR: {
98-
setsvalue2s(L, oldtop, luaS_newliteral(L, "error in error handling"));
99-
break;
100-
}
10197
case LUA_OK: { /* special case only for closing upvalues */
10298
setnilvalue(s2v(oldtop)); /* no error message */
10399
break;
@@ -202,6 +198,16 @@ static void correctstack (lua_State *L) {
202198
/* some space for error handling */
203199
#define ERRORSTACKSIZE (LUAI_MAXSTACK + 200)
204200

201+
202+
/* raise an error while running the message handler */
203+
l_noret luaD_errerr (lua_State *L) {
204+
TString *msg = luaS_newliteral(L, "error in error handling");
205+
setsvalue2s(L, L->top.p, msg);
206+
L->top.p++; /* assume EXTRA_STACK */
207+
luaD_throw(L, LUA_ERRERR);
208+
}
209+
210+
205211
/*
206212
** Reallocate the stack to a new size, correcting all pointers into it.
207213
** In ISO C, any pointer use after the pointer has been deallocated is
@@ -251,7 +257,7 @@ int luaD_growstack (lua_State *L, int n, int raiseerror) {
251257
a stack error; cannot grow further than that. */
252258
lua_assert(stacksize(L) == ERRORSTACKSIZE);
253259
if (raiseerror)
254-
luaD_throw(L, LUA_ERRERR); /* error inside message handler */
260+
luaD_errerr(L); /* error inside message handler */
255261
return 0; /* if not 'raiseerror', just signal it */
256262
}
257263
else if (n < LUAI_MAXSTACK) { /* avoids arithmetic overflows */

3rd/lua/lua-latest/ldo.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
/* type of protected functions, to be ran by 'runprotected' */
6161
typedef void (*Pfunc) (lua_State *L, void *ud);
6262

63+
LUAI_FUNC l_noret luaD_errerr (lua_State *L);
6364
LUAI_FUNC void luaD_seterrorobj (lua_State *L, int errcode, StkId oldtop);
6465
LUAI_FUNC int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
6566
const char *mode);

3rd/lua/lua-latest/lstate.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void luaE_checkcstack (lua_State *L) {
166166
if (getCcalls(L) == LUAI_MAXCCALLS)
167167
luaG_runerror(L, "C stack overflow");
168168
else if (getCcalls(L) >= (LUAI_MAXCCALLS / 10 * 11))
169-
luaD_throw(L, LUA_ERRERR); /* error while handling stack error */
169+
luaD_errerr(L); /* error while handling stack error */
170170
}
171171

172172

@@ -272,7 +272,9 @@ static void close_state (lua_State *L) {
272272
luaC_freeallobjects(L); /* just collect its objects */
273273
else { /* closing a fully built state */
274274
L->ci = &L->base_ci; /* unwind CallInfo list */
275+
L->errfunc = 0; /* stack unwind can "throw away" the error function */
275276
luaD_closeprotected(L, 1, LUA_OK); /* close all upvalues */
277+
L->top.p = L->stack.p + 1; /* empty the stack to run finalizers */
276278
luaC_freeallobjects(L); /* collect all objects */
277279
luai_userstateclose(L);
278280
}
@@ -328,6 +330,7 @@ int luaE_resetthread (lua_State *L, int status) {
328330
if (status == LUA_YIELD)
329331
status = LUA_OK;
330332
L->status = LUA_OK; /* so it can run __close metamethods */
333+
L->errfunc = 0; /* stack unwind can "throw away" the error function */
331334
status = luaD_closeprotected(L, 1, status);
332335
if (status != LUA_OK) /* errors? */
333336
luaD_seterrorobj(L, status, L->stack.p + 1);

0 commit comments

Comments
 (0)