words are stored in hi-lo order (easier to print)

This commit is contained in:
Roberto Ierusalimschy 1998-03-30 10:57:23 -03:00
parent 439236773b
commit d470792517
2 changed files with 5 additions and 5 deletions

View File

@ -1,6 +1,6 @@
%{
/*
** $Id: lua.stx,v 1.35 1998/03/09 21:49:52 roberto Exp roberto $
** $Id: lua.stx,v 1.36 1998/03/25 18:52:29 roberto Exp roberto $
** Syntax analizer and code generator
** See Copyright Notice in lua.h
*/
@ -149,8 +149,8 @@ static int code_oparg_at (int pc, OpCode op, int builtin, int arg, int delta)
}
else if (arg <= MAX_WORD) {
code[pc] = op+1+builtin;
code[pc+1] = arg&0xFF;
code[pc+2] = arg>>8;
code[pc+1] = arg>>8;
code[pc+2] = arg&0xFF;
return 3;
}
else luaY_error("code too long " MES_LIM("64K"));

4
lvm.c
View File

@ -1,5 +1,5 @@
/*
** $Id: lvm.c,v 1.26 1998/03/11 13:59:50 roberto Exp roberto $
** $Id: lvm.c,v 1.27 1998/03/25 18:52:29 roberto Exp roberto $
** Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -28,7 +28,7 @@
#define skip_word(pc) (pc+=2)
#define get_word(pc) (*(pc)+(*((pc)+1)<<8))
#define get_word(pc) ((*(pc)<<8)+(*((pc)+1)))
#define next_word(pc) (pc+=2, get_word(pc-2))