cvsuser     04/03/10 09:43:12

  Modified:    imcc     instructions.c pcc.c
  Log:
  PIR meth call syntax - 3
  * cleanup
  * handle unquoted strings when emitting PASM
  
  Revision  Changes    Path
  1.55      +6 -0      parrot/imcc/instructions.c
  
  Index: instructions.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/instructions.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -w -r1.54 -r1.55
  --- instructions.c    23 Feb 2004 08:52:31 -0000      1.54
  +++ instructions.c    10 Mar 2004 17:43:12 -0000      1.55
  @@ -410,6 +410,12 @@
               }
               regstr[i] = regb[i];
           }
  +        else if (p->type == VTCONST && p->set == 'S' &&
  +                *p->name != '"' && *p->name != '\'' ) {
  +            /* unquoted string const */
  +            sprintf(regb[i], "\"%s\"", p->name);      /* XXX */
  +            regstr[i] = regb[i];
  +        }
        else
            regstr[i] = p->name;
       }
  
  
  
  1.48      +1 -3      parrot/imcc/pcc.c
  
  Index: pcc.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/pcc.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -w -r1.47 -r1.48
  --- pcc.c     10 Mar 2004 15:02:50 -0000      1.47
  +++ pcc.c     10 Mar 2004 17:43:12 -0000      1.48
  @@ -842,11 +842,9 @@
        */
       arg = sub->pcc_sub->sub;
       if (meth_call) {
  -        char buf[256];
           /* set S0, meth */
           regs[0] = get_pasm_reg("S0");;
  -        sprintf(buf, "\"%s\"", arg->name);
  -        regs[1] = mk_const(str_dup(buf), 'S');
  +        regs[1] = mk_const(str_dup(arg->name), 'S');
           ins = insINS(interp, unit, ins, "set", regs, 2);
           /* set P2, obj */
           regs[0] = get_pasm_reg("P2");
  
  
  

Reply via email to