diff options
author | Lua Team <team@lua.org> | 2006-06-05 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2006-06-05 12:00:00 +0000 |
commit | fc48fbdd7b265a381002c76dcf79584b919104a0 (patch) | |
tree | 0fa484162d99677514d6cf8d80f8f32d9bd23770 | |
parent | 2ccf5a6aa54605d1b4f6a4a6e3b83625780e2cb3 (diff) | |
download | lua-github-fc48fbdd7b265a381002c76dcf79584b919104a0.tar.gz |
Lua 5.1.1-rc35.1.1-rc3
-rw-r--r-- | doc/manual.html | 11 | ||||
-rw-r--r-- | src/ldo.c | 7 | ||||
-rw-r--r-- | src/lparser.c | 11 | ||||
-rw-r--r-- | src/lvm.c | 3 |
4 files changed, 18 insertions, 14 deletions
diff --git a/doc/manual.html b/doc/manual.html index f2de7131..16fbb36e 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -7905,7 +7905,7 @@ then <code>getinfo</code> returns <b>nil</b>. <p> -The returned table my contain all the fields returned by <a href="#lua_getinfo"><code>lua_getinfo</code></a>, +The returned table may contain all the fields returned by <a href="#lua_getinfo"><code>lua_getinfo</code></a>, with the string <code>what</code> describing which fields to fill in. The default for <code>what</code> is to get all information available, except the table of valid lines. @@ -8370,9 +8370,7 @@ is not a userdata of the expected type. <p> Here is the complete syntax of Lua in extended BNF. -It does not describe operator priorities or some syntactical restrictions, -such as <b>return</b> and <b>break</b> statements -can only appear as the <em>last</em> statement of a block. +(It does not describe operator precedences.) @@ -8448,8 +8446,11 @@ can only appear as the <em>last</em> statement of a block. <HR> <SMALL> Last update: -Fri Jun 2 14:33:44 BRT 2006 +Mon Jun 5 17:05:27 BRT 2006 </SMALL> +<!-- +Last change: ready for Lua 5.1.1 +--> </body></html> @@ -1,5 +1,5 @@ /* -** $Id: ldo.c,v 2.37 2005/12/22 16:19:56 roberto Exp $ +** $Id: ldo.c,v 2.38 2006/06/05 19:36:14 roberto Exp $ ** Stack and Call structure of Lua ** See Copyright Notice in lua.h */ @@ -383,12 +383,14 @@ void luaD_call (lua_State *L, StkId func, int nResults) { static void resume (lua_State *L, void *ud) { StkId firstArg = cast(StkId, ud); CallInfo *ci = L->ci; - if (L->status != LUA_YIELD) { /* start coroutine */ + if (L->status == 0) { /* start coroutine? */ lua_assert(ci == L->base_ci && firstArg > L->base); if (luaD_precall(L, firstArg - 1, LUA_MULTRET) != PCRLUA) return; } else { /* resuming from previous yield */ + lua_assert(L->status == LUA_YIELD); + L->status = 0; if (!f_isLua(ci)) { /* `common' yield? */ /* finish interrupted execution of `OP_CALL' */ lua_assert(GET_OPCODE(*((ci-1)->savedpc - 1)) == OP_CALL || @@ -399,7 +401,6 @@ static void resume (lua_State *L, void *ud) { else /* yielded inside a hook: just continue its execution */ L->base = L->ci->base; } - L->status = 0; luaV_execute(L, cast_int(L->ci - L->base_ci)); } diff --git a/src/lparser.c b/src/lparser.c index 6d30ebad..a9be740e 100644 --- a/src/lparser.c +++ b/src/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.41 2006/03/09 18:15:48 roberto Exp $ +** $Id: lparser.c,v 2.42 2006/06/05 15:57:59 roberto Exp $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -299,7 +299,8 @@ static void leaveblock (FuncState *fs) { removevars(fs->ls, bl->nactvar); if (bl->upval) luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0); - lua_assert(!bl->isbreakable || !bl->upval); /* loops have no body */ + /* a block either controls scope or breaks (never both) */ + lua_assert(!bl->isbreakable || !bl->upval); lua_assert(bl->nactvar == fs->nactvar); fs->freereg = fs->nactvar; /* free registers */ luaK_patchtohere(fs, bl->breaklist); @@ -444,6 +445,7 @@ static void recfield (LexState *ls, struct ConsControl *cc) { FuncState *fs = ls->fs; int reg = ls->fs->freereg; expdesc key, val; + int rkkey; if (ls->t.token == TK_NAME) { luaY_checklimit(fs, cc->nh, MAX_INT, "items in a constructor"); checkname(ls, &key); @@ -452,10 +454,9 @@ static void recfield (LexState *ls, struct ConsControl *cc) { yindex(ls, &key); cc->nh++; checknext(ls, '='); - luaK_exp2RK(fs, &key); + rkkey = luaK_exp2RK(fs, &key); expr(ls, &val); - luaK_codeABC(fs, OP_SETTABLE, cc->t->u.s.info, luaK_exp2RK(fs, &key), - luaK_exp2RK(fs, &val)); + luaK_codeABC(fs, OP_SETTABLE, cc->t->u.s.info, rkkey, luaK_exp2RK(fs, &val)); fs->freereg = reg; /* free registers */ } @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 2.62 2006/01/23 19:51:43 roberto Exp $ +** $Id: lvm.c,v 2.63 2006/06/05 15:58:59 roberto Exp $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -376,6 +376,7 @@ void luaV_execute (lua_State *L, int nexeccalls) { TValue *k; const Instruction *pc; reentry: /* entry point */ + lua_assert(isLua(L->ci)); pc = L->savedpc; cl = &clvalue(L->ci->func)->l; base = L->base; |