[svn:parrot] r43728 - in branches/nativecall_pir_build: . config/gen/makefiles src/bootstrap tools/build
plobsing at svn.parrot.org
plobsing at svn.parrot.org
Fri Feb 5 21:33:17 UTC 2010
Author: plobsing
Date: Fri Feb 5 21:33:16 2010
New Revision: 43728
URL: https://trac.parrot.org/parrot/changeset/43728
Log:
remove miniparrot dependancy on src/nci.o using src/bootstrap/nci.c
Added:
branches/nativecall_pir_build/src/bootstrap/ (props changed)
branches/nativecall_pir_build/src/bootstrap/nci.c
Modified:
branches/nativecall_pir_build/MANIFEST
branches/nativecall_pir_build/MANIFEST.SKIP
branches/nativecall_pir_build/config/gen/makefiles/root.in
branches/nativecall_pir_build/tools/build/nativecall.pir
Modified: branches/nativecall_pir_build/MANIFEST
==============================================================================
--- branches/nativecall_pir_build/MANIFEST Fri Feb 5 20:10:16 2010 (r43727)
+++ branches/nativecall_pir_build/MANIFEST Fri Feb 5 21:33:16 2010 (r43728)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 2 19:27:59 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Fri Feb 5 20:09:33 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -1305,6 +1305,7 @@
runtime/parrot/library/yaml_dumper.pir [library]
src/atomic/gcc_x86.c []
src/atomic/sparc_v9.s []
+src/bootstrap/nci.c []
src/byteorder.c []
src/call/args.c []
src/call/context.c []
Modified: branches/nativecall_pir_build/MANIFEST.SKIP
==============================================================================
--- branches/nativecall_pir_build/MANIFEST.SKIP Fri Feb 5 20:10:16 2010 (r43727)
+++ branches/nativecall_pir_build/MANIFEST.SKIP Fri Feb 5 21:33:16 2010 (r43728)
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 2 06:21:51 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Fri Feb 5 21:29:01 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -667,6 +667,13 @@
^src/atomic/.*\.gcda/
^src/atomic/.*\.o$
^src/atomic/.*\.o/
+# generated from svn:ignore of 'src/bootstrap/'
+^src/bootstrap/.*\.o$
+^src/bootstrap/.*\.o/
+^src/bootstrap/.*\.obj$
+^src/bootstrap/.*\.obj/
+^src/bootstrap/.*\.str$
+^src/bootstrap/.*\.str/
# generated from svn:ignore of 'src/call/'
^src/call/.*\.o$
^src/call/.*\.o/
Modified: branches/nativecall_pir_build/config/gen/makefiles/root.in
==============================================================================
--- branches/nativecall_pir_build/config/gen/makefiles/root.in Fri Feb 5 20:10:16 2010 (r43727)
+++ branches/nativecall_pir_build/config/gen/makefiles/root.in Fri Feb 5 21:33:16 2010 (r43728)
@@ -474,7 +474,6 @@
src/misc$(O) \
src/multidispatch$(O) \
src/frame_builder$(O) \
- src/nci$(O) \
src/oo$(O) \
src/packfile$(O) \
src/packout$(O) \
@@ -505,7 +504,7 @@
OPS_FILES = @ops@ $(GEN_OPSFILES)
-O_FILES = \
+COMMON_O_FILES = \
$(INTERP_O_FILES) \
$(CHARSET_O_FILES) \
$(IO_O_FILES) \
@@ -513,6 +512,16 @@
$(ENCODING_O_FILES) \
$(IMCC_O_FILES)
+STAGE1_O_FILES = \
+ $(COMMON_O_FILES) \
+ src/bootstrap/nci$(O)
+
+STAGE2_O_FILES = \
+ $(COMMON_O_FILES) \
+ src/nci$(O)
+
+O_FILES = $(STAGE2_O_FILES)
+
###############################################################################
#
# BUILD TARGET CONFIGURATIONS:
@@ -793,6 +802,7 @@
@echo " tags-vi: Create tags for the vi editor."
@echo " tags-emacs: Create tags for the EMACS editor."
@echo " perlcritic: Check Perl code with Perl::Critic."
+ @echo " bootstrap: Regenerate src/bootstrap."
@echo ""
@echo "Release:"
@echo " release: Create a tarball."
@@ -835,10 +845,10 @@
$(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
-$(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(O_FILES) \
+$(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(STAGE1_O_FILES) \
lib/Parrot/OpLib/core.pm src/null_config$(O)
$(LINK) @ld_out@$@ src/main$(O) src/null_config$(O) \
- $(O_FILES) $(ICU_SHARED) $(C_LIBS) $(LINKFLAGS)
+ $(STAGE1_O_FILES) $(ICU_SHARED) $(C_LIBS) $(LINKFLAGS)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(INSTALLABLEPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
@@ -1380,6 +1390,14 @@
include/pmc/pmc_nci.h \
include/pmc/pmc_pointer.h
+src/bootstrap/nci$(O) : src/bootstrap/nci.str \
+ $(INC_DIR)/oplib/ops.h $(GENERAL_H_FILES) \
+ src/frame_builder.h \
+ include/pmc/pmc_managedstruct.h \
+ include/pmc/pmc_nci.h \
+ include/pmc/pmc_pointer.h
+ # $(INC_DIR)/oplib/ops.h $(PARROT_H_HEADERS) \
+
src/frame_builder$(O) : $(PARROT_H_HEADERS) src/frame_builder.h \
include/pmc/pmc_fixedintegerarray.h \
include/pmc/pmc_unmanagedstruct.h \
@@ -1966,6 +1984,11 @@
pmcrenumber :
$(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num
+bootstrap : $(PARROT) $(BUILD_TOOLS_DIR)/nativecall.pir \
+ $(LIBRARY_DIR)/data_json.pbc config/gen/call_list/core.in
+ $(PARROT) $(BUILD_TOOLS_DIR)/nativecall.pir <config/gen/call_list/core.in >src/bootstrap/nci.c
+
+
###############################################################################
#
# SVN Targets:
Added: branches/nativecall_pir_build/src/bootstrap/nci.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/nativecall_pir_build/src/bootstrap/nci.c Fri Feb 5 21:33:16 2010 (r43728)
@@ -0,0 +1,1289 @@
+/* ex: set ro ft=c:
+ * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
+ *
+ * This file is generated automatically by tools/build/nativecall.pir
+ *
+ * Any changes made here will be lost!
+ *
+ */
+
+/* nci.c
+ * Copyright (C) 2001-2009, Parrot Foundation.
+ * SVN Info
+ * $Id: nativecall.pir 43674 2010-02-01 01:22:31Z plobsing $
+ * Overview:
+ * Native Call Interface routines. The code needed to build a
+ * parrot to C call frame is in here
+ * Data Structure and Algorithms:
+ * History:
+ * Notes:
+ * References:
+ */
+#include "parrot/parrot.h"
+#include "parrot/hash.h"
+#include "parrot/oplib/ops.h"
+#include "pmc/pmc_managedstruct.h"
+#include "pmc/pmc_nci.h"
+#include "pmc/pmc_pointer.h"
+#include "pmc/pmc_callcontext.h"
+#include "nci.str"
+
+/* HEADERIZER HFILE: none */
+/* HEADERIZER STOP */
+
+/* All our static functions that call in various ways. Yes, terribly
+ hackish, but that is just fine */
+
+
+static void
+pcf_d_JOd(PARROT_INTERP, PMC *self)
+{
+ typedef double(* func_t)(PARROT_INTERP, PMC *, double);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ FLOATVAL return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiN" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (double)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "N", return_data);
+
+
+
+}
+static void
+pcf_I_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_P_JOl(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, long);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_P_Jt(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ char *t_1; STRING *ts_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "S" , &ts_1);
+ t_1 = ts_1 ? Parrot_str_to_cstring(interp, ts_1) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+if (t_1) Parrot_str_free_cstring(t_1);
+}
+static void
+pcf_S_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+
+}
+static void
+pcf_I_JI(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I" , &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_v_JOSP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_JOS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_I_JOI(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_P_JOP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiP" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+}
+static void
+pcf_P_JOPS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ STRING * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPS" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_v_JOPSP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ STRING * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPSP" , &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+
+
+
+
+
+
+}
+static void
+pcf_v_JPPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPIP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPSP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPNP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PNP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_v_JPP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JPI(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JPS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_v_JPN(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PN" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_JPPP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JPIP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JPSP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PSP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_P_JPNP(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, FLOATVAL, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PNP" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+}
+static void
+pcf_I_JPP(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_I_JPS(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_I_JPN(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, FLOATVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ FLOATVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PN" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_JP(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P" , &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+}
+static void
+pcf_v_JP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "P" , &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1);
+
+
+
+}
+static void
+pcf_i_JPi(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+}
+static void
+pcf_i_JPii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_i_JPiii(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, int, int, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ INTVAL t_3;
+ INTVAL t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIII" , &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_i_JPt(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, char *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ char *t_2; STRING *ts_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PS" , &t_1, &ts_2);
+ t_2 = ts_2 ? Parrot_str_to_cstring(interp, ts_2) : (char *)NULL;
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+if (t_2) Parrot_str_free_cstring(t_2);
+}
+static void
+pcf_P_JOSSS(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *, STRING *, STRING *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ STRING * t_3;
+ STRING * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSSS" , &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+
+
+
+}
+static void
+pcf_v_JOSS(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, STRING *, STRING *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING * t_2;
+ STRING * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiSS" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2, t_3);
+
+
+
+
+
+}
+static void
+pcf_S_JOI(PARROT_INTERP, PMC *self)
+{
+ typedef STRING *(* func_t)(PARROT_INTERP, PMC *, INTVAL);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ STRING * return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiI" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (STRING *)(*fn_pointer)(interp, t_1, t_2);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "S", return_data);
+
+
+
+}
+static void
+pcf_v_JOb(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, void *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ STRING *t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiS" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, Buffer_bufstart(t_2));
+
+
+
+
+}
+static void
+pcf_i_JOPxAT_(PARROT_INTERP, PMC *self)
+{
+ typedef int(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPs" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (int)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_I_JOPxAT_(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ PMC * t_3;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiPPs" , &t_1, &t_2, &t_3);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2, t_3);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+}
+static void
+pcf_I_JOIPxAT_(PARROT_INTERP, PMC *self)
+{
+ typedef INTVAL(* func_t)(PARROT_INTERP, PMC *, INTVAL, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ INTVAL return_data;
+
+ PMC * t_1;
+ INTVAL t_2;
+ PMC * t_3;
+ PMC * t_4;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiIPPs" , &t_1, &t_2, &t_3, &t_4);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (INTVAL)(*fn_pointer)(interp, t_1, t_2, t_3, t_4);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "I", return_data);
+
+
+
+
+
+}
+static void
+pcf_P_JO(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ PMC * t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "Pi" , &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+}
+static void
+pcf_v_JOP(PARROT_INTERP, PMC *self)
+{
+ typedef void(* func_t)(PARROT_INTERP, PMC *, PMC *);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ void * return_data;
+
+ PMC * t_1;
+ PMC * t_2;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "PiP" , &t_1, &t_2);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ (*fn_pointer)(interp, t_1, t_2);
+
+
+
+
+}
+static void
+pcf_P_Ji(PARROT_INTERP, PMC *self)
+{
+ typedef PMC *(* func_t)(PARROT_INTERP, int);
+ func_t fn_pointer;
+ void *orig_func;
+ PMC *ctx = CURRENT_CONTEXT(interp);
+ PMC *call_object = Parrot_pcc_get_signature(interp, ctx);
+ PMC * return_data;
+
+ INTVAL t_1;
+ Parrot_pcc_fill_params_from_c_args(interp, call_object, "I" , &t_1);
+
+ GETATTR_NCI_orig_func(interp, self, orig_func);
+ fn_pointer = (func_t)D2FPTR(orig_func);
+ return_data = (PMC *)(*fn_pointer)(interp, t_1);
+ Parrot_pcc_fill_returns_from_c_args(interp, call_object, "P", return_data);
+
+
+}
+
+
+
+/* This function serves a single purpose. It takes the function
+ signature for a C function we want to call and returns a pointer
+ to a function that can call it. */
+void *
+build_call_func(PARROT_INTERP,
+#if defined(CAN_BUILD_CALL_FRAMES)
+PMC *pmc_nci, NOTNULL(STRING *signature), NOTNULL(int *jitted))
+#else
+SHIM(PMC *pmc_nci), NOTNULL(STRING *signature), SHIM(int *jitted))
+#endif
+{
+ char *c;
+ STRING *ns, *message;
+ PMC *b;
+ PMC *iglobals;
+ PMC *temp_pmc;
+
+ PMC *HashPointer = NULL;
+
+ /* And in here is the platform-independent way. Which is to say
+ "here there be hacks" */
+
+ /* fixup empty signatures */
+ if (STRING_IS_EMPTY(signature))
+ signature = CONST_STRING(interp, "v");
+
+ iglobals = interp->iglobals;
+
+ if (PMC_IS_NULL(iglobals))
+ PANIC(interp, "iglobals isn't created yet");
+ HashPointer = VTABLE_get_pmc_keyed_int(interp, iglobals,
+ IGLOBALS_NCI_FUNCS);
+
+ if (!HashPointer) {
+ HashPointer = pmc_new(interp, enum_class_Hash);
+ VTABLE_set_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS,
+ HashPointer);
+ }
+
+#if defined(CAN_BUILD_CALL_FRAMES)
+ /* Try if JIT code can build that signature. If yes, we are done */
+ 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_ManagedStruct) {
+ *jitted = 1;
+ return F2DPTR(VTABLE_get_pointer(interp, b));
+ }
+ else {
+ int jit_size;
+ void * const result = Parrot_jit_build_call_func(interp, pmc_nci, signature, &jit_size);
+ if (result) {
+ struct jit_buffer_private_data *priv;
+ *jitted = 1;
+ temp_pmc = pmc_new(interp, enum_class_ManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)result);
+#ifdef PARROT_HAS_EXEC_PROTECT
+ priv = (struct jit_buffer_private_data *)
+ mem_sys_allocate(sizeof(struct jit_buffer_private_data));
+ priv->size = jit_size;
+ SETATTR_ManagedStruct_custom_free_func(interp, temp_pmc, Parrot_jit_free_buffer);
+ SETATTR_ManagedStruct_custom_free_priv(interp, temp_pmc, priv);
+ 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, signature, temp_pmc);
+ return result;
+ }
+ }
+
+#endif
+
+ b = VTABLE_get_pmc_keyed_str(interp, HashPointer, signature);
+
+ if (PMC_IS_NULL(b)) {
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_d_JOd);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "dJOd"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOl);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOl"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Jt);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJt"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJOS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JI);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJI"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOSP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOI);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOI"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOPS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOPS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOPSP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOPSP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPPP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPPP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPIP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPIP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPSP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPSP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPNP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPNP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPI);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPI"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JPN);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJPN"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPPP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPPP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPIP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPIP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPSP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPSP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JPNP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJPNP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJPP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJPS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JPN);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJPN"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPi);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPi"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPii);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPii"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPiii);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPiii"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JPt);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJPt"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JOSSS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJOSSS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOSS);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOSS"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_S_JOI);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "SJOI"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOb);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOb"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_JOPxAT_);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "iJOP@"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOPxAT_);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOP@"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_I_JOIPxAT_);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "IJOIP@"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_JO);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJO"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_v_JOP);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "vJOP"), temp_pmc);
+ temp_pmc = pmc_new(interp, enum_class_UnManagedStruct);
+ VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Ji);
+ VTABLE_set_pmc_keyed_str(interp, HashPointer, CONST_STRING(interp, "PJi"), temp_pmc);
+
+ 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)
+ return F2DPTR(VTABLE_get_pointer(interp, b));
+
+ /*
+ These three lines have been added to aid debugging. I want to be able to
+ see which signature has an unknown type. I am sure someone can come up
+ with a neater way to do this.
+ */
+ ns = string_make(interp, " is an unknown signature type", 29, "ascii", 0);
+ message = Parrot_str_concat(interp, signature, ns, 0);
+
+#if defined(CAN_BUILD_CALL_FRAMES)
+ ns = string_make(interp, ".\\nCAN_BUILD_CALL_FRAMES is enabled, this should not happen", 58, "ascii", 0);
+#else
+ ns = string_make(interp, ".\\nCAN_BUILD_CALL_FRAMES is disabled, add the signature to src/call_list.txt", 75, "ascii", 0);
+#endif
+ message = Parrot_str_concat(interp, message, ns, 0);
+
+ /*
+ * I think there may be memory issues with this but if we get to here we are
+ * aborting.
+ */
+ c = Parrot_str_to_cstring(interp, message);
+ PANIC(interp, c);
+}
+
+
+
+/*
+ * Local variables:
+ * c-file-style: "parrot"
+ * End:
+ * vim: expandtab shiftwidth=4:
+ */
+
Modified: branches/nativecall_pir_build/tools/build/nativecall.pir
==============================================================================
--- branches/nativecall_pir_build/tools/build/nativecall.pir Fri Feb 5 20:10:16 2010 (r43727)
+++ branches/nativecall_pir_build/tools/build/nativecall.pir Fri Feb 5 21:33:16 2010 (r43728)
@@ -79,15 +79,6 @@
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
-/*
- * if the architecture can build some or all of these signatures
- * enable the define below
- * - the JITed function will be called first
- * - if it returns NULL, the hardcoded version will do the job
- */
-
-#include "frame_builder.h"
-
/* All our static functions that call in various ways. Yes, terribly
hackish, but that is just fine */
More information about the parrot-commits
mailing list