diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-11 18:27:11 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-11 18:27:11 -0200 |
commit | 5d14ce612baf55c4f019842947388b44f8732d34 (patch) | |
tree | 59050f9f7d7c70131a2dba720e95be6eb3739ad1 /lvm.c | |
parent | d56d4cf776b2a874e35d7a92c506840f4a2051b6 (diff) | |
download | lua-5d14ce612baf55c4f019842947388b44f8732d34.tar.gz lua-5d14ce612baf55c4f019842947388b44f8732d34.tar.bz2 lua-5d14ce612baf55c4f019842947388b44f8732d34.zip |
details
Diffstat (limited to 'lvm.c')
-rw-r--r-- | lvm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -64,7 +64,7 @@ int luaV_tostring (lua_State *L, TObject *obj) { | |||
64 | static void traceexec (lua_State *L, lua_Hook linehook) { | 64 | static void traceexec (lua_State *L, lua_Hook linehook) { |
65 | CallInfo *ci = L->ci; | 65 | CallInfo *ci = L->ci; |
66 | int *lineinfo = ci_func(ci)->l.p->lineinfo; | 66 | int *lineinfo = ci_func(ci)->l.p->lineinfo; |
67 | int pc = (*ci->pc - ci_func(ci)->l.p->code) - 1; | 67 | int pc = (int)(*ci->pc - ci_func(ci)->l.p->code) - 1; |
68 | int newline; | 68 | int newline; |
69 | if (pc == 0) { /* may be first time? */ | 69 | if (pc == 0) { /* may be first time? */ |
70 | ci->line = 1; | 70 | ci->line = 1; |
@@ -97,7 +97,7 @@ static void callTM (lua_State *L, const TObject *f, | |||
97 | setobj(base+3, p3); /* 3th argument */ | 97 | setobj(base+3, p3); /* 3th argument */ |
98 | L->top++; | 98 | L->top++; |
99 | } | 99 | } |
100 | luaD_call(L, base, (result ? 1 : 0)); | 100 | luaD_call(L, base, 1); |
101 | if (result) { /* need a result? */ | 101 | if (result) { /* need a result? */ |
102 | setobj(result, base); /* get it */ | 102 | setobj(result, base); /* get it */ |
103 | } | 103 | } |
@@ -326,6 +326,7 @@ StkId luaV_execute (lua_State *L) { | |||
326 | traceexec(L, linehook); | 326 | traceexec(L, linehook); |
327 | lua_assert(L->top == L->ci->top || GET_OPCODE(i) == OP_CALL || | 327 | lua_assert(L->top == L->ci->top || GET_OPCODE(i) == OP_CALL || |
328 | GET_OPCODE(i) == OP_RETURN || GET_OPCODE(i) == OP_SETLISTO); | 328 | GET_OPCODE(i) == OP_RETURN || GET_OPCODE(i) == OP_SETLISTO); |
329 | lua_assert(L->ci->savedpc == NULL); | ||
329 | switch (GET_OPCODE(i)) { | 330 | switch (GET_OPCODE(i)) { |
330 | case OP_MOVE: { | 331 | case OP_MOVE: { |
331 | setobj(ra, RB(i)); | 332 | setobj(ra, RB(i)); |