diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-11-30 16:50:47 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-11-30 16:50:47 -0200 |
| commit | 01b00cc29261579600ce414b470c339510ac49d5 (patch) | |
| tree | d485971f691e6914b92d52a4ba6976f6f3357a23 /lcode.c | |
| parent | fc7b167ae0a0d65f0050299101e7d177550d7120 (diff) | |
| download | lua-01b00cc29261579600ce414b470c339510ac49d5.tar.gz lua-01b00cc29261579600ce414b470c339510ac49d5.tar.bz2 lua-01b00cc29261579600ce414b470c339510ac49d5.zip | |
better control over extensions of char/short to int
Diffstat (limited to 'lcode.c')
| -rw-r--r-- | lcode.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 1.50 2000/08/31 14:08:27 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 1.51 2000/09/29 12:42:13 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -445,7 +445,7 @@ int luaK_code1 (FuncState *fs, OpCode o, int arg1) { | |||
| 445 | 445 | ||
| 446 | int luaK_code2 (FuncState *fs, OpCode o, int arg1, int arg2) { | 446 | int luaK_code2 (FuncState *fs, OpCode o, int arg1, int arg2) { |
| 447 | Instruction i = previous_instruction(fs); | 447 | Instruction i = previous_instruction(fs); |
| 448 | int delta = luaK_opproperties[o].push - luaK_opproperties[o].pop; | 448 | int delta = (int)luaK_opproperties[o].push - (int)luaK_opproperties[o].pop; |
| 449 | int optm = 0; /* 1 when there is an optimization */ | 449 | int optm = 0; /* 1 when there is an optimization */ |
| 450 | switch (o) { | 450 | switch (o) { |
| 451 | case OP_CLOSURE: { | 451 | case OP_CLOSURE: { |
| @@ -647,7 +647,7 @@ int luaK_code2 (FuncState *fs, OpCode o, int arg1, int arg2) { | |||
| 647 | } | 647 | } |
| 648 | 648 | ||
| 649 | 649 | ||
| 650 | const struct OpProperties luaK_opproperties[NUM_OPCODES] = { | 650 | const OpProperties luaK_opproperties[NUM_OPCODES] = { |
| 651 | {iO, 0, 0}, /* OP_END */ | 651 | {iO, 0, 0}, /* OP_END */ |
| 652 | {iU, 0, 0}, /* OP_RETURN */ | 652 | {iU, 0, 0}, /* OP_RETURN */ |
| 653 | {iAB, 0, 0}, /* OP_CALL */ | 653 | {iAB, 0, 0}, /* OP_CALL */ |
