summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-13 16:53:05 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-13 16:53:05 -0300
commitcf531912f233ce0c7151131fb027c046d3beab39 (patch)
treeded2bddb69afad9ad0e0d66963b5cacb59aa4969
parent0d00729e316dd7cd9a1b00ae716761eef8f00dfe (diff)
downloadlua-github-cf531912f233ce0c7151131fb027c046d3beab39.tar.gz
one more macro (mvdispatch) to easy experiments with alternative
dispatch methods
-rw-r--r--lvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lvm.c b/lvm.c
index 0339c6fc..ce0572f3 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
/*
-** $Id: lvm.c,v 2.118 2010/05/12 20:31:33 roberto Exp roberto $
+** $Id: lvm.c,v 2.119 2010/05/12 20:40:35 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -439,6 +439,7 @@ void luaV_finishOp (lua_State *L) {
else { Protect(luaV_arith(L, ra, rb, rc, tm)); } }
+#define vmdispatch(o) switch(o)
#define vmcase(l,b) case l: {b} break;
void luaV_execute (lua_State *L) {
@@ -464,7 +465,7 @@ void luaV_execute (lua_State *L) {
ra = RA(i);
lua_assert(base == ci->u.l.base);
lua_assert(base <= L->top && L->top < L->stack + L->stacksize);
- switch (GET_OPCODE(i)) {
+ vmdispatch (GET_OPCODE(i)) {
vmcase(OP_MOVE,
setobjs2s(L, ra, RB(i));
)