Author: chromatic
Date: Tue May 22 13:55:20 2007
New Revision: 18625

Modified:
   trunk/lib/Parrot/Ops2c/Utils.pm

Log:
[Pmc2c] Move instance variable initialization to new() (Steve Peters, RT 
#43031).

Modified: trunk/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- trunk/lib/Parrot/Ops2c/Utils.pm     (original)
+++ trunk/lib/Parrot/Ops2c/Utils.pm     Tue May 22 13:55:20 2007
@@ -192,10 +192,15 @@
     $argsref->{num_ops}     = $num_ops;
     $argsref->{num_entries} = $num_entries;
 
-    $argsref->{preamble}  = $preamble;
-    $argsref->{init_func} = $init_func;
+    $argsref->{preamble}     = $preamble;
+    $argsref->{init_func}    = $init_func;
+    $argsref->{bs}           = "$argsref->{base}$argsref->{suffix}_";
+    $argsref->{opsarraytype} = $argsref->{trans}->opsarraytype();
 
-    $argsref->{flag} = $flagref;
+    # Invoked as:  ${defines}
+    $argsref->{defines}      = $argsref->{trans}->defines();
+
+    $argsref->{flag}         = $flagref;
     return bless $argsref, $class;
 }
 
@@ -420,9 +425,6 @@
 
 sub print_c_source_top {
     my $self = shift;
-    $self->{defines}      = $self->{trans}->defines();          # Invoked as:  
${defines}
-    $self->{bs}           = "$self->{base}$self->{suffix}_";    # Also invoked 
as ${bs}
-    $self->{opsarraytype} = $self->{trans}->opsarraytype();
 
     ##### BEGIN printing to $SOURCE #####
     open my $SOURCE, '>', $self->{source}

Reply via email to