dan         01/09/10 08:49:27

  Modified:    .        register.h register.c
  Log:
  Renamed the core functions so the opcodes can find 'em OK. (There were some
  conflicts)
  
  Revision  Changes    Path
  1.2       +15 -5     parrot/register.h
  
  Index: register.h
  ===================================================================
  RCS file: /home/perlcvs/parrot/register.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- register.h        2001/08/29 12:07:03     1.1
  +++ register.h        2001/09/10 15:49:26     1.2
  @@ -65,12 +65,22 @@
   
   /* This macro masks off the low bits of a register chunk address,
      since we're guaranteed to be aligned */
  -#define CHUNK_BASE(x) (void *)(MASK_CHUNK_LOW_BITS && (IV)x)
  +#define CHUNK_BASE(x) (void *)(MASK_CHUNK_LOW_BITS & (IV)x)
   
  -void clear_i(struct Perl_Interp *);
  -void clear_s(struct Perl_Interp *);
  -void clear_p(struct Perl_Interp *);
  -void clear_n(struct Perl_Interp *);
  +void Parrot_clear_i(struct Perl_Interp *);
  +void Parrot_clear_s(struct Perl_Interp *);
  +void Parrot_clear_p(struct Perl_Interp *);
  +void Parrot_clear_n(struct Perl_Interp *);
  +
  +void Parrot_push_i(struct Perl_Interp *);
  +void Parrot_push_n(struct Perl_Interp *);
  +void Parrot_push_s(struct Perl_Interp *);
  +void Parrot_push_p(struct Perl_Interp *);
  +
  +void Parrot_pop_i(struct Perl_Interp *);
  +void Parrot_pop_n(struct Perl_Interp *);
  +void Parrot_pop_s(struct Perl_Interp *);
  +void Parrot_pop_p(struct Perl_Interp *);
   
   
   #endif /* __PARROT_REGISTER_H */
  
  
  
  1.2       +17 -14    parrot/register.c
  
  Index: register.c
  ===================================================================
  RCS file: /home/perlcvs/parrot/register.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- register.c        2001/08/29 12:07:03     1.1
  +++ register.c        2001/09/10 15:49:27     1.2
  @@ -6,18 +6,21 @@
   
   #include "parrot.h"
   
  -void push_i(struct Perl_Interp *interpreter) {
  +void Parrot_push_i(struct Perl_Interp *interpreter) {
     struct IRegChunk *chunk_base;
   
     chunk_base = CHUNK_BASE(interpreter->int_reg);
  +  printf("Chunk base is %x for %x\n", chunk_base, interpreter->int_reg);
     /* Do we have any slots left in the current chunk? */
     if (chunk_base->free) {
  +    printf("Free was %i\n", chunk_base->free);
       interpreter->int_reg = &chunk_base->IReg[chunk_base->used++];
       chunk_base->free--;
     }
     /* Nope, so plan B time. Allocate a new chunk of integer register frames */
     else {
       struct IRegChunk *new_chunk;
  +    printf("Allocating a new piece\n");
       new_chunk = Allocate_Aligned(sizeof(struct IRegChunk));
       new_chunk->used = 1;
       new_chunk->free = FRAMES_PER_INT_REG_CHUNK - 1;
  @@ -28,7 +31,7 @@
     }
   }
   
  -void pop_i(struct Perl_Interp *interpreter) {
  +void Parrot_pop_i(struct Perl_Interp *interpreter) {
     struct IRegChunk *chunk_base;
     chunk_base = CHUNK_BASE(interpreter->int_reg);
     /* Is there more than one register frame in use? */
  @@ -53,14 +56,14 @@
     }
   }
   
  -void clear_i(struct Perl_Interp *interpreter) {
  +void Parrot_clear_i(struct Perl_Interp *interpreter) {
     int i;
     for (i=0; i<NUM_REGISTERS; i++) {
       INT_REG(i) = 0;
     }
   }
   
  -void push_s(struct Perl_Interp *interpreter) {
  +void Parrot_push_s(struct Perl_Interp *interpreter) {
     struct SRegChunk *chunk_base;
   
     chunk_base = CHUNK_BASE(interpreter->string_reg);
  @@ -82,7 +85,7 @@
     }
   }
   
  -void pop_s(struct Perl_Interp *interpreter) {
  +void Parrot_pop_s(struct Perl_Interp *interpreter) {
     struct SRegChunk *chunk_base;
     chunk_base = CHUNK_BASE(interpreter->string_reg);
     /* Is there more than one register frame in use? */
  @@ -107,14 +110,14 @@
     }
   }
   
  -void clear_s(struct Perl_Interp *interpreter) {
  +void Parrot_clear_s(struct Perl_Interp *interpreter) {
     int i;
     for (i=0; i<NUM_REGISTERS; i++) {
       STR_REG(i) = NULL;
     }
   }
   
  -void push_n(struct Perl_Interp *interpreter) {
  +void Parrot_push_n(struct Perl_Interp *interpreter) {
     struct NRegChunk *chunk_base;
   
     chunk_base = CHUNK_BASE(interpreter->num_reg);
  @@ -136,7 +139,7 @@
     }
   }
   
  -void pop_n(struct Perl_Interp *interpreter) {
  +void Parrot_pop_n(struct Perl_Interp *interpreter) {
     struct NRegChunk *chunk_base;
     chunk_base = CHUNK_BASE(interpreter->num_reg);
     /* Is there more than one register frame in use? */
  @@ -161,14 +164,14 @@
     }
   }
   
  -void clear_n(struct Perl_Interp *interpreter) {
  +void Parrot_clear_n(struct Perl_Interp *interpreter) {
     int i;
     for (i=0; i<NUM_REGISTERS; i++) {
       NUM_REG(i) = 0;
     }
   }
   
  -void push_p(struct Perl_Interp *interpreter) {
  +void Parrot_push_p(struct Perl_Interp *interpreter) {
     struct PRegChunk *chunk_base;
   
     chunk_base = CHUNK_BASE(interpreter->pmc_reg);
  @@ -190,7 +193,7 @@
     }
   }
   
  -void pop_p(struct Perl_Interp *interpreter) {
  +void Parrot_pop_p(struct Perl_Interp *interpreter) {
     struct PRegChunk *chunk_base;
     chunk_base = CHUNK_BASE(interpreter->pmc_reg);
     /* Is there more than one register frame in use? */
  @@ -215,15 +218,15 @@
     }
   }
   
  -void clear_p(struct Perl_Interp *interpreter) {
  +void Parrot_clear_p(struct Perl_Interp *interpreter) {
     int i;
     for (i=0; i<NUM_REGISTERS; i++) {
       PMC_REG(i) = NULL;
     }
   }
   
  -void push_on_stack(void *thing, IV size, IV type) {
  +void Parrot_push_on_stack(void *thing, IV size, IV type) {
   }
   
  -void pop_off_stack(void *thing, IV type) {
  +void Parrot_pop_off_stack(void *thing, IV type) {
   }
  
  
  

Reply via email to