[teu] / trunk / tertius / src / lua / src / lcode.c Repository:
ViewVC logotype

Diff of /trunk/tertius/src/lua/src/lcode.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 40, Wed Nov 7 22:02:52 2007 UTC revision 243, Thu Apr 22 02:46:50 2010 UTC
# Line 469  Line 469 
469  }  }
470    
471    
472  void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex) {  void luaK_storevar (FuncState *fs, expdesc *var, expdesc *ex, BinOpr opr) {
473      expdesc tempvar;
474    
475      if (opr != OPR_NOBINOPR) {
476        tempvar = *var;
477    
478            if (var->k == VINDEXED) {
479              /* soft discharge to keep the var available */
480          tempvar.u.s.info = luaK_codeABC(fs, OP_GETTABLE, 0, var->u.s.info, var->u.s.aux);
481          tempvar.k = VRELOCABLE;
482            }
483    
484            if (opr == OPR_CONCAT) {
485              /* reorient the stack so the operand is on top */
486              luaK_reserveregs(fs, 2);
487              exp2reg(fs, ex, fs->freereg-1);
488              exp2reg(fs, &tempvar, fs->freereg-2);
489            }
490        luaK_posfix(fs, opr, &tempvar, ex);
491            ex = &tempvar;
492      }
493    
494    switch (var->k) {    switch (var->k) {
495      case VLOCAL: {      case VLOCAL: {
496        freeexp(fs, ex);        freeexp(fs, ex);

Legend:
Removed from v.40  
changed lines
  Added in v.243

svnmaster@icculus.org
ViewVC Help
Powered by ViewVC 1.0.4