[svn:parrot] r42157 - trunk/compilers/imcc

jonathan at svn.parrot.org jonathan at svn.parrot.org
Wed Oct 28 15:31:33 UTC 2009


Author: jonathan
Date: Wed Oct 28 15:31:32 2009
New Revision: 42157
URL: https://trac.parrot.org/parrot/changeset/42157

Log:
Make IMCC think it's OK to have a :call_sig in a method.

Modified:
   trunk/compilers/imcc/pcc.c

Modified: trunk/compilers/imcc/pcc.c
==============================================================================
--- trunk/compilers/imcc/pcc.c	Wed Oct 28 13:45:58 2009	(r42156)
+++ trunk/compilers/imcc/pcc.c	Wed Oct 28 15:31:32 2009	(r42157)
@@ -289,9 +289,9 @@
         flags       = 0;
 
         if (arg_flags[i] & VT_CALL_SIG) {
-            if (n > 1 || i != 0)
+            if ((n > 1 || i != 0) && !(n == 2 && strcmp(args[0]->name, "self") == 0))
                 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INTERNAL_PANIC,
-                    ":call_sig must be the first and only parameter");
+                    ":call_sig must be the first and only parameter besides self");
             if (arg_flags[i] & (VT_FLAT | VT_OPTIONAL | VT_OPT_FLAG | VT_NAMED))
                 Parrot_ex_throw_from_c_args(interp, NULL, EXCEPTION_INTERNAL_PANIC,
                     ":call_sig cannot be combined with any other flags");


More information about the parrot-commits mailing list