mirror of https://github.com/lua/lua
words are stored in hi-lo order (easier to print)
This commit is contained in:
parent
439236773b
commit
d470792517
6
lua.stx
6
lua.stx
|
@ -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
4
lvm.c
|
@ -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))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue