diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-17 11:58:57 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1994-11-17 11:58:57 -0200 |
| commit | b234da1cc2053b8919a9b27af67291e48fdf9703 (patch) | |
| tree | b32559df54e0d9c79fe271260f69238244ae2fc7 /opcode.c | |
| parent | d6a1699e37257c0b3d4651a481ce0bf597bc4e45 (diff) | |
| download | lua-b234da1cc2053b8919a9b27af67291e48fdf9703.tar.gz lua-b234da1cc2053b8919a9b27af67291e48fdf9703.tar.bz2 lua-b234da1cc2053b8919a9b27af67291e48fdf9703.zip | |
changes in garbage collection control
Diffstat (limited to '')
| -rw-r--r-- | opcode.c | 9 |
1 files changed, 5 insertions, 4 deletions
| @@ -3,7 +3,7 @@ | |||
| 3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | char *rcs_opcode="$Id: opcode.c,v 3.12 1994/11/16 16:03:48 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 3.13 1994/11/16 17:38:08 roberto Exp $"; |
| 7 | 7 | ||
| 8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
| 9 | #include <stdio.h> | 9 | #include <stdio.h> |
| @@ -454,8 +454,8 @@ int lua_storesubscript (void) | |||
| 454 | lua_Object lua_createTable (int initSize) | 454 | lua_Object lua_createTable (int initSize) |
| 455 | { | 455 | { |
| 456 | adjustC(0); | 456 | adjustC(0); |
| 457 | tag(top) = LUA_T_ARRAY; | ||
| 458 | avalue(top) = lua_createarray(initSize); | 457 | avalue(top) = lua_createarray(initSize); |
| 458 | tag(top) = LUA_T_ARRAY; | ||
| 459 | top++; | 459 | top++; |
| 460 | CBase++; /* incorporate object in the stack */ | 460 | CBase++; /* incorporate object in the stack */ |
| 461 | return Ref(top-1); | 461 | return Ref(top-1); |
| @@ -585,8 +585,9 @@ int lua_pushnumber (real n) | |||
| 585 | int lua_pushstring (char *s) | 585 | int lua_pushstring (char *s) |
| 586 | { | 586 | { |
| 587 | lua_checkstack(top-stack+1); | 587 | lua_checkstack(top-stack+1); |
| 588 | svalue(top) = lua_createstring(s); | ||
| 588 | tag(top) = LUA_T_STRING; | 589 | tag(top) = LUA_T_STRING; |
| 589 | svalue(top++) = lua_createstring(s); | 590 | top++; |
| 590 | return 0; | 591 | return 0; |
| 591 | } | 592 | } |
| 592 | 593 | ||
| @@ -843,8 +844,8 @@ static int lua_execute (Byte *pc, int base) | |||
| 843 | { | 844 | { |
| 844 | CodeWord size; | 845 | CodeWord size; |
| 845 | get_word(size,pc); | 846 | get_word(size,pc); |
| 846 | tag(top) = LUA_T_ARRAY; | ||
| 847 | avalue(top) = lua_createarray(size.w); | 847 | avalue(top) = lua_createarray(size.w); |
| 848 | tag(top) = LUA_T_ARRAY; | ||
| 848 | top++; | 849 | top++; |
| 849 | } | 850 | } |
| 850 | break; | 851 | break; |
