cvsuser     04/12/15 14:07:29

  Modified:    dynclasses pyfloat.pmc pyint.pmc pystring.pmc
               languages/python README
  Log:
  First attempts at multiple PMC inheritance, minor pie test related
  fixes and status.
  
  Revision  Changes    Path
  1.8       +2 -2      parrot/dynclasses/pyfloat.pmc
  
  Index: pyfloat.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/dynclasses/pyfloat.pmc,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- pyfloat.pmc       15 Dec 2004 19:48:15 -0000      1.7
  +++ pyfloat.pmc       15 Dec 2004 22:07:28 -0000      1.8
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: pyfloat.pmc,v 1.7 2004/12/15 19:48:15 rubys Exp $
  +$Id: pyfloat.pmc,v 1.8 2004/12/15 22:07:28 rubys Exp $
   
   =head1 NAME
   
  @@ -20,7 +20,7 @@
   
   #include "parrot/parrot.h"
   
  -pmclass PyFloat extends PyObject dynpmc group python_group {
  +pmclass PyFloat extends Float extends PyObject dynpmc group python_group {
   
   /*
   
  
  
  
  1.11      +5 -1      parrot/dynclasses/pyint.pmc
  
  Index: pyint.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/dynclasses/pyint.pmc,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- pyint.pmc 15 Dec 2004 19:48:15 -0000      1.10
  +++ pyint.pmc 15 Dec 2004 22:07:28 -0000      1.11
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: pyint.pmc,v 1.10 2004/12/15 19:48:15 rubys Exp $
  +$Id: pyint.pmc,v 1.11 2004/12/15 22:07:28 rubys Exp $
   
   =head1 NAME
   
  @@ -216,6 +216,10 @@
               valf = VTABLE_get_number_keyed_int(INTERP, value, 1);
               VTABLE_set_number_keyed_int(INTERP, dest, 1, valf);
           }
  +MMD_PyString: {
  +            real_exception(INTERP, NULL, E_TypeError,
  +               "TypeError: unsupported operand type(s) for +: 'int' and 
'str'");
  +        }
       }
   
   /*
  
  
  
  1.10      +35 -4     parrot/dynclasses/pystring.pmc
  
  Index: pystring.pmc
  ===================================================================
  RCS file: /cvs/public/parrot/dynclasses/pystring.pmc,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- pystring.pmc      15 Dec 2004 12:30:34 -0000      1.9
  +++ pystring.pmc      15 Dec 2004 22:07:28 -0000      1.10
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: pystring.pmc,v 1.9 2004/12/15 12:30:34 rubys Exp $
  +$Id: pystring.pmc,v 1.10 2004/12/15 22:07:28 rubys Exp $
   
   =head1 NAME
   
  @@ -139,6 +139,37 @@
               PMC_int_val(key) = -1;
           return iter;
       }
  +
  +/*
  +
  +=item C<INTVAL get_integer()>
  +
  +Returns the integer representation of the string.
  +
  +=cut
  +
  +*/
  +
  +    INTVAL get_integer () {
  +        STRING *s = (STRING*) PMC_str_val(SELF);
  +        return string_to_int(INTERP, s);
  +    }
  +
  +/*
  +
  +=item C<FLOATVAL get_number()>
  +
  +Returns the floating-point representation of the string.
  +
  +=cut
  +
  +*/
  +
  +    FLOATVAL get_number () {
  +        STRING *s = (STRING*) PMC_str_val(SELF);
  +        return string_to_num(INTERP, s);
  +    }
  +
   /*
   
   =item C<PMC *get_pmc_keyed_int(INTVAL key)>
  @@ -281,9 +312,9 @@
   */
   
       METHOD PMC* lower() {
  -        STRING *s = string_downcase(interpreter, PMC_str_val(SELF));
  -        PMC *ret = pmc_new(interpreter, dynclass_PyString);
  -        string_set(interpreter, PMC_str_val(ret), s);
  +        STRING *s = string_downcase(INTERP, PMC_str_val(SELF));
  +        PMC *ret = pmc_new(INTERP, dynclass_PyString);
  +        VTABLE_set_string_native(INTERP, ret, s);
           return ret;
       }
   
  
  
  
  1.6       +10 -0     parrot/languages/python/README
  
  Index: README
  ===================================================================
  RCS file: /cvs/public/parrot/languages/python/README,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- README    11 Dec 2004 02:17:56 -0000      1.5
  +++ README    15 Dec 2004 22:07:29 -0000      1.6
  @@ -19,6 +19,16 @@
   
     Keyword/Default arguments
   
  +Benchmark status/issues:
  +
  +  b1: passes.  Would perform better if xranges were implemented as an iter.
  +  b2: co-routine issue.  main calls izip which calls PI which 
  +      yields to izip which yields to... PI?  WTF?
  +  b3: need to implement __new__
  +  b4: there is no b4!
  +  b5: awaiting completion of float, complex, ...
  +  b6: requires a dictionary with integer keys.
  +
   - Sam Ruby
   
   Below is the previous contents of this README:
  
  
  

Reply via email to