[svn:parrot] r45118 - in trunk: include/parrot src/nci src/pmc

plobsing at svn.parrot.org plobsing at svn.parrot.org
Tue Mar 23 00:28:06 UTC 2010


Author: plobsing
Date: Tue Mar 23 00:28:06 2010
New Revision: 45118
URL: https://trac.parrot.org/parrot/changeset/45118

Log:
eliminate NCI.jitted flag

having 2 framebuilder call signatures is a bad idea

Modified:
   trunk/include/parrot/nci.h
   trunk/src/nci/api.c
   trunk/src/pmc/nci.pmc

Modified: trunk/include/parrot/nci.h
==============================================================================
--- trunk/include/parrot/nci.h	Mon Mar 22 23:42:16 2010	(r45117)
+++ trunk/include/parrot/nci.h	Tue Mar 23 00:28:06 2010	(r45118)
@@ -15,7 +15,7 @@
 
 #include "parrot/parrot.h"
 
-void *build_call_func(PARROT_INTERP, SHIM(PMC *pmc_nci), NOTNULL(STRING *signature), NOTNULL(int *jitted));
+void *build_call_func(PARROT_INTERP, SHIM(PMC *pmc_nci), NOTNULL(STRING *signature));
 
 void Parrot_nci_load_core_thunks(PARROT_INTERP);
 

Modified: trunk/src/nci/api.c
==============================================================================
--- trunk/src/nci/api.c	Mon Mar 22 23:42:16 2010	(r45117)
+++ trunk/src/nci/api.c	Tue Mar 23 00:28:06 2010	(r45118)
@@ -23,7 +23,7 @@
    to a function that can call it. */
 
 void *
-build_call_func(PARROT_INTERP, SHIM(PMC *pmc_nci), NOTNULL(STRING *signature), SHIM(int *jitted)) {
+build_call_func(PARROT_INTERP, SHIM(PMC *pmc_nci), NOTNULL(STRING *signature)) {
     PMC *iglobals;
     PMC *nci_funcs;
     PMC *thunk;

Modified: trunk/src/pmc/nci.pmc
==============================================================================
--- trunk/src/pmc/nci.pmc	Mon Mar 22 23:42:16 2010	(r45117)
+++ trunk/src/pmc/nci.pmc	Tue Mar 23 00:28:06 2010	(r45118)
@@ -19,7 +19,6 @@
 */
 
 typedef INTVAL (*nci_sub_t)(PARROT_INTERP, PMC *);
-typedef INTVAL (*nci_jit_sub_t)(PARROT_INTERP, PMC *, char *);
 
 void pcc_params(PARROT_INTERP, STRING *sig, Parrot_NCI_attributes * const nci_info,
                 size_t sig_length);
@@ -108,7 +107,6 @@
 {
     STRING    *key        = nci_info->signature;
     size_t     key_length = Parrot_str_byte_length(interp, key);
-    int       jitted      = 0;
 
     pcc_params(interp, key, nci_info, key_length);
 
@@ -116,8 +114,7 @@
     nci_info->arity       = key_length - 1;
 
     /* Build call function. */
-    nci_info->func        = (PMC *)(build_call_func(interp, pmc, key, &jitted));
-    nci_info->jitted      = jitted;
+    nci_info->func        = (PMC *)(build_call_func(interp, pmc, key));
 
     return (nci_sub_t)nci_info->func;
 }
@@ -132,7 +129,6 @@
     ATTR STRING    *long_signature;         /* The full signature. */
     ATTR PMC       *multi_sig;              /* type tuple array (?) */
     ATTR INTVAL     arity;                  /* Cached arity of the NCI. */
-    ATTR INTVAL     jitted;                 /* Is this a jitted NCI stub. */
 
 /*
 
@@ -266,7 +262,6 @@
         nci_info_ret->signature             = nci_info_self->signature;
         nci_info_ret->pcc_params_signature  = nci_info_self->pcc_params_signature;
         nci_info_ret->arity                 = nci_info_self->arity;
-        nci_info_ret->jitted                = nci_info_self->jitted;
         PObj_get_FLAGS(ret)                |= (PObj_get_FLAGS(SELF) & 0x7);
 
         return ret;
@@ -320,23 +315,7 @@
                     "attempt to call NULL function");
         }
 
-        if (nci_info->jitted) {
-            nci_jit_sub_t jit_func = (nci_jit_sub_t) D2FPTR(nci_info->func);
-
-            /* Parrot_eprintf(interp, "JITTED %S\n", nci_info->signature); */
-            sig_str = Parrot_str_to_cstring(interp, nci_info->pcc_params_signature);
-            jit_func(INTERP, SELF, sig_str);
-            Parrot_str_free_cstring(sig_str);
-        }
-        else {
-            if (PObj_flag_TEST(private2, SELF)) {
-                /* Parrot_eprintf(interp, "RAW NCI CALL\n"); */
-            }
-            else {
-                /* Parrot_eprintf(interp, "HACKED %S\n", nci_info->signature); */
-            }
-            func(INTERP, SELF);
-        }
+        func(INTERP, SELF);
         cont = INTERP->current_cont;
 
         /*


More information about the parrot-commits mailing list