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

chromatic at svn.parrot.org chromatic at svn.parrot.org
Wed Jul 1 23:16:31 UTC 2009


Author: chromatic
Date: Wed Jul  1 23:16:30 2009
New Revision: 39861
URL: https://trac.parrot.org/parrot/changeset/39861

Log:
[NCI] Made generated function build_call_func() attempt to use NCI to build
call frames (if the built Parrot supports that) rather than installing NCI
functions for every potential NCI signature when first loaded.  This reduces
startup time by 8.03% and reduces the number of PMCs generated on startup
dramatically.

The behavior is unchanged on builds which do not support JIT, though they may
be slightly faster as well.

Modified:
   trunk/tools/build/nativecall.pl

Modified: trunk/tools/build/nativecall.pl
==============================================================================
--- trunk/tools/build/nativecall.pl	Wed Jul  1 22:41:34 2009	(r39860)
+++ trunk/tools/build/nativecall.pl	Wed Jul  1 23:16:30 2009	(r39861)
@@ -542,11 +542,9 @@
         HashPointer = pmc_new(interp, enum_class_Hash);
         VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS,
                 HashPointer);
-
-$put_pointer
-
     }
 
+
 #if defined(CAN_BUILD_CALL_FRAMES)
     /* Try if JIT code can build that signature. If yes, we are done */
 
@@ -586,6 +584,12 @@
 
     b = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
 
+    if (PMC_IS_NULL(b)) {
+        $put_pointer
+
+        b = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
+    }
+
     PARROT_ASSERT(PMC_IS_NULL(b) || b->vtable);
 
     if ((!PMC_IS_NULL(b)) && b->vtable->base_type == enum_class_UnManagedStruct)


More information about the parrot-commits mailing list