diff options
author | Li Jin <dragon-fly@qq.com> | 2022-12-02 10:40:09 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-12-02 10:40:09 +0800 |
commit | 298b18dbe852300199cc529c942a181bead5f135 (patch) | |
tree | f4b5ae89b6920fa0a12c693118f85334f19754f8 /src/3rdParty/lua/lparser.c | |
parent | a6a65ba26a9d320611abcbfba49fa724edfb4dad (diff) | |
download | yuescript-298b18dbe852300199cc529c942a181bead5f135.tar.gz yuescript-298b18dbe852300199cc529c942a181bead5f135.tar.bz2 yuescript-298b18dbe852300199cc529c942a181bead5f135.zip |
update Lua.
Diffstat (limited to 'src/3rdParty/lua/lparser.c')
-rw-r--r-- | src/3rdParty/lua/lparser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/3rdParty/lua/lparser.c b/src/3rdParty/lua/lparser.c index fe693b5..24668c2 100644 --- a/src/3rdParty/lua/lparser.c +++ b/src/3rdParty/lua/lparser.c | |||
@@ -1944,10 +1944,10 @@ LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, | |||
1944 | LexState lexstate; | 1944 | LexState lexstate; |
1945 | FuncState funcstate; | 1945 | FuncState funcstate; |
1946 | LClosure *cl = luaF_newLclosure(L, 1); /* create main closure */ | 1946 | LClosure *cl = luaF_newLclosure(L, 1); /* create main closure */ |
1947 | setclLvalue2s(L, L->top, cl); /* anchor it (to avoid being collected) */ | 1947 | setclLvalue2s(L, L->top.p, cl); /* anchor it (to avoid being collected) */ |
1948 | luaD_inctop(L); | 1948 | luaD_inctop(L); |
1949 | lexstate.h = luaH_new(L); /* create table for scanner */ | 1949 | lexstate.h = luaH_new(L); /* create table for scanner */ |
1950 | sethvalue2s(L, L->top, lexstate.h); /* anchor it */ | 1950 | sethvalue2s(L, L->top.p, lexstate.h); /* anchor it */ |
1951 | luaD_inctop(L); | 1951 | luaD_inctop(L); |
1952 | funcstate.f = cl->p = luaF_newproto(L); | 1952 | funcstate.f = cl->p = luaF_newproto(L); |
1953 | luaC_objbarrier(L, cl, cl->p); | 1953 | luaC_objbarrier(L, cl, cl->p); |
@@ -1961,7 +1961,7 @@ LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, | |||
1961 | lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs); | 1961 | lua_assert(!funcstate.prev && funcstate.nups == 1 && !lexstate.fs); |
1962 | /* all scopes should be correctly finished */ | 1962 | /* all scopes should be correctly finished */ |
1963 | lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0); | 1963 | lua_assert(dyd->actvar.n == 0 && dyd->gt.n == 0 && dyd->label.n == 0); |
1964 | L->top--; /* remove scanner's table */ | 1964 | L->top.p--; /* remove scanner's table */ |
1965 | return cl; /* closure is on the stack, too */ | 1965 | return cl; /* closure is on the stack, too */ |
1966 | } | 1966 | } |
1967 | 1967 | ||