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

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Oct 14 21:24:39 UTC 2009


Author: chromatic
Date: Wed Oct 14 21:24:39 2009
New Revision: 41858
URL: https://trac.parrot.org/parrot/changeset/41858

Log:
[PCC] Switched from VTABLE calls with expensive STRING comparisons to direct
CallSignature attribute access with macros in hotpath
Parrot_pcc_build_sig_object_returns_from_op().  This improves the fib.pir
benchmark by 2.858%.

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 21:24:34 2009	(r41857)
+++ branches/pcc_reapply/src/call/args.c	Wed Oct 14 21:24:39 2009	(r41858)
@@ -22,6 +22,7 @@
 #include "parrot/runcore_api.h"
 #include "args.str"
 #include "../pmc/pmc_key.h"
+#include "../pmc/pmc_callsignature.h"
 
 /* HEADERIZER HFILE: include/parrot/call.h */
 
@@ -750,8 +751,10 @@
         return NULL;
     }
 
-    VTABLE_set_attr_str(interp, call_object, CONST_STRING(interp, "return_flags"), raw_sig);
-    VTABLE_set_attr_str(interp, call_object, CONST_STRING(interp, "returns"), returns);
+    /* a little encapsulation violation for great speed */
+    SETATTR_CallSignature_return_flags(interp, call_object, raw_sig);
+    SETATTR_CallSignature_results(interp, call_object, returns);
+
     string_sig = Parrot_str_append(interp, string_sig, CONST_STRING(interp, "->"));
 
     for (arg_index = 0; arg_index < arg_count; arg_index++) {


More information about the parrot-commits mailing list