Author: heimdall
Date: Wed Aug 10 08:16:38 2005
New Revision: 8904
Modified:
branches/gmc/lib/Parrot/Pmc2c.pm
branches/gmc/lib/Parrot/Vtable.pm
branches/gmc/src/gc_gmc.c
branches/gmc/vtable.tbl
Log:
size is now a field and not a method in vtables
Modified: branches/gmc/lib/Parrot/Pmc2c.pm
==============================================================================
--- branches/gmc/lib/Parrot/Pmc2c.pm (original)
+++ branches/gmc/lib/Parrot/Pmc2c.pm Wed Aug 10 08:16:38 2005
@@ -845,6 +845,7 @@ Parrot_${classname}_class_init(Parrot_In
$enum_name, /* base_type */
NULL, /* whoami */
$vtbl_flag, /* flags */
+ 0, /* size */
NULL, /* does_str */
NULL, /* isa_str */
NULL, /* class */
Modified: branches/gmc/lib/Parrot/Vtable.pm
==============================================================================
--- branches/gmc/lib/Parrot/Vtable.pm (original)
+++ branches/gmc/lib/Parrot/Vtable.pm Wed Aug 10 08:16:38 2005
@@ -140,6 +140,7 @@ struct _vtable {
INTVAL base_type; /* 'type' value for MMD */
STRING* whoami; /* Name of class this vtable is for */
UINTVAL flags; /* Flags. Duh */
+ size_t size; /* Size of the pmc_body. */
STRING* does_str; /* space separated list of interfaces */
STRING* isa_str; /* space separated list of classes */
PMC *class; /* for PMCs: a PMC of that type
@@ -217,6 +218,7 @@ static const char * const Parrot_vtable_
"", /* 'type' value for MMD */
"", /* Name of class this vtable is for */
"", /* Flags. Duh */
+ "", /* Size of the pmc_body. */
"", /* space separated list of interfaces */
"", /* space separated list of classes */
"", /* class */
Modified: branches/gmc/src/gc_gmc.c
==============================================================================
--- branches/gmc/src/gc_gmc.c (original)
+++ branches/gmc/src/gc_gmc.c Wed Aug 10 08:16:38 2005
@@ -11,13 +11,13 @@ static void gc_gmc_more_objects(Interp*,
/* Determines the size of a PMC according to its base_type. */
-UINTVAL
+size_t
gc_gmc_get_PMC_size(Interp *interpreter, INTVAL base_type)
{
VTABLE *vtable = Parrot_base_vtables[base_type];
if (!vtable)
return (UINTVAL)0;
- return vtable->size(interpreter, NULL);
+ return vtable->size;
}
Modified: branches/gmc/vtable.tbl
==============================================================================
--- branches/gmc/vtable.tbl (original)
+++ branches/gmc/vtable.tbl Wed Aug 10 08:16:38 2005
@@ -36,8 +36,6 @@ PMC* find_method(STRING* method_name)
INTVAL hash(size_t seed)
-UINTVAL size()
-
[FETCH]
INTVAL get_integer()
INTVAL get_integer_keyed(PMC* key)