diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-30 11:35:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-06-30 11:35:17 -0300 |
commit | cfba57207660fd27ddac9ea51cdeb263c2d6b418 (patch) | |
tree | 3112ff095cd058017823a64dd592649ff750de89 /ldebug.c | |
parent | aa01d2568dcecf5a12ce2d8f04e969658ea46c89 (diff) | |
download | lua-cfba57207660fd27ddac9ea51cdeb263c2d6b418.tar.gz lua-cfba57207660fd27ddac9ea51cdeb263c2d6b418.tar.bz2 lua-cfba57207660fd27ddac9ea51cdeb263c2d6b418.zip |
remove dummy argument in LUA_ASSERT
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 1.25 2000/06/28 20:20:36 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 1.26 2000/06/30 14:29:35 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -101,7 +101,7 @@ static int lua_nups (StkId f) { | |||
101 | 101 | ||
102 | static int lua_currentpc (StkId f) { | 102 | static int lua_currentpc (StkId f) { |
103 | CallInfo *ci = infovalue(f); | 103 | CallInfo *ci = infovalue(f); |
104 | LUA_ASSERT(L, ttype(f) == TAG_LMARK, "function has no pc"); | 104 | LUA_ASSERT(ttype(f) == TAG_LMARK, "function has no pc"); |
105 | return (*ci->pc - 1) - ci->func->f.l->code; | 105 | return (*ci->pc - 1) - ci->func->f.l->code; |
106 | } | 106 | } |
107 | 107 | ||
@@ -165,7 +165,7 @@ static void lua_funcinfo (lua_Debug *ar, StkId func) { | |||
165 | ar->what = "C"; | 165 | ar->what = "C"; |
166 | break; | 166 | break; |
167 | default: | 167 | default: |
168 | LUA_INTERNALERROR(L, "invalid `func' value"); | 168 | LUA_INTERNALERROR("invalid `func' value"); |
169 | } | 169 | } |
170 | if (ar->linedefined == 0) | 170 | if (ar->linedefined == 0) |
171 | ar->what = "main"; | 171 | ar->what = "main"; |
@@ -245,24 +245,24 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int stackpos) { | |||
245 | top++; /* `arg' */ | 245 | top++; /* `arg' */ |
246 | while (pc < lastpc) { | 246 | while (pc < lastpc) { |
247 | const Instruction i = code[pc++]; | 247 | const Instruction i = code[pc++]; |
248 | LUA_ASSERT(NULL, top <= pt->maxstacksize, "wrong stack"); | 248 | LUA_ASSERT(top <= pt->maxstacksize, "wrong stack"); |
249 | switch (GET_OPCODE(i)) { | 249 | switch (GET_OPCODE(i)) { |
250 | case OP_RETURN: { | 250 | case OP_RETURN: { |
251 | LUA_ASSERT(NULL, top >= GETARG_U(i), "wrong stack"); | 251 | LUA_ASSERT(top >= GETARG_U(i), "wrong stack"); |
252 | top = GETARG_U(i); | 252 | top = GETARG_U(i); |
253 | break; | 253 | break; |
254 | } | 254 | } |
255 | case OP_CALL: { | 255 | case OP_CALL: { |
256 | int nresults = GETARG_B(i); | 256 | int nresults = GETARG_B(i); |
257 | if (nresults == MULT_RET) nresults = 1; | 257 | if (nresults == MULT_RET) nresults = 1; |
258 | LUA_ASSERT(NULL, top >= GETARG_A(i), "wrong stack"); | 258 | LUA_ASSERT(top >= GETARG_A(i), "wrong stack"); |
259 | top = GETARG_A(i); | 259 | top = GETARG_A(i); |
260 | while (nresults--) | 260 | while (nresults--) |
261 | stack[top++] = pc-1; | 261 | stack[top++] = pc-1; |
262 | break; | 262 | break; |
263 | } | 263 | } |
264 | case OP_TAILCALL: { | 264 | case OP_TAILCALL: { |
265 | LUA_ASSERT(NULL, top >= GETARG_A(i), "wrong stack"); | 265 | LUA_ASSERT(top >= GETARG_A(i), "wrong stack"); |
266 | top = GETARG_B(i); | 266 | top = GETARG_B(i); |
267 | break; | 267 | break; |
268 | } | 268 | } |
@@ -311,10 +311,10 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int stackpos) { | |||
311 | } | 311 | } |
312 | default: { | 312 | default: { |
313 | int n; | 313 | int n; |
314 | LUA_ASSERT(NULL, luaK_opproperties[GET_OPCODE(i)].push != VD, | 314 | LUA_ASSERT(luaK_opproperties[GET_OPCODE(i)].push != VD, |
315 | "invalid opcode for default"); | 315 | "invalid opcode for default"); |
316 | top -= luaK_opproperties[GET_OPCODE(i)].pop; | 316 | top -= luaK_opproperties[GET_OPCODE(i)].pop; |
317 | LUA_ASSERT(NULL, top >= 0, "wrong stack"); | 317 | LUA_ASSERT(top >= 0, "wrong stack"); |
318 | for (n=0; n<luaK_opproperties[GET_OPCODE(i)].push; n++) | 318 | for (n=0; n<luaK_opproperties[GET_OPCODE(i)].push; n++) |
319 | stack[top++] = pc-1; | 319 | stack[top++] = pc-1; |
320 | } | 320 | } |