Author: leo
Date: Sun Feb  5 14:46:08 2006
New Revision: 11431

Modified:
   trunk/src/inter_call.c
   trunk/t/pmc/coroutine.t
   trunk/t/pmc/exception.t
Log:
use process_args for get_results of exception handlers - this will 
automatically enable arg count checks too

Modified: trunk/src/inter_call.c
==============================================================================
--- trunk/src/inter_call.c      (original)
+++ trunk/src/inter_call.c      Sun Feb  5 14:46:08 2006
@@ -1198,19 +1198,15 @@ opcode_t *
 parrot_pass_args_to_result(Interp *interpreter, const char *sig,
         opcode_t *dest, parrot_context_t * old_ctxp, va_list ap)
 {
-    int todo;
     struct call_state st;
 
     Parrot_init_arg_op(interpreter,
             CONTEXT(interpreter->ctx), dest, &st.dest);
-    todo = Parrot_init_arg_sig(interpreter,
+    Parrot_init_arg_sig(interpreter,
             old_ctxp, sig, PARROT_VA_TO_VAPTR(ap), &st.src);
 
-    while (todo) {
-        fetch_arg_sig(interpreter, &st);
-        Parrot_convert_arg(interpreter, &st);
-        todo = Parrot_store_arg(interpreter, &st);
-    }
+    init_call_stats(&st);
+    process_args(interpreter, &st, "params", 1);
     return dest + st.dest.n + 2;
 }
 

Modified: trunk/t/pmc/coroutine.t
==============================================================================
--- trunk/t/pmc/coroutine.t     (original)
+++ trunk/t/pmc/coroutine.t     Sun Feb  5 14:46:08 2006
@@ -123,6 +123,7 @@ lp:
     print "done\n"
     end
 _catchm:
+    get_results '(0, 0)' , P5, S0
     print "catch main\n"
     end
 
@@ -134,6 +135,7 @@ corolp:
     yield
     branch corolp
 _catchc:
+    get_results '(0, 0)' , P5, S0
     print "catch coro\n"
     end
 CODE
@@ -158,6 +160,7 @@ lp:
     print "done\n"
     end
 _catchm:
+    get_results '(0, 0)' , P5, S0
     print "catch main\n"
     end
 
@@ -170,6 +173,7 @@ corolp:
     find_global P17, "no_such"
     branch corolp
 _catchc:
+    get_results '(0, 0)' , P5, S0
     print "catch coro\n"
     end
 CODE
@@ -194,6 +198,7 @@ lp:
     print "done\n"
     end
 _catchm:
+    get_results '(0, 0)' , P5, S0
     print "catch main\n"
     end
 .pcc_sub _coro:
@@ -228,6 +233,7 @@ lp:
     print "done\n"
     end
 _catchm:
+    get_results '(0, 0)' , P5, S0
     print "catch main\n"
     end
 
@@ -240,7 +246,7 @@ corolp:
     find_global P17, "no_such"
     branch corolp
 _catchc:
-    get_results '(0)' , P5
+    get_results '(0, 0)' , P5, S0
     print "catch coro\n"
     rethrow P5
     end

Modified: trunk/t/pmc/exception.t
==============================================================================
--- trunk/t/pmc/exception.t     (original)
+++ trunk/t/pmc/exception.t     Sun Feb  5 14:46:08 2006
@@ -541,7 +541,7 @@ pir_output_is(<<'CODE', <<'OUTPUT', 'cle
        print "skipped.\n"
 eh:
        .local pmc exception
-       .get_results (exception)
+       .get_results (exception, $S0)
        print "Error: "
        print exception
        print "\n"

Reply via email to