aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-03-30 10:57:23 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-03-30 10:57:23 -0300
commitd4707925176f94a29e69ff92f6618f36ca1928dd (patch)
tree39d7d1b4d5c87a3cbce7c75b8416356c4fd665dc
parent439236773b9d36208375bb8eed251bcd393f7b24 (diff)
downloadlua-d4707925176f94a29e69ff92f6618f36ca1928dd.tar.gz
lua-d4707925176f94a29e69ff92f6618f36ca1928dd.tar.bz2
lua-d4707925176f94a29e69ff92f6618f36ca1928dd.zip
words are stored in hi-lo order (easier to print)
-rw-r--r--lua.stx6
-rw-r--r--lvm.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/lua.stx b/lua.stx
index fcfd9aa0..41aff108 100644
--- a/lua.stx
+++ b/lua.stx
@@ -1,6 +1,6 @@
1%{ 1%{
2/* 2/*
3** $Id: lua.stx,v 1.35 1998/03/09 21:49:52 roberto Exp roberto $ 3** $Id: lua.stx,v 1.36 1998/03/25 18:52:29 roberto Exp roberto $
4** Syntax analizer and code generator 4** Syntax analizer and code generator
5** See Copyright Notice in lua.h 5** See Copyright Notice in lua.h
6*/ 6*/
@@ -149,8 +149,8 @@ static int code_oparg_at (int pc, OpCode op, int builtin, int arg, int delta)
149 } 149 }
150 else if (arg <= MAX_WORD) { 150 else if (arg <= MAX_WORD) {
151 code[pc] = op+1+builtin; 151 code[pc] = op+1+builtin;
152 code[pc+1] = arg&0xFF; 152 code[pc+1] = arg>>8;
153 code[pc+2] = arg>>8; 153 code[pc+2] = arg&0xFF;
154 return 3; 154 return 3;
155 } 155 }
156 else luaY_error("code too long " MES_LIM("64K")); 156 else luaY_error("code too long " MES_LIM("64K"));
diff --git a/lvm.c b/lvm.c
index c41d84b5..42d29ac7 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 1.26 1998/03/11 13:59:50 roberto Exp roberto $ 2** $Id: lvm.c,v 1.27 1998/03/25 18:52:29 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -28,7 +28,7 @@
28 28
29 29
30#define skip_word(pc) (pc+=2) 30#define skip_word(pc) (pc+=2)
31#define get_word(pc) (*(pc)+(*((pc)+1)<<8)) 31#define get_word(pc) ((*(pc)<<8)+(*((pc)+1)))
32#define next_word(pc) (pc+=2, get_word(pc-2)) 32#define next_word(pc) (pc+=2, get_word(pc-2))
33 33
34 34