diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-03 20:32:42 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-03 20:32:42 -0200 |
commit | 2651afc455a78f5ae778b9fd8a0ee9efffed4998 (patch) | |
tree | cc9f7997d45006d208df92237b74cc6a1adcfe3a | |
parent | 5cb6856ebc8c95d8d6bd38b3e4b366dc46c6a903 (diff) | |
download | lua-2651afc455a78f5ae778b9fd8a0ee9efffed4998.tar.gz lua-2651afc455a78f5ae778b9fd8a0ee9efffed4998.tar.bz2 lua-2651afc455a78f5ae778b9fd8a0ee9efffed4998.zip |
RESET is generated at codereturn.
-rw-r--r-- | lua.stx | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 2.12 1994/11/01 18:25:20 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.1 1994/11/02 20:30:53 roberto Exp $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -274,7 +274,6 @@ function : FUNCTION NAME | |||
274 | block | 274 | block |
275 | END | 275 | END |
276 | { | 276 | { |
277 | if (lua_debug) code_byte(RESET); | ||
278 | codereturn(); | 277 | codereturn(); |
279 | s_tag($<vWord>3) = LUA_T_FUNCTION; | 278 | s_tag($<vWord>3) = LUA_T_FUNCTION; |
280 | s_bvalue($<vWord>3) = calloc (pc, sizeof(Byte)); | 279 | s_bvalue($<vWord>3) = calloc (pc, sizeof(Byte)); |
@@ -314,7 +313,6 @@ method : FUNCTION NAME { $<vWord>$ = lua_findsymbol($2); } ':' NAME | |||
314 | END | 313 | END |
315 | { | 314 | { |
316 | Byte *b; | 315 | Byte *b; |
317 | if (lua_debug) code_byte(RESET); | ||
318 | codereturn(); | 316 | codereturn(); |
319 | b = calloc (pc, sizeof(Byte)); | 317 | b = calloc (pc, sizeof(Byte)); |
320 | if (b == NULL) | 318 | if (b == NULL) |
@@ -449,7 +447,6 @@ ret : /* empty */ | |||
449 | RETURN exprlist sc | 447 | RETURN exprlist sc |
450 | { | 448 | { |
451 | if ($3 < 0) code_byte(MULT_RET); | 449 | if ($3 < 0) code_byte(MULT_RET); |
452 | if (lua_debug) code_byte(RESET); | ||
453 | codereturn(); | 450 | codereturn(); |
454 | } | 451 | } |
455 | ; | 452 | ; |
@@ -716,6 +713,7 @@ static void lua_codeadjust (int n) | |||
716 | 713 | ||
717 | static void codereturn (void) | 714 | static void codereturn (void) |
718 | { | 715 | { |
716 | if (lua_debug) code_byte(RESET); | ||
719 | if (nlocalvar == 0) | 717 | if (nlocalvar == 0) |
720 | code_byte(RETCODE0); | 718 | code_byte(RETCODE0); |
721 | else | 719 | else |