emudef.h File Reference

#include "debugs/debug_attv.h"

Defines

#define nunify_with_nil(op)
#define nunify_with_con(OP1, OP2)
#define nunify_with_num(OP1, OP2)
#define nunify_with_float(OP1, OP2)
#define nunify_with_float_get(OP1, OP2)
#define nunify_with_str(OP1, OP2)
#define nunify_with_list_sym(OP1)
#define nunify_with_attv(OP1)
#define call_sub(PSC)
#define proceed_sub

Variables

Cell reg [MAX_REGS]
CPtr ereg
CPtr breg
CPtr hreg
CPtrtrreg
CPtr hbreg
CPtr sreg
bytecpreg
bytepcreg
CPtr ebreg
CPtr efreg
CPtr bfreg
CPtr hfreg
CPtrtrfreg
CPtr pdlreg
CPtr openreg
CPtr root_address
CPtr ptcpreg = NULL
CPtr delayreg
VarStringtsgLBuff1
VarStringtsgLBuff2
VarStringtsgSBuff1
VarStringtsgSBuff2
Cell interrupt_counter
CPtr interrupt_reg = &interrupt_counter
byteinst_begin_gl
char * nil_string
char * true_string
Pair list_pscPair
Psc list_psc
Psc comma_psc
Psc true_psc
Psc if_psc
Psc colon_psc
Psc tnot_psc
Psc delay_psc
Psc box_psc
Psc ret_psc [MAX_ARITY]
char * list_dot_string
int asynint_code = 0
int asynint_val = 0
int next_free_code = 0
unsigned long enc [16]
unsigned long dec [8]

Define Documentation

#define call_sub PSC   ) 
 

#define nunify_with_attv OP1   ) 
 

Value:

{                                       \
  XSB_Deref(OP1);                                               \
  if (isref(OP1)) {                                             \
    bind_attv((CPtr)(OP1), hreg);                               \
    new_heap_free(hreg);        /* the VAR part of the attv */  \
  }                                                             \
  else {                                                        \
    xsb_dbgmsg((LOG_ATTV,">>>> nunify_with_attv, interrupt needed\n")); \
    /* add_interrupt(makeattv(hreg), OP1); */                   \
    *hreg = OP1; hreg++;                                        \
    add_interrupt(CTXTc (Integer)hreg, OP1);                    \
  }                                                             \
  flag = WRITE;                                                 \
}

#define nunify_with_con OP1,
OP2   ) 
 

Value:

XSB_Deref(OP1);                                                         \
  if (isref(OP1)) {                                                     \
    /* op1 is FREE */                                                   \
    bind_string((CPtr)(OP1), (char *)OP2);                              \
  }                                                                     \
  else if (isstring(OP1)) {                                             \
    if (string_val(OP1) == (char *)OP2) {XSB_Next_Instr();} else Fail1; \
  }                                                                     \
  else if (isattv(OP1)) {                                               \
    xsb_dbgmsg((LOG_ATTV,">>>> ATTV nunify_with_con, interrupt needed\n"));     \
    /* add_interrupt(OP1, makestring((char *)OP2)); */                  \
    add_interrupt(CTXTc cell(((CPtr)dec_addr(op1) + 1)),makestring((char *)OP2));       \
    bind_string((CPtr)dec_addr(op1),(char *)OP2);       \
  }                                                                     \
  else Fail1;

#define nunify_with_float OP1,
OP2   ) 
 

Value:

XSB_Deref(OP1);                                                         \
  if (isref(OP1)) {                                                     \
    /* op1 is FREE */                                                   \
    bind_float_tagged(vptr(OP1), makefloat(OP2));                       \
  }                                                                     \
  else if (isofloat(OP1)) {                                             \
    if ( (float)ofloat_val(OP1) == OP2) {                               \
      XSB_Next_Instr();                                                 \
    }                                                                   \
    else Fail1;                                                         \
  }                                                                     \
  else if (isattv(OP1)) {                                               \
    xsb_dbgmsg((LOG_ATTV,">>>> ATTV nunify_with_float, interrupt needed\n"));   \
    /* add_interrupt(OP1, OP2); */                                      \
    add_interrupt(CTXTc cell(((CPtr)dec_addr(op1) + 1)),makefloat(OP2)); \
    bind_float_tagged((CPtr)dec_addr(op1), makefloat(OP2));             \
  }                                                                     \
  else Fail1;

#define nunify_with_float_get OP1,
OP2   ) 
 

Value:

XSB_Deref(OP1);                                                         \
  if (isref(OP1)) {                                                     \
    /* op1 is FREE */                                                   \
      bind_boxedfloat(vptr(OP1), OP2);                                  \
  }                                                                     \
  else if (isofloat(OP1)) {                                             \
    if ( (float)ofloat_val(OP1) == OP2) {                               \
      XSB_Next_Instr();                                                 \
    }                                                                   \
    else Fail1;                                                         \
  }                                                                     \
  else if (isattv(OP1)) {                                               \
    xsb_dbgmsg((LOG_ATTV,">>>> ATTV nunify_with_float, interrupt needed\n"));   \
    /* add_interrupt(OP1, OP2); */                                      \
    add_interrupt(CTXTc cell(((CPtr)dec_addr(op1) + 1)),makefloat(OP2)); \
    bind_boxedfloat((CPtr)dec_addr(op1), OP2);                          \
  }                                                                     \
  else Fail1;

#define nunify_with_list_sym OP1   ) 
 

Value:

XSB_Deref(OP1);                                                 \
  if (isref(OP1)) {                                                     \
    /* op1 is FREE */                                                   \
    bind_list((CPtr)(OP1), hreg);                                       \
    flag = WRITE;                                                       \
  }                                                                     \
  else if (islist(OP1)) {                                               \
    sreg = clref_val(OP1);                                              \
    flag = READFLAG;                                                    \
  }                                                                     \
  else if (isattv(OP1)) {                                               \
    xsb_dbgmsg((LOG_ATTV,">>>> ATTV nunify_with_list_sym, interrupt needed\n"));        \
    /* add_interrupt(OP1, makelist(hreg)); */                           \
    add_interrupt(CTXTc cell(((CPtr)dec_addr(op1) + 1)),makelist(hreg));\
    bind_copy((CPtr)dec_addr(op1), makelist(hreg));                     \
    flag = WRITE;                                                       \
  }                                                                     \
  else Fail1;

#define nunify_with_nil op   ) 
 

Value:

XSB_Deref(op);                                                          \
  if (isref(op)) {                                                      \
    /* op is FREE */                                                    \
    bind_nil((CPtr)(op));                                               \
  }                                                                     \
  else if (isnil(op)) {XSB_Next_Instr();} /* op == [] */                \
  else if (isattv(op)) {                                                \
    xsb_dbgmsg((LOG_ATTV,">>>> ATTV nunify_with_nil, interrupt needed\n"));     \
    /* add_interrupt(op, makenil);      */                              \
    add_interrupt(CTXTc cell(((CPtr)dec_addr(op1) + 1)),makenil);               \
    bind_copy((CPtr)dec_addr(op1), makenil);                            \
  }                                                                     \
  else Fail1;

#define nunify_with_num OP1,
OP2   ) 
 

Value:

/* op1 is general, op2 has number (untagged) */                 \
  XSB_Deref(OP1);                                                       \
  if (isref(OP1)) {                                                     \
    /* op1 is FREE */                                                   \
    bind_oint((CPtr)(OP1), (Integer)OP2);                                       \
  }                                                                     \
  else if (isinteger(OP1)) {                                            \
    if (oint_val(OP1) == (Integer)OP2) {XSB_Next_Instr();} else Fail1;          \
  }                                                                     \
  else if (isattv(OP1)) {                                               \
    xsb_dbgmsg((LOG_ATTV,">>>> ATTV nunify_with_num, interrupt needed\n"));     \
    /* add_interrupt(OP1, OP2); */                                      \
    add_interrupt(CTXTc cell(((CPtr)dec_addr(op1) + 1)),makeint(OP2));  \
    bind_oint((CPtr)dec_addr(op1), (Integer)OP2);                               \
  }                                                                     \
  else Fail1;

#define nunify_with_str OP1,
OP2   ) 
 

#define proceed_sub
 


Variable Documentation

int asynint_code = 0
 

int asynint_val = 0
 

CPtr bfreg
 

Psc box_psc
 

CPtr breg
 

Psc colon_psc
 

Psc comma_psc
 

byte* cpreg
 

unsigned long dec[8]
 

Initial value:

 {0xffffffff,0xffffffff,0xffffffff,0xffffffff,
                        0xffffffff,0xffffffff,0xffffffff,0xffffffff}

Psc delay_psc
 

CPtr delayreg
 

CPtr ebreg
 

CPtr efreg
 

unsigned long enc[16]
 

Initial value:

 {0xffffffff,0xffffffff,0xffffffff,0xffffffff,
                         0xffffffff,0xffffffff,0xffffffff,0xffffffff,
                         0xffffffff,0xffffffff,0xffffffff,0xffffffff,
                         0xffffffff,0xffffffff,0xffffffff,0xffffffff}

CPtr ereg
 

CPtr hbreg
 

CPtr hfreg
 

CPtr hreg
 

Psc if_psc
 

byte* inst_begin_gl
 

Cell interrupt_counter
 

CPtr interrupt_reg = &interrupt_counter
 

char* list_dot_string
 

Psc list_psc
 

Pair list_pscPair
 

int next_free_code = 0
 

char* nil_string
 

CPtr openreg
 

byte* pcreg
 

CPtr pdlreg
 

CPtr ptcpreg = NULL
 

Cell reg[MAX_REGS]
 

Psc ret_psc[MAX_ARITY]
 

CPtr root_address
 

CPtr sreg
 

Psc tnot_psc
 

CPtr* trfreg
 

CPtr* trreg
 

Psc true_psc
 

char * true_string
 

VarString* tsgLBuff1
 

VarString* tsgLBuff2
 

VarString* tsgSBuff1
 

VarString* tsgSBuff2
 


Generated on Wed Jul 26 13:26:53 2006 for XSB by  doxygen 1.4.5