[svn:parrot] r40500 - branches/auto_attrs/lib/Parrot/Pmc2c

NotFound at svn.parrot.org NotFound at svn.parrot.org
Wed Aug 12 06:58:32 UTC 2009


Author: NotFound
Date: Wed Aug 12 06:58:31 2009
New Revision: 40500
URL: https://trac.parrot.org/parrot/changeset/40500

Log:
explain the heuristic used to set the value of attr_size

Modified:
   branches/auto_attrs/lib/Parrot/Pmc2c/PMCEmitter.pm

Modified: branches/auto_attrs/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- branches/auto_attrs/lib/Parrot/Pmc2c/PMCEmitter.pm	Wed Aug 12 06:53:19 2009	(r40499)
+++ branches/auto_attrs/lib/Parrot/Pmc2c/PMCEmitter.pm	Wed Aug 12 06:58:31 2009	(r40500)
@@ -763,8 +763,12 @@
     my $classname = $self->name;
     my $export = $self->is_dynamic ? 'PARROT_DYNEXT_EXPORT ' : 'PARROT_EXPORT';
 
+    # Sets the attr_size field:
+    # If the auto_attrs flag is set, use the current data,
+    # else check if this PMC has init or init_pmc vtable functions,
+    # setting it to 0 in that case, and keeping the value from the
+    # parent otherwise.
     my $set_attr_size = '';
-
     if ( @{$self->attributes} && $self->{flags}{auto_attrs} ) {
         $set_attr_size .= "sizeof(Parrot_${classname}_attributes)";
     }


More information about the parrot-commits mailing list