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

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Nov 5 08:51:27 UTC 2009


Author: chromatic
Date: Thu Nov  5 08:51:26 2009
New Revision: 42264
URL: https://trac.parrot.org/parrot/changeset/42264

Log:
[lib] Made PMC emitters throw exceptions when encountering unknown NCI
signature components (see RT #43735).

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	Thu Nov  5 08:43:28 2009	(r42263)
+++ trunk/lib/Parrot/Pmc2c/MethodEmitter.pm	Thu Nov  5 08:51:26 2009	(r42264)
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2008, Parrot Foundation.
+# Copyright (C) 2004-2009, Parrot Foundation.
 
 # $Id$
 
@@ -163,14 +163,13 @@
 
     # type method(interp, self, parameters...)
     my $ret = $calltype{ $type or "void" };
-    $ret .= "JO" . join( '', map { $calltype{$_} or "?" } split( /,/, $parameters ) );
+    $ret .= "JO" . join( '',
+        map { $calltype{$_} or die "Unknown signature type '$_'" }
+        split( /,/, $parameters ) );
 
-    # RT#43733
+    # RT #43733
     # scan src/call_list.txt if the generated signature is available
 
-    # RT#43735 report errors for "?"
-    # --leo
-
     return $ret;
 }
 

Modified: trunk/lib/Parrot/Pmc2c/PMCEmitter.pm
==============================================================================
--- trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Thu Nov  5 08:43:28 2009	(r42263)
+++ trunk/lib/Parrot/Pmc2c/PMCEmitter.pm	Thu Nov  5 08:51:26 2009	(r42264)
@@ -293,14 +293,13 @@
     # type method(interp, self, parameters...)
     my $ret = $calltype{ $type or "void" }
         . "JO"
-        . join( '', map { $calltype{$_} or "?" } split( /,/, $parameters ) );
+        . join( '',
+            map { $calltype{$_} or die "Unknown signature type '$_'" }
+            split( /,/, $parameters ) );
 
     # RT #43733
     # scan src/call_list.txt if the generated signature is available
 
-    # RT #43735 report errors for "?"
-    # --leo
-
     return $ret;
 }
 


More information about the parrot-commits mailing list