YAP 7.1.0
TermExt.h File Reference
#include "inline-only.h"
#include <stddef.h>
#include <string.h>

Go to the source code of this file.

Macros

#define SF_STORE   ((special_functors *)HEAP_INIT_BASE)
 
#define TermFoundVar   MkAtomTerm(AtomFoundVar)
 
#define TermFreeTerm   MkAtomTerm(AtomFreeTerm)
 
#define TermNil   MkAtomTerm(AtomNil)
 
#define TermDot   MkAtomTerm(AtomDot)
 
#define end_e   (8 * sizeof(Functor *))
 
#define FunctorDBRef   ((Functor)(db_ref_e))
 
#define FunctorDouble   ((Functor)(double_e))
 
#define FunctorLongInt   ((Functor)(long_int_e))
 
#define FunctorBigInt   ((Functor)(big_int_e))
 
#define FunctorString   ((Functor)(string_e))
 
#define FunctorBlob   ((Functor)(blob_e))
 
#define CloseExtension(x)   MkAtomTerm((Atom)(x))
 
#define GetStartOfExtension(x)   ((CELL*)AtomOfTerm(*x))
 
#define MkFloatTerm(fl)   __MkFloatTerm((fl)PASS_REGS)
 
#define InitUnalignedFloat()
 
#define MkLongIntTerm(i)   __MkLongIntTerm((i)PASS_REGS)
 
#define MkStringTerm(i)   __MkStringTerm((i)PASS_REGS)
 
#define MkUStringTerm(i)   __MkStringTerm((const char *)(i)PASS_REGS)
 

Typedefs

typedef UInt mp_limb_t
 

Enumerations

enum  blob_type {
  db_ref_e = sizeof(Functor *) , blob_e = 2 * sizeof(Functor *) , double_e = 3 * sizeof(Functor *) , long_int_e = 4 * sizeof(Functor *) ,
  big_int_e = 5 * sizeof(Functor *) , string_e = 6 * sizeof(Functor *)
}
 
enum  big_blob_type {
  BIG_INT = 0x01 , BIG_RATIONAL = 0x02 , BIG_FLOAT = 0x04 , EMPTY_ARENA = 0x10 ,
  ARRAY_INT = 0x21 , ARRAY_FLOAT = 0x22 , CLAUSE_LIST = 0x40 , EXTERNAL_BLOB = 0x0A0 ,
  GOAL_CUT_POINT = 0x0A1 , USER_BLOB_START = 0x0100 , USER_BLOB_END = 0x0200
}
 
enum  exts { empty_ext = 0 * sizeof(ext_op) , attvars_ext = 1 * sizeof(ext_op) }
 

Functions

INLINE_ONLY blob_type BlobOfFunctor (Functor f)
 
size_t SizeOfOpaqueTerm (Term *next, CELL cnext)
 
INLINE_ONLY Float CpFloatUnaligned (CELL *ptr)
 
INLINE_ONLY Term __MkFloatTerm (Float USES_REGS)
 
INLINE_ONLY Float FloatOfTerm (Term t)
 
INLINE_ONLY Term __MkFloatTerm (Float dbl USES_REGS)
 
INLINE_ONLY bool IsFloatTerm (Term)
 
INLINE_ONLY Term __MkLongIntTerm (Int USES_REGS)
 
INLINE_ONLY Term __MkLongIntTerm (Int i USES_REGS)
 
INLINE_ONLY Int LongIntOfTerm (Term t)
 
INLINE_ONLY bool IsLongIntTerm (Term)
 
INLINE_ONLY Term __MkStringTerm (const char *s USES_REGS)
 
INLINE_ONLY const unsigned char * UStringOfTerm (Term t)
 
INLINE_ONLY const char * StringOfTerm (Term t)
 
INLINE_ONLY bool IsStringTerm (Term)
 
INLINE_ONLY bool IsBigIntTerm (Term t)
 
INLINE_ONLY bool IsBlobTerm (Term t)
 
INLINE_ONLY int IsLargeIntTerm (Term)
 
INLINE_ONLY bool IsLargeNumTerm (Term)
 
INLINE_ONLY bool IsExternalBlobTerm (Term, CELL)
 
INLINE_ONLY void * ExternalBlobFromTerm (Term)
 
INLINE_ONLY bool IsNumTerm (Term)
 
INLINE_ONLY bool IsAtomicTerm (Term)
 
INLINE_ONLY bool IsExtensionFunctor (Functor)
 
INLINE_ONLY bool IsBlobFunctor (Functor)
 
INLINE_ONLY bool IsPrimitiveTerm (Term)
 
INLINE_ONLY exts ExtFromCell (CELL *)
 
INLINE_ONLY Int Yap_BlobTag (Term t)
 
INLINE_ONLY void * Yap_BlobInfo (Term t)
 

Variables

Atom AtomFoundVar
 
Atom AtomFreeTerm
 
Atom AtomNil
 
Atom AtomDot
 

Macro Definition Documentation

◆ CloseExtension

#define CloseExtension (   x)    MkAtomTerm((Atom)(x))

Definition at line 122 of file TermExt.h.

◆ end_e

#define end_e   (8 * sizeof(Functor *))

Definition at line 66 of file TermExt.h.

◆ FunctorBigInt

#define FunctorBigInt   ((Functor)(big_int_e))

Definition at line 71 of file TermExt.h.

◆ FunctorBlob

#define FunctorBlob   ((Functor)(blob_e))

Definition at line 73 of file TermExt.h.

◆ FunctorDBRef

#define FunctorDBRef   ((Functor)(db_ref_e))

Definition at line 68 of file TermExt.h.

◆ FunctorDouble

#define FunctorDouble   ((Functor)(double_e))

Definition at line 69 of file TermExt.h.

◆ FunctorLongInt

#define FunctorLongInt   ((Functor)(long_int_e))

Definition at line 70 of file TermExt.h.

◆ FunctorString

#define FunctorString   ((Functor)(string_e))

Definition at line 72 of file TermExt.h.

◆ GetStartOfExtension

#define GetStartOfExtension (   x)    ((CELL*)AtomOfTerm(*x))

Definition at line 124 of file TermExt.h.

◆ InitUnalignedFloat

#define InitUnalignedFloat ( )

Definition at line 182 of file TermExt.h.

◆ MkFloatTerm

#define MkFloatTerm (   fl)    __MkFloatTerm((fl)PASS_REGS)

Definition at line 165 of file TermExt.h.

◆ MkLongIntTerm

#define MkLongIntTerm (   i)    __MkLongIntTerm((i)PASS_REGS)

Definition at line 257 of file TermExt.h.

◆ MkStringTerm

#define MkStringTerm (   i)    __MkStringTerm((i)PASS_REGS)

Definition at line 290 of file TermExt.h.

◆ MkUStringTerm

#define MkUStringTerm (   i)    __MkStringTerm((const char *)(i)PASS_REGS)

Definition at line 308 of file TermExt.h.

◆ SF_STORE

#define SF_STORE   ((special_functors *)HEAP_INIT_BASE)

Definition at line 30 of file TermExt.h.

◆ TermDot

#define TermDot   MkAtomTerm(AtomDot)

Definition at line 56 of file TermExt.h.

◆ TermFoundVar

#define TermFoundVar   MkAtomTerm(AtomFoundVar)

Definition at line 53 of file TermExt.h.

◆ TermFreeTerm

#define TermFreeTerm   MkAtomTerm(AtomFreeTerm)

Definition at line 54 of file TermExt.h.

◆ TermNil

#define TermNil   MkAtomTerm(AtomNil)

Definition at line 55 of file TermExt.h.

Typedef Documentation

◆ mp_limb_t

typedef UInt mp_limb_t

Definition at line 343 of file TermExt.h.

Enumeration Type Documentation

◆ big_blob_type

enum big_blob_type

Definition at line 77 of file TermExt.h.

◆ blob_type

enum blob_type

Definition at line 58 of file TermExt.h.

◆ exts

enum exts

Definition at line 113 of file TermExt.h.

Function Documentation

◆ __MkFloatTerm()

INLINE_ONLY Term __MkFloatTerm ( Float dbl  USES_REGS)

Definition at line 173 of file TermExt.h.

◆ __MkLongIntTerm()

INLINE_ONLY Term __MkLongIntTerm ( Int i  USES_REGS)

Definition at line 261 of file TermExt.h.

◆ __MkStringTerm()

INLINE_ONLY Term __MkStringTerm ( const char *s  USES_REGS)

Definition at line 295 of file TermExt.h.

◆ BlobOfFunctor()

INLINE_ONLY blob_type BlobOfFunctor ( Functor  f)

Definition at line 93 of file TermExt.h.

◆ CpFloatUnaligned()

INLINE_ONLY Float CpFloatUnaligned ( CELL *  ptr)

Definition at line 184 of file TermExt.h.

◆ ExternalBlobFromTerm()

INLINE_ONLY void * ExternalBlobFromTerm ( Term  t)

Definition at line 445 of file TermExt.h.

◆ ExtFromCell()

INLINE_ONLY exts ExtFromCell ( CELL *  pt)

Definition at line 486 of file TermExt.h.

◆ FloatOfTerm()

INLINE_ONLY Float FloatOfTerm ( Term  t)

Definition at line 178 of file TermExt.h.

◆ IsAtomicTerm()

INLINE_ONLY bool IsAtomicTerm ( Term  t)

Definition at line 457 of file TermExt.h.

◆ IsBigIntTerm()

INLINE_ONLY bool IsBigIntTerm ( Term  t)

Definition at line 357 of file TermExt.h.

◆ IsBlobFunctor()

INLINE_ONLY bool IsBlobFunctor ( Functor  f)

Definition at line 471 of file TermExt.h.

◆ IsBlobTerm()

INLINE_ONLY bool IsBlobTerm ( Term  t)

Definition at line 362 of file TermExt.h.

◆ IsExtensionFunctor()

INLINE_ONLY bool IsExtensionFunctor ( Functor  f)

Definition at line 465 of file TermExt.h.

◆ IsExternalBlobTerm()

INLINE_ONLY bool IsExternalBlobTerm ( Term  t,
CELL  tag 
)

Definition at line 437 of file TermExt.h.

◆ IsFloatTerm()

INLINE_ONLY bool IsFloatTerm ( Term  t)

Definition at line 251 of file TermExt.h.

◆ IsLargeIntTerm()

INLINE_ONLY int IsLargeIntTerm ( Term  t)

Definition at line 419 of file TermExt.h.

◆ IsLargeNumTerm()

INLINE_ONLY bool IsLargeNumTerm ( Term  t)

Definition at line 429 of file TermExt.h.

◆ IsLongIntTerm()

INLINE_ONLY bool IsLongIntTerm ( Term  t)

Definition at line 277 of file TermExt.h.

◆ IsNumTerm()

INLINE_ONLY bool IsNumTerm ( Term  t)

Definition at line 451 of file TermExt.h.

◆ IsPrimitiveTerm()

INLINE_ONLY bool IsPrimitiveTerm ( Term  t)

Definition at line 478 of file TermExt.h.

◆ IsStringTerm()

INLINE_ONLY bool IsStringTerm ( Term  t)

Definition at line 325 of file TermExt.h.

◆ LongIntOfTerm()

INLINE_ONLY Int LongIntOfTerm ( Term  t)

Definition at line 271 of file TermExt.h.

◆ StringOfTerm()

INLINE_ONLY const char * StringOfTerm ( Term  t)

Definition at line 319 of file TermExt.h.

◆ UStringOfTerm()

INLINE_ONLY const unsigned char * UStringOfTerm ( Term  t)

Definition at line 313 of file TermExt.h.

◆ Yap_BlobInfo()

INLINE_ONLY void * Yap_BlobInfo ( Term  t)

Definition at line 498 of file TermExt.h.

◆ Yap_BlobTag()

INLINE_ONLY Int Yap_BlobTag ( Term  t)

Definition at line 490 of file TermExt.h.

Variable Documentation

◆ AtomDot

Atom AtomDot

Definition at line 35 of file TermExt.h.

◆ AtomFoundVar

Atom AtomFoundVar
extern

Definition at line 63 of file init.c.

◆ AtomFreeTerm

Atom AtomFreeTerm

Definition at line 35 of file TermExt.h.

◆ AtomNil

Atom AtomNil

Definition at line 35 of file TermExt.h.