[svn:parrot] r41864 - branches/pcc_reapply/src/call

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Oct 14 22:47:43 UTC 2009


Author: chromatic
Date: Wed Oct 14 22:47:40 2009
New Revision: 41864
URL: https://trac.parrot.org/parrot/changeset/41864

Log:
[PCC] Rearranged tests for exceptional condition in
Parrot_pcc_build_sig_object_returns_from_op() to avoid unnecessary extra work.
No functional changes.

Modified:
   branches/pcc_reapply/src/call/args.c

Modified: branches/pcc_reapply/src/call/args.c
==============================================================================
--- branches/pcc_reapply/src/call/args.c	Wed Oct 14 22:26:05 2009	(r41863)
+++ branches/pcc_reapply/src/call/args.c	Wed Oct 14 22:47:40 2009	(r41864)
@@ -735,21 +735,20 @@
         call_object = pmc_new(interp, enum_class_CallSignature);
         gc_register_pmc(interp, call_object);
     }
-    else
-        call_object = signature;
-
-    string_sig = VTABLE_get_string(interp, call_object);
-
     /* A hack to support 'get_results' as the way of fetching the
      * exception object inside an exception handler. The first argument
      * in the call object is the exception, stick it directly into the
      * destination register. */
-    if (CALLSIGNATURE_is_exception_TEST(call_object)) {
+    else if (CALLSIGNATURE_is_exception_TEST(signature)) {
         const INTVAL raw_index = raw_args[2];
         CTX_REG_PMC(ctx, raw_index) =
-                VTABLE_get_pmc_keyed_int(interp, call_object, 0);
+                VTABLE_get_pmc_keyed_int(interp, signature, 0);
         return NULL;
     }
+    else
+        call_object = signature;
+
+    string_sig = VTABLE_get_string(interp, call_object);
 
     /* a little encapsulation violation for great speed */
     SETATTR_CallSignature_return_flags(interp, call_object, raw_sig);


More information about the parrot-commits mailing list