1 diff -r lua-5.0/COPYRIGHT lua-5.0.2/COPYRIGHT
3 < Copyright (C) 2003 Tecgraf, PUC-Rio.
5 > Copyright (C) 2003-2004 Tecgraf, PUC-Rio.
6 diff -r lua-5.0/Makefile lua-5.0.2/Makefile
9 > @find . -newer MANIFEST -type f
11 diff -r lua-5.0/doc/readme.html lua-5.0.2/doc/readme.html
13 < <LI><A HREF="manual.html">Reference manual</A>
15 > <LI><A HREF="contents.html">Reference manual</A>
17 < Tue Apr 1 14:35:18 EST 2003
19 > Thu Mar 11 23:08:56 BRT 2004
20 diff -r lua-5.0/include/lua.h lua-5.0.2/include/lua.h
22 < ** $Id: lua.h,v 1.175 2003/03/18 12:31:39 roberto Exp $
24 > ** $Id: lua.h,v 1.175b 2003/03/18 12:31:39 roberto Exp $
26 < #define LUA_VERSION "Lua 5.0"
27 < #define LUA_COPYRIGHT "Copyright (C) 1994-2003 Tecgraf, PUC-Rio"
29 > #define LUA_VERSION "Lua 5.0.2"
30 > #define LUA_COPYRIGHT "Copyright (C) 1994-2004 Tecgraf, PUC-Rio"
32 < * Copyright (C) 1994-2003 Tecgraf, PUC-Rio. All rights reserved.
34 > * Copyright (C) 1994-2004 Tecgraf, PUC-Rio. All rights reserved.
35 diff -r lua-5.0/src/ldo.c lua-5.0.2/src/ldo.c
37 < ** $Id: ldo.c,v 1.217 2003/04/03 13:35:34 roberto Exp $
39 > ** $Id: ldo.c,v 1.217a 2003/04/03 13:35:34 roberto Exp $
41 < if (nargs >= L->top - L->base)
42 < luaG_runerror(L, "cannot resume dead coroutine");
44 > lua_assert(nargs < L->top - L->base);
46 < else if (ci->state & CI_YIELD) { /* inside a yield? */
48 > else { /* inside a yield */
49 > lua_assert(ci->state & CI_YIELD);
52 < luaG_runerror(L, "cannot resume non-suspended coroutine");
54 > static int resume_error (lua_State *L, const char *msg) {
55 > L->top = L->ci->base;
56 > setsvalue2s(L->top, luaS_new(L, msg));
64 > if (L->ci == L->base_ci) {
65 > if (nargs >= L->top - L->base)
66 > return resume_error(L, "cannot resume dead coroutine");
68 > else if (!(L->ci->state & CI_YIELD)) /* not inside a yield? */
69 > return resume_error(L, "cannot resume non-suspended coroutine");
70 diff -r lua-5.0/src/lgc.c lua-5.0.2/src/lgc.c
72 < ** $Id: lgc.c,v 1.171 2003/04/03 13:35:34 roberto Exp $
74 > ** $Id: lgc.c,v 1.171a 2003/04/03 13:35:34 roberto Exp $
76 < void luaC_separateudata (lua_State *L) {
78 > size_t luaC_separateudata (lua_State *L) {
81 > deadmem += sizeudata(gcotou(curr)->uv.len);
85 < if (!(ci->state & CI_C) && lim < ci->top)
89 < static void checkSizes (lua_State *L) {
91 > static void checkSizes (lua_State *L, size_t deadmem) {
93 < G(L)->GCthreshold = 2*G(L)->nblocks; /* new threshold */
95 > G(L)->GCthreshold = 2*G(L)->nblocks - deadmem; /* new threshold */
97 < static void mark (lua_State *L) {
99 > static size_t mark (lua_State *L) {
102 < luaC_separateudata(L); /* separate userdata to be preserved */
104 > deadmem = luaC_separateudata(L); /* separate userdata to be preserved */
110 > size_t deadmem = mark(L);
114 > checkSizes(L, deadmem);
115 diff -r lua-5.0/src/lgc.h lua-5.0.2/src/lgc.h
117 < ** $Id: lgc.h,v 1.19 2003/02/28 19:45:15 roberto Exp $
119 > ** $Id: lgc.h,v 1.19a 2003/02/28 19:45:15 roberto Exp $
121 < void luaC_separateudata (lua_State *L);
123 > size_t luaC_separateudata (lua_State *L);
124 diff -r lua-5.0/src/lib/lbaselib.c lua-5.0.2/src/lib/lbaselib.c
126 < ** $Id: lbaselib.c,v 1.130 2003/04/03 13:35:34 roberto Exp $
128 > ** $Id: lbaselib.c,v 1.130b 2003/04/03 13:35:34 roberto Exp $
130 > int n = lua_gettop(L);
132 < return lua_gettop(L) - 1;
134 > return lua_gettop(L) - n;
139 diff -r lua-5.0/src/lib/liolib.c lua-5.0.2/src/lib/liolib.c
141 < ** $Id: liolib.c,v 2.39 2003/03/19 21:16:12 roberto Exp $
143 > ** $Id: liolib.c,v 2.39a 2003/03/19 21:16:12 roberto Exp $
145 < if (lua_isnone(L, 1)) {
147 > if (lua_isnone(L, 1) && lua_type(L, lua_upvalueindex(1)) == LUA_TTABLE) {
152 diff -r lua-5.0/src/lparser.c lua-5.0.2/src/lparser.c
154 < ** $Id: lparser.c,v 1.208 2003/04/03 13:35:34 roberto Exp $
156 > ** $Id: lparser.c,v 1.208a 2003/04/03 13:35:34 roberto Exp $
158 > FuncState *fs = ls->fs;
160 < init_exp(&v, VLOCAL, ls->fs->freereg++);
162 > init_exp(&v, VLOCAL, fs->freereg);
163 > luaK_reserveregs(fs, 1);
165 < luaK_storevar(ls->fs, &v, &b);
167 > luaK_storevar(fs, &v, &b);
168 > /* debug information will only see the variable after this point! */
169 > getlocvar(fs, fs->nactvar - 1).startpc = fs->pc;
170 diff -r lua-5.0/src/luac/Makefile lua-5.0.2/src/luac/Makefile
172 < $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS)
174 > $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB)
175 diff -r lua-5.0/src/luac/luac.c lua-5.0.2/src/luac/luac.c
177 < ** $Id: luac.c,v 1.44 2003/04/07 20:34:20 lhf Exp $
179 > ** $Id: luac.c,v 1.44a 2003/04/07 20:34:20 lhf Exp $
184 diff -r lua-5.0/src/lvm.c lua-5.0.2/src/lvm.c
186 < ** $Id: lvm.c,v 1.284 2003/04/03 13:35:34 roberto Exp $
188 > ** $Id: lvm.c,v 1.284b 2003/04/03 13:35:34 roberto Exp $
190 < if (mask > LUA_MASKLINE) { /* instruction-hook set? */
192 > if (mask & LUA_MASKCOUNT) { /* instruction-hook set? */
194 < L->ci->u.l.pc = &pc;
195 < if (L->hookmask & LUA_MASKCALL)
197 > if (L->hookmask & LUA_MASKCALL) {
198 > L->ci->u.l.pc = &pc;
202 > L->ci->u.l.pc = &pc;
204 < lua_assert(ci->u.l.pc == &pc &&
205 < ttisfunction(ci->base - 1) &&
206 < (ci->state & CI_SAVEDPC));
208 > lua_assert(ttisfunction(ci->base - 1) && (ci->state & CI_SAVEDPC));
211 diff -r lua-5.0/test/luac.lua lua-5.0.2/test/luac.lua
213 < assert(arg[1]~=nil,"usage: lua luac.lua file.lua")
214 < f=assert(io.open("luac.out","w"))
215 < f:write(string.dump(loadfile(arg[1])))
217 > assert(arg[1]~=nil and arg[2]==nil,"usage: lua luac.lua file.lua")
218 > f=assert(io.open("luac.out","wb"))
219 > f:write(string.dump(assert(loadfile(arg[1]))))
220 diff -r lua-5.0/test/table.lua lua-5.0.2/test/table.lua
222 < local _,_,a,b=string.find(l,'"?(%w+)"?%s*(.*)$')
224 > local _,_,a,b=string.find(l,'"?([_%w]+)"?%s*(.*)$')