[svn:parrot] r39271 - trunk/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Sat May 30 14:46:19 UTC 2009
Author: bacek
Date: Sat May 30 14:46:18 2009
New Revision: 39271
URL: https://trac.parrot.org/parrot/changeset/39271
Log:
[core] Preserve semantic of non-core PMCs in Parrot_pmc_try_reuse.
Modified:
trunk/src/pmc.c
Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c Sat May 30 14:20:58 2009 (r39270)
+++ trunk/src/pmc.c Sat May 30 14:46:18 2009 (r39271)
@@ -265,7 +265,10 @@
/* Morph to self type is required */
{
INTVAL type = VTABLE_type(interp, self);
- if (dest->vtable->base_type != type)
+ if (type >= enum_class_core_max)
+ /* We are not core PMC. Just clone self to preserve semantic of VTABLEs */
+ dest = VTABLE_clone(interp, self);
+ else if (dest->vtable->base_type != type)
pmc_reuse(interp, dest, type, 0);
}
More information about the parrot-commits
mailing list