[svn:parrot] r36580 - in trunk/src: . dynpmc ops pmc
Infinoid at svn.parrot.org
Infinoid at svn.parrot.org
Wed Feb 11 17:57:12 UTC 2009
Author: Infinoid
Date: Wed Feb 11 17:57:09 2009
New Revision: 36580
URL: https://trac.parrot.org/parrot/changeset/36580
Log:
Apply r36396 from vtable_morph_change branch.
Modified:
trunk/src/dynpmc/rational.pmc
trunk/src/ops/experimental.ops
trunk/src/ops/pic.ops
trunk/src/pmc/bigint.pmc
trunk/src/pmc/class.pmc
trunk/src/pmc/complex.pmc
trunk/src/pmc/default.pmc
trunk/src/pmc/integer.pmc
trunk/src/pmc/object.pmc
trunk/src/pmc/pointer.pmc
trunk/src/pmc/ref.pmc
trunk/src/pmc/scalar.pmc
trunk/src/pmc/undef.pmc
trunk/src/vtable.tbl
Modified: trunk/src/dynpmc/rational.pmc
==============================================================================
--- trunk/src/dynpmc/rational.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/dynpmc/rational.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -78,7 +78,7 @@
if (dest) {
if (self != dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
}
else {
dest = pmc_new(interp, self->vtable->base_type);
@@ -108,7 +108,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -133,7 +133,7 @@
static void rat_multiply_integer(PARROT_INTERP, PMC *self, int value, PMC *dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -158,7 +158,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -185,7 +185,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -212,7 +212,7 @@
mpq_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -240,7 +240,7 @@
mpz_t t;
if (dest)
- VTABLE_morph(interp, dest, self->vtable->base_type);
+ VTABLE_morph(interp, dest, self->vtable->pmc_class);
else
dest = pmc_new(interp, self->vtable->base_type);
@@ -563,7 +563,7 @@
MULTI PMC *add(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph(INTERP, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -673,7 +673,7 @@
MULTI PMC *subtract(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph(INTERP, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -783,7 +783,7 @@
MULTI PMC *multiply(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph(INTERP, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -893,7 +893,7 @@
MULTI PMC *divide(Rational value, PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph(INTERP, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -993,7 +993,7 @@
VTABLE PMC *neg(PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph(INTERP, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1029,7 +1029,7 @@
VTABLE PMC *absolute(PMC* dest) {
#ifdef PARROT_HAS_GMP
if (dest)
- VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
+ VTABLE_morph(INTERP, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
Modified: trunk/src/ops/experimental.ops
==============================================================================
--- trunk/src/ops/experimental.ops Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/ops/experimental.ops Wed Feb 11 17:57:09 2009 (r36580)
@@ -164,9 +164,8 @@
=cut
-inline op morph(invar PMC, in STR) {
- INTVAL type = pmc_type(interp, $2);
- VTABLE_morph(interp, $1, type);
+inline op morph(invar PMC, in PMC) {
+ VTABLE_morph(interp, $1, $2);
}
=item B<exec>(in STR)
Modified: trunk/src/ops/pic.ops
==============================================================================
--- trunk/src/ops/pic.ops Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/ops/pic.ops Wed Feb 11 17:57:09 2009 (r36580)
@@ -109,7 +109,7 @@
goto ADDRESS(handler);
}
/* #RT42354 preserve type system */
- VTABLE_morph(interp, left, enum_class_BigInt);
+ VTABLE_morph(interp, left, interp->vtables[enum_class_BigInt]->pmc_class);
VTABLE_set_integer_native(interp, left, a);
$2 = VTABLE_subtract_int(interp, left, b, left);
}
Modified: trunk/src/pmc/bigint.pmc
==============================================================================
--- trunk/src/pmc/bigint.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/bigint.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -313,7 +313,7 @@
static void
bigint_abs(PARROT_INTERP, PMC *self, PMC *dest) {
BIGINT *bi_self, *bi_dest;
- VTABLE_morph(interp, dest, enum_class_BigInt);
+ VTABLE_morph(interp, dest, interp->vtables[enum_class_BigInt]->pmc_class);
GETATTR_BigInt_bi(interp, self, bi_self);
GETATTR_BigInt_bi(interp, dest, bi_dest);
mpz_abs(bi_dest->b, bi_self->b);
@@ -322,7 +322,7 @@
static void
bigint_neg(PARROT_INTERP, PMC *self, PMC *dest) {
BIGINT *bi_self, *bi_dest;
- VTABLE_morph(interp, dest, enum_class_BigInt);
+ VTABLE_morph(interp, dest, interp->vtables[enum_class_BigInt]->pmc_class);
GETATTR_BigInt_bi(interp, self, bi_self);
GETATTR_BigInt_bi(interp, dest, bi_dest);
mpz_neg(bi_dest->b, bi_self->b);
@@ -893,7 +893,7 @@
MULTI PMC *subtract(BigInt value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -903,7 +903,7 @@
MULTI PMC *subtract(Integer value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -920,7 +920,7 @@
VTABLE PMC *subtract_int(INTVAL value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1007,7 +1007,7 @@
VTABLE PMC *pow_int(INTVAL value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1027,7 +1027,7 @@
MULTI PMC *divide(BigInt value, PMC *dest) {
BIGINT *bi;
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1046,7 +1046,7 @@
MULTI PMC *divide(Integer value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1063,7 +1063,7 @@
VTABLE PMC *divide_int(INTVAL value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1111,7 +1111,7 @@
VTABLE PMC *floor_divide_int(INTVAL value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1140,7 +1140,7 @@
MULTI PMC *modulus(BigInt value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1150,7 +1150,7 @@
MULTI PMC *modulus(Integer value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1275,7 +1275,7 @@
MULTI PMC *bitwise_shl(BigInt value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1287,7 +1287,7 @@
MULTI PMC *bitwise_shl(Integer value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1304,7 +1304,7 @@
VTABLE PMC *bitwise_shl_int(INTVAL value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1355,7 +1355,7 @@
MULTI PMC *bitwise_shr(BigInt value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1367,7 +1367,7 @@
MULTI PMC *bitwise_shr(Integer value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1385,7 +1385,7 @@
VTABLE PMC *bitwise_shr_int(INTVAL value, PMC *dest) {
if (dest)
- VTABLE_morph(interp, dest, SELF->vtable->base_type);
+ VTABLE_morph(interp, dest, SELF->vtable->pmc_class);
else
dest = pmc_new(INTERP, SELF->vtable->base_type);
Modified: trunk/src/pmc/class.pmc
==============================================================================
--- trunk/src/pmc/class.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/class.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -1578,6 +1578,22 @@
/*
+=item C<INTVAL get_integer()>
+
+This is just a temporary hack. Type ID numbers shouldn't be externally
+visible to the average PIR user. However, we need this for now to interface
+with functions like pmc_new and pmc_reuse, which take type ID numbers still.
+
+=cut
+
+*/
+
+ VTABLE INTVAL get_integer() {
+ return PARROT_CLASS(SELF)->id;
+ }
+
+/*
+
=item C<void thawfinish(visit_info *info)>
Called after the class has been thawed.
Modified: trunk/src/pmc/complex.pmc
==============================================================================
--- trunk/src/pmc/complex.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/complex.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -1248,7 +1248,7 @@
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
d = sqrt(re*re + im*im);
- VTABLE_morph(INTERP, SELF, enum_class_Float); /* XXX */
+ VTABLE_morph(INTERP, SELF, interp->vtables[enum_class_Float]->pmc_class);
VTABLE_set_number_native(INTERP, SELF, d);
}
Modified: trunk/src/pmc/default.pmc
==============================================================================
--- trunk/src/pmc/default.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/default.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -112,7 +112,7 @@
if (on && (pmc->vtable->flags & VTABLE_HAS_CONST_TOO))
pmc->vtable = interp->vtables[pmc->vtable->base_type + 1];
else if (!on && (pmc->vtable->flags & (VTABLE_IS_CONST_FLAG)))
- VTABLE_morph(interp, pmc, pmc->vtable->base_type - 1);
+ VTABLE_morph(interp, pmc, interp->vtables[pmc->vtable->base_type - 1]->pmc_class);
else if (on && (pmc->vtable->flags & VTABLE_HAS_READONLY_FLAG))
pmc->vtable = pmc->vtable->ro_variant_vtable;
else if (!on && (pmc->vtable->flags & VTABLE_IS_READONLY_FLAG)
@@ -624,7 +624,7 @@
/*
-=item C<void morph(INTVAL type)>
+=item C<void morph(PMC* type)>
Changes the PMC to a PMC of a new type
@@ -632,8 +632,8 @@
*/
- VTABLE void morph(INTVAL type) {
- pmc_reuse(INTERP, SELF, type, 0);
+ VTABLE void morph(PMC* type) {
+ pmc_reuse(INTERP, SELF, VTABLE_get_integer(interp, type), 0);
}
/*
Modified: trunk/src/pmc/integer.pmc
==============================================================================
--- trunk/src/pmc/integer.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/integer.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -46,7 +46,7 @@
/* Do an in-place upgrade to a Bignum of SELF and return a pointer
to it (which is probably redundant, but whatever). */
const INTVAL a = VTABLE_get_integer(interp, self);
- VTABLE_morph(interp, self, enum_class_BigInt);
+ VTABLE_morph(interp, self, interp->vtables[enum_class_BigInt]->pmc_class);
VTABLE_set_integer_native(interp, self, a);
return self;
}
@@ -451,7 +451,7 @@
MULTI void i_add(Complex value) {
const INTVAL a = SELF.get_integer();
- VTABLE_morph(INTERP, SELF, value->vtable->base_type);
+ VTABLE_morph(INTERP, SELF, value->vtable->pmc_class);
VTABLE_set_number_native(INTERP, SELF,
SELF.get_integer() + VTABLE_get_number(INTERP, value));
}
@@ -609,7 +609,7 @@
MULTI void i_subtract(Complex value) {
const INTVAL a = SELF.get_integer();
- VTABLE_morph(INTERP, SELF, value->vtable->base_type);
+ VTABLE_morph(INTERP, SELF, value->vtable->pmc_class);
VTABLE_set_number_native(INTERP, SELF,
(FLOATVAL)a - VTABLE_get_number_keyed_int(INTERP, value, 0));
VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -1272,7 +1272,7 @@
if ((c^a) >= 0 || (c^1) >= 0)
VTABLE_set_integer_native(interp, SELF, c);
else {
- VTABLE_morph(INTERP, SELF, enum_class_BigInt);
+ VTABLE_morph(INTERP, SELF, interp->vtables[enum_class_BigInt]->pmc_class);
VTABLE_set_integer_native(INTERP, SELF, a);
VTABLE_increment(interp, SELF);
}
@@ -1296,7 +1296,7 @@
if ((c^a) >= 0 || (c^~1) >= 0)
VTABLE_set_integer_native(interp, SELF, c);
else {
- VTABLE_morph(interp, SELF, enum_class_BigInt);
+ VTABLE_morph(interp, SELF, interp->vtables[enum_class_BigInt]->pmc_class);
VTABLE_set_integer_native(interp, SELF, a);
VTABLE_decrement(interp, SELF);
}
Modified: trunk/src/pmc/object.pmc
==============================================================================
--- trunk/src/pmc/object.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/object.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -854,7 +854,7 @@
/*
-=item C<void morph(INTVAL type)>
+=item C<void morph(PMC* type)>
Changes the PMC to a PMC of a new type
@@ -862,17 +862,15 @@
*/
- VTABLE void morph(INTVAL type) {
+ VTABLE void morph(PMC* type) {
PMC * const classobj = VTABLE_get_class(interp, SELF);
STRING * meth_name = CONST_STRING(interp, "morph");
/* If there's a vtable override for 'morph' run that instead. */
PMC * const method = Parrot_oo_find_vtable_override(interp,
classobj, meth_name);
- if (!PMC_IS_NULL(method)) {
- PMC * const _class = Parrot_oo_get_class_str(interp, interp->vtables[type]->whoami);
- Parrot_run_meth_fromc_args(interp, method, SELF, meth_name, "vP", _class);
- }
+ if (!PMC_IS_NULL(method))
+ Parrot_run_meth_fromc_args(interp, method, SELF, meth_name, "vP", type);
else
SUPER(type);
}
Modified: trunk/src/pmc/pointer.pmc
==============================================================================
--- trunk/src/pmc/pointer.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/pointer.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -48,7 +48,7 @@
*/
- VTABLE void morph(INTVAL type) {
+ VTABLE void morph(PMC* type) {
}
/*
Modified: trunk/src/pmc/ref.pmc
==============================================================================
--- trunk/src/pmc/ref.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/ref.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -142,14 +142,14 @@
/*
-=item C<void morph(INTVAL type)>
+=item C<void morph(PMC* type)>
Changes the PMC to a PMC of a new type.
=cut
*/
- VTABLE void morph(INTVAL type) {
+ VTABLE void morph(PMC* type) {
SUPER(type);
}
Modified: trunk/src/pmc/scalar.pmc
==============================================================================
--- trunk/src/pmc/scalar.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/scalar.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -73,7 +73,7 @@
else {
/* Overflow; must promote dest to BigInt, and do a BigInt shift. */
if (self == dest)
- VTABLE_morph(interp, self, enum_class_BigInt);
+ VTABLE_morph(interp, self, interp->vtables[enum_class_BigInt]->pmc_class);
else
dest = pmc_new(interp, enum_class_BigInt);
@@ -96,10 +96,11 @@
*/
- VTABLE void morph(INTVAL type) {
- if (SELF->vtable->base_type == type)
+ VTABLE void morph(PMC* type) {
+ INTVAL type_id = VTABLE_get_integer(interp, type);
+ if (SELF->vtable->base_type == type_id)
return;
- pmc_reuse(INTERP, SELF, type, 0);
+ pmc_reuse(INTERP, SELF, type_id, 0);
}
/*
@@ -119,11 +120,11 @@
if (SELF->vtable->base_type == enum_class_Boolean) {
/* doesn't morph */
- SELF.morph(value->vtable->base_type);
+ SELF.morph(value->vtable->pmc_class);
}
if (value->vtable->base_type == enum_class_Undef) {
- SELF.morph(value->vtable->base_type);
+ SELF.morph(value->vtable->pmc_class);
return;
}
@@ -148,7 +149,7 @@
SELF.set_string_native(v);
return;
}
- SELF.morph(enum_class_Ref);
+ SELF.morph(interp->vtables[enum_class_Ref]->pmc_class);
SELF.set_pmc(value);
}
@@ -245,7 +246,7 @@
MULTI void i_add(Complex value) {
const FLOATVAL a = SELF.get_number();
- VTABLE_morph(INTERP, SELF, value->vtable->base_type);
+ VTABLE_morph(INTERP, SELF, value->vtable->pmc_class);
VTABLE_set_number_native(INTERP, SELF,
a + VTABLE_get_number_keyed_int(INTERP, value, 0));
VTABLE_set_number_keyed_int(INTERP, SELF, 1,
@@ -293,7 +294,7 @@
MULTI PMC *subtract(Complex value, PMC *dest) {
const FLOATVAL a = SELF.get_number();
if (dest)
- VTABLE_morph(INTERP, dest, value->vtable->base_type);
+ VTABLE_morph(INTERP, dest, value->vtable->pmc_class);
else
dest = pmc_new(INTERP, VTABLE_type(INTERP, value));
@@ -330,7 +331,7 @@
MULTI void i_subtract(Complex value) {
const FLOATVAL a = SELF.get_number();
- VTABLE_morph(INTERP, SELF, value->vtable->base_type);
+ VTABLE_morph(INTERP, SELF, value->vtable->pmc_class);
VTABLE_set_number_native(INTERP, SELF,
a - VTABLE_get_number_keyed_int(INTERP, value, 0));
VTABLE_set_number_keyed_int(INTERP, SELF, 1,
Modified: trunk/src/pmc/undef.pmc
==============================================================================
--- trunk/src/pmc/undef.pmc Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/pmc/undef.pmc Wed Feb 11 17:57:09 2009 (r36580)
@@ -40,7 +40,7 @@
*/
VTABLE void set_pmc(PMC *other) {
- VTABLE_morph(INTERP, SELF, enum_class_Ref);
+ VTABLE_morph(INTERP, SELF, interp->vtables[enum_class_Ref]->pmc_class);
VTABLE_set_pmc(INTERP, SELF, other);
}
@@ -57,7 +57,7 @@
VTABLE void assign_pmc(PMC *other) {
if (!PObj_is_object_TEST(other))
- VTABLE_morph(INTERP, SELF, other->vtable->base_type);
+ VTABLE_morph(INTERP, SELF, other->vtable->pmc_class);
/* don't want to call set_pmc if we're assigning an Undef to an Undef */
if (other->vtable->base_type != enum_class_Undef)
@@ -104,7 +104,7 @@
*/
VTABLE void set_integer_native(INTVAL value) {
- VTABLE_morph(INTERP, SELF, enum_class_Integer);
+ VTABLE_morph(INTERP, SELF, interp->vtables[enum_class_Integer]->pmc_class);
VTABLE_set_integer_native(INTERP, SELF, value);
}
@@ -133,7 +133,7 @@
*/
VTABLE void set_number_native(FLOATVAL value) {
- VTABLE_morph(INTERP, SELF, enum_class_Float);
+ VTABLE_morph(INTERP, SELF, interp->vtables[enum_class_Float]->pmc_class);
VTABLE_set_number_native(INTERP, SELF, value);
}
@@ -165,7 +165,7 @@
*/
VTABLE void set_string_native(STRING *value) {
- VTABLE_morph(INTERP, SELF, UNDEF_STRING_CLASS);
+ VTABLE_morph(INTERP, SELF, interp->vtables[enum_class_String]->pmc_class);
VTABLE_set_string_native(INTERP, SELF, value);
}
Modified: trunk/src/vtable.tbl
==============================================================================
--- trunk/src/vtable.tbl Wed Feb 11 12:56:26 2009 (r36579)
+++ trunk/src/vtable.tbl Wed Feb 11 17:57:09 2009 (r36580)
@@ -11,7 +11,7 @@
void init_pmc(PMC* initializer)
PMC* instantiate(PMC* sig)
PMC* instantiate_str(STRING* rep, INTVAL flags)
-void morph(INTVAL type) :write
+void morph(PMC* type) :write
void mark()
void destroy()
PMC* get_namespace()
More information about the parrot-commits
mailing list