Skip to content

Commit da401bf

Browse files
committed
Merge branch 'master' of https://github.com/actboy168/bee.lua
2 parents 1a8a41e + 51bb8fa commit da401bf

File tree

17 files changed

+80
-24
lines changed

17 files changed

+80
-24
lines changed

3rd/lua55/lcode.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,9 +1370,11 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) {
13701370
fillidxk(t, k->u.info, VINDEXUP); /* literal short string */
13711371
}
13721372
else if (t->k == VVARGVAR) { /* indexing the vararg parameter? */
1373-
lua_assert(t->u.ind.t == fs->f->numparams);
1374-
t->u.ind.t = cast_byte(t->u.var.ridx);
1375-
fillidxk(t, luaK_exp2anyreg(fs, k), VVARGIND); /* register */
1373+
int kreg = luaK_exp2anyreg(fs, k); /* put key in some register */
1374+
lu_byte vreg = cast_byte(t->u.var.ridx); /* register with vararg param. */
1375+
lua_assert(vreg == fs->f->numparams);
1376+
t->u.ind.t = vreg; /* (avoid a direct assignment; values may overlap) */
1377+
fillidxk(t, kreg, VVARGIND); /* 't' represents 'vararg[k]' */
13761378
}
13771379
else {
13781380
/* register index of the table */

3rd/lua55/lparser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ static void buildglobal (LexState *ls, TString *varname, expdesc *var) {
505505
init_exp(var, VGLOBAL, -1); /* global by default */
506506
singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
507507
if (var->k == VGLOBAL)
508-
luaK_semerror(ls, "_ENV is global when accessing variable '%s'",
509-
getstr(varname));
508+
luaK_semerror(ls, "%s is global when accessing variable '%s'",
509+
LUA_ENV, getstr(varname));
510510
luaK_exp2anyregup(fs, var); /* _ENV could be a constant */
511511
codestring(&key, varname); /* key is variable name */
512512
luaK_indexed(fs, var, &key); /* 'var' represents _ENV[varname] */

bee/crash/handler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#pragma once
22

33
#if defined(_MSC_VER) && !defined(__clang__) && !defined(__SANITIZE_ADDRESS__)
4-
# include <bee/crash/handler_win.h>
5-
#elif defined(__linux__)
6-
# include <bee/crash/handler_linux.h>
4+
# include <bee/crash/windows/handler_win.h>
5+
//#elif defined(__linux__)
6+
//# include <bee/crash/linux/handler_linux.h>
77
#else
88
namespace bee::crash {
99
class empty_handler {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include <bee/crash/allocator.h>
2-
#include <bee/crash/handler_linux.h>
2+
#include <bee/crash/linux/handler_linux.h>
3+
#include <bee/crash/linux/unwind_linux.h>
34
#include <bee/crash/nanoid.h>
45
#include <bee/crash/stacktrace.h>
5-
#include <bee/crash/unwind_linux.h>
66
#include <errno.h>
77
#include <fcntl.h>
88
#include <pthread.h>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <bee/crash/unwind_linux.h>
1+
#include <bee/crash/linux/unwind_linux.h>
22

33
#define UNW_LOCAL_ONLY
44
#include <libunwind.h>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#include <bee/crash/handler_win.h>
21
#include <bee/crash/nanoid.h>
32
#include <bee/crash/stacktrace.h>
4-
#include <bee/crash/unwind_win.h>
3+
#include <bee/crash/windows/handler_win.h>
4+
#include <bee/crash/windows/unwind_win.h>
55
#include <bee/win/wtf8.h>
66
#include <io.h>
77

0 commit comments

Comments
 (0)