jpl.c File Reference

#include <SWI-Prolog.h>
#include <SWI-Stream.h>
#include <jni.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <pthread.h>
#include <semaphore.h>
#include <limits.h>
Include dependency graph for jpl.c:

Go to the source code of this file.

Classes

struct  Hr_Entry
struct  Hr_Table

Defines

#define DEBUG(n, g)   ( n >= DEBUG_LEVEL ? g : (void)0 )
#define DEBUG_LEVEL   3
#define IREF_FMT   "J#%020lu"
#define IREF_INTTYPE   unsigned long
#define JNI_charP_to_term(J, T)   PL_unify_atom_chars((T),(J))
#define jni_ensure_jvm()
#define JNI_HR_ADD_FAIL   -1
#define JNI_HR_ADD_NEW   0
#define JNI_HR_ADD_OLD   1
#define JNI_HR_LOAD_FACTOR   0.75
#define JNI_jboolean_to_term(J, T)
#define JNI_jbuf_to_term(J, T, TP)
#define JNI_jbyte_to_term(J, T)   PL_unify_integer((T),(int)(J))
#define JNI_jchar_to_term(J, T)   PL_unify_integer((T),(int)(J))
#define JNI_jdouble_to_term(J, T)   PL_unify_float((T),(double)(J))
#define JNI_jfieldID_to_term(J, T)
#define JNI_jfloat_to_term(J, T)   PL_unify_float((T),(double)(J))
#define JNI_jint_to_term(J, T)   PL_unify_integer((T),(int)(J))
#define JNI_jlong_to_term(J, T)   PL_unify_int64((T),(int64_t)(J))
#define JNI_jmethodID_to_term(J, T)
#define JNI_jobject_to_term(J, T)
#define JNI_jshort_to_term(J, T)   PL_unify_integer((T),(int)(J))
#define JNI_MAX_JBYTE   127
#define JNI_MAX_JCHAR   65535
#define JNI_MAX_JSHORT   32767
#define JNI_MIN_JBYTE   -128
#define JNI_MIN_JCHAR   0
#define JNI_MIN_JSHORT   -32768
#define JNI_pointer_to_term(J, T)   PL_unify_pointer((T),(void*)(J))
#define JNI_term_to_boolean_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_byte_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_char_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_charP(T, J)   PL_get_atom_chars((T),&(J))
#define JNI_term_to_double_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_float_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_int_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_jboolean(T, JB)
#define JNI_term_to_jbuf(T, J, TP)
#define JNI_term_to_jbyte(T, J)
#define JNI_term_to_jchar(T, J)
#define JNI_term_to_jclass(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_jdouble(T, J)
#define JNI_term_to_jfieldID(T, J)
#define JNI_term_to_jfloat(T, J)
#define JNI_term_to_jint(T, J)
#define JNI_term_to_jlong(T, J)
#define JNI_term_to_jmethodID(T, J)
#define JNI_term_to_jobject(T, J)
#define JNI_term_to_jshort(T, J)
#define JNI_term_to_jstring(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_long_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_non_array_jclass(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_non_neg_jint(T, J)
#define JNI_term_to_object_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_pointer(T, J)   PL_get_pointer((T),(void**)&(J))
#define JNI_term_to_ref(T, J)
#define JNI_term_to_short_jarray(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_throwable_jclass(T, J)   JNI_term_to_jobject(T,J)
#define JNI_term_to_throwable_jobject(T, J)   JNI_term_to_jobject(T,J)
#define JNI_unify_false(T)
#define JNI_unify_true(T)
#define JNI_unify_void(T)
#define JNI_XPUT_ATOM   13
#define JNI_XPUT_BOOLEAN   1
#define JNI_XPUT_BYTE   2
#define JNI_XPUT_CHAR   3
#define JNI_XPUT_DOUBLE   8
#define JNI_XPUT_FLOAT   7
#define JNI_XPUT_FLOAT_TO_DOUBLE   9
#define JNI_XPUT_INT   5
#define JNI_XPUT_JVALUE   15
#define JNI_XPUT_JVALUEP   14
#define JNI_XPUT_LONG   6
#define JNI_XPUT_LONG_TO_DOUBLE   11
#define JNI_XPUT_LONG_TO_FLOAT   10
#define JNI_XPUT_REF   12
#define JNI_XPUT_SHORT   4
#define JNI_XPUT_VOID   0
#define JPL_C_LIB_VERSION   "3.1.4-alpha"
#define JPL_C_LIB_VERSION_MAJOR   3
#define JPL_C_LIB_VERSION_MINOR   1
#define JPL_C_LIB_VERSION_PATCH   4
#define JPL_C_LIB_VERSION_STATUS   "alpha"
#define JPL_CACHE_TYPE_OF_REF   FALSE
#define jpl_ensure_jpl_init(e)
#define jpl_ensure_pvm_init(e)
#define JPL_INIT_JPL_FAILED   104
#define JPL_INIT_OK   103
#define JPL_INIT_PVM_FAILED   105
#define JPL_INIT_PVM_MAYBE   102
#define JPL_INIT_RAW   101
#define JPL_INITIAL_POOL_ENGINES   1
#define JPL_MAX_POOL_ENGINES   10
#define MAX_JVM_OPTIONS   100

Typedefs

typedef int bool
typedef struct Hr_Entry HrEntry
typedef struct Hr_Table HrTable
typedef intptr_t pointer

Functions

static int create_pool_engines ()
static int current_pool_engine ()
static int current_pool_engine_handle (PL_engine_t *e)
static bool getLongValue (JNIEnv *env, jobject jlong_holder, long *lv)
static bool getPointerValue (JNIEnv *env, jobject jpointer_holder, pointer *pv)
install_t install ()
JNIEXPORT int JNICALL Java_jpl_fli_Prolog_action_1abort (JNIEnv *env, jclass jProlog)
JNIEXPORT jstring JNICALL Java_jpl_fli_Prolog_atom_1chars (JNIEnv *env, jclass jProlog, jobject jatom)
JNIEXPORT int JNICALL Java_jpl_fli_Prolog_attach_1engine (JNIEnv *env, jclass jProlog, jobject jengine)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_attach_1pool_1engine (JNIEnv *env, jclass jProlog)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_close_1query (JNIEnv *env, jclass jProlog, jobject jqid)
JNIEXPORT jint JNICALL Java_jpl_fli_Prolog_compare (JNIEnv *env, jclass jProlog, jobject jterm1, jobject jterm2)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_cons_1functor_1v (JNIEnv *env, jclass jProlog, jobject jterm, jobject jfunctor, jobject jterm0)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_copy_1term_1ref (JNIEnv *env, jclass jProlog, jobject jfrom)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_current_1engine (JNIEnv *env, jclass jProlog)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_current_1engine_1is_1pool (JNIEnv *env, jclass jProlog)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_discard_1foreign_1frame (JNIEnv *env, jclass jProlog, jobject jfid)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_exception (JNIEnv *env, jclass jProlog, jobject jqid)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_get_1actual_1init_1args (JNIEnv *env, jclass jProlog)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1arg (JNIEnv *env, jclass jProlog, jint jindex, jobject jterm, jobject jarg)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1atom_1chars (JNIEnv *env, jclass jProlog, jobject jterm, jobject jstring_holder)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_get_1c_1lib_1version (JNIEnv *env, jclass jProlog)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_get_1default_1init_1args (JNIEnv *env, jclass jProlog)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1float (JNIEnv *env, jclass jProlog, jobject jterm, jobject jdouble_holder)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1integer (JNIEnv *env, jclass jProlog, jobject jterm, jobject jint64_holder)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1name_1arity (JNIEnv *env, jclass jProlog, jobject jterm, jobject jname_holder, jobject jarity_holder)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1string_1chars (JNIEnv *env, jclass jProlog, jobject jterm, jobject jstring_holder)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_halt (JNIEnv *env, jclass jProlog, jint jstatus)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_initialise (JNIEnv *env, jclass jProlog)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_is_1tag (JNIEnv *env, jclass jProlog, jstring tag)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1atom (JNIEnv *env, jclass jProlog, jstring jname)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1functor (JNIEnv *env, jclass jProlog, jobject jatom, jint jarity)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1module (JNIEnv *env, jclass jProlog, jobject jatom)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1term_1ref (JNIEnv *env, jclass jProlog)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1term_1refs (JNIEnv *env, jclass jProlog, jint jn)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_next_1solution (JNIEnv *env, jclass jProlog, jobject jqid)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_object_1to_1tag (JNIEnv *env, jclass jProlog, jobject jobj)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_open_1foreign_1frame (JNIEnv *env, jclass jProlog)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_open_1query (JNIEnv *env, jclass jProlog, jobject jmodule, jint jflags, jobject jpredicate, jobject jterm0)
JNIEXPORT int JNICALL Java_jpl_fli_Prolog_pool_1engine_1id (JNIEnv *env, jclass jProlog, jobject jengine)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_predicate (JNIEnv *env, jclass jProlog, jstring jname, jint jarity, jstring jmodule)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1float (JNIEnv *env, jclass jProlog, jobject jterm, jdouble jf)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1integer (JNIEnv *env, jclass jProlog, jobject jterm, jlong ji)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1jref (JNIEnv *env, jclass jProlog, jobject jterm, jobject jref)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1term (JNIEnv *env, jclass jProlog, jobject jterm1, jobject jterm2)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1variable (JNIEnv *env, jclass jProlog, jobject jterm)
JNIEXPORT int JNICALL Java_jpl_fli_Prolog_release_1pool_1engine (JNIEnv *env, jclass jProlog)
JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_set_1default_1init_1args (JNIEnv *env, jclass jProlog, jobject jargs)
JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_tag_1to_1object (JNIEnv *env, jclass jProlog, jstring tag)
JNIEXPORT jint JNICALL Java_jpl_fli_Prolog_term_1type (JNIEnv *env, jclass jProlog, jobject jterm)
JNIEXPORT jint JNICALL Java_jpl_fli_Prolog_thread_1self (JNIEnv *env, jclass jProlog)
JNIEXPORT void JNICALL Java_jpl_fli_Prolog_unregister_1atom (JNIEnv *env, jclass jProlog, jobject jatom)
static foreign_t jni_alloc_buffer_plc (term_t txc, term_t tlen, term_t tbp)
static bool jni_atom_freed (atom_t a)
static bool jni_atom_to_String (JNIEnv *env, atom_t a, jobject *s)
static foreign_t jni_byte_buf_length_to_codes_plc (term_t tbb, term_t tlen, term_t tcs)
static bool jni_check_exception (JNIEnv *env)
int jni_create_default_jvm ()
static int jni_create_jvm (char *cp)
static int jni_create_jvm_c (char *classpath)
static foreign_t jni_ensure_jvm_plc ()
JNIEnv * jni_env ()
static foreign_t jni_fetch_buffer_value_plc (term_t tbp, term_t ti, term_t tv, term_t txc)
static foreign_t jni_free_buffer_plc (term_t tbp)
static bool jni_free_iref (JNIEnv *env, pointer iref)
static foreign_t jni_func_0_plc (term_t tn, term_t tr)
static foreign_t jni_func_1_plc (term_t tn, term_t ta1, term_t tr)
static foreign_t jni_func_2_plc (term_t tn, term_t ta1, term_t ta2, term_t tr)
static foreign_t jni_func_3_plc (term_t tn, term_t ta1, term_t ta2, term_t ta3, term_t tr)
static foreign_t jni_func_4_plc (term_t tn, term_t ta1, term_t ta2, term_t ta3, term_t ta4, term_t tr)
static foreign_t jni_get_actual_jvm_opts_plc (term_t args)
static int jni_get_created_jvm_count ()
static foreign_t jni_get_created_jvm_count_plc (term_t t1)
static bool jni_get_default_jvm_opts_1 (term_t args, int i, char **jvm_xia)
static foreign_t jni_get_default_jvm_opts_plc (term_t args)
static foreign_t jni_get_jvm_opts (term_t args, char **jvm_xia)
static int jni_hr_add (JNIEnv *, jobject, pointer *)
static bool jni_hr_create (int length)
static bool jni_hr_create_default ()
static int jni_hr_del (JNIEnv *, pointer)
static void jni_hr_free_chain_entries (HrEntry *ep)
static bool jni_hr_free_table (HrTable *t)
static void jni_hr_free_table_chains (HrTable *t)
static bool jni_hr_hash (JNIEnv *env, jobject obj, int *hash)
static foreign_t jni_hr_info_plc (term_t t1, term_t t2, term_t t3, term_t t4)
static bool jni_hr_rehash ()
static foreign_t jni_hr_table_plc (term_t t)
static bool jni_hr_table_slot (term_t t2, HrEntry *slot)
static int jni_init ()
static bool jni_iref_to_tag (pointer iref, atom_t *a)
static bool jni_jobject_to_term_byval (JNIEnv *env, jobject jobj, term_t term)
static foreign_t jni_jref_to_term_plc (term_t jref, term_t termIn)
static term_t jni_new_java_exception (atom_t tag, atom_t msg)
static term_t jni_new_jpl_error (atom_t tag, atom_t msg)
static bool jni_object_to_iref (JNIEnv *env, jobject obj, pointer *iref)
static foreign_t jni_param_put_plc (term_t tn, term_t txc, term_t tt, term_t tjvp)
static foreign_t jni_set_default_jvm_opts_plc (term_t tn, term_t args)
static foreign_t jni_stash_buffer_value_plc (term_t tbp, term_t ti, term_t tv, term_t txc)
static bool jni_String_to_atom (JNIEnv *env, jobject s, atom_t *a)
static bool jni_string_to_String (JNIEnv *env, term_t t, jobject *s)
static bool jni_tag_to_iref (atom_t a, pointer *iref)
static bool jni_tag_to_iref1 (const char *s, pointer *iref)
static bool jni_tag_to_iref2 (const char *s, pointer *iref)
static foreign_t jni_tag_to_iref_plc (term_t tt, term_t ti)
static foreign_t jni_term_to_jref_plc (term_t tref1, term_t tref2)
static bool jni_tidy_iref_type_cache (pointer iref)
static foreign_t jni_void_0_plc (term_t tn)
static foreign_t jni_void_1_plc (term_t tn, term_t ta1)
static foreign_t jni_void_2_plc (term_t tn, term_t ta1, term_t ta2)
static foreign_t jni_void_3_plc (term_t tn, term_t ta1, term_t ta2, term_t ta3)
static foreign_t jni_void_4_plc (term_t tn, term_t ta1, term_t ta2, term_t ta3, term_t ta4)
static char * jpl_c_lib_version ()
static foreign_t jpl_c_lib_version_1_plc (term_t ta)
static foreign_t jpl_c_lib_version_4_plc (term_t tmajor, term_t tminor, term_t tpatch, term_t tstatus)
static bool jpl_do_jpl_init (JNIEnv *env)
static bool jpl_do_pvm_init (JNIEnv *env)
static bool jpl_ensure_jpl_init_1 (JNIEnv *env)
static bool jpl_ensure_pvm_init_1 (JNIEnv *env)
static int jpl_num_initial_default_args ()
static bool jpl_post_pvm_init (JNIEnv *env, int argc, char **argv)
static bool jpl_test_pvm_init (JNIEnv *env)
static int pool_engine_id (PL_engine_t e)
static bool setDoubleValue (JNIEnv *env, jobject jdouble_holder, jdouble dv)
static bool setIntValue (JNIEnv *env, jobject jint_holder, jint iv)
static bool setLongValue (JNIEnv *env, jobject jlong_holder, jlong lv)
static bool setPointerValue (JNIEnv *env, jobject jpointer_holder, pointer pv)
static bool setStringValue (JNIEnv *env, jobject jstring_holder, jstring sv)

Variables

static jclass c_class
static jmethodID c_getName
const char * default_args []
static PL_engine_t * engines = NULL
static int engines_allocated = 0
static pthread_cond_t engines_cond = PTHREAD_COND_INITIALIZER
static pthread_mutex_t engines_mutex = PTHREAD_MUTEX_INITIALIZER
static int hr_add_count = 0
static int hr_del_count = 0
static int hr_old_count = 0
static HrTablehr_table = NULL
static jclass jAtomT_c
static jclass jBooleanHolder_c
static jfieldID jBooleanHolderValue_f
static jclass jDoubleHolder_c
static jfieldID jDoubleHolderValue_f
static jclass jEngineT_c
static jclass jFidT_c
static jclass jFunctorT_c
static jclass jInt64Holder_c
static jfieldID jInt64HolderValue_f
static jclass jIntHolder_c
static jfieldID jIntHolderValue_f
static jclass jJPLException_c
static jclass jLongHolder_c
static jfieldID jLongHolderValue_f
static jclass jModuleT_c
static atom_t JNI_atom_boolean
static atom_t JNI_atom_byte
static atom_t JNI_atom_char
static atom_t JNI_atom_double
static atom_t JNI_atom_false
static atom_t JNI_atom_float
static atom_t JNI_atom_int
static atom_t JNI_atom_long
static atom_t JNI_atom_null
static atom_t JNI_atom_short
static atom_t JNI_atom_true
static atom_t JNI_atom_void
static functor_t JNI_functor_at_1
static functor_t JNI_functor_error_2
static functor_t JNI_functor_java_exception_1
static functor_t JNI_functor_jbuf_2
static functor_t JNI_functor_jfieldID_1
static functor_t JNI_functor_jlong_2
static functor_t JNI_functor_jmethodID_1
static functor_t JNI_functor_jpl_error_1
static jclass jObjectHolder_c
static jfieldID jObjectHolderValue_f
static int jpl_status = JPL_INIT_RAW
static jclass jPointerHolder_c
static jfieldID jPointerHolderValue_f
static jclass jPredicateT_c
static jclass jQidT_c
static jclass jString_c
static jclass jStringHolder_c
static jfieldID jStringHolderValue_f
static jclass jTermT_c
static JavaVM * jvm = NULL
static char ** jvm_aia = NULL
static char ** jvm_dia = jvm_ia
static char * jvm_ia [2] = {"-Xrs", NULL}
static pthread_mutex_t jvm_init_mutex = PTHREAD_MUTEX_INITIALIZER
static PL_extension predspecs []
static jobject pvm_aia = NULL
static jobject pvm_dia = NULL
static pthread_mutex_t pvm_init_mutex = PTHREAD_MUTEX_INITIALIZER
int size [16]
static jclass str_class
static jclass sys_class
static jmethodID sys_ihc
static jclass term_class
static jmethodID term_getTerm
static jmethodID term_put
static jmethodID term_putTerm
static jclass termt_class

Define Documentation

#define DEBUG ( n,
 )     ( n >= DEBUG_LEVEL ? g : (void)0 )

Definition at line 55 of file jpl.c.

#define DEBUG_LEVEL   3

Definition at line 54 of file jpl.c.

#define IREF_FMT   "J#%020lu"

Definition at line 755 of file jpl.c.

#define IREF_INTTYPE   unsigned long

Definition at line 756 of file jpl.c.

#define JNI_charP_to_term ( J,
 )     PL_unify_atom_chars((T),(J))

Definition at line 427 of file jpl.c.

 
#define jni_ensure_jvm (  ) 
Value:
( ( jvm != NULL \
                                  ||  jni_create_default_jvm() \
                                  ) \
                                  && (env=jni_env()) != NULL \
                                )

Definition at line 433 of file jpl.c.

#define JNI_HR_ADD_FAIL   -1

Definition at line 131 of file jpl.c.

#define JNI_HR_ADD_NEW   0

Definition at line 132 of file jpl.c.

#define JNI_HR_ADD_OLD   1

Definition at line 133 of file jpl.c.

#define JNI_HR_LOAD_FACTOR   0.75

Definition at line 128 of file jpl.c.

#define JNI_jboolean_to_term ( J,
 ) 
Value:
( (J)==0 \
    ? JNI_unify_false((T)) \
    : JNI_unify_true((T)) \
    )

Definition at line 354 of file jpl.c.

#define JNI_jbuf_to_term ( J,
T,
TP   ) 
Value:
PL_unify_term((T), \
      PL_FUNCTOR, JNI_functor_jbuf_2, \
      PL_POINTER, (void*)(J), \
      PL_ATOM,    (TP) \
    )

Definition at line 417 of file jpl.c.

#define JNI_jbyte_to_term ( J,
 )     PL_unify_integer((T),(int)(J))

Definition at line 363 of file jpl.c.

#define JNI_jchar_to_term ( J,
 )     PL_unify_integer((T),(int)(J))

Definition at line 360 of file jpl.c.

#define JNI_jdouble_to_term ( J,
 )     PL_unify_float((T),(double)(J))

Definition at line 378 of file jpl.c.

#define JNI_jfieldID_to_term ( J,
 ) 
Value:
PL_unify_term((T), \
      PL_FUNCTOR, JNI_functor_jfieldID_1, \
      PL_POINTER, (void*)(J) \
    )

Definition at line 405 of file jpl.c.

#define JNI_jfloat_to_term ( J,
 )     PL_unify_float((T),(double)(J))

Definition at line 375 of file jpl.c.

#define JNI_jint_to_term ( J,
 )     PL_unify_integer((T),(int)(J))

Definition at line 369 of file jpl.c.

#define JNI_jlong_to_term ( J,
 )     PL_unify_int64((T),(int64_t)(J))

Definition at line 372 of file jpl.c.

#define JNI_jmethodID_to_term ( J,
 ) 
Value:
PL_unify_term((T), \
      PL_FUNCTOR, JNI_functor_jmethodID_1, \
      PL_POINTER, (void*)(J) \
    )

Definition at line 411 of file jpl.c.

#define JNI_jobject_to_term ( J,
 ) 
Value:
( ( j=(J), j==NULL ) \
    ? PL_unify_term((T), \
        PL_FUNCTOR, JNI_functor_at_1, \
        PL_ATOM, JNI_atom_null \
      ) \
    : ( (*env)->IsInstanceOf(env,j,str_class) \
          ? jni_String_to_atom(env,j,&a) \
        && PL_unify_term((T), \
             PL_ATOM, a \
           ) \
      : jni_object_to_iref(env,j,&i) \
        && jni_iref_to_tag(i,&a) \
        && PL_unify_term((T), \
             PL_FUNCTOR, JNI_functor_at_1, \
             PL_ATOM, a \
           ) \
      ) \
    )

Definition at line 385 of file jpl.c.

#define JNI_jshort_to_term ( J,
 )     PL_unify_integer((T),(int)(J))

Definition at line 366 of file jpl.c.

#define JNI_MAX_JBYTE   127

Definition at line 102 of file jpl.c.

#define JNI_MAX_JCHAR   65535

Definition at line 99 of file jpl.c.

#define JNI_MAX_JSHORT   32767

Definition at line 105 of file jpl.c.

#define JNI_MIN_JBYTE   -128

Definition at line 101 of file jpl.c.

#define JNI_MIN_JCHAR   0

Definition at line 98 of file jpl.c.

#define JNI_MIN_JSHORT   -32768

Definition at line 104 of file jpl.c.

#define JNI_pointer_to_term ( J,
 )     PL_unify_pointer((T),(void*)(J))

Definition at line 424 of file jpl.c.

#define JNI_term_to_boolean_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 297 of file jpl.c.

#define JNI_term_to_byte_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 299 of file jpl.c.

#define JNI_term_to_char_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 301 of file jpl.c.

#define JNI_term_to_charP ( T,
 )     PL_get_atom_chars((T),&(J))

Definition at line 327 of file jpl.c.

#define JNI_term_to_double_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 311 of file jpl.c.

#define JNI_term_to_float_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 309 of file jpl.c.

#define JNI_term_to_int_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 305 of file jpl.c.

#define JNI_term_to_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 293 of file jpl.c.

#define JNI_term_to_jboolean ( T,
JB   ) 
Value:
( PL_get_functor((T),&fn) \
      && fn==JNI_functor_at_1 \
    ? ( ( a1=PL_new_term_ref(), \
          PL_get_arg(1,(T),a1) \
        ) \
        && PL_get_atom(a1,&a) \
      ? ( a==JNI_atom_false \
        ? ( (JB)=0, TRUE) \
        : ( a==JNI_atom_true \
          ? ( (JB)=1, TRUE) \
          : FALSE \
          ) \
        ) \
      : FALSE \
      ) \
    : FALSE \
    )

Definition at line 156 of file jpl.c.

#define JNI_term_to_jbuf ( T,
J,
TP   ) 
Value:
( PL_get_functor((T),&fn) \
      && fn==JNI_functor_jbuf_2 \
      && ( a2=PL_new_term_ref(), \
           PL_get_arg(2,(T),a2) \
         ) \
      && PL_get_atom(a2,&a) \
      && a==(TP) \
      && ( a1=PL_new_term_ref(), \
           PL_get_arg(1,(T),a1) \
         ) \
      && PL_get_pointer(a1,(void**)&(J)) \
    )

Definition at line 313 of file jpl.c.

#define JNI_term_to_jbyte ( T,
 ) 
Value:
( PL_get_integer((T),&i) \
          && i >= JNI_MIN_JBYTE \
          && i <= JNI_MAX_JBYTE \
          && ( (J)=(jbyte)i, TRUE) \
    )

Definition at line 182 of file jpl.c.

#define JNI_term_to_jchar ( T,
 ) 
Value:
( PL_get_integer((T),&i) \
          && i >= JNI_MIN_JCHAR \
          && i <= JNI_MAX_JCHAR \
          && ( (J)=(jchar)i, TRUE) \
    )

Definition at line 175 of file jpl.c.

#define JNI_term_to_jclass ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 283 of file jpl.c.

#define JNI_term_to_jdouble ( T,
 ) 
Value:
( PL_get_float((T),&(J)) \
    ? TRUE \
        : ( PL_get_int64((T),&i64) \
            && ( (J)=(jdouble)i64, TRUE) \
      ) \
    )

Definition at line 222 of file jpl.c.

#define JNI_term_to_jfieldID ( T,
 ) 
Value:
( PL_get_functor((T),&fn) \
      && fn==JNI_functor_jfieldID_1 \
      && ( a1=PL_new_term_ref(), \
           PL_get_arg(1,(T),a1) \
         ) \
      && PL_get_pointer(a1,(void**)&(J)) \
    )

Definition at line 230 of file jpl.c.

#define JNI_term_to_jfloat ( T,
 ) 
Value:
( PL_get_float((T),&d) \
        ? ( (J)=(jfloat)d, TRUE) \
        : ( PL_get_int64((T),&i64) \
            && ( (J)=(jfloat)i64, TRUE) \
      ) \
    )

Definition at line 214 of file jpl.c.

#define JNI_term_to_jint ( T,
 ) 
Value:
( PL_get_integer((T),&i) \
      && ((J)=i, TRUE) \
    )

Definition at line 198 of file jpl.c.

#define JNI_term_to_jlong ( T,
 ) 
Value:
( PL_get_int64((T),&i64) \
          && ( (J)=(jlong)i64, TRUE) \
    )

Definition at line 209 of file jpl.c.

#define JNI_term_to_jmethodID ( T,
 ) 
Value:
( PL_get_functor((T),&fn) \
      && fn==JNI_functor_jmethodID_1 \
      && ( a1=PL_new_term_ref(), \
           PL_get_arg(1,(T),a1) \
         ) \
      && PL_get_pointer(a1,(void**)&(J)) \
    )

Definition at line 239 of file jpl.c.

#define JNI_term_to_jobject ( T,
 ) 
Value:
(  JNI_term_to_ref(T,J) \
        && (J) != 0 \
    )

Definition at line 275 of file jpl.c.

#define JNI_term_to_jshort ( T,
 ) 
Value:
( PL_get_integer((T),&i) \
          && i >= JNI_MIN_JSHORT \
          && i <= JNI_MAX_JSHORT \
          && ( (J)=(jshort)i, TRUE) \
    )

Definition at line 189 of file jpl.c.

#define JNI_term_to_jstring ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 291 of file jpl.c.

#define JNI_term_to_long_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 307 of file jpl.c.

#define JNI_term_to_non_array_jclass ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 287 of file jpl.c.

#define JNI_term_to_non_neg_jint ( T,
 ) 
Value:
( PL_get_int64((T),&i) \
          && i >= 0 \
          && ( (J)=(jint)i, TRUE) \
    )

Definition at line 203 of file jpl.c.

#define JNI_term_to_object_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 295 of file jpl.c.

#define JNI_term_to_pointer ( T,
 )     PL_get_pointer((T),(void**)&(J))

Definition at line 330 of file jpl.c.

#define JNI_term_to_ref ( T,
 ) 
Value:
( PL_get_atom((T),&a) \
        ? jni_atom_to_String(env,a,(jobject*)&(J)) \
    : PL_get_functor((T),&fn) \
      && fn==JNI_functor_at_1 \
      && ( a1=PL_new_term_ref(), \
           PL_get_arg(1,(T),a1) \
         ) \
      && PL_get_atom(a1,&a) \
      && ( a==JNI_atom_null \
         ? ( (J)=0, TRUE) \
         : jni_tag_to_iref(a,(pointer*)&(J)) \
         ) \
    )

Definition at line 254 of file jpl.c.

#define JNI_term_to_short_jarray ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 303 of file jpl.c.

#define JNI_term_to_throwable_jclass ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 285 of file jpl.c.

#define JNI_term_to_throwable_jobject ( T,
 )     JNI_term_to_jobject(T,J)

Definition at line 289 of file jpl.c.

#define JNI_unify_false (  ) 
Value:
PL_unify_term((T), \
      PL_FUNCTOR, JNI_functor_at_1, \
      PL_ATOM,    JNI_atom_false \
    )

Definition at line 342 of file jpl.c.

#define JNI_unify_true (  ) 
Value:
PL_unify_term((T), \
      PL_FUNCTOR, JNI_functor_at_1, \
      PL_ATOM,    JNI_atom_true \
    )

Definition at line 348 of file jpl.c.

#define JNI_unify_void (  ) 
Value:
PL_unify_term((T), \
      PL_FUNCTOR, JNI_functor_at_1, \
      PL_ATOM,    JNI_atom_void \
    )

Definition at line 336 of file jpl.c.

#define JNI_XPUT_ATOM   13

Definition at line 121 of file jpl.c.

#define JNI_XPUT_BOOLEAN   1

Definition at line 109 of file jpl.c.

#define JNI_XPUT_BYTE   2

Definition at line 110 of file jpl.c.

#define JNI_XPUT_CHAR   3

Definition at line 111 of file jpl.c.

#define JNI_XPUT_DOUBLE   8

Definition at line 116 of file jpl.c.

#define JNI_XPUT_FLOAT   7

Definition at line 115 of file jpl.c.

#define JNI_XPUT_FLOAT_TO_DOUBLE   9

Definition at line 117 of file jpl.c.

#define JNI_XPUT_INT   5

Definition at line 113 of file jpl.c.

#define JNI_XPUT_JVALUE   15

Definition at line 123 of file jpl.c.

#define JNI_XPUT_JVALUEP   14

Definition at line 122 of file jpl.c.

#define JNI_XPUT_LONG   6

Definition at line 114 of file jpl.c.

#define JNI_XPUT_LONG_TO_DOUBLE   11

Definition at line 119 of file jpl.c.

#define JNI_XPUT_LONG_TO_FLOAT   10

Definition at line 118 of file jpl.c.

#define JNI_XPUT_REF   12

Definition at line 120 of file jpl.c.

#define JNI_XPUT_SHORT   4

Definition at line 112 of file jpl.c.

#define JNI_XPUT_VOID   0

Definition at line 108 of file jpl.c.

#define JPL_C_LIB_VERSION   "3.1.4-alpha"

Definition at line 47 of file jpl.c.

#define JPL_C_LIB_VERSION_MAJOR   3

Definition at line 48 of file jpl.c.

#define JPL_C_LIB_VERSION_MINOR   1

Definition at line 49 of file jpl.c.

#define JPL_C_LIB_VERSION_PATCH   4

Definition at line 50 of file jpl.c.

#define JPL_C_LIB_VERSION_STATUS   "alpha"

Definition at line 51 of file jpl.c.

#define JPL_CACHE_TYPE_OF_REF   FALSE

Definition at line 58 of file jpl.c.

#define jpl_ensure_jpl_init (  ) 
Value:

Definition at line 445 of file jpl.c.

#define jpl_ensure_pvm_init (  ) 
Value:

Definition at line 452 of file jpl.c.

#define JPL_INIT_JPL_FAILED   104

Definition at line 142 of file jpl.c.

#define JPL_INIT_OK   103

Definition at line 141 of file jpl.c.

#define JPL_INIT_PVM_FAILED   105

Definition at line 143 of file jpl.c.

#define JPL_INIT_PVM_MAYBE   102

Definition at line 140 of file jpl.c.

#define JPL_INIT_RAW   101

Definition at line 139 of file jpl.c.

#define JPL_INITIAL_POOL_ENGINES   1

Definition at line 146 of file jpl.c.

#define JPL_MAX_POOL_ENGINES   10

Definition at line 145 of file jpl.c.

#define MAX_JVM_OPTIONS   100

Definition at line 1808 of file jpl.c.


Typedef Documentation

typedef int bool

Definition at line 477 of file jpl.c.

typedef struct Hr_Entry HrEntry

Definition at line 459 of file jpl.c.

typedef struct Hr_Table HrTable

Definition at line 467 of file jpl.c.

typedef intptr_t pointer

Definition at line 476 of file jpl.c.


Function Documentation

static int create_pool_engines (  )  [static]

Definition at line 5206 of file jpl.c.

static int current_pool_engine (  )  [static]

Definition at line 5342 of file jpl.c.

static int current_pool_engine_handle ( PL_engine_t *  e  )  [static]

Definition at line 5330 of file jpl.c.

static bool getLongValue ( JNIEnv *  env,
jobject  jlong_holder,
long *  lv 
) [static]

Definition at line 3824 of file jpl.c.

static bool getPointerValue ( JNIEnv *  env,
jobject  jpointer_holder,
pointer pv 
) [static]

Definition at line 3855 of file jpl.c.

install_t install (  ) 

Definition at line 5646 of file jpl.c.

JNIEXPORT int JNICALL Java_jpl_fli_Prolog_action_1abort ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 4139 of file jpl.c.

JNIEXPORT jstring JNICALL Java_jpl_fli_Prolog_atom_1chars ( JNIEnv *  env,
jclass  jProlog,
jobject  jatom 
)

Definition at line 4162 of file jpl.c.

JNIEXPORT int JNICALL Java_jpl_fli_Prolog_attach_1engine ( JNIEnv *  env,
jclass  jProlog,
jobject  jengine 
)

Definition at line 4187 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_attach_1pool_1engine ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 5242 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_close_1query ( JNIEnv *  env,
jclass  jProlog,
jobject  jqid 
)

Definition at line 4229 of file jpl.c.

JNIEXPORT jint JNICALL Java_jpl_fli_Prolog_compare ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm1,
jobject  jterm2 
)

Definition at line 4254 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_cons_1functor_1v ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jfunctor,
jobject  jterm0 
)

Definition at line 4286 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_copy_1term_1ref ( JNIEnv *  env,
jclass  jProlog,
jobject  jfrom 
)

Definition at line 4315 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_current_1engine ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 4344 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_current_1engine_1is_1pool ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 4370 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_discard_1foreign_1frame ( JNIEnv *  env,
jclass  jProlog,
jobject  jfid 
)

Definition at line 5163 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_exception ( JNIEnv *  env,
jclass  jProlog,
jobject  jqid 
)

Definition at line 4393 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_get_1actual_1init_1args ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 3725 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1arg ( JNIEnv *  env,
jclass  jProlog,
jint  jindex,
jobject  jterm,
jobject  jarg 
)

Definition at line 4432 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1atom_1chars ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jstring_holder 
)

Definition at line 4459 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_get_1c_1lib_1version ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 4486 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_get_1default_1init_1args ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 3639 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1float ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jdouble_holder 
)

Definition at line 4502 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1integer ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jint64_holder 
)

Definition at line 4527 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1name_1arity ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jname_holder,
jobject  jarity_holder 
)

Definition at line 4552 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_get_1string_1chars ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jstring_holder 
)

Definition at line 4583 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_halt ( JNIEnv *  env,
jclass  jProlog,
jint  jstatus 
)

Definition at line 3799 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_initialise ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 3761 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_is_1tag ( JNIEnv *  env,
jclass  jProlog,
jstring  tag 
)

Definition at line 5038 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1atom ( JNIEnv *  env,
jclass  jProlog,
jstring  jname 
)

Definition at line 4608 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1functor ( JNIEnv *  env,
jclass  jProlog,
jobject  jatom,
jint  jarity 
)

Definition at line 4635 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1module ( JNIEnv *  env,
jclass  jProlog,
jobject  jatom 
)

Definition at line 4665 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1term_1ref ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 4693 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_new_1term_1refs ( JNIEnv *  env,
jclass  jProlog,
jint  jn 
)

Definition at line 4716 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_next_1solution ( JNIEnv *  env,
jclass  jProlog,
jobject  jqid 
)

Definition at line 4746 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_object_1to_1tag ( JNIEnv *  env,
jclass  jProlog,
jobject  jobj 
)

Definition at line 4775 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_open_1foreign_1frame ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 5136 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_open_1query ( JNIEnv *  env,
jclass  jProlog,
jobject  jmodule,
jint  jflags,
jobject  jpredicate,
jobject  jterm0 
)

Definition at line 4818 of file jpl.c.

JNIEXPORT int JNICALL Java_jpl_fli_Prolog_pool_1engine_1id ( JNIEnv *  env,
jclass  jProlog,
jobject  jengine 
)

Definition at line 5357 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_predicate ( JNIEnv *  env,
jclass  jProlog,
jstring  jname,
jint  jarity,
jstring  jmodule 
)

Definition at line 4864 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1float ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jdouble  jf 
)

Definition at line 4909 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1integer ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jlong  ji 
)

Definition at line 4933 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1jref ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm,
jobject  jref 
)

Definition at line 4984 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1term ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm1,
jobject  jterm2 
)

Definition at line 4957 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_put_1variable ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm 
)

Definition at line 5064 of file jpl.c.

JNIEXPORT int JNICALL Java_jpl_fli_Prolog_release_1pool_1engine ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 5383 of file jpl.c.

JNIEXPORT jboolean JNICALL Java_jpl_fli_Prolog_set_1default_1init_1args ( JNIEnv *  env,
jclass  jProlog,
jobject  jargs 
)

Definition at line 3676 of file jpl.c.

JNIEXPORT jobject JNICALL Java_jpl_fli_Prolog_tag_1to_1object ( JNIEnv *  env,
jclass  jProlog,
jstring  tag 
)

Definition at line 5013 of file jpl.c.

JNIEXPORT jint JNICALL Java_jpl_fli_Prolog_term_1type ( JNIEnv *  env,
jclass  jProlog,
jobject  jterm 
)

Definition at line 5087 of file jpl.c.

JNIEXPORT jint JNICALL Java_jpl_fli_Prolog_thread_1self ( JNIEnv *  env,
jclass  jProlog 
)

Definition at line 5188 of file jpl.c.

JNIEXPORT void JNICALL Java_jpl_fli_Prolog_unregister_1atom ( JNIEnv *  env,
jclass  jProlog,
jobject  jatom 
)

Definition at line 5110 of file jpl.c.

static foreign_t jni_alloc_buffer_plc ( term_t  txc,
term_t  tlen,
term_t  tbp 
) [static]

Definition at line 1651 of file jpl.c.

static bool jni_atom_freed ( atom_t  a  )  [static]

Definition at line 1023 of file jpl.c.

static bool jni_atom_to_String ( JNIEnv *  env,
atom_t  a,
jobject *  s 
) [static]

Definition at line 901 of file jpl.c.

static foreign_t jni_byte_buf_length_to_codes_plc ( term_t  tbb,
term_t  tlen,
term_t  tcs 
) [static]

Definition at line 1538 of file jpl.c.

static bool jni_check_exception ( JNIEnv *  env  )  [static]

Definition at line 1473 of file jpl.c.

int jni_create_default_jvm (  ) 

Definition at line 1919 of file jpl.c.

static int jni_create_jvm ( char *  cp  )  [static]

Definition at line 1887 of file jpl.c.

static int jni_create_jvm_c ( char *  classpath  )  [static]

Definition at line 1811 of file jpl.c.

static foreign_t jni_ensure_jvm_plc (  )  [static]

Definition at line 1947 of file jpl.c.

JNIEnv* jni_env (  ) 

Definition at line 621 of file jpl.c.

static foreign_t jni_fetch_buffer_value_plc ( term_t  tbp,
term_t  ti,
term_t  tv,
term_t  txc 
) [static]

Definition at line 1687 of file jpl.c.

static foreign_t jni_free_buffer_plc ( term_t  tbp  )  [static]

Definition at line 1675 of file jpl.c.

static bool jni_free_iref ( JNIEnv *  env,
pointer  iref 
) [static]

Definition at line 835 of file jpl.c.

static foreign_t jni_func_0_plc ( term_t  tn,
term_t  tr 
) [static]

Definition at line 2521 of file jpl.c.

static foreign_t jni_func_1_plc ( term_t  tn,
term_t  ta1,
term_t  tr 
) [static]

Definition at line 2565 of file jpl.c.

static foreign_t jni_func_2_plc ( term_t  tn,
term_t  ta1,
term_t  ta2,
term_t  tr 
) [static]

Definition at line 2685 of file jpl.c.

static foreign_t jni_func_3_plc ( term_t  tn,
term_t  ta1,
term_t  ta2,
term_t  ta3,
term_t  tr 
) [static]

Definition at line 2910 of file jpl.c.

static foreign_t jni_func_4_plc ( term_t  tn,
term_t  ta1,
term_t  ta2,
term_t  ta3,
term_t  ta4,
term_t  tr 
) [static]

Definition at line 3116 of file jpl.c.

static foreign_t jni_get_actual_jvm_opts_plc ( term_t  args  )  [static]

Definition at line 5600 of file jpl.c.

static int jni_get_created_jvm_count (  )  [static]

Definition at line 1796 of file jpl.c.

static foreign_t jni_get_created_jvm_count_plc ( term_t  t1  )  [static]

Definition at line 1877 of file jpl.c.

static bool jni_get_default_jvm_opts_1 ( term_t  args,
int  i,
char **  jvm_xia 
) [static]

Definition at line 5483 of file jpl.c.

static foreign_t jni_get_default_jvm_opts_plc ( term_t  args  )  [static]

Definition at line 5590 of file jpl.c.

static foreign_t jni_get_jvm_opts ( term_t  args,
char **  jvm_xia 
) [static]

Definition at line 5508 of file jpl.c.

static int jni_hr_add ( JNIEnv *  env,
jobject  lref,
pointer iref 
) [static]

Definition at line 1270 of file jpl.c.

static bool jni_hr_create ( int  length  )  [static]

Definition at line 1121 of file jpl.c.

static bool jni_hr_create_default (  )  [static]

Definition at line 1156 of file jpl.c.

static bool jni_hr_del ( JNIEnv *  env,
pointer  iref 
) [static]

Definition at line 1328 of file jpl.c.

static void jni_hr_free_chain_entries ( HrEntry ep  )  [static]

Definition at line 1165 of file jpl.c.

static bool jni_hr_free_table ( HrTable t  )  [static]

Definition at line 1197 of file jpl.c.

static void jni_hr_free_table_chains ( HrTable t  )  [static]

Definition at line 1180 of file jpl.c.

static bool jni_hr_hash ( JNIEnv *  env,
jobject  obj,
int *  hash 
) [static]

Definition at line 1251 of file jpl.c.

static foreign_t jni_hr_info_plc ( term_t  t1,
term_t  t2,
term_t  t3,
term_t  t4 
) [static]

Definition at line 1057 of file jpl.c.

static bool jni_hr_rehash (  )  [static]

Definition at line 1217 of file jpl.c.

static foreign_t jni_hr_table_plc ( term_t  t  )  [static]

Definition at line 1100 of file jpl.c.

static bool jni_hr_table_slot ( term_t  t2,
HrEntry slot 
) [static]

Definition at line 1073 of file jpl.c.

static int jni_init (  )  [static]

Definition at line 1362 of file jpl.c.

static bool jni_iref_to_tag ( pointer  iref,
atom_t *  a 
) [static]

Definition at line 765 of file jpl.c.

static bool jni_jobject_to_term_byval ( JNIEnv *  env,
jobject  jobj,
term_t  term 
) [static]

Definition at line 5435 of file jpl.c.

static foreign_t jni_jref_to_term_plc ( term_t  jref,
term_t  termIn 
) [static]

Definition at line 5455 of file jpl.c.

static term_t jni_new_java_exception ( atom_t  tag,
atom_t  msg 
) [static]

Definition at line 1435 of file jpl.c.

static term_t jni_new_jpl_error ( atom_t  tag,
atom_t  msg 
) [static]

Definition at line 1454 of file jpl.c.

static bool jni_object_to_iref ( JNIEnv *  env,
jobject  obj,
pointer iref 
) [static]

Definition at line 780 of file jpl.c.

static foreign_t jni_param_put_plc ( term_t  tn,
term_t  txc,
term_t  tt,
term_t  tjvp 
) [static]

Definition at line 1588 of file jpl.c.

static foreign_t jni_set_default_jvm_opts_plc ( term_t  tn,
term_t  args 
) [static]

Definition at line 5526 of file jpl.c.

static foreign_t jni_stash_buffer_value_plc ( term_t  tbp,
term_t  ti,
term_t  tv,
term_t  txc 
) [static]

Definition at line 1736 of file jpl.c.

static bool jni_String_to_atom ( JNIEnv *  env,
jobject  s,
atom_t *  a 
) [static]

Definition at line 860 of file jpl.c.

static bool jni_string_to_String ( JNIEnv *  env,
term_t  t,
jobject *  s 
) [static]

Definition at line 952 of file jpl.c.

static bool jni_tag_to_iref ( atom_t  a,
pointer iref 
) [static]

Definition at line 744 of file jpl.c.

static bool jni_tag_to_iref1 ( const char *  s,
pointer iref 
) [static]

Definition at line 725 of file jpl.c.

static bool jni_tag_to_iref2 ( const char *  s,
pointer iref 
) [static]

Definition at line 687 of file jpl.c.

static foreign_t jni_tag_to_iref_plc ( term_t  tt,
term_t  ti 
) [static]

Definition at line 1005 of file jpl.c.

static foreign_t jni_term_to_jref_plc ( term_t  tref1,
term_t  tref2 
) [static]

Definition at line 5413 of file jpl.c.

static bool jni_tidy_iref_type_cache ( pointer  iref  )  [static]

Definition at line 808 of file jpl.c.

static foreign_t jni_void_0_plc ( term_t  tn  )  [static]

Definition at line 1959 of file jpl.c.

static foreign_t jni_void_1_plc ( term_t  tn,
term_t  ta1 
) [static]

Definition at line 1989 of file jpl.c.

static foreign_t jni_void_2_plc ( term_t  tn,
term_t  ta1,
term_t  ta2 
) [static]

Definition at line 2036 of file jpl.c.

static foreign_t jni_void_3_plc ( term_t  tn,
term_t  ta1,
term_t  ta2,
term_t  ta3 
) [static]

Definition at line 2095 of file jpl.c.

static foreign_t jni_void_4_plc ( term_t  tn,
term_t  ta1,
term_t  ta2,
term_t  ta3,
term_t  ta4 
) [static]

Definition at line 2335 of file jpl.c.

static char* jpl_c_lib_version (  )  [static]

Definition at line 637 of file jpl.c.

static foreign_t jpl_c_lib_version_1_plc ( term_t  ta  )  [static]

Definition at line 653 of file jpl.c.

static foreign_t jpl_c_lib_version_4_plc ( term_t  tmajor,
term_t  tminor,
term_t  tpatch,
term_t  tstatus 
) [static]

Definition at line 663 of file jpl.c.

static bool jpl_do_jpl_init ( JNIEnv *  env  )  [static]

Definition at line 3274 of file jpl.c.

static bool jpl_do_pvm_init ( JNIEnv *  env  )  [static]

Definition at line 3536 of file jpl.c.

static bool jpl_ensure_jpl_init_1 ( JNIEnv *  env  )  [static]

Definition at line 3599 of file jpl.c.

static bool jpl_ensure_pvm_init_1 ( JNIEnv *  env  )  [static]

Definition at line 3613 of file jpl.c.

static int jpl_num_initial_default_args (  )  [static]

Definition at line 3259 of file jpl.c.

static bool jpl_post_pvm_init ( JNIEnv *  env,
int  argc,
char **  argv 
) [static]

Definition at line 3421 of file jpl.c.

static bool jpl_test_pvm_init ( JNIEnv *  env  )  [static]

Definition at line 3477 of file jpl.c.

static int pool_engine_id ( PL_engine_t  e  )  [static]

Definition at line 5309 of file jpl.c.

static bool setDoubleValue ( JNIEnv *  env,
jobject  jdouble_holder,
jdouble  dv 
) [static]

Definition at line 3992 of file jpl.c.

static bool setIntValue ( JNIEnv *  env,
jobject  jint_holder,
jint  iv 
) [static]

Definition at line 3912 of file jpl.c.

static bool setLongValue ( JNIEnv *  env,
jobject  jlong_holder,
jlong  lv 
) [static]

Definition at line 3966 of file jpl.c.

static bool setPointerValue ( JNIEnv *  env,
jobject  jpointer_holder,
pointer  pv 
) [static]

Definition at line 3886 of file jpl.c.

static bool setStringValue ( JNIEnv *  env,
jobject  jstring_holder,
jstring  sv 
) [static]

Definition at line 4018 of file jpl.c.


Variable Documentation

jclass c_class [static]

Definition at line 531 of file jpl.c.

jmethodID c_getName [static]

Definition at line 532 of file jpl.c.

const char* default_args[]
Initial value:
 { "pl",
                                "-g", "true",
                                "-nosignals",
                                NULL
                            }

Definition at line 581 of file jpl.c.

PL_engine_t* engines = NULL [static]

Definition at line 609 of file jpl.c.

int engines_allocated = 0 [static]

Definition at line 610 of file jpl.c.

pthread_cond_t engines_cond = PTHREAD_COND_INITIALIZER [static]

Definition at line 612 of file jpl.c.

pthread_mutex_t engines_mutex = PTHREAD_MUTEX_INITIALIZER [static]

Definition at line 611 of file jpl.c.

int hr_add_count = 0 [static]

Definition at line 599 of file jpl.c.

int hr_del_count = 0 [static]

Definition at line 601 of file jpl.c.

int hr_old_count = 0 [static]

Definition at line 600 of file jpl.c.

HrTable* hr_table = NULL [static]

Definition at line 598 of file jpl.c.

jclass jAtomT_c [static]

Definition at line 549 of file jpl.c.

jclass jBooleanHolder_c [static]

Definition at line 564 of file jpl.c.

jfieldID jBooleanHolderValue_f [static]

Definition at line 576 of file jpl.c.

jclass jDoubleHolder_c [static]

Definition at line 561 of file jpl.c.

jfieldID jDoubleHolderValue_f [static]

Definition at line 573 of file jpl.c.

jclass jEngineT_c [static]

Definition at line 555 of file jpl.c.

jclass jFidT_c [static]

Definition at line 551 of file jpl.c.

jclass jFunctorT_c [static]

Definition at line 550 of file jpl.c.

jclass jInt64Holder_c [static]

Definition at line 560 of file jpl.c.

jfieldID jInt64HolderValue_f [static]

Definition at line 572 of file jpl.c.

jclass jIntHolder_c [static]

Definition at line 559 of file jpl.c.

jfieldID jIntHolderValue_f [static]

Definition at line 571 of file jpl.c.

jclass jJPLException_c [static]

Definition at line 547 of file jpl.c.

jclass jLongHolder_c [static]

Definition at line 557 of file jpl.c.

jfieldID jLongHolderValue_f [static]

Definition at line 569 of file jpl.c.

jclass jModuleT_c [static]

Definition at line 554 of file jpl.c.

atom_t JNI_atom_boolean [static]

Definition at line 507 of file jpl.c.

atom_t JNI_atom_byte [static]

Definition at line 509 of file jpl.c.

atom_t JNI_atom_char [static]

Definition at line 508 of file jpl.c.

atom_t JNI_atom_double [static]

Definition at line 514 of file jpl.c.

atom_t JNI_atom_false [static]

Definition at line 504 of file jpl.c.

atom_t JNI_atom_float [static]

Definition at line 513 of file jpl.c.

atom_t JNI_atom_int [static]

Definition at line 511 of file jpl.c.

atom_t JNI_atom_long [static]

Definition at line 512 of file jpl.c.

atom_t JNI_atom_null [static]

Definition at line 516 of file jpl.c.

atom_t JNI_atom_short [static]

Definition at line 510 of file jpl.c.

atom_t JNI_atom_true [static]

Definition at line 505 of file jpl.c.

atom_t JNI_atom_void [static]

Definition at line 517 of file jpl.c.

functor_t JNI_functor_at_1 [static]

Definition at line 519 of file jpl.c.

functor_t JNI_functor_error_2 [static]

Definition at line 524 of file jpl.c.

functor_t JNI_functor_java_exception_1 [static]

Definition at line 525 of file jpl.c.

functor_t JNI_functor_jbuf_2 [static]

Definition at line 520 of file jpl.c.

functor_t JNI_functor_jfieldID_1 [static]

Definition at line 522 of file jpl.c.

functor_t JNI_functor_jlong_2 [static]

Definition at line 521 of file jpl.c.

functor_t JNI_functor_jmethodID_1 [static]

Definition at line 523 of file jpl.c.

functor_t JNI_functor_jpl_error_1 [static]

Definition at line 526 of file jpl.c.

jclass jObjectHolder_c [static]

Definition at line 563 of file jpl.c.

jfieldID jObjectHolderValue_f [static]

Definition at line 575 of file jpl.c.

int jpl_status = JPL_INIT_RAW [static]

Definition at line 606 of file jpl.c.

jclass jPointerHolder_c [static]

Definition at line 558 of file jpl.c.

jfieldID jPointerHolderValue_f [static]

Definition at line 570 of file jpl.c.

jclass jPredicateT_c [static]

Definition at line 552 of file jpl.c.

jclass jQidT_c [static]

Definition at line 553 of file jpl.c.

jclass jString_c [static]

Definition at line 546 of file jpl.c.

jclass jStringHolder_c [static]

Definition at line 562 of file jpl.c.

jfieldID jStringHolderValue_f [static]

Definition at line 574 of file jpl.c.

jclass jTermT_c [static]

Definition at line 548 of file jpl.c.

JavaVM* jvm = NULL [static]

Definition at line 590 of file jpl.c.

char** jvm_aia = NULL [static]

Definition at line 593 of file jpl.c.

char** jvm_dia = jvm_ia [static]

Definition at line 592 of file jpl.c.

char* jvm_ia[2] = {"-Xrs", NULL} [static]

Definition at line 591 of file jpl.c.

pthread_mutex_t jvm_init_mutex = PTHREAD_MUTEX_INITIALIZER [static]

Definition at line 614 of file jpl.c.

PL_extension predspecs[] [static]

Definition at line 5612 of file jpl.c.

jobject pvm_aia = NULL [static]

Definition at line 608 of file jpl.c.

jobject pvm_dia = NULL [static]

Definition at line 607 of file jpl.c.

pthread_mutex_t pvm_init_mutex = PTHREAD_MUTEX_INITIALIZER [static]

Definition at line 615 of file jpl.c.

int size[16]
Initial value:
 {      
            0,
            sizeof(jboolean),   
            sizeof(jbyte),      
            sizeof(jchar),      
            sizeof(jshort),     
            sizeof(jint),       
            sizeof(jlong),      
            sizeof(jfloat),     
            sizeof(jdouble),    
            0,                  
            0,                  
            0,                  
            0,                  
            0,                  
            0,                  
            sizeof(jvalue)      
            }

Definition at line 482 of file jpl.c.

jclass str_class [static]

Definition at line 533 of file jpl.c.

jclass sys_class [static]

Definition at line 537 of file jpl.c.

jmethodID sys_ihc [static]

Definition at line 538 of file jpl.c.

jclass term_class [static]

Definition at line 534 of file jpl.c.

jmethodID term_getTerm [static]

Definition at line 539 of file jpl.c.

jmethodID term_put [static]

Definition at line 540 of file jpl.c.

jmethodID term_putTerm [static]

Definition at line 541 of file jpl.c.

jclass termt_class [static]

Definition at line 535 of file jpl.c.

 All Classes Namespaces Files Functions Variables Typedefs Defines


jpl
Author(s): Lorenz Moesenlechner
autogenerated on Fri Jan 11 09:40:29 2013