Author: allison Date: Sun Jan 6 05:20:04 2008 New Revision: 24597 Modified: branches/pdd17pmc/src/pmc/array.pmc branches/pdd17pmc/src/pmc/bigint.pmc branches/pdd17pmc/src/pmc/class.pmc branches/pdd17pmc/src/pmc/complex.pmc branches/pdd17pmc/src/pmc/continuation.pmc branches/pdd17pmc/src/pmc/coroutine.pmc branches/pdd17pmc/src/pmc/deleg_pmc.pmc branches/pdd17pmc/src/pmc/exception_handler.pmc branches/pdd17pmc/src/pmc/fixedbooleanarray.pmc branches/pdd17pmc/src/pmc/fixedfloatarray.pmc branches/pdd17pmc/src/pmc/fixedintegerarray.pmc branches/pdd17pmc/src/pmc/fixedpmcarray.pmc branches/pdd17pmc/src/pmc/fixedstringarray.pmc branches/pdd17pmc/src/pmc/hash.pmc branches/pdd17pmc/src/pmc/intlist.pmc branches/pdd17pmc/src/pmc/iterator.pmc branches/pdd17pmc/src/pmc/key.pmc branches/pdd17pmc/src/pmc/nci.pmc branches/pdd17pmc/src/pmc/orderedhash.pmc branches/pdd17pmc/src/pmc/parrotinterpreter.pmc branches/pdd17pmc/src/pmc/parrotio.pmc branches/pdd17pmc/src/pmc/parrotlibrary.pmc branches/pdd17pmc/src/pmc/pointer.pmc branches/pdd17pmc/src/pmc/resizablefloatarray.pmc branches/pdd17pmc/src/pmc/resizableintegerarray.pmc branches/pdd17pmc/src/pmc/resizablepmcarray.pmc branches/pdd17pmc/src/pmc/resizablestringarray.pmc branches/pdd17pmc/src/pmc/retcontinuation.pmc branches/pdd17pmc/src/pmc/sarray.pmc branches/pdd17pmc/src/pmc/scalar.pmc branches/pdd17pmc/src/pmc/slice.pmc branches/pdd17pmc/src/pmc/stmref.pmc branches/pdd17pmc/src/pmc/stmvar.pmc branches/pdd17pmc/src/pmc/string.pmc branches/pdd17pmc/src/pmc/sub.pmc branches/pdd17pmc/src/pmc/task.pmc branches/pdd17pmc/src/pmc/timer.pmc branches/pdd17pmc/src/pmc/tqueue.pmc branches/pdd17pmc/src/pmc/undef.pmc
Log: [pdd17pmc] VTABLEizing clone and clone_pmc routines for all core PMCs. Modified: branches/pdd17pmc/src/pmc/array.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/array.pmc (original) +++ branches/pdd17pmc/src/pmc/array.pmc Sun Jan 6 05:20:04 2008 @@ -223,7 +223,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { List *l = list_clone(INTERP, (List *)PMC_data(SELF)); PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); Modified: branches/pdd17pmc/src/pmc/bigint.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/bigint.pmc (original) +++ branches/pdd17pmc/src/pmc/bigint.pmc Sun Jan 6 05:20:04 2008 @@ -533,7 +533,7 @@ PObj_active_destroy_SET(SELF); } - PMC *clone() { + VTABLE PMC *clone() { PMC *res = pmc_new(INTERP, SELF->vtable->base_type); bigint_set(INTERP, res, SELF); return res; Modified: branches/pdd17pmc/src/pmc/class.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/class.pmc (original) +++ branches/pdd17pmc/src/pmc/class.pmc Sun Jan 6 05:20:04 2008 @@ -970,7 +970,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { Parrot_Class *_class = PARROT_CLASS(SELF); /* Create the new class PMC, of the same type of this one (we may @@ -1010,7 +1010,7 @@ */ - PMC *clone_pmc(PMC *args) { + VTABLE PMC *clone_pmc(PMC *args) { /* Do the standard clone. */ PMC *copy = DYNSELF.clone(); Modified: branches/pdd17pmc/src/pmc/complex.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/complex.pmc (original) +++ branches/pdd17pmc/src/pmc/complex.pmc Sun Jan 6 05:20:04 2008 @@ -390,7 +390,7 @@ SUPER(type); } - PMC *clone() { + VTABLE PMC *clone() { PMC *dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); FLOATVAL *data = (FLOATVAL *)mem_sys_allocate(2 * sizeof (FLOATVAL)); Modified: branches/pdd17pmc/src/pmc/continuation.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/continuation.pmc (original) +++ branches/pdd17pmc/src/pmc/continuation.pmc Sun Jan 6 05:20:04 2008 @@ -125,7 +125,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { Parrot_cont *cc_self = PMC_cont(SELF); Parrot_cont *cc = new_continuation(INTERP, cc_self); PMC *ret = pmc_new_noinit(INTERP, enum_class_Continuation); Modified: branches/pdd17pmc/src/pmc/coroutine.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/coroutine.pmc (original) +++ branches/pdd17pmc/src/pmc/coroutine.pmc Sun Jan 6 05:20:04 2008 @@ -93,7 +93,7 @@ SUPER(); } - PMC *clone() { + VTABLE PMC *clone() { Parrot_coro *sub = mem_allocate_typed(Parrot_coro); PMC *ret = pmc_new_noinit(INTERP, SELF->vtable->base_type); Modified: branches/pdd17pmc/src/pmc/deleg_pmc.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/deleg_pmc.pmc (original) +++ branches/pdd17pmc/src/pmc/deleg_pmc.pmc Sun Jan 6 05:20:04 2008 @@ -53,7 +53,7 @@ /* don't pass that on */ } - PMC *clone() { + VTABLE PMC *clone() { PMC *res = pmc_new(INTERP, SELF->vtable->base_type); SLOTTYPE *attrib_array = PMC_data_typed(res, SLOTTYPE *); INTVAL i; Modified: branches/pdd17pmc/src/pmc/exception_handler.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/exception_handler.pmc (original) +++ branches/pdd17pmc/src/pmc/exception_handler.pmc Sun Jan 6 05:20:04 2008 @@ -78,7 +78,7 @@ } } - PMC *clone() { + VTABLE PMC *clone() { PMC *result = SUPER(); PObj_custom_mark_CLEAR(result); return result; Modified: branches/pdd17pmc/src/pmc/fixedbooleanarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/fixedbooleanarray.pmc (original) +++ branches/pdd17pmc/src/pmc/fixedbooleanarray.pmc Sun Jan 6 05:20:04 2008 @@ -99,7 +99,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *dest = pmc_new(INTERP, SELF->vtable->base_type); PMC_int_val(dest) = PMC_int_val(SELF); PMC_int_val2(dest) = PMC_int_val2(SELF); Modified: branches/pdd17pmc/src/pmc/fixedfloatarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/fixedfloatarray.pmc (original) +++ branches/pdd17pmc/src/pmc/fixedfloatarray.pmc Sun Jan 6 05:20:04 2008 @@ -87,7 +87,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { INTVAL size; size_t mem_size; PMC *dest = pmc_new(INTERP, SELF->vtable->base_type); Modified: branches/pdd17pmc/src/pmc/fixedintegerarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/fixedintegerarray.pmc (original) +++ branches/pdd17pmc/src/pmc/fixedintegerarray.pmc Sun Jan 6 05:20:04 2008 @@ -173,7 +173,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { INTVAL size; PMC *dest; /* a quick hack to create a clone in the constant PMC arena Modified: branches/pdd17pmc/src/pmc/fixedpmcarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/fixedpmcarray.pmc (original) +++ branches/pdd17pmc/src/pmc/fixedpmcarray.pmc Sun Jan 6 05:20:04 2008 @@ -176,7 +176,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *dest = pmc_new(INTERP, SELF->vtable->base_type); INTVAL size = PMC_int_val(SELF); Modified: branches/pdd17pmc/src/pmc/fixedstringarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/fixedstringarray.pmc (original) +++ branches/pdd17pmc/src/pmc/fixedstringarray.pmc Sun Jan 6 05:20:04 2008 @@ -87,7 +87,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type); INTVAL mem_size, size; Modified: branches/pdd17pmc/src/pmc/hash.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/hash.pmc (original) +++ branches/pdd17pmc/src/pmc/hash.pmc Sun Jan 6 05:20:04 2008 @@ -193,7 +193,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type); parrot_hash_clone(INTERP, (Hash *)PMC_struct_val(SELF), Modified: branches/pdd17pmc/src/pmc/intlist.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/intlist.pmc (original) +++ branches/pdd17pmc/src/pmc/intlist.pmc Sun Jan 6 05:20:04 2008 @@ -32,7 +32,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); PObj_custom_mark_SET(dest); PMC_struct_val(dest) = intlist_clone(INTERP, Modified: branches/pdd17pmc/src/pmc/iterator.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/iterator.pmc (original) +++ branches/pdd17pmc/src/pmc/iterator.pmc Sun Jan 6 05:20:04 2008 @@ -139,7 +139,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const key = (PMC *)PMC_struct_val(SELF); PMC * const res = pmc_new_init(INTERP, SELF->vtable->base_type, PMC_pmc_val(SELF)); Modified: branches/pdd17pmc/src/pmc/key.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/key.pmc (original) +++ branches/pdd17pmc/src/pmc/key.pmc Sun Jan 6 05:20:04 2008 @@ -46,7 +46,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); PMC *dkey = dest; PMC *key = SELF; Modified: branches/pdd17pmc/src/pmc/nci.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/nci.pmc (original) +++ branches/pdd17pmc/src/pmc/nci.pmc Sun Jan 6 05:20:04 2008 @@ -139,7 +139,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { Parrot_NCI * const nci_info_self = PARROT_NCI(SELF); Parrot_NCI *nci_info_ret; Modified: branches/pdd17pmc/src/pmc/orderedhash.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/orderedhash.pmc (original) +++ branches/pdd17pmc/src/pmc/orderedhash.pmc Sun Jan 6 05:20:04 2008 @@ -538,7 +538,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type); Hash * const hash = (Hash *)PMC_struct_val(SELF); Hash * const h_dest = (Hash *)PMC_struct_val(dest); Modified: branches/pdd17pmc/src/pmc/parrotinterpreter.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/parrotinterpreter.pmc (original) +++ branches/pdd17pmc/src/pmc/parrotinterpreter.pmc Sun Jan 6 05:20:04 2008 @@ -504,7 +504,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type); clone_interpreter((Parrot_Interp)PMC_data(dest), Modified: branches/pdd17pmc/src/pmc/parrotio.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/parrotio.pmc (original) +++ branches/pdd17pmc/src/pmc/parrotio.pmc Sun Jan 6 05:20:04 2008 @@ -405,7 +405,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *dest = pmc_new(INTERP, SELF->vtable->base_type); PMC_data(dest) = PMC_data(SELF); PMC_struct_val(dest) = PMC_struct_val(SELF); Modified: branches/pdd17pmc/src/pmc/parrotlibrary.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/parrotlibrary.pmc (original) +++ branches/pdd17pmc/src/pmc/parrotlibrary.pmc Sun Jan 6 05:20:04 2008 @@ -90,7 +90,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); PMC_struct_val(dest) = PMC_struct_val(SELF); PMC_data(dest) = PMC_data(SELF); Modified: branches/pdd17pmc/src/pmc/pointer.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/pointer.pmc (original) +++ branches/pdd17pmc/src/pmc/pointer.pmc Sun Jan 6 05:20:04 2008 @@ -84,7 +84,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); PObj_custom_mark_SET(dest); PMC_data(dest) = PMC_data(SELF); Modified: branches/pdd17pmc/src/pmc/resizablefloatarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/resizablefloatarray.pmc (original) +++ branches/pdd17pmc/src/pmc/resizablefloatarray.pmc Sun Jan 6 05:20:04 2008 @@ -139,7 +139,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *copy = SUPER(); /* copy trimmed extra space */ Modified: branches/pdd17pmc/src/pmc/resizableintegerarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/resizableintegerarray.pmc (original) +++ branches/pdd17pmc/src/pmc/resizableintegerarray.pmc Sun Jan 6 05:20:04 2008 @@ -216,7 +216,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *copy = SUPER(); /* copy trimmed extra space */ Modified: branches/pdd17pmc/src/pmc/resizablepmcarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/resizablepmcarray.pmc (original) +++ branches/pdd17pmc/src/pmc/resizablepmcarray.pmc Sun Jan 6 05:20:04 2008 @@ -564,7 +564,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *copy = SUPER(); /* copy trimmed extra space */ Modified: branches/pdd17pmc/src/pmc/resizablestringarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/resizablestringarray.pmc (original) +++ branches/pdd17pmc/src/pmc/resizablestringarray.pmc Sun Jan 6 05:20:04 2008 @@ -252,7 +252,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *copy = SUPER(); /* copy trimmed extra space */ PMC_int_val2(copy) = PMC_int_val(SELF); Modified: branches/pdd17pmc/src/pmc/retcontinuation.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/retcontinuation.pmc (original) +++ branches/pdd17pmc/src/pmc/retcontinuation.pmc Sun Jan 6 05:20:04 2008 @@ -69,7 +69,7 @@ =cut */ - PMC *clone() { + VTABLE PMC *clone() { invalidate_retc_context(INTERP, SELF); return SUPER(); } Modified: branches/pdd17pmc/src/pmc/sarray.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/sarray.pmc (original) +++ branches/pdd17pmc/src/pmc/sarray.pmc Sun Jan 6 05:20:04 2008 @@ -331,7 +331,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { HashEntry *e, *d; int i, start, end; INTVAL size; Modified: branches/pdd17pmc/src/pmc/scalar.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/scalar.pmc (original) +++ branches/pdd17pmc/src/pmc/scalar.pmc Sun Jan 6 05:20:04 2008 @@ -163,7 +163,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new(INTERP, SELF->vtable->base_type); memcpy(&PMC_union(dest), &PMC_union(SELF), sizeof (UnionVal)); return dest; Modified: branches/pdd17pmc/src/pmc/slice.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/slice.pmc (original) +++ branches/pdd17pmc/src/pmc/slice.pmc Sun Jan 6 05:20:04 2008 @@ -261,7 +261,7 @@ } } - PMC *clone() { + VTABLE PMC *clone() { real_exception(INTERP, NULL, E_NotImplementedError, "Unimplemented"); } Modified: branches/pdd17pmc/src/pmc/stmref.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/stmref.pmc (original) +++ branches/pdd17pmc/src/pmc/stmref.pmc Sun Jan 6 05:20:04 2008 @@ -79,7 +79,7 @@ =cut */ - PMC *clone() { + VTABLE PMC *clone() { return SELF; } Modified: branches/pdd17pmc/src/pmc/stmvar.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/stmvar.pmc (original) +++ branches/pdd17pmc/src/pmc/stmvar.pmc Sun Jan 6 05:20:04 2008 @@ -67,7 +67,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { return SELF; } Modified: branches/pdd17pmc/src/pmc/string.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/string.pmc (original) +++ branches/pdd17pmc/src/pmc/string.pmc Sun Jan 6 05:20:04 2008 @@ -86,7 +86,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type); PObj_custom_mark_SET(dest); PMC_str_val(dest) = string_copy(INTERP, VTABLE_get_string(INTERP, SELF)); Modified: branches/pdd17pmc/src/pmc/sub.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/sub.pmc (original) +++ branches/pdd17pmc/src/pmc/sub.pmc Sun Jan 6 05:20:04 2008 @@ -324,7 +324,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { Parrot_sub *sub = mem_allocate_typed(Parrot_sub); PMC * const ret = pmc_new_noinit(INTERP, SELF->vtable->base_type); Modified: branches/pdd17pmc/src/pmc/task.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/task.pmc (original) +++ branches/pdd17pmc/src/pmc/task.pmc Sun Jan 6 05:20:04 2008 @@ -171,7 +171,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { /* Create the new task PMC, of the same type of this one (we may * have been subclassed). */ PMC *copy = pmc_new(interp, SELF->vtable->base_type); Modified: branches/pdd17pmc/src/pmc/timer.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/timer.pmc (original) +++ branches/pdd17pmc/src/pmc/timer.pmc Sun Jan 6 05:20:04 2008 @@ -151,7 +151,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { PMC *copy = SUPER(); Parrot_Timer *new_struct = PARROT_TIMER(copy); Parrot_Timer * const old_struct = PARROT_TIMER(SELF); Modified: branches/pdd17pmc/src/pmc/tqueue.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/tqueue.pmc (original) +++ branches/pdd17pmc/src/pmc/tqueue.pmc Sun Jan 6 05:20:04 2008 @@ -60,7 +60,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { /* XXX fake a shared PMC */ return SELF; } Modified: branches/pdd17pmc/src/pmc/undef.pmc ============================================================================== --- branches/pdd17pmc/src/pmc/undef.pmc (original) +++ branches/pdd17pmc/src/pmc/undef.pmc Sun Jan 6 05:20:04 2008 @@ -234,7 +234,7 @@ */ - PMC *clone() { + VTABLE PMC *clone() { return pmc_new(INTERP, SELF->vtable->base_type); }