cvsuser     03/06/23 04:06:18

  Modified:    .        core.ops pmc.c
               include/parrot pobj.h
               jit/i386 jit_emit.h
               t/op     comp.t interp.t
  Log:
  PMC-data-5
  
  Revision  Changes    Path
  1.292     +2 -20     parrot/core.ops
  
  Index: core.ops
  ===================================================================
  RCS file: /cvs/public/parrot/core.ops,v
  retrieving revision 1.291
  retrieving revision 1.292
  diff -u -w -r1.291 -r1.292
  --- core.ops  22 Jun 2003 10:26:10 -0000      1.291
  +++ core.ops  23 Jun 2003 11:05:51 -0000      1.292
  @@ -4651,28 +4651,9 @@
   
   ########################################
   
  -=item B<newinterp>(out PMC, in INT)
  -
  -Create a new interpreter and store it in a PMC.
  -
  -=cut
  -
  -op newinterp(out PMC, in INT) {
  -  struct Parrot_Interp *new_interp;
  -  struct PMC *new_pmc;
  -  new_pmc = new_pmc_header(interpreter);
  -  $1 = new_pmc;
  -  new_interp = make_interpreter((Interp_flags)$2);
  -  new_interp->parent_interpreter = interpreter;
  -  PMC_data(new_pmc) = new_interp;
  -  new_pmc->vtable = YOU_LOSE_VTABLE;
  -  goto NEXT();
  -}
  -
  -
   =item B<runinterp>(in PMC, in INT)
   
  -Take a built interpreter and run the code starting at offset $2.
  +Run the code starting at offset $2 within interpreter $1.
   
   =cut
   
  @@ -4952,6 +4933,7 @@
        PANIC("Failed to load native library");
     }
     pmc = new_pmc_header(interpreter);
  +  add_pmc_ext(interpreter, pmc);
     PMC_data(pmc) = (void *)p;
     $1 = pmc;
     goto NEXT();
  
  
  
  1.24      +3 -1      parrot/pmc.c
  
  Index: pmc.c
  ===================================================================
  RCS file: /cvs/public/parrot/pmc.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -r1.23 -r1.24
  --- pmc.c     6 Jun 2003 08:29:18 -0000       1.23
  +++ pmc.c     23 Jun 2003 11:05:51 -0000      1.24
  @@ -1,7 +1,7 @@
   /* pmc.c
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: pmc.c,v 1.23 2003/06/06 08:29:18 leo Exp $
  + *     $Id: pmc.c,v 1.24 2003/06/23 11:05:51 leo Exp $
    *  Overview:
    *     The base vtable calling functions.
    *  Data Structure and Algorithms:
  @@ -103,6 +103,7 @@
       PMC *pmc = get_new_pmc_header(interpreter, base_type,
               interpreter->arena_base->constant_pmc_pool);
       PObj_constant_SET(pmc);
  +    add_pmc_ext(interpreter, pmc);
       return pmc;
   }
   /*=for api pmc pmc_new_init
  @@ -133,6 +134,7 @@
           return NULL;
       }
   
  +    add_pmc_ext(interpreter, pmc);
       VTABLE_init_pmc(interpreter, pmc, init);
   
       return pmc;
  
  
  
  1.21      +3 -3      parrot/include/parrot/pobj.h
  
  Index: pobj.h
  ===================================================================
  RCS file: /cvs/public/parrot/include/parrot/pobj.h,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -w -r1.20 -r1.21
  --- pobj.h    7 Jun 2003 09:26:17 -0000       1.20
  +++ pobj.h    23 Jun 2003 11:06:01 -0000      1.21
  @@ -1,7 +1,7 @@
   /* pobj.h
    *  Copyright: (When this is determined...it will go here)
    *  CVS Info
  - *     $Id: pobj.h,v 1.20 2003/06/07 09:26:17 leo Exp $
  + *     $Id: pobj.h,v 1.21 2003/06/23 11:06:01 leo Exp $
    *  Overview:
    *     Parrot Object data members and flags enum
    *  Data Structure and Algorithms:
  @@ -80,8 +80,8 @@
       /* completely different data.  That's why it's */
       /* referred to as a "cache". */
   
  -/* put data into the PMC_EXT structure - not yet */
  -#define PMC_DATA_IN_EXT 0
  +/* put data into the PMC_EXT structure */
  +#define PMC_DATA_IN_EXT 1
   
   struct PMC {
       pobj_t obj;
  
  
  
  1.67      +7 -4      parrot/jit/i386/jit_emit.h
  
  Index: jit_emit.h
  ===================================================================
  RCS file: /cvs/public/parrot/jit/i386/jit_emit.h,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -w -r1.66 -r1.67
  --- jit_emit.h        19 Jun 2003 14:07:59 -0000      1.66
  +++ jit_emit.h        23 Jun 2003 11:06:08 -0000      1.67
  @@ -3,7 +3,7 @@
    *
    * i386
    *
  - * $Id: jit_emit.h,v 1.66 2003/06/19 14:07:59 leo Exp $
  + * $Id: jit_emit.h,v 1.67 2003/06/23 11:06:08 leo Exp $
    */
   
   #include <assert.h>
  @@ -2669,18 +2669,21 @@
               emitm_calll(pc, (char*)pmc_new - pc - 4);
               emitm_addb_i_r(pc, 8, emit_ESP);
               /* eax = PMC, get return value into edx */
  +            jit_emit_mov_mr_i(pc, &PMC_REG(next_p++), emit_EAX);
               emitm_popl_r(pc, emit_EDX);
               /* stuff return value into pmc->data */
   #if ! PMC_DATA_IN_EXT
  +            /* mov %edx, (data) %eax */
               emitm_movl_r_m(pc, emit_EDX, emit_EAX, 0, 1,
                       offsetof(struct PMC, data));
   #else
  -            emitm_movl_r_m(pc, emit_EDX, emit_EAX, 0, 1,
  +            /* mov pmc_ext(%eax), %eax
  +               mov %edx, data(%eax) */
  +            emitm_movl_m_r(pc, emit_EAX, emit_EAX, 0, 1,
                       offsetof(struct PMC, pmc_ext));
  -            emitm_movl_r_m(pc, emit_EAX, emit_EAX, 0, 1,
  +            emitm_movl_r_m(pc, emit_EDX, emit_EAX, 0, 1,
                       offsetof(struct PMC_EXT, data));
   #endif
  -            jit_emit_mov_mr_i(pc, &PMC_REG(next_p++), emit_EAX);
               break;
           case 't':   /* string, determine length, make string */
               emitm_pushl_i(pc, 0);
  
  
  
  1.3       +1 -0      parrot/t/op/comp.t
  
  Index: comp.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/op/comp.t,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -w -r1.2 -r1.3
  --- comp.t    22 Jun 2003 10:26:15 -0000      1.2
  +++ comp.t    23 Jun 2003 11:06:17 -0000      1.3
  @@ -158,6 +158,7 @@
           print "\n"
           print I4
           print "\n"
  +     end
   CODE
   1
   0
  
  
  
  1.8       +1 -17     parrot/t/op/interp.t
  
  Index: interp.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/op/interp.t,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -r1.7 -r1.8
  --- interp.t  16 Jun 2003 18:11:39 -0000      1.7
  +++ interp.t  23 Jun 2003 11:06:17 -0000      1.8
  @@ -1,22 +1,6 @@
   #! perl -w
   
  -use Parrot::Test tests => 3;
  -
  -output_is(<<'CODE', <<'OUTPUT', "runinterp");
  -     newinterp P0, 0
  -     print "calling\n"
  -     runinterp P0, foo
  -     print "ending\n"
  -     end
  -     print "bad things!\n"
  -foo:
  -     print "In 2\n"
  -     end
  -CODE
  -calling
  -In 2
  -ending
  -OUTPUT
  +use Parrot::Test tests => 2;
   
   output_is(<<'CODE', <<'OUTPUT', "runinterp - new style");
        new P0, .ParrotInterpreter
  
  
  

Reply via email to