aboutsummaryrefslogtreecommitdiff
path: root/opcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-02-12 15:32:40 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-02-12 15:32:40 -0300
commit41259bff31dbb904edfb8070006ccb15577f8f04 (patch)
tree664bf9cbe6394e9074435ecf2bd710712b4537c3 /opcode.c
parentafaa98a666acd5f596b50f56bb288815838c096e (diff)
downloadlua-41259bff31dbb904edfb8070006ccb15577f8f04.tar.gz
lua-41259bff31dbb904edfb8070006ccb15577f8f04.tar.bz2
lua-41259bff31dbb904edfb8070006ccb15577f8f04.zip
BIG CHANGE: new data structure for constants, strings and globals, using
an array of hash tables for all them.
Diffstat (limited to 'opcode.c')
-rw-r--r--opcode.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/opcode.c b/opcode.c
index 5999d7a6..2f77cad4 100644
--- a/opcode.c
+++ b/opcode.c
@@ -3,7 +3,7 @@
3** TecCGraf - PUC-Rio 3** TecCGraf - PUC-Rio
4*/ 4*/
5 5
6char *rcs_opcode="$Id: opcode.c,v 3.55 1996/02/07 18:10:27 roberto Exp roberto $"; 6char *rcs_opcode="$Id: opcode.c,v 3.56 1996/02/08 17:03:20 roberto Exp roberto $";
7 7
8#include <setjmp.h> 8#include <setjmp.h>
9#include <stdlib.h> 9#include <stdlib.h>
@@ -381,7 +381,7 @@ static void getglobal (Word n)
381 if (tag(top-1) == LUA_T_NIL) 381 if (tag(top-1) == LUA_T_NIL)
382 { /* must call getglobal fallback */ 382 { /* must call getglobal fallback */
383 tag(top-1) = LUA_T_STRING; 383 tag(top-1) = LUA_T_STRING;
384 tsvalue(top-1) = &lua_table[n].varname->ts; 384 tsvalue(top-1) = lua_table[n].varname;
385 callFB(FB_GETGLOBAL); 385 callFB(FB_GETGLOBAL);
386 } 386 }
387} 387}
@@ -792,17 +792,6 @@ void lua_pushstring (char *s)
792} 792}
793 793
794/* 794/*
795** Push an object (tag=string) on stack and register it on the constant table.
796*/
797void lua_pushliteral (char *s)
798{
799 Word ct = luaI_findconstantbyname(s); /* this call may change lua_constant */
800 tsvalue(top) = lua_constant[ct];
801 tag(top) = LUA_T_STRING;
802 incr_top;
803}
804
805/*
806** Push an object (tag=cfunction) to stack. 795** Push an object (tag=cfunction) to stack.
807*/ 796*/
808void lua_pushcfunction (lua_CFunction fn) 797void lua_pushcfunction (lua_CFunction fn)