cvsuser     03/06/06 09:02:50

  Modified:    .        build_nativecall.pl debug.c dod.c headers.c key.c
                        pxs.c sub.c trace.c
  Log:
  PMC-data-2: some more + finally the warning in debug.c
  
  Revision  Changes    Path
  1.13      +3 -3      parrot/build_nativecall.pl
  
  Index: build_nativecall.pl
  ===================================================================
  RCS file: /cvs/public/parrot/build_nativecall.pl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -r1.12 -r1.13
  --- build_nativecall.pl       18 Mar 2003 11:57:57 -0000      1.12
  +++ build_nativecall.pl       6 Jun 2003 16:02:50 -0000       1.13
  @@ -39,7 +39,7 @@
                       v => "void *",
                        );
   
  -my (%ret_assign) = (p => "final_destination->data = return_data;\nPMC_REG(5) = 
final_destination;",
  +my (%ret_assign) = (p => "PMC_data(final_destination) = return_data;\nPMC_REG(5) = 
final_destination;",
                    i => "INT_REG(5) = return_data;",
                    l => "INT_REG(5) = return_data;",
                    c => "INT_REG(5) = return_data;",
  @@ -74,7 +74,7 @@
   /* nci.c
    *  Copyright: 2001-2003 Yet Another Society
    *  CVS Info
  - *     $Id: build_nativecall.pl,v 1.12 2003/03/18 11:57:57 ask Exp $
  + *     $Id: build_nativecall.pl,v 1.13 2003/06/06 16:02:50 leo Exp $
    *  Overview:
    *     Native Call Interface routines. The code needed to build a
    *     parrot to C call frame is in here
  @@ -178,7 +178,7 @@
   sub make_arg {
       my ($argtype, $reg_ref) = @_;
       /p/ && do {my $regnum = $reg_ref->{p}++;
  -            return "PMC_REG($regnum)->data";
  +            return "PMC_data(PMC_REG($regnum))";
                 };
       /i/ && do {my $regnum = $reg_ref->{i}++;
               return "(int)INT_REG($regnum)";
  
  
  
  1.79      +6 -6      parrot/debug.c
  
  Index: debug.c
  ===================================================================
  RCS file: /cvs/public/parrot/debug.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -w -r1.78 -r1.79
  --- debug.c   6 Jun 2003 14:00:53 -0000       1.78
  +++ debug.c   6 Jun 2003 16:02:50 -0000       1.79
  @@ -2,7 +2,7 @@
    * debug.c
    *
    * CVS Info
  - *    $Id: debug.c,v 1.78 2003/06/06 14:00:53 leo Exp $
  + *    $Id: debug.c,v 1.79 2003/06/06 16:02:50 leo Exp $
    * Overview:
    *    Parrot debugger
    * History:
  @@ -597,7 +597,7 @@
   PDB_set_break(struct Parrot_Interp *interpreter, const char *command)
   {
       PDB_t *pdb = interpreter->pdb;
  -    PDB_breakpoint_t *newbreak,*sbreak;
  +    PDB_breakpoint_t *newbreak = NULL, *sbreak;
       PDB_condition_t *condition;
       PDB_line_t *line;
       long ln,i;
  @@ -1282,7 +1282,7 @@
                       dest[size++] = '?';
                       break;
                   }
  -                k = k->data;
  +                k = PMC_data(k);
                   if (k) dest[size++] = ';';
               }
               dest[size++] = ']';
  
  
  
  1.57      +6 -6      parrot/dod.c
  
  Index: dod.c
  ===================================================================
  RCS file: /cvs/public/parrot/dod.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -w -r1.56 -r1.57
  --- dod.c     6 Jun 2003 12:01:35 -0000       1.56
  +++ dod.c     6 Jun 2003 16:02:50 -0000       1.57
  @@ -1,7 +1,7 @@
   /* dod.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: dod.c,v 1.56 2003/06/06 12:01:35 leo Exp $
  + *     $Id: dod.c,v 1.57 2003/06/06 16:02:50 leo Exp $
    *  Overview:
    *     Handles dead object destruction of the various headers
    *  Data Structure and Algorithms:
  @@ -200,18 +200,18 @@
            * pointer that we need to trace */
           if (bits) {
               if (bits == PObj_is_PMC_ptr_FLAG) {
  -                if (current->data) {
  -                    pobject_lives(interpreter, current->data);
  +                if (PMC_data(current)) {
  +                    pobject_lives(interpreter, PMC_data(current));
                   }
               }
               else if (bits == PObj_is_buffer_ptr_FLAG) {
  -                if (current->data) {
  -                    pobject_lives(interpreter, current->data);
  +                if (PMC_data(current)) {
  +                    pobject_lives(interpreter, PMC_data(current));
                   }
               }
               else if (bits == PObj_is_buffer_of_PMCs_ptr_FLAG) {
                   /* buffer of PMCs */
  -                Buffer *trace_buf = current->data;
  +                Buffer *trace_buf = PMC_data(current);
   
                   if (trace_buf) {
                       PMC **cur_pmc = trace_buf->bufstart;
  
  
  
  1.36      +2 -2      parrot/headers.c
  
  Index: headers.c
  ===================================================================
  RCS file: /cvs/public/parrot/headers.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -w -r1.35 -r1.36
  --- headers.c 6 Jun 2003 10:05:45 -0000       1.35
  +++ headers.c 6 Jun 2003 16:02:50 -0000       1.36
  @@ -1,7 +1,7 @@
   /* headers.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: headers.c,v 1.35 2003/06/06 10:05:45 leo Exp $
  + *     $Id: headers.c,v 1.36 2003/06/06 16:02:50 leo Exp $
    *  Overview:
    *     Header management functions. Handles getting of various headers,
    *     and pool creation
  @@ -38,7 +38,7 @@
   
       /* clear flags, set is_PMC_FLAG */
       PObj_flags_SETTO(pmc, PObj_is_PMC_FLAG);
  -    ((PMC *)pmc)->data = NULL;
  +    PMC_data((PMC *)pmc) = NULL;
       ((PMC *)pmc)->pmc_ext = NULL;
       /* TODO check PMCs init method, if they clear the cache */
       return pmc;
  
  
  
  1.39      +7 -7      parrot/key.c
  
  Index: key.c
  ===================================================================
  RCS file: /cvs/public/parrot/key.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -w -r1.38 -r1.39
  --- key.c     19 May 2003 13:06:52 -0000      1.38
  +++ key.c     6 Jun 2003 16:02:50 -0000       1.39
  @@ -1,7 +1,7 @@
   /* key.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: key.c,v 1.38 2003/05/19 13:06:52 leo Exp $
  + *     $Id: key.c,v 1.39 2003/06/06 16:02:50 leo Exp $
    *  Overview:
    *     The base vtable calling functions.
    *  Data Structure and Algorithms:
  @@ -210,7 +210,7 @@
   PMC *
   key_next(struct Parrot_Interp *interpreter, PMC *key)
   {
  -    return key->data;
  +    return PMC_data(key);
   }
   
   PMC *
  @@ -218,11 +218,11 @@
   {
       PMC *tail = key1;
   
  -    while (tail->data) {
  -        tail = tail->data;
  +    while (PMC_data(tail)) {
  +        tail = PMC_data(tail);
       }
   
  -    tail->data = key2;
  +    PMC_data(tail) = key2;
   
       return key1;
   }
  @@ -235,8 +235,8 @@
          ((PObj_get_FLAGS(key) & KEY_type_FLAGS) == KEY_pmc_FLAG) )
           pobject_lives(interpreter, (PObj *)key->cache.string_val);
   
  -    if (key->data)
  -        pobject_lives(interpreter, (PObj *)key->data);
  +    if (PMC_data(key))
  +        pobject_lives(interpreter, (PObj *)PMC_data(key));
   
   }
   
  
  
  
  1.7       +2 -2      parrot/pxs.c
  
  Index: pxs.c
  ===================================================================
  RCS file: /cvs/public/parrot/pxs.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- pxs.c     2 Nov 2002 14:57:47 -0000       1.6
  +++ pxs.c     6 Jun 2003 16:02:50 -0000       1.7
  @@ -93,7 +93,7 @@
   PXS_pointer(Parrot_Interp_t interp, void *object)
   {
       PMC *p = new_pmc_header(interp);
  -    p->data = object;
  +    PMC_data(p) = object;
       p->vtable = YOU_LOSE_VTABLE;
       return p;
   }
  
  
  
  1.19      +11 -11    parrot/sub.c
  
  Index: sub.c
  ===================================================================
  RCS file: /cvs/public/parrot/sub.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -w -r1.18 -r1.19
  --- sub.c     29 Jan 2003 18:34:02 -0000      1.18
  +++ sub.c     6 Jun 2003 16:02:50 -0000       1.19
  @@ -1,7 +1,7 @@
   /*  sub.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: sub.c,v 1.18 2003/01/29 18:34:02 sfink Exp $
  + *     $Id: sub.c,v 1.19 2003/06/06 16:02:50 leo Exp $
    *  Overview:
    *     Sub-routines, co-routines and other fun stuff...
    *  Data Structure and Algorithms:
  @@ -86,7 +86,7 @@
           return NULL;
       }
   
  -    return &(((struct Parrot_Lexicals *)pad->data)[scope_index]);
  +    return &(((struct Parrot_Lexicals *)PMC_data(pad))[scope_index]);
   }
   
   /*
  @@ -133,7 +133,7 @@
       struct Parrot_Lexicals * lex = NULL;
   
       for (i = pad->cache.int_val - 1; i >= 0; i--) {
  -        lex = &(((struct Parrot_Lexicals *)pad->data)[i]);
  +        lex = &(((struct Parrot_Lexicals *)PMC_data(pad))[i]);
           pos = lexicals_get_position(interp, lex, name);
           if (pos == list_length(interp, lex->names))
               lex = NULL;
  @@ -168,25 +168,25 @@
       }
   
       /* XXX JPS: should we use a List * here instead? */
  -    pad_pmc->data = mem_sys_allocate((depth + 1) *
  +    PMC_data(pad_pmc) = mem_sys_allocate((depth + 1) *
                                        sizeof(struct Parrot_Lexicals));
   
       if (base) {
           /* XXX JPS: I guess this is copying the front, when it should
              be copying the end of the parent (base) */
  -        memcpy(pad_pmc->data, base->data, depth *
  +        memcpy(PMC_data(pad_pmc), PMC_data(base), depth *
                  sizeof(struct Parrot_Lexicals));
       }
   
       pad_pmc->cache.int_val = depth + 1;
   
       /* in case call to list_new triggers gc */
  -    ((struct Parrot_Lexicals *)pad_pmc->data)[depth].values = NULL;
  -    ((struct Parrot_Lexicals *)pad_pmc->data)[depth].names = NULL;
  +    ((struct Parrot_Lexicals *)PMC_data(pad_pmc))[depth].values = NULL;
  +    ((struct Parrot_Lexicals *)PMC_data(pad_pmc))[depth].names = NULL;
   
  -    ((struct Parrot_Lexicals *)pad_pmc->data)[depth].values = 
  +    ((struct Parrot_Lexicals *)PMC_data(pad_pmc))[depth].values =
           list_new(interp, enum_type_PMC);
  -    ((struct Parrot_Lexicals *)pad_pmc->data)[depth].names = 
  +    ((struct Parrot_Lexicals *)PMC_data(pad_pmc))[depth].names =
           list_new(interp, enum_type_STRING);
   
       Parrot_unblock_DOD(interp);
  
  
  
  1.33      +2 -2      parrot/trace.c
  
  Index: trace.c
  ===================================================================
  RCS file: /cvs/public/parrot/trace.c,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -w -r1.32 -r1.33
  --- trace.c   19 May 2003 13:06:52 -0000      1.32
  +++ trace.c   6 Jun 2003 16:02:50 -0000       1.33
  @@ -1,7 +1,7 @@
   /* trace.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: trace.c,v 1.32 2003/05/19 13:06:52 leo Exp $
  + *     $Id: trace.c,v 1.33 2003/06/06 16:02:50 leo Exp $
    *  Overview:
    *     Tracing support for runops_cores.c.
    *  Data Structure and Algorithms:
  @@ -102,7 +102,7 @@
               PIO_eprintf(interpreter, "??");
           }
   
  -        key = key->data;
  +        key = PMC_data(key);
   
           if (key) PIO_eprintf(interpreter, ";");
       }
  
  
  

Reply via email to