summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-25 09:50:46 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-10-25 09:50:46 -0200
commitbdf566a8a32450c2eb6273c8c1a92e2181b6846e (patch)
treeb301da541fbad81034216a6e0465cc381082431e /lcode.c
parentc3c78030f79fdbbb06265d50645e408d60e7798e (diff)
downloadlua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.gz
lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.tar.bz2
lua-bdf566a8a32450c2eb6273c8c1a92e2181b6846e.zip
`name' in comments changed to 'name'
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lcode.c b/lcode.c
index 40bfd1c3..bd39e46b 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.89 2014/04/29 18:14:16 roberto Exp roberto $ 2** $Id: lcode.c,v 2.90 2014/05/08 18:58:46 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*/
@@ -107,7 +107,7 @@ static void fixjump (FuncState *fs, int pc, int dest) {
107 107
108 108
109/* 109/*
110** returns current `pc' and marks it as a jump target (to avoid wrong 110** returns current 'pc' and marks it as a jump target (to avoid wrong
111** optimizations with consecutive instructions not in the same basic block). 111** optimizations with consecutive instructions not in the same basic block).
112*/ 112*/
113int luaK_getlabel (FuncState *fs) { 113int luaK_getlabel (FuncState *fs) {
@@ -230,7 +230,7 @@ void luaK_concat (FuncState *fs, int *l1, int l2) {
230 230
231static int luaK_code (FuncState *fs, Instruction i) { 231static int luaK_code (FuncState *fs, Instruction i) {
232 Proto *f = fs->f; 232 Proto *f = fs->f;
233 dischargejpc(fs); /* `pc' will change */ 233 dischargejpc(fs); /* 'pc' will change */
234 /* put new instruction in code array */ 234 /* put new instruction in code array */
235 luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction, 235 luaM_growvector(fs->ls->L, f->code, fs->pc, f->sizecode, Instruction,
236 MAX_INT, "opcodes"); 236 MAX_INT, "opcodes");
@@ -503,7 +503,7 @@ static void discharge2anyreg (FuncState *fs, expdesc *e) {
503static void exp2reg (FuncState *fs, expdesc *e, int reg) { 503static void exp2reg (FuncState *fs, expdesc *e, int reg) {
504 discharge2reg(fs, e, reg); 504 discharge2reg(fs, e, reg);
505 if (e->k == VJMP) 505 if (e->k == VJMP)
506 luaK_concat(fs, &e->t, e->u.info); /* put this jump in `t' list */ 506 luaK_concat(fs, &e->t, e->u.info); /* put this jump in 't' list */
507 if (hasjumps(e)) { 507 if (hasjumps(e)) {
508 int final; /* position after whole expression */ 508 int final; /* position after whole expression */
509 int p_f = NO_JUMP; /* position of an eventual LOAD false */ 509 int p_f = NO_JUMP; /* position of an eventual LOAD false */
@@ -677,7 +677,7 @@ void luaK_goiftrue (FuncState *fs, expdesc *e) {
677 break; 677 break;
678 } 678 }
679 } 679 }
680 luaK_concat(fs, &e->f, pc); /* insert last jump in `f' list */ 680 luaK_concat(fs, &e->f, pc); /* insert last jump in 'f' list */
681 luaK_patchtohere(fs, e->t); 681 luaK_patchtohere(fs, e->t);
682 e->t = NO_JUMP; 682 e->t = NO_JUMP;
683} 683}
@@ -700,7 +700,7 @@ void luaK_goiffalse (FuncState *fs, expdesc *e) {
700 break; 700 break;
701 } 701 }
702 } 702 }
703 luaK_concat(fs, &e->t, pc); /* insert last jump in `t' list */ 703 luaK_concat(fs, &e->t, pc); /* insert last jump in 't' list */
704 luaK_patchtohere(fs, e->f); 704 luaK_patchtohere(fs, e->f);
705 e->f = NO_JUMP; 705 e->f = NO_JUMP;
706} 706}
@@ -831,7 +831,7 @@ static void codecomp (FuncState *fs, OpCode op, int cond, expdesc *e1,
831 freeexp(fs, e2); 831 freeexp(fs, e2);
832 freeexp(fs, e1); 832 freeexp(fs, e1);
833 if (cond == 0 && op != OP_EQ) { 833 if (cond == 0 && op != OP_EQ) {
834 int temp; /* exchange args to replace by `<' or `<=' */ 834 int temp; /* exchange args to replace by '<' or '<=' */
835 temp = o1; o1 = o2; o2 = temp; /* o1 <==> o2 */ 835 temp = o1; o1 = o2; o2 = temp; /* o1 <==> o2 */
836 cond = 1; 836 cond = 1;
837 } 837 }
@@ -865,7 +865,7 @@ void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) {
865 break; 865 break;
866 } 866 }
867 case OPR_CONCAT: { 867 case OPR_CONCAT: {
868 luaK_exp2nextreg(fs, v); /* operand must be on the `stack' */ 868 luaK_exp2nextreg(fs, v); /* operand must be on the 'stack' */
869 break; 869 break;
870 } 870 }
871 case OPR_ADD: case OPR_SUB: 871 case OPR_ADD: case OPR_SUB: