[svn:parrot] r39862 - trunk/tools/build

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Jul 1 23:43:27 UTC 2009


Author: chromatic
Date: Wed Jul  1 23:43:26 2009
New Revision: 39862
URL: https://trac.parrot.org/parrot/changeset/39862

Log:
[NCI] Removed the _XJIT_ prefix from JIT-generated call thunks.  Avoiding the
STRING concatenation necessary to find the right thunk in the NCI hash speeds
up startup time by more than 2%.

Modified:
   trunk/tools/build/nativecall.pl

Modified: trunk/tools/build/nativecall.pl
==============================================================================
--- trunk/tools/build/nativecall.pl	Wed Jul  1 23:16:30 2009	(r39861)
+++ trunk/tools/build/nativecall.pl	Wed Jul  1 23:43:26 2009	(r39862)
@@ -511,7 +511,6 @@
 {
     char       *c;
     STRING     *ns, *message;
-    STRING     *jit_key_name;
     PMC        *b;
     PMC        *iglobals;
     PMC        *temp_pmc;
@@ -547,10 +546,7 @@
 
 #if defined(CAN_BUILD_CALL_FRAMES)
     /* Try if JIT code can build that signature. If yes, we are done */
-
-    jit_key_name = CONST_STRING(interp, "_XJIT_");
-    jit_key_name = Parrot_str_concat(interp, jit_key_name, signature, 0);
-    b            = VTABLE_get_pmc_keyed_str(interp, HashPointer, jit_key_name);
+    b            = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
 
     PARROT_ASSERT(PMC_IS_NULL(b) || b->vtable);
 
@@ -575,7 +571,7 @@
             SETATTR_ManagedStruct_custom_clone_func(interp, temp_pmc, Parrot_jit_clone_buffer);
             SETATTR_ManagedStruct_custom_clone_priv(interp, temp_pmc, priv);
 #endif /* PARROT_HAS_EXEC_PROTECT */
-            VTABLE_set_pmc_keyed_str(interp, HashPointer, jit_key_name, temp_pmc);
+            VTABLE_set_pmc_keyed_str(interp, HashPointer, signature, temp_pmc);
             return result;
         }
     }


More information about the parrot-commits mailing list