cvsuser     05/04/04 01:39:43

  Modified:    build_tools build_nativecall.pl
               classes  iterator.pmc parrotio.pmc
               jit/i386 jit_emit.h
               lib/Parrot Pmc2c.pm
               src      call_list.txt inter_misc.c
  Log:
  NCI call signature change - Interpreter is J now
  
  Revision  Changes    Path
  1.63      +12 -12    parrot/build_tools/build_nativecall.pl
  
  Index: build_nativecall.pl
  ===================================================================
  RCS file: /cvs/public/parrot/build_tools/build_nativecall.pl,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- build_nativecall.pl       20 Feb 2005 11:15:22 -0000      1.62
  +++ build_nativecall.pl       4 Apr 2005 08:39:39 -0000       1.63
  @@ -36,7 +36,7 @@
   
   # Needed to build code which tells about the number of return registers.
   # [ $stack, $int, $string, $pmc, $num ]
  -my %ret_count = 
  +my %ret_count =
        ( p => [1,0,0,1,0],        # Returning a pointer that we PMC stuff
          P => [1,0,0,1,0],        # PMC
          S => [1,0,1,0,0],        # STR
  @@ -53,7 +53,7 @@
   #      B => [1,0,1,0,0],        # Returns a buffer
        );
   
  -my %ret_type = 
  +my %ret_type =
        ( p => "void *",
          i => "int",
          3 => "int *",
  @@ -72,7 +72,7 @@
          S => "STRING *",
        );
   
  -my %proto_type = 
  +my %proto_type =
        ( p => "void *",
          i => "int",
          3 => "int *",
  @@ -85,7 +85,7 @@
          d => "double",
          t => "char *",
          v => "void",
  -       I => "Interp *",
  +       J => "Interp *",
          P => "PMC *",
          S => "STRING *",
          O => "PMC *",
  @@ -95,14 +95,14 @@
          T => "char **",
        );
   
  -my %other_decl = 
  +my %other_decl =
        ( p => "PMC *final_destination = pmc_new(interpreter, 
enum_class_UnManagedStruct);",
          t => "STRING *final_destination;"
   #      b => "Buffer *final_destination = 
new_buffer_header(interpreter);\nPObj_external_SET(final_destination)",
   #      B => "Buffer *final_destination = 
new_buffer_header(interpreter);\nPObj_external_SET(final_destination)",
        );
   
  -my %ret_type_decl = 
  +my %ret_type_decl =
        ( p => "void *",
          i => "int",
          3 => "int *",
  @@ -121,7 +121,7 @@
          S => "STRING *",
        );
   
  -my %ret_assign = 
  +my %ret_assign =
        ( p => "PMC_data(final_destination) = return_data;\n    REG_PMC(5) = 
final_destination;",
          i => "REG_INT(5) = return_data;",
          3 => "REG_INT(5) = *return_data;",
  @@ -140,7 +140,7 @@
          s => "REG_INT(5) = return_data;",
        );
   
  -my %func_call_assign = 
  +my %func_call_assign =
        ( p => "return_data = ",
          i => "return_data = ",
          3 => "return_data = ",
  @@ -300,7 +300,7 @@
       /B/ && do {my $reg_num = $reg_ref->{s}++;
                  return "(&PObj_bufstart(REG_STR($reg_num)))";
                 };
  -    /I/ && do {
  +    /J/ && do {
                  return "interpreter";
                 };
       /O/ && do {
  @@ -539,4 +539,4 @@
       return;
   }
   
  -=cut 
  +=cut
  
  
  
  1.33      +2 -2      parrot/classes/iterator.pmc
  
  Index: iterator.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/classes/iterator.pmc,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- iterator.pmc      12 Dec 2004 23:03:45 -0000      1.32
  +++ iterator.pmc      4 Apr 2005 08:39:40 -0000       1.33
  @@ -25,7 +25,7 @@
       void class_init() {
           if (pass) {
               enter_nci_method(INTERP, enum_class_Iterator,
  -                    F2DPTR(Parrot_Iterator_shift_pmc), "next", "PIO");
  +                    F2DPTR(Parrot_Iterator_shift_pmc), "next", "PJO");
           }
       }
   
  
  
  
  1.26      +6 -6      parrot/classes/parrotio.pmc
  
  Index: parrotio.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/classes/parrotio.pmc,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- parrotio.pmc      12 Jan 2005 11:42:06 -0000      1.25
  +++ parrotio.pmc      4 Apr 2005 08:39:40 -0000       1.26
  @@ -40,15 +40,15 @@
   
           if (pass) {
               enter_nci_method(INTERP, enum_class_ParrotIO,
  -                    F2DPTR(PIO_flush), "flush", "vIO");
  +                    F2DPTR(PIO_flush), "flush", "vJO");
               enter_nci_method(INTERP, enum_class_ParrotIO,
  -                    F2DPTR(PIO_setbuf), "setbuf", "iIOi");
  +                    F2DPTR(PIO_setbuf), "setbuf", "iJOi");
               enter_nci_method(INTERP, enum_class_ParrotIO,
  -                    F2DPTR(PIO_setlinebuf), "setlinebuf", "iIO");
  +                    F2DPTR(PIO_setlinebuf), "setlinebuf", "iJO");
               enter_nci_method(INTERP, enum_class_ParrotIO,
  -                    F2DPTR(PIO_puts), "puts", "iIOt");
  +                    F2DPTR(PIO_puts), "puts", "iJOt");
               enter_nci_method(INTERP, enum_class_ParrotIO,
  -                    F2DPTR(PIO_eof), "eof", "iIO");
  +                    F2DPTR(PIO_eof), "eof", "iJO");
           }
       }
   
  
  
  
  1.143     +4 -2      parrot/jit/i386/jit_emit.h
  
  Index: jit_emit.h
  ===================================================================
  RCS file: /cvs/public/parrot/jit/i386/jit_emit.h,v
  retrieving revision 1.142
  retrieving revision 1.143
  diff -u -r1.142 -r1.143
  --- jit_emit.h        18 Dec 2004 04:19:18 -0000      1.142
  +++ jit_emit.h        4 Apr 2005 08:39:41 -0000       1.143
  @@ -2932,6 +2932,7 @@
                   emitm_fstpl(pc, emit_ESP, emit_None, 1, 0);
                   st += 4;        /* extra stack for double */
                   break;
  +            case 'I':   /* INTVAL */
               case 'l':   /* long */
               case 'i':   /* int */
                   jit_emit_mov_RM_i(pc, emit_EAX,
  @@ -3015,7 +3016,7 @@
                   emitm_addb_i_r(pc, 8, emit_ESP);
                   emitm_pushl_r(pc, emit_EAX);
                   break;
  -            case 'I':
  +            case 'J':   /* interpreter */
                   emitm_movl_m_r(pc, emit_ECX, emit_EBP, 0, 1, 8);
                   emitm_pushl_r(pc, emit_ECX);
                   break;
  @@ -3076,6 +3077,7 @@
               emitm_movsbl_r_r(pc, emit_EDX, emit_EAX);
               jit_emit_mov_MR_i(pc, REG_OFFS_INT(next_i++), emit_EDX);
               break;
  +        case 'I':   /* INTVAL */
           case 'l':
           case 'i':
               jit_emit_mov_MR_i(pc, REG_OFFS_INT(next_i++), emit_EAX);
  
  
  
  1.69      +2 -2      parrot/lib/Parrot/Pmc2c.pm
  
  Index: Pmc2c.pm
  ===================================================================
  RCS file: /cvs/public/parrot/lib/Parrot/Pmc2c.pm,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- Pmc2c.pm  3 Apr 2005 15:46:45 -0000       1.68
  +++ Pmc2c.pm  4 Apr 2005 08:39:42 -0000       1.69
  @@ -482,7 +482,7 @@
   
       # type method(interpreter, self, parameters...)
       my $ret = $calltype{$type or "void"};
  -    $ret .= "IO";
  +    $ret .= "JO";
       $ret .= join('', map {$calltype{$_} or "?"} split(/,/, $parameters));
       # TODO
       # scan src/call_list.txt if the generated signature is available
  
  
  
  1.59      +38 -45    parrot/src/call_list.txt
  
  Index: call_list.txt
  ===================================================================
  RCS file: /cvs/public/parrot/src/call_list.txt,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- call_list.txt     26 Mar 2005 16:56:59 -0000      1.58
  +++ call_list.txt     4 Apr 2005 08:39:43 -0000       1.59
  @@ -33,28 +33,21 @@
   # v - void
   
   # Buffers are not valid return parameters,
  -# use 'p' when the native function returns a pointer value 
  +# use 'p' when the native function returns a pointer value
   # b - void *
   # B - void **
   
   # special stuff
   # 0 - insert a NULL (pointer) - doesn't comsume a register
  -# I - Parrot_Interp param
  +# J - Parrot_Interp param
   
   # Arrayish things, terminated with NULL/0
   # L - Long array
   # T - Array of string pointers (Converted to cstrings)
   
   # Callback Things
  -# C - Function pointer to call back into Parrot. The signature of
  -#     this function is: void (function *)(ExternalThing *, CallbackInfo *)
  -#     More docs in PDD 16.
  -# D - Function pointer. Like C, only the arg order is reversed:
  -#     this function is: void (function *)(CallbackInfo *, ExternalThing *)
  -
  -# The following parameters must appear in a pair
  -# Y - sub PMC to call back into
  -# Z - Single PMC parameter to pass into sub Y
  +
  +# U - Single PMC parameter to pass into callback - user data
   
   c                # t/pmc/nci.t
   c    p
  @@ -63,7 +56,7 @@
   
   d                # t/pmc/nci.t
   d    d
  -d    IOd      # Parrot builtins
  +d    JOd      # Parrot builtins
   d    v
   
   f                # t/pmc/nci.t
  @@ -149,15 +142,15 @@
   l    v
   l    33l
   
  -P    Ii       # Needed for parrot threads
  -P    IOl      # Parrot builtins
  -P    IOP      # PerlHash fromkeys, obsolete
  -P    It
  +P    Ji       # Needed for parrot threads
  +P    JOl      # Parrot builtins
  +P    JOP      # PerlHash fromkeys, obsolete
  +P    Jt
   
   p
   p    B
   p    b
  -p    It
  +p    Jt
   p    i
   p    ii
   p    iiii
  @@ -189,8 +182,8 @@
   t    v
   
   v
  -v    Iiiip    # examples/japh/japh11.pasm
  -v    IOP      # Needed for parrot threads
  +v    Jiiip    # examples/japh/japh11.pasm
  +v    JOP      # Needed for parrot threads
   v    i
   v    ii
   v    illllllll
  @@ -204,19 +197,19 @@
   v    v
   
   # These are needed for parrotio.pmc
  -i    IP
  -v    IP
  -i    IPi
  -i    IPii
  -i    IPiii
  -i    IPt
  +i    JP
  +v    JP
  +i    JPi
  +i    JPii
  +i    JPiii
  +i    JPt
   
   # Py_func signatures
  -P    IP
  -P    IPP
  -P    IPPP
  -P    IO
  -S    IO
  +P    JP
  +P    JPP
  +P    JPPP
  +P    JO
  +S    JO
   i       P
   
   # the following are use by t/pmc/nci.t
  @@ -232,12 +225,12 @@
   p    ip
   i    33
   v    pii
  -v    IO
  -i    IO
  -i    IOi
  -i    IOt
  -i    It
  -i    Ii
  +v    JO
  +i    JO
  +i    JOi
  +i    JOt
  +i    Jt
  +i    Ji
   
   # Oddball ones for postgres
   p    ptiLTLLi
  @@ -264,7 +257,7 @@
   i    pt33
   
   # For python
  -i    IPP
  +i    JPP
   
   #required for mod_parrot
   i    tp
  @@ -272,12 +265,12 @@
   i    Pip
   
   # PyBuiltins
  -P    IOPP
  -P    IOPPP
  -v    IOPP
  -v    IOPPP
  -P    IOPPPP
  -P    IOPPPPP
  +P    JOPP
  +P    JOPPP
  +v    JOPP
  +v    JOPPP
  +P    JOPPPP
  +P    JOPPPPP
   
   # Added for Tcl
  -l    IOSl
  +l    JOSl
  
  
  
  1.19      +2 -2      parrot/src/inter_misc.c
  
  Index: inter_misc.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/inter_misc.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- inter_misc.c      14 Mar 2005 19:18:14 -0000      1.18
  +++ inter_misc.c      4 Apr 2005 08:39:43 -0000       1.19
  @@ -123,7 +123,7 @@
       nci = pmc_new(interpreter, enum_class_Compiler);
       VTABLE_set_pmc_keyed_str(interpreter, hash, type, nci);
       /* build native call interface fir the C sub in "func" */
  -    sc = CONST_STRING(interpreter, "PIt");
  +    sc = CONST_STRING(interpreter, "PJt");
       VTABLE_set_pointer_keyed_str(interpreter, nci, sc, func);
   }
   
  
  
  

Reply via email to