[svn:parrot] r44153 - trunk/lib/Parrot/Pmc2c

plobsing at svn.parrot.org plobsing at svn.parrot.org
Fri Feb 19 02:25:10 UTC 2010


Author: plobsing
Date: Fri Feb 19 02:25:09 2010
New Revision: 44153
URL: https://trac.parrot.org/parrot/changeset/44153

Log:
remove dead proto methods (unused since at least pcc refactor)

Modified:
   trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
   trunk/lib/Parrot/Pmc2c/PMCEmitter.pm

Modified: trunk/lib/Parrot/Pmc2c/MethodEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Fri Feb 19 01:53:12 2010	(r44152)
+++ trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Fri Feb 19 02:25:09 2010	(r44153)
@@ -115,58 +115,6 @@
 EOC
 }
 
-=item C<proto($type,$parameters)>
-
-Determines the prototype (argument signature) for a method body
-(see F<src/call_list>).
-
-=cut
-
-my %calltype = (
-    'char'     => 'c',
-    'short'    => 's',
-    'char'     => 'c',
-    'short'    => 's',
-    'int'      => 'i',
-    'INTVAL'   => 'I',
-    'float'    => 'f',
-    'FLOATVAL' => 'N',
-    'double'   => 'd',
-    'STRING*'  => 'S',
-    'STRING *' => 'S',
-    'char*'    => 't',
-    'char *'   => 't',
-    'PMC*'     => 'P',
-    'PMC *'    => 'P',
-    'short*'   => '2',
-    'short *'  => '2',
-    'int*'     => '3',
-    'int *'    => '3',
-    'long*'    => '4',
-    'long *'   => '4',
-    'void'     => 'v',
-    'void*'    => 'b',
-    'void *'   => 'b',
-    'void**'   => 'B',
-    'void **'  => 'B',
-);
-
-sub proto {
-    my ( $type, $parameters ) = @_;
-
-    # reduce to a comma separated set of types
-    $parameters =~ s/\w+(,|$)/,/g;
-    $parameters =~ s/ //g;
-
-    # type method(interp, self, parameters...)
-    my $ret = $calltype{ $type or "void" };
-    $ret .= "JO" . join( '',
-        map { $calltype{$_} or die "Unknown signature type '$_'" }
-        split( /,/, $parameters ) );
-
-    return $ret;
-}
-
 =item C<rewrite_nci_method($self, $pmc )>
 
 Rewrites the method body performing the various macro substitutions for

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Fri Feb 19 01:53:12 2010	(r44152)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Fri Feb 19 02:25:09 2010	(r44153)
@@ -251,54 +251,6 @@
         unless $self->is_dynamic;
 }
 
-=item C<proto($type,$parameters)>
-
-Determines the prototype (argument signature) for a method body
-(see F<src/call_list>).
-
-=cut
-
-my %calltype = (
-    "char"     => "c",
-    "short"    => "s",
-    "char"     => "c",
-    "short"    => "s",
-    "int"      => "i",
-    "INTVAL"   => "I",
-    "float"    => "f",
-    "FLOATVAL" => "N",
-    "double"   => "d",
-    "STRING*"  => "S",
-    "char*"    => "t",
-    "PMC*"     => "P",
-    "short*"   => "2",
-    "int*"     => "3",
-    "long*"    => "4",
-    "void"     => "v",
-    "void*"    => "b",
-    "void**"   => "B",
-);
-
-sub proto {
-    my ( $type, $parameters ) = @_;
-
-    # reduce to a comma separated set of types
-    $parameters =~ s/\w+(,|$)/,/g;
-    $parameters =~ s/ //g;
-
-    # flatten whitespace before "*" in return value
-    $type =~ s/\s+\*$/\*/ if defined $type;
-
-    # type method(interp, self, parameters...)
-    my $ret = $calltype{ $type or "void" }
-        . "JO"
-        . join( '',
-            map { $calltype{$_} or die "Unknown signature type '$_'" }
-            split( /,/, $parameters ) );
-
-    return $ret;
-}
-
 =item C<pre_method_gen>
 
 Generate switch-bases VTABLE for MULTI


More information about the parrot-commits mailing list