NCI thunk compile error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc -fno-common -no-cpp-precomp -pipe -fstack-protector -I/usr/local/include -pipe -fno-common -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -I/usr/local/Cellar/libffi/3.0.9/lib/libffi-3.0.9/include -I/usr/local/include/parrot/3.5.0-devel -Ipmc/pmc_nci.h -o src/GMP/thunks src/GMP/thunks.c | |
Undefined symbols: | |
"_Parrot_pcc_fill_params_from_c_args", referenced from: | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_double_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_long_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_void_ptr_double in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_long in ccSotlCp.o | |
_pcf_int_ptr_double in ccSotlCp.o | |
"_Parrot_pmc_new_init_int", referenced from: | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
"_Parrot_pcc_build_call_from_c_args", referenced from: | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_double_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_long_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_void_ptr_double in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_long in ccSotlCp.o | |
_pcf_int_ptr_double in ccSotlCp.o | |
"_Parrot_pmc_new", referenced from: | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
"_main", referenced from: | |
start in crt1.10.6.o | |
"_Parrot_pcc_get_signature_func", referenced from: | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_double_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_long_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_void_ptr_double in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_long in ccSotlCp.o | |
_pcf_int_ptr_double in ccSotlCp.o | |
"_PMCNULL", referenced from: | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_double_ptr in ccSotlCp.o | |
_pcf_double_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_long_ptr_long in ccSotlCp.o | |
_pcf_long_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_void_ptr_double in ccSotlCp.o | |
_pcf_void_ptr_double in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_long in ccSotlCp.o | |
_pcf_void_ptr_long_long in ccSotlCp.o | |
_pcf_int_ptr_double in ccSotlCp.o | |
_pcf_int_ptr_double in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
"_Parrot_ex_throw_from_c_args", referenced from: | |
_pcf_void_ptr_ptr_ptr_long in ccSotlCp.o | |
_pcf_double_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_long in ccSotlCp.o | |
_pcf_long_ptr_long in ccSotlCp.o | |
_pcf_void_ptr_ptr_long in ccSotlCp.o | |
_pcf_ptr_ptr_int_ptr in ccSotlCp.o | |
_pcf_void_ptr_double in ccSotlCp.o | |
_pcf_long_ptr_ptr in ccSotlCp.o | |
_pcf_double_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_long_ptr_ptr_ptr in ccSotlCp.o | |
_pcf_void_ptr_ptr_long_ptr in ccSotlCp.o | |
_pcf_void_ptr_long_long in ccSotlCp.o | |
_pcf_int_ptr_double in ccSotlCp.o | |
"_Parrot_confess", referenced from: | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
_Parrot_lib_thunks_init in ccSotlCp.o | |
ld: symbol(s) not found | |
collect2: ld returned 1 exit status | |
exit status: 256 | |
command: cc -fno-common -no-cpp-precomp -pipe -fstack-protector -I/usr/local/include -pipe -fno-common -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -I/usr/local/Cellar/libffi/3.0.9/lib/libffi-3.0.9/include -I/usr/local/include/parrot/3.5.0-devel -Ipmc/pmc_nci.h -o src/GMP/thunks src/GMP/thunks.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ex: set ro ft=c: | |
* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! | |
* | |
* This file is generated automatically by tools/dev/nci_thunk_gen.pir | |
* | |
* Any changes made here will be lost! | |
* | |
*/ | |
/* src/GMP/thunks.c | |
* Copyright (C) 2010, Parrot Foundation. | |
* 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: | |
*/ | |
#define PARROT_IN_EXTENSION | |
#include "parrot/parrot.h" | |
#include "parrot/nci.h" | |
#include "pmc/pmc_nci.h" | |
#ifdef PARROT_IN_EXTENSION | |
/* external libraries can't have strings statically compiled into parrot */ | |
# define CONST_STRING(i, s) Parrot_str_new_constant((i), (s)) | |
#else | |
# include "thunks.str" | |
#endif | |
/* 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_void_ptr_ptr_ptr_long(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, void *, void *, long); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
PMC * t_3; void * v_3; | |
INTVAL t_4; long v_4; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPI", &t_1, &t_2, &t_3, &t_4); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = PMC_IS_NULL(t_3) ? NULL : VTABLE_get_pointer(interp, t_3);; | |
v_4 = t_4; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3, v_4); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_double_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef double(* func_t)(void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
FLOATVAL t_0; double v_0; | |
PMC * t_1; void * v_1; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "P", &t_1); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1); | |
t_0 = v_0; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "N", t_0); | |
} | |
static void | |
pcf_void_ptr_ptr_long_long(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, void *, long, long); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
INTVAL t_3; long v_3; | |
INTVAL t_4; long v_4; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPII", &t_1, &t_2, &t_3, &t_4); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = t_3; | |
v_4 = t_4; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3, v_4); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_long_ptr_long(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef long(* func_t)(void *, long); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
INTVAL t_0; long v_0; | |
PMC * t_1; void * v_1; | |
INTVAL t_2; long v_2; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PI", &t_1, &t_2); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = t_2; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1, v_2); | |
t_0 = v_0; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", t_0); | |
} | |
static void | |
pcf_void_ptr_ptr_long(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, void *, long); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
INTVAL t_3; long v_3; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPI", &t_1, &t_2, &t_3); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = t_3; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_ptr_ptr_int_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void *(* func_t)(void *, int, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_0; void * v_0; | |
PMC * t_1; void * v_1; | |
INTVAL t_2; int v_2; | |
PMC * t_3; void * v_3; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_1, &t_2, &t_3); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = t_2; | |
v_3 = PMC_IS_NULL(t_3) ? NULL : VTABLE_get_pointer(interp, t_3);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1, v_2, v_3); | |
if (v_0 != NULL) { | |
t_0 = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, t_0, v_0); | |
} | |
else { | |
t_0 = PMCNULL; | |
}; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "P", t_0); | |
} | |
static void | |
pcf_void_ptr_double(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, double); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
FLOATVAL t_2; double v_2; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PN", &t_1, &t_2); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = t_2; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_long_ptr_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef long(* func_t)(void *, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
INTVAL t_0; long v_0; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1, v_2); | |
t_0 = v_0; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", t_0); | |
} | |
static void | |
pcf_double_ptr_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef double(* func_t)(void *, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
FLOATVAL t_0; double v_0; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PP", &t_1, &t_2); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1, v_2); | |
t_0 = v_0; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "N", t_0); | |
} | |
static void | |
pcf_void_ptr_ptr_ptr_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, void *, void *, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
PMC * t_3; void * v_3; | |
PMC * t_4; void * v_4; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPP", &t_1, &t_2, &t_3, &t_4); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = PMC_IS_NULL(t_3) ? NULL : VTABLE_get_pointer(interp, t_3);; | |
v_4 = PMC_IS_NULL(t_4) ? NULL : VTABLE_get_pointer(interp, t_4);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3, v_4); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_void_ptr_long_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, long, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
INTVAL t_2; long v_2; | |
PMC * t_3; void * v_3; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PIP", &t_1, &t_2, &t_3); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = t_2; | |
v_3 = PMC_IS_NULL(t_3) ? NULL : VTABLE_get_pointer(interp, t_3);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_void_ptr_ptr_ptr_ptr_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, void *, void *, void *, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
PMC * t_3; void * v_3; | |
PMC * t_4; void * v_4; | |
PMC * t_5; void * v_5; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPPPP", &t_1, &t_2, &t_3, &t_4, &t_5); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = PMC_IS_NULL(t_3) ? NULL : VTABLE_get_pointer(interp, t_3);; | |
v_4 = PMC_IS_NULL(t_4) ? NULL : VTABLE_get_pointer(interp, t_4);; | |
v_5 = PMC_IS_NULL(t_5) ? NULL : VTABLE_get_pointer(interp, t_5);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3, v_4, v_5); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_long_ptr_ptr_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef long(* func_t)(void *, void *, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
INTVAL t_0; long v_0; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
PMC * t_3; void * v_3; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPP", &t_1, &t_2, &t_3); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = PMC_IS_NULL(t_3) ? NULL : VTABLE_get_pointer(interp, t_3);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1, v_2, v_3); | |
t_0 = v_0; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", t_0); | |
} | |
static void | |
pcf_void_ptr_ptr_long_ptr(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, void *, long, void *); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
PMC * t_2; void * v_2; | |
INTVAL t_3; long v_3; | |
PMC * t_4; void * v_4; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PPIP", &t_1, &t_2, &t_3, &t_4); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = PMC_IS_NULL(t_2) ? NULL : VTABLE_get_pointer(interp, t_2);; | |
v_3 = t_3; | |
v_4 = PMC_IS_NULL(t_4) ? NULL : VTABLE_get_pointer(interp, t_4);; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3, v_4); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_void_ptr_long_long(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef void(* func_t)(void *, long, long); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
PMC * t_1; void * v_1; | |
INTVAL t_2; long v_2; | |
INTVAL t_3; long v_3; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PII", &t_1, &t_2, &t_3); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = t_2; | |
v_3 = t_3; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
(*fn_pointer)(v_1, v_2, v_3); | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, ""); | |
} | |
static void | |
pcf_int_ptr_double(PARROT_INTERP, PMC *nci, SHIM(PMC *self)) | |
{ | |
typedef int(* func_t)(void *, double); | |
func_t fn_pointer; | |
void *orig_func; | |
PMC * const ctx = CURRENT_CONTEXT(interp); | |
PMC * const call_object = Parrot_pcc_get_signature(interp, ctx); | |
PMC * ret_object = PMCNULL; | |
INTVAL t_0; int v_0; | |
PMC * t_1; void * v_1; | |
FLOATVAL t_2; double v_2; | |
UNUSED(ret_object); | |
Parrot_pcc_fill_params_from_c_args(interp, call_object, "PN", &t_1, &t_2); | |
v_1 = PMC_IS_NULL(t_1) ? NULL : VTABLE_get_pointer(interp, t_1);; | |
v_2 = t_2; | |
GETATTR_NCI_orig_func(interp, nci, orig_func); | |
fn_pointer = (func_t)D2FPTR(orig_func); | |
v_0 = (*fn_pointer)(v_1, v_2); | |
t_0 = v_0; | |
ret_object = Parrot_pcc_build_call_from_c_args(interp, call_object, "I", t_0); | |
} | |
PARROT_DYNEXT_EXPORT void | |
Parrot_lib_thunks_init(PARROT_INTERP, SHIM(PMC *lib)) | |
; | |
PARROT_DYNEXT_EXPORT void | |
Parrot_lib_thunks_init(PARROT_INTERP, SHIM(PMC *lib)) | |
{ | |
PMC * const iglobals = interp->iglobals; | |
PMC *nci_funcs; | |
PMC *temp_pmc; | |
PARROT_ASSERT(!(PMC_IS_NULL(iglobals))); | |
nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals, IGLOBALS_NCI_FUNCS); | |
PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs))); | |
{ | |
const int n = 5; | |
static const int sig[] = { 28, 29, 29, 29, 8, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_ptr_ptr_long); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 2; | |
static const int sig[] = { 16, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_double_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 5; | |
static const int sig[] = { 28, 29, 29, 8, 8, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_ptr_long_long); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 3; | |
static const int sig[] = { 8, 29, 8, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_long_ptr_long); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 4; | |
static const int sig[] = { 28, 29, 29, 8, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_ptr_long); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 4; | |
static const int sig[] = { 29, 29, 7, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_ptr_ptr_int_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 3; | |
static const int sig[] = { 28, 29, 16, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_double); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 3; | |
static const int sig[] = { 8, 29, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_long_ptr_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 3; | |
static const int sig[] = { 16, 29, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_double_ptr_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 5; | |
static const int sig[] = { 28, 29, 29, 29, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_ptr_ptr_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 4; | |
static const int sig[] = { 28, 29, 8, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_long_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 6; | |
static const int sig[] = { 28, 29, 29, 29, 29, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_ptr_ptr_ptr_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 4; | |
static const int sig[] = { 8, 29, 29, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_long_ptr_ptr_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 5; | |
static const int sig[] = { 28, 29, 29, 8, 29, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_ptr_long_ptr); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 4; | |
static const int sig[] = { 28, 29, 8, 8, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_void_ptr_long_long); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
{ | |
const int n = 3; | |
static const int sig[] = { 7, 29, 16, }; | |
PMC *sig_pmc = Parrot_pmc_new_init_int(interp, enum_class_FixedIntegerArray, n); | |
int i; | |
for (i = 0; i < n; i++) | |
VTABLE_set_integer_keyed_int(interp, sig_pmc, i, sig[i]); | |
temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct); | |
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_int_ptr_double); | |
VTABLE_set_pmc_keyed(interp, nci_funcs, sig_pmc, temp_pmc); | |
} | |
} | |
/* | |
* Local variables: | |
* c-file-style: "parrot" | |
* End: | |
* vim: expandtab shiftwidth=4 cinoptions='\:2=2' : | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment