From 3b19af44b05ce5e7f7db3708d052cca25fe6d7d3 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 29 Aug 2005 17:49:21 -0300 Subject: new method to handle tests without values (negative values) --- lopcodes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lopcodes.h') diff --git a/lopcodes.h b/lopcodes.h index 8d199ea7..080c4a1c 100644 --- a/lopcodes.h +++ b/lopcodes.h @@ -1,5 +1,5 @@ /* -** $Id: lopcodes.h,v 1.120 2005/05/20 15:53:42 roberto Exp roberto $ +** $Id: lopcodes.h,v 1.121 2005/06/06 13:30:25 roberto Exp $ ** Opcodes for Lua virtual machine ** See Copyright Notice in lua.h */ @@ -186,7 +186,8 @@ OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */ OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ -OP_TEST,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ +OP_TEST,/* A C if not (R(A) <=> C) then pc++ */ +OP_TESTSET,/* A B C if (R(B) <=> C) then R(A) := R(B) else pc++ */ OP_CALL,/* A B C R(A), ... ,R(A+C-2) := R(A)(R(A+1), ... ,R(A+B-1)) */ OP_TAILCALL,/* A B C return R(A)(R(A+1), ... ,R(A+B-1)) */ -- cgit v1.2.3-55-g6feb