浏览代码

no more `register' declarations: leave it to the compiler.

Roberto Ierusalimschy 25 年之前
父节点
当前提交
89a9c36281
共有 2 个文件被更改,包括 7 次插入7 次删除
  1. 5 5
      lvm.c
  2. 2 2
      lvm.h

+ 5 - 5
lvm.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lvm.c,v 1.102 2000/04/13 16:51:01 roberto Exp roberto $
+** $Id: lvm.c,v 1.103 2000/04/14 17:45:25 roberto Exp roberto $
 ** Lua virtual machine
 ** Lua virtual machine
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -334,10 +334,10 @@ static void adjust_varargs (lua_State *L, StkId base, int nfixargs) {
 ** Executes the given Lua function. Parameters are between [base,top).
 ** Executes the given Lua function. Parameters are between [base,top).
 ** Returns n such that the the results are between [n,top).
 ** Returns n such that the the results are between [n,top).
 */
 */
-StkId luaV_execute (lua_State *L, const Closure *cl, register StkId base) {
+StkId luaV_execute (lua_State *L, const Closure *cl, StkId base) {
   const Proto *tf = cl->f.l;
   const Proto *tf = cl->f.l;
-  register StkId top;  /* keep top local, for performance */
-  register const Instruction *pc = tf->code;
+  StkId top;  /* keep top local, for performance */
+  const Instruction *pc = tf->code;
   TString **kstr = tf->kstr;
   TString **kstr = tf->kstr;
   luaD_checkstack(L, tf->maxstacksize+EXTRA_STACK);
   luaD_checkstack(L, tf->maxstacksize+EXTRA_STACK);
   if (tf->is_vararg) {  /* varargs? */
   if (tf->is_vararg) {  /* varargs? */
@@ -348,7 +348,7 @@ StkId luaV_execute (lua_State *L, const Closure *cl, register StkId base) {
     luaD_adjusttop(L, base, tf->numparams);
     luaD_adjusttop(L, base, tf->numparams);
   top = L->top;
   top = L->top;
   for (;;) {
   for (;;) {
-    register Instruction i = *pc++;
+    Instruction i = *pc++;
     switch (GET_OPCODE(i)) {
     switch (GET_OPCODE(i)) {
 
 
       case OP_END:
       case OP_END:

+ 2 - 2
lvm.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lvm.h,v 1.19 2000/03/10 18:37:44 roberto Exp roberto $
+** $Id: lvm.h,v 1.20 2000/03/29 20:19:20 roberto Exp roberto $
 ** Lua virtual machine
 ** Lua virtual machine
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -26,7 +26,7 @@ void luaV_settable (lua_State *L, StkId t, StkId top);
 void luaV_rawsettable (lua_State *L, StkId t);
 void luaV_rawsettable (lua_State *L, StkId t);
 void luaV_getglobal (lua_State *L, GlobalVar *gv, StkId top);
 void luaV_getglobal (lua_State *L, GlobalVar *gv, StkId top);
 void luaV_setglobal (lua_State *L, GlobalVar *gv, StkId top);
 void luaV_setglobal (lua_State *L, GlobalVar *gv, StkId top);
-StkId luaV_execute (lua_State *L, const Closure *cl, register StkId base);
+StkId luaV_execute (lua_State *L, const Closure *cl, StkId base);
 void luaV_Cclosure (lua_State *L, lua_CFunction c, int nelems);
 void luaV_Cclosure (lua_State *L, lua_CFunction c, int nelems);
 void luaV_Lclosure (lua_State *L, Proto *l, int nelems);
 void luaV_Lclosure (lua_State *L, Proto *l, int nelems);
 int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r, StkId top);
 int luaV_lessthan (lua_State *L, const TObject *l, const TObject *r, StkId top);