aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-24 17:18:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-24 17:18:38 -0300
commitfdfd5b44ee48a5497181d0bcaa89586b12a48eb4 (patch)
tree9931e21b52c08b60ae76f1a787b2b112d4dcb5ce
parent1a4c428d6d2c9c9a35ceb7d4fb054f83c89f98e5 (diff)
downloadlua-fdfd5b44ee48a5497181d0bcaa89586b12a48eb4.tar.gz
lua-fdfd5b44ee48a5497181d0bcaa89586b12a48eb4.tar.bz2
lua-fdfd5b44ee48a5497181d0bcaa89586b12a48eb4.zip
TM_GETTABLE/TM_SETTABLE don't need fast access anymore
-rw-r--r--lobject.h4
-rw-r--r--ltable.c4
-rw-r--r--ltm.c5
-rw-r--r--ltm.h6
4 files changed, 10 insertions, 9 deletions
diff --git a/lobject.h b/lobject.h
index 62357a9a..259c2977 100644
--- a/lobject.h
+++ b/lobject.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lobject.h,v 1.136 2002/06/20 20:41:46 roberto Exp roberto $ 2** $Id: lobject.h,v 1.137 2002/06/24 13:08:45 roberto Exp roberto $
3** Type definitions for Lua objects 3** Type definitions for Lua objects
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -212,7 +212,7 @@ typedef struct Table {
212 struct Table *next; 212 struct Table *next;
213 struct Table *mark; /* marked tables (point to itself when not marked) */ 213 struct Table *mark; /* marked tables (point to itself when not marked) */
214 int sizearray; /* size of `array' array */ 214 int sizearray; /* size of `array' array */
215 unsigned short flags; /* 1<<p means tagmethod(p) is not present */ 215 lu_byte flags; /* 1<<p means tagmethod(p) is not present */
216 lu_byte lsizenode; /* log2 of size of `node' array */ 216 lu_byte lsizenode; /* log2 of size of `node' array */
217} Table; 217} Table;
218 218
diff --git a/ltable.c b/ltable.c
index 37dc6b0f..faae28cf 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.109 2002/05/27 20:35:40 roberto Exp roberto $ 2** $Id: ltable.c,v 1.110 2002/06/13 13:39:55 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -302,7 +302,7 @@ Table *luaH_new (lua_State *L, int narray, int lnhash) {
302 t->next = G(L)->roottable; 302 t->next = G(L)->roottable;
303 G(L)->roottable = t; 303 G(L)->roottable = t;
304 t->mark = t; 304 t->mark = t;
305 t->flags = cast(unsigned short, ~0); 305 t->flags = cast(lu_byte, ~0);
306 /* temporary values (kept only if some malloc fails) */ 306 /* temporary values (kept only if some malloc fails) */
307 t->array = NULL; 307 t->array = NULL;
308 t->sizearray = 0; 308 t->sizearray = 0;
diff --git a/ltm.c b/ltm.c
index ea402aac..25bebc82 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 1.94 2002/06/12 14:51:31 roberto Exp roberto $ 2** $Id: ltm.c,v 1.95 2002/06/13 13:39:55 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -25,8 +25,9 @@ const char *const luaT_typenames[] = {
25 25
26void luaT_init (lua_State *L) { 26void luaT_init (lua_State *L) {
27 static const char *const luaT_eventname[] = { /* ORDER TM */ 27 static const char *const luaT_eventname[] = { /* ORDER TM */
28 "__gettable", "__settable", "__index", "__newindex", 28 "__index", "__newindex",
29 "__gc", "__eq", "__weakmode", 29 "__gc", "__eq", "__weakmode",
30 "__gettable", "__settable",
30 "__add", "__sub", "__mul", "__div", 31 "__add", "__sub", "__mul", "__div",
31 "__pow", "__unm", "__lt", "__le", 32 "__pow", "__unm", "__lt", "__le",
32 "__concat", "__call" 33 "__concat", "__call"
diff --git a/ltm.h b/ltm.h
index 36577531..b0d6439a 100644
--- a/ltm.h
+++ b/ltm.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.h,v 1.34 2002/06/12 14:51:31 roberto Exp roberto $ 2** $Id: ltm.h,v 1.35 2002/06/13 13:39:55 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -15,13 +15,13 @@
15* grep "ORDER TM" 15* grep "ORDER TM"
16*/ 16*/
17typedef enum { 17typedef enum {
18 TM_GETTABLE = 0,
19 TM_SETTABLE,
20 TM_INDEX, 18 TM_INDEX,
21 TM_NEWINDEX, 19 TM_NEWINDEX,
22 TM_GC, 20 TM_GC,
23 TM_EQ, 21 TM_EQ,
24 TM_WEAKMODE, /* last tag method with `fast' access */ 22 TM_WEAKMODE, /* last tag method with `fast' access */
23 TM_GETTABLE,
24 TM_SETTABLE,
25 TM_ADD, 25 TM_ADD,
26 TM_SUB, 26 TM_SUB,
27 TM_MUL, 27 TM_MUL,