cvsuser     04/11/15 02:30:34

  Modified:    imcc     instructions.c main.c parser_util.c pbc.c
               include/parrot packfile.h
               src      packfile.c
  Log:
  some bits of POSTCOMP pragma
  
  Revision  Changes    Path
  1.63      +1 -1      parrot/imcc/instructions.c
  
  Index: instructions.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/instructions.c,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- instructions.c    12 Nov 2004 16:38:36 -0000      1.62
  +++ instructions.c    15 Nov 2004 10:30:32 -0000      1.63
  @@ -207,7 +207,7 @@
                   return 1;
               if ((ins->r[i]->type & VT_REGP) && ins->r[i]->reg == r)
                   return 1;
  -    }
  +        }
   
       if (ins->type & ITPCCSUB)
           return pcc_sub_writes(ins, r);
  
  
  
  1.83      +1 -1      parrot/imcc/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/main.c,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- main.c    4 Nov 2004 09:07:58 -0000       1.82
  +++ main.c    15 Nov 2004 10:30:32 -0000      1.83
  @@ -574,7 +574,7 @@
           else
               info(interpreter, 1, "Running...\n");
           if (!load_pbc)
  -            PackFile_fixup_subs(interpreter);
  +            PackFile_fixup_subs(interpreter, PBC_MAIN);
           Parrot_runcode(interpreter, argc, argv);
           /* XXX no return value :-( */
       }
  
  
  
  1.82      +1 -1      parrot/imcc/parser_util.c
  
  Index: parser_util.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/parser_util.c,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- parser_util.c     10 Nov 2004 11:19:27 -0000      1.81
  +++ parser_util.c     15 Nov 2004 10:30:32 -0000      1.82
  @@ -463,7 +463,7 @@
       yyparse((void *) interp);
       imc_compile_all_units(interp);
   
  -    PackFile_fixup_subs(interp);
  +    PackFile_fixup_subs(interp, PBC_MAIN);
       if (old_cs) {
           /* restore old byte_code, */
           (void)Parrot_switch_to_cs(interp, old_cs, 0);
  
  
  
  1.97      +3 -1      parrot/imcc/pbc.c
  
  Index: pbc.c
  ===================================================================
  RCS file: /cvs/public/parrot/imcc/pbc.c,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- pbc.c     12 Nov 2004 16:38:36 -0000      1.96
  +++ pbc.c     15 Nov 2004 10:30:32 -0000      1.97
  @@ -865,7 +865,7 @@
       if (pragma & P_IMMEDIATE) {
           debug(interpreter, DEBUG_PBC, "immediate sub '%s'",
                   ins->r[1]->name);
  -        PackFile_fixup_subs(interpreter);
  +        PackFile_fixup_subs(interpreter, PBC_IMMEDIATE);
       }
       return 0;
   }
  @@ -1021,6 +1021,8 @@
   
       fixup_bsrs(interpreter);
       clear_globals();
  +
  +    PackFile_fixup_subs(interpreter, PBC_POSTCOMP);
       return 0;
   }
   
  
  
  
  1.66      +10 -2     parrot/include/parrot/packfile.h
  
  Index: packfile.h
  ===================================================================
  RCS file: /cvs/public/parrot/include/parrot/packfile.h,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- packfile.h        10 Nov 2004 11:19:29 -0000      1.65
  +++ packfile.h        15 Nov 2004 10:30:33 -0000      1.66
  @@ -1,6 +1,6 @@
   /* packfile.h
   *
  -* $Id: packfile.h,v 1.65 2004/11/10 11:19:29 leo Exp $
  +* $Id: packfile.h,v 1.66 2004/11/15 10:30:33 leo Exp $
   *
   * History:
   *  Rework by Melvin; new bytecode format, make bytecode portable.
  @@ -234,7 +234,15 @@
                            struct PackFile *self, opcode_t *packed,
                            size_t packed_size);
   
  -void PackFile_fixup_subs(Interp *interpreter);
  +typedef enum {
  +    PBC_MAIN   = 1,
  +    PBC_LOADED = 2,
  +    PBC_PBC    = 4,
  +    PBC_IMMEDIATE = 8,
  +    PBC_POSTCOMP  = 16
  +} pbc_action_enum_t;
  +
  +void PackFile_fixup_subs(Interp *interpreter, pbc_action_enum_t);
   /*
    * directory functions
    */
  
  
  
  1.182     +4 -11     parrot/src/packfile.c
  
  Index: packfile.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/packfile.c,v
  retrieving revision 1.181
  retrieving revision 1.182
  diff -u -r1.181 -r1.182
  --- packfile.c        12 Nov 2004 16:38:38 -0000      1.181
  +++ packfile.c        15 Nov 2004 10:30:34 -0000      1.182
  @@ -2,7 +2,7 @@
   Copyright (C) 2001-2002 Gregor N. Purdy. All rights reserved.
   This program is free software. It is subject to the same license as
   Parrot itself.
  -$Id: packfile.c,v 1.181 2004/11/12 16:38:38 leo Exp $
  +$Id: packfile.c,v 1.182 2004/11/15 10:30:34 leo Exp $
   
   =head1 NAME
   
  @@ -187,13 +187,6 @@
       }
   }
   
  -typedef enum {
  -    PBC_MAIN   = 1,
  -    PBC_LOADED = 2,
  -    PBC_PBC    = 4,
  -    PBC_IMMEDIATE = 8
  -} pbc_action_enum_t;
  -
   
   /*
   
  @@ -3209,7 +3202,7 @@
   /*
   
   =item C<void
  -PackFile_fixup_subs(Interp *interpreter)>
  +PackFile_fixup_subs(Interp *interpreter, pbc_action_enum_t)>
   
   I<What does this do?>
   
  @@ -3218,9 +3211,9 @@
   */
   
   void
  -PackFile_fixup_subs(Interp *interpreter)
  +PackFile_fixup_subs(Interp *interpreter, pbc_action_enum_t what)
   {
  -    fixup_subs(interpreter, interpreter->code, PBC_MAIN);
  +    fixup_subs(interpreter, interpreter->code, what);
   }
   
   /*
  
  
  

Reply via email to