cvsuser 04/12/15 04:30:36
Modified: classes bigint.pmc
dynclasses pybuiltin.pmc pyfloat.pmc pyint.pmc pylist.pmc
pylong.pmc pyobject.pmc pystring.pmc pytuple.pmc
t/dynclass pybuiltin.t
Log:
Progress towards passing languages/python/t/pie/b2.t
Revision Changes Path
1.18 +6 -6 parrot/classes/bigint.pmc
Index: bigint.pmc
===================================================================
RCS file: /cvs/public/parrot/classes/bigint.pmc,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- bigint.pmc 29 Jul 2004 09:12:38 -0000 1.17
+++ bigint.pmc 15 Dec 2004 12:30:33 -0000 1.18
@@ -1,6 +1,6 @@
/*
Copyright: 2004 The Perl Foundation. All Rights Reserved.
-$Id: bigint.pmc,v 1.17 2004/07/29 09:12:38 leo Exp $
+$Id: bigint.pmc,v 1.18 2004/12/15 12:30:33 rubys Exp $
=head1 NAME
@@ -127,7 +127,7 @@
/* this is mpz_fdiv_q */
mpz_div(BN(dest), BN(self), BN(value));
if (mpz_fits_slong_p(BN(dest))) {
- VTABLE_morph(interpreter, dest, enum_class_PerlInt);
+ VTABLE_morph(interpreter, dest, enum_class_Integer);
VTABLE_set_integer_native(interpreter, dest,
mpz_get_si(BN(dest)));
}
@@ -139,7 +139,7 @@
/* this is mpz_fdiv_q */
mpz_div_ui(BN(dest), BN(self), value);
if (mpz_fits_slong_p(BN(dest))) {
- VTABLE_morph(interpreter, dest, enum_class_PerlInt);
+ VTABLE_morph(interpreter, dest, enum_class_Integer);
VTABLE_set_integer_native(interpreter, dest,
mpz_get_si(BN(dest)));
}
@@ -151,7 +151,7 @@
/* this is mpz_fdiv_q */
mpz_fdiv_q(BN(dest), BN(self), BN(value));
if (mpz_fits_slong_p(BN(dest))) {
- VTABLE_morph(interpreter, dest, enum_class_PerlInt);
+ VTABLE_morph(interpreter, dest, enum_class_Integer);
VTABLE_set_integer_native(interpreter, dest,
mpz_get_si(BN(dest)));
}
@@ -163,7 +163,7 @@
/* this is mpz_fdiv_q */
mpz_fdiv_q_ui(BN(dest), BN(self), value);
if (mpz_fits_slong_p(BN(dest))) {
- VTABLE_morph(interpreter, dest, enum_class_PerlInt);
+ VTABLE_morph(interpreter, dest, enum_class_Integer);
VTABLE_set_integer_native(interpreter, dest,
mpz_get_si(BN(dest)));
}
@@ -174,7 +174,7 @@
VTABLE_morph(interpreter, dest, enum_class_BigInt);
mpz_mod(BN(dest), BN(self), BN(value));
if (mpz_fits_slong_p(BN(dest))) {
- VTABLE_morph(interpreter, dest, enum_class_PerlInt);
+ VTABLE_morph(interpreter, dest, enum_class_Integer);
VTABLE_set_integer_native(interpreter, dest,
mpz_get_si(BN(dest)));
}
1.21 +26 -29 parrot/dynclasses/pybuiltin.pmc
Index: pybuiltin.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pybuiltin.pmc,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- pybuiltin.pmc 13 Dec 2004 13:46:10 -0000 1.20
+++ pybuiltin.pmc 15 Dec 2004 12:30:34 -0000 1.21
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pybuiltin.pmc,v 1.20 2004/12/13 13:46:10 leo Exp $
+$Id: pybuiltin.pmc,v 1.21 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -123,6 +123,11 @@
}
/* constants */
+ key = const_string(INTERP, "__debug__");
+ item = pmc_new(INTERP, dynclass_PyBoolean);
+ VTABLE_set_integer_native(INTERP, item, 0);
+ scratchpad_store_by_name(INTERP, pad, 0, key, item);
+
key = const_string(INTERP, "False");
item = pmc_new(INTERP, dynclass_PyBoolean);
VTABLE_set_integer_native(INTERP, item, 0);
@@ -334,15 +339,12 @@
* TODO save registers once around loop
*/
PMC *t;
- if (func->vtable->base_type == enum_class_NCI) {
- REG_PMC(5) = item;
- REG_INT(3) = 1;
- Parrot_runops_fromc(INTERP, func);
- t = REG_PMC(5);
- }
- else {
- t = Parrot_runops_fromc_args(INTERP, func, "PP", item);
- }
+ struct parrot_regs_t *bp;
+ REG_PMC(5) = item;
+ REG_INT(0) = REG_INT(3) = 1;
+ REG_INT(1) = REG_INT(2) = REG_INT(4) = 0;
+ bp = Parrot_runops_fromc(INTERP, func);
+ t = BP_REG_PMC(bp,5);
if (!VTABLE_get_bool(INTERP, t))
continue;
}
@@ -618,15 +620,12 @@
while (VTABLE_get_bool(INTERP, iter)) {
PMC *item = VTABLE_shift_pmc(INTERP, iter);
if (!none_func) {
- if (VTABLE_isa(INTERP, func, PYOBJECT)) {
- REG_PMC(5) = item;
- REG_INT(3) = 1;
- Parrot_runops_fromc(INTERP, func);
- item = REG_PMC(5);
- }
- else {
- item = Parrot_runops_fromc_args(INTERP, func, "PP",
item);
- }
+ struct parrot_regs_t *bp;
+ REG_PMC(5) = item;
+ REG_INT(0) = REG_INT(3) = 1;
+ REG_INT(1) = REG_INT(2) = REG_INT(4) = 0;
+ bp = Parrot_runops_fromc(INTERP, func);
+ item = BP_REG_PMC(bp,5);
}
VTABLE_set_pmc_keyed_int(INTERP, res, i++, item);
}
@@ -802,16 +801,14 @@
/* run filter func -
* TODO save registers once around loop
*/
- if (VTABLE_isa(INTERP, func, PYOBJECT)) {
- REG_PMC(5) = res;
- REG_PMC(6) = item;
- REG_INT(3) = 2;
- Parrot_runops_fromc(INTERP, func);
- res = REG_PMC(5);
- }
- else {
- res = Parrot_runops_fromc_args(INTERP, func, "PPP", res,
item);
- }
+ struct parrot_regs_t *bp;
+ REG_PMC(5) = res;
+ REG_PMC(6) = item;
+ REG_INT(3) = 2;
+ REG_INT(0) = 1;
+ REG_INT(1) = REG_INT(2) = REG_INT(4) = 0;
+ bp = Parrot_runops_fromc(INTERP, func);
+ res = BP_REG_PMC(bp,5);
}
if ((REG_INT(3)>2) && 0==VTABLE_elements(INTERP, res))
1.6 +1 -3 parrot/dynclasses/pyfloat.pmc
Index: pyfloat.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pyfloat.pmc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- pyfloat.pmc 7 Dec 2004 19:48:49 -0000 1.5
+++ pyfloat.pmc 15 Dec 2004 12:30:34 -0000 1.6
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pyfloat.pmc,v 1.5 2004/12/07 19:48:49 rubys Exp $
+$Id: pyfloat.pmc,v 1.6 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -97,8 +97,6 @@
Sets the value of the number to C<value>.
-Note that if C<value> is an integer the number morphs to a C<PerlInt>.
-
=cut
*/
1.9 +97 -20 parrot/dynclasses/pyint.pmc
Index: pyint.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pyint.pmc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pyint.pmc 13 Dec 2004 21:50:58 -0000 1.8
+++ pyint.pmc 15 Dec 2004 12:30:34 -0000 1.9
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pyint.pmc,v 1.8 2004/12/13 21:50:58 rubys Exp $
+$Id: pyint.pmc,v 1.9 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -24,10 +24,44 @@
static INTVAL dynclass_PyInt;
static INTVAL dynclass_PyComplex;
static INTVAL dynclass_PyFloat;
+static INTVAL dynclass_PyLong;
static INTVAL dynclass_PyString;
static PMC* base_class;
+static void
+overflow(Interp *interpreter, PMC *self, INTVAL b, PMC *dest, int mmd)
+{
+ PMC *temp;
+ INTVAL a = PMC_int_val(self);
+
+ if (PARROT_ERRORS_test(interpreter,PARROT_ERRORS_OVERFLOW_FLAG)) {
+ real_exception(interpreter, NULL, ERR_OVERFLOW,
+ "Integer overflow");
+ }
+ if (self == dest) {
+ /* TODO preserve type system */
+ VTABLE_morph(interpreter, self, dynclass_PyLong);
+ VTABLE_set_integer_native(interpreter, self, a);
+ mmd_dispatch_v_pip(interpreter, self, b, dest, mmd);
+ }
+ else {
+ temp = pmc_new(interpreter, dynclass_PyLong);
+ VTABLE_set_integer_native(interpreter, temp, a);
+ mmd_dispatch_v_pip(interpreter, temp, b, dest, mmd);
+ }
+}
+
+static void
+promote(Interp *interpreter, PMC *self, PMC *b, PMC *dest, int mmd)
+{
+ PMC *temp;
+ INTVAL a = PMC_int_val(self);
+ temp = pmc_new(interpreter, dynclass_PyLong);
+ VTABLE_set_integer_native(interpreter, temp, a);
+ mmd_dispatch_v_ppp(interpreter, temp, b, dest, mmd);
+}
+
pmclass PyInt extends PyObject dynpmc group python_group {
/*
@@ -46,6 +80,7 @@
dynclass_PyInt = Parrot_PMC_typenum(INTERP, "PyInt");
dynclass_PyComplex = Parrot_PMC_typenum(INTERP, "PyComplex");
dynclass_PyFloat = Parrot_PMC_typenum(INTERP, "PyFloat");
+ dynclass_PyLong = Parrot_PMC_typenum(INTERP, "PyLong");
dynclass_PyString = Parrot_PMC_typenum(INTERP, "PyString");
/* TODO: make Int have a real base class */
@@ -156,17 +191,23 @@
void add (PMC* value, PMC* dest) {
MMD_PyInt: {
- INTVAL pmci = PMC_int_val(SELF);
- INTVAL vali = VTABLE_get_integer(INTERP, value);
- VTABLE_morph(INTERP, dest, dynclass_PyInt);
- VTABLE_set_integer_native(INTERP, dest, pmci + vali);
- }
+ INTVAL a = PMC_int_val(SELF);
+ INTVAL b = PMC_int_val(value);
+ INTVAL c = a + b;
+ if ((c^a) >= 0 || (c^b) >= 0)
+ VTABLE_set_integer_native(INTERP, dest, c);
+ else
+ overflow(INTERP, SELF, b, dest, MMD_ADD_INT);
+ }
MMD_PyFloat: {
INTVAL pmci = PMC_int_val(SELF);
FLOATVAL valf = VTABLE_get_number(INTERP, value);
VTABLE_morph(INTERP, dest, dynclass_PyFloat);
VTABLE_set_number_native(INTERP, dest, pmci + valf);
}
+MMD_PyLong: {
+ promote(INTERP, SELF, value, dest, MMD_ADD);
+ }
MMD_PyComplex: {
INTVAL pmci = PMC_int_val(SELF);
FLOATVAL valf = VTABLE_get_number_keyed_int(INTERP, value, 0);
@@ -189,7 +230,11 @@
void add_int (INTVAL b, PMC* dest) {
INTVAL a = PMC_int_val(SELF);
- VTABLE_set_integer_native(INTERP, dest, a+b);
+ INTVAL c = a + b;
+ if ((c^a) >= 0 || (c^b) >= 0)
+ VTABLE_set_integer_native(INTERP, dest, c);
+ else
+ overflow(INTERP, SELF, b, dest, MMD_ADD_INT);
}
/*
@@ -404,10 +449,18 @@
- VTABLE_get_integer(INTERP, value);
return diff > 0 ? 1 : diff < 0 ? -1 : 0;
}
+MMD_PyLong: {
+ PMC *temp;
+ INTVAL a = PMC_int_val(SELF);
+ temp = pmc_new(INTERP, dynclass_PyLong);
+ VTABLE_set_integer_native(INTERP, temp, a);
+ return mmd_dispatch_i_pp(INTERP, temp, value, MMD_CMP);
+ }
MMD_DEFAULT: {
return -1;
}
}
+
/*
=item C<void divide(PMC *value, PMC *dest)>
@@ -429,6 +482,9 @@
}
VTABLE_set_integer_native(INTERP, dest, xdivy);
}
+MMD_PyLong: {
+ promote(INTERP, SELF, value, dest, MMD_DIVIDE);
+ }
MMD_PyFloat: {
INTVAL pmci = PMC_int_val(SELF);
FLOATVAL valf = VTABLE_get_number(INTERP, value);
@@ -468,6 +524,9 @@
*/
void floor_divide (PMC* value, PMC* dest) {
+MMD_PyLong: {
+ promote(INTERP, SELF, value, dest, MMD_FLOOR_DIVIDE);
+ }
MMD_DEFAULT: {
mmd_dispatch_v_ppp(INTERP, SELF, value, dest, MMD_DIVIDE);
}
@@ -645,14 +704,19 @@
*/
void modulus (PMC* value, PMC* dest) {
- INTVAL pmci = PMC_int_val(SELF);
- INTVAL vali = VTABLE_get_integer(INTERP, value);
- INTVAL xdivy = pmci / vali;
- INTVAL xmody = pmci - xdivy * vali;
- if (xmody && ((vali ^ xmody) < 0) /* i.e. and signs differ */) {
- xmody += vali;
+MMD_PyInt: {
+ INTVAL pmci = PMC_int_val(SELF);
+ INTVAL vali = VTABLE_get_integer(INTERP, value);
+ INTVAL xdivy = pmci / vali;
+ INTVAL xmody = pmci - xdivy * vali;
+ if (xmody && ((vali ^ xmody) < 0) /* i.e. and signs differ */) {
+ xmody += vali;
+ }
+ VTABLE_set_integer_native(INTERP, dest, xmody);
+ }
+MMD_PyLong: {
+ promote(INTERP, SELF, value, dest, MMD_MOD);
}
- VTABLE_set_integer_native(INTERP, dest, xmody);
}
/*
@@ -688,9 +752,17 @@
void multiply (PMC* value, PMC* dest) {
MMD_PyInt: {
- INTVAL pmci = PMC_int_val(SELF);
- INTVAL vali = VTABLE_get_integer(INTERP, value);
- VTABLE_set_integer_native(INTERP, dest, pmci * vali);
+ INTVAL a = PMC_int_val(SELF);
+ INTVAL b = PMC_int_val(value);
+ double cf = (double)a * (double)b;
+ INTVAL c = a * b;
+ if ((double) c == cf)
+ VTABLE_set_integer_native(INTERP, dest, c);
+ else
+ overflow(INTERP, SELF, b, dest, MMD_MULTIPLY_INT);
+ }
+MMD_PyLong: {
+ promote(INTERP, SELF, value, dest, MMD_MULTIPLY);
}
MMD_PyFloat: {
INTVAL pmci = PMC_int_val(SELF);
@@ -710,9 +782,14 @@
*/
- void multiply_int (INTVAL value, PMC* dest) {
- INTVAL pmci = PMC_int_val(SELF);
- VTABLE_set_integer_native(INTERP, dest, pmci * value);
+ void multiply_int (INTVAL b, PMC* dest) {
+ INTVAL a = PMC_int_val(SELF);
+ double cf = (double)a * (double)b;
+ INTVAL c = a * b;
+ if ((double) c == cf)
+ VTABLE_set_integer_native(INTERP, dest, c);
+ else
+ overflow(INTERP, SELF, b, dest, MMD_MULTIPLY_INT);
}
/*
1.8 +30 -1 parrot/dynclasses/pylist.pmc
Index: pylist.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pylist.pmc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- pylist.pmc 12 Dec 2004 23:03:47 -0000 1.7
+++ pylist.pmc 15 Dec 2004 12:30:34 -0000 1.8
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pylist.pmc,v 1.7 2004/12/12 23:03:47 chromatic Exp $
+$Id: pylist.pmc,v 1.8 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -304,6 +304,35 @@
/*
+=item C<void multiply_int(INTVAL value, PMC *dest)>
+
+Build a list by duplicating the passed list N times.
+
+=cut
+
+*/
+
+ void multiply_int (INTVAL value, PMC* dest) {
+ INTVAL k = DYNSELF.elements();
+ INTVAL i;
+ PMC *elem;
+ List *list;
+
+ if (k == 1) {
+ elem = VTABLE_get_pmc_keyed_int(INTERP, SELF, 0);
+ VTABLE_morph(INTERP, dest, dynclass_PyList);
+ list = PMC_data(dest);
+ list_set_length(INTERP, list, value);
+ for (i = 0; i < value; ++i)
+ list_assign(INTERP, list, i, elem, enum_type_PMC);
+ }
+ else {
+ internal_exception(1, "multiply_int: unimplemented list size");
+ }
+ }
+
+/*
+
=item C<void push_integer (INTVAL value)>
Extends the array by adding an element of value C<value> to the end of
1.4 +22 -20 parrot/dynclasses/pylong.pmc
Index: pylong.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pylong.pmc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pylong.pmc 9 Dec 2004 23:22:46 -0000 1.3
+++ pylong.pmc 15 Dec 2004 12:30:34 -0000 1.4
@@ -1,6 +1,6 @@
/*
Copyright: 2004 The Perl Foundation. All Rights Reserved.
-$Id: pylong.pmc,v 1.3 2004/12/09 23:22:46 rubys Exp $
+$Id: pylong.pmc,v 1.4 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -24,39 +24,41 @@
#include "parrot/parrot.h"
+/* cache of classes referenced */
+static INTVAL dynclass_PyInt;
+
pmclass PyLong extends BigInt dynpmc group python_group {
/*
-=item C<STRING* get_string()>
+=item C<void class_init()>
-Returns the string representation of the integer.
+Class initialization. Caches the type id of various PMCs because
+they will be used frequently here.
-=item C<STRING* get_string_keyed_int(INTVAL base)>
+=cut
-Returns the string representation of the integer in base C<base>.
+*/
-=item C<STRING* get_repr()>
+ void class_init() {
+ if (pass) {
+ dynclass_PyInt = Parrot_PMC_typenum(INTERP, "PyInt");
+ }
+ }
-Returns the string representation of the integer with the letter 'L'
-appended.
+/*
-=cut
+=item C<void morph(INTVAL type)>
-*/
+Morphs the scalar to the specified type.
- STRING* get_string() {
- STRING *ps = SUPER();
- return string_append(INTERP, ps, const_string(INTERP, "L"), 0);
- }
+=cut
- STRING* get_string_keyed_int(INTVAL base) {
- STRING *ps = SUPER(base);
- return string_append(INTERP, ps, const_string(INTERP, "L"), 0);
- }
+*/
- STRING* get_repr() {
- return SELF.get_string();
+ void morph (INTVAL type) {
+ if (type == enum_class_Integer) type = dynclass_PyInt;
+ pmc_reuse(INTERP, SELF, type, 0);
}
/*
1.9 +5 -3 parrot/dynclasses/pyobject.pmc
Index: pyobject.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pyobject.pmc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pyobject.pmc 14 Dec 2004 13:37:47 -0000 1.8
+++ pyobject.pmc 15 Dec 2004 12:30:34 -0000 1.9
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pyobject.pmc,v 1.8 2004/12/14 13:37:47 rubys Exp $
+$Id: pyobject.pmc,v 1.9 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -25,6 +25,7 @@
static INTVAL dynclass_PyBoolean;
static INTVAL dynclass_PyInt;
static INTVAL dynclass_PyFloat;
+static INTVAL dynclass_PyLong;
static INTVAL dynclass_PyString;
static STRING* __add__;
@@ -70,6 +71,7 @@
dynclass_PyBoolean = Parrot_PMC_typenum(INTERP, "PyBoolean");
dynclass_PyInt = Parrot_PMC_typenum(INTERP, "PyInt");
dynclass_PyFloat = Parrot_PMC_typenum(INTERP, "PyFloat");
+ dynclass_PyLong = Parrot_PMC_typenum(INTERP, "PyLong");
dynclass_PyString = Parrot_PMC_typenum(INTERP, "PyString");
}
}
@@ -682,8 +684,8 @@
*/
void morph (INTVAL type) {
- SELF->vtable = Parrot_base_vtables[type];
- DYNSELF.init();
+ if (type == enum_class_BigInt) type = dynclass_PyLong;
+ pmc_reuse(INTERP, SELF, type, 0);
}
/*
1.9 +4 -4 parrot/dynclasses/pystring.pmc
Index: pystring.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pystring.pmc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- pystring.pmc 11 Dec 2004 22:44:29 -0000 1.8
+++ pystring.pmc 15 Dec 2004 12:30:34 -0000 1.9
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pystring.pmc,v 1.8 2004/12/11 22:44:29 rubys Exp $
+$Id: pystring.pmc,v 1.9 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -8,7 +8,7 @@
=head1 DESCRIPTION
-C<PyString> extends C<PyObject> to provide Perl string behaviour.
+C<PyString> extends C<PyObject> to provide Python string behaviour.
=head2 Methods
@@ -282,7 +282,7 @@
METHOD PMC* lower() {
STRING *s = string_downcase(interpreter, PMC_str_val(SELF));
- PMC *ret = pmc_new(interpreter, enum_class_PerlString);
+ PMC *ret = pmc_new(interpreter, dynclass_PyString);
string_set(interpreter, PMC_str_val(ret), s);
return ret;
}
@@ -352,7 +352,7 @@
=item C<void set_string_same(PMC *value)>
-Sets the string's value to the value of the specified C<PerlString>.
+Sets the string's value to the value of the specified C<PyString>.
=cut
1.7 +1 -2 parrot/dynclasses/pytuple.pmc
Index: pytuple.pmc
===================================================================
RCS file: /cvs/public/parrot/dynclasses/pytuple.pmc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- pytuple.pmc 12 Dec 2004 23:03:47 -0000 1.6
+++ pytuple.pmc 15 Dec 2004 12:30:34 -0000 1.7
@@ -1,6 +1,6 @@
/*
Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-$Id: pytuple.pmc,v 1.6 2004/12/12 23:03:47 chromatic Exp $
+$Id: pytuple.pmc,v 1.7 2004/12/15 12:30:34 rubys Exp $
=head1 NAME
@@ -10,7 +10,6 @@
This class, PyTuple, implements an array of fixed size, which stores PMCs,
it puts things into Integer, Float, or String PMCs as appropriate
-TODO currently this uses Perl types.
=head2 Methods
1.6 +3 -2 parrot/t/dynclass/pybuiltin.t
Index: pybuiltin.t
===================================================================
RCS file: /cvs/public/parrot/t/dynclass/pybuiltin.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- pybuiltin.t 3 Dec 2004 02:06:30 -0000 1.5
+++ pybuiltin.t 15 Dec 2004 12:30:36 -0000 1.6
@@ -1,6 +1,6 @@
#! perl -w
# Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
-# $Id: pybuiltin.t,v 1.5 2004/12/03 02:06:30 rubys Exp $
+# $Id: pybuiltin.t,v 1.6 2004/12/15 12:30:36 rubys Exp $
=head1 NAME
@@ -94,7 +94,8 @@
find_lex $P1, "long"
$P2 = $P1($P0)
- print $P2
+ get_repr $S0, $P2
+ print $S0
print "\n"
.end
CODE