[svn:parrot] r44505 - in trunk/src: . nci

plobsing at svn.parrot.org plobsing at svn.parrot.org
Fri Feb 26 20:59:18 UTC 2010


Author: plobsing
Date: Fri Feb 26 20:59:15 2010
New Revision: 44505
URL: https://trac.parrot.org/parrot/changeset/44505

Log:
move nci thunk loading into global_setup

this is necessitated by dynext nci thunk libraries (and also possibly by runtime-loadable frame builders once we get them)

Modified:
   trunk/src/global_setup.c
   trunk/src/nci/api.c

Modified: trunk/src/global_setup.c
==============================================================================
--- trunk/src/global_setup.c	Fri Feb 26 19:13:08 2010	(r44504)
+++ trunk/src/global_setup.c	Fri Feb 26 20:59:15 2010	(r44505)
@@ -190,6 +190,11 @@
 
     pmc = Parrot_pmc_new(interp, enum_class_Hash);
     VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_DYN_LIBS, pmc);
+
+    pmc = Parrot_pmc_new(interp, enum_class_Hash);
+    VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS, pmc);
+    Parrot_nci_load_core_thunks(interp);
+    Parrot_nci_load_extra_thunks(interp);
 }
 
 /*

Modified: trunk/src/nci/api.c
==============================================================================
--- trunk/src/nci/api.c	Fri Feb 26 19:13:08 2010	(r44504)
+++ trunk/src/nci/api.c	Fri Feb 26 20:59:15 2010	(r44505)
@@ -45,10 +45,8 @@
         PANIC(interp, "iglobals isn't created yet");
 
     nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS);
-    if (PMC_IS_NULL(nci_funcs)) {
-        init_nci_funcs(interp);
-        nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS);
-    }
+    if (PMC_IS_NULL(nci_funcs))
+        PANIC(interp, "iglobals.nci_funcs isn't created_yet");
 
     thunk = VTABLE_get_pmc_keyed_str(interp, nci_funcs, signature);
 


More information about the parrot-commits mailing list