hycomp.h File Reference


Defines

#define hycomp_h
#define HY_PLATFORM_DOUBLE_ORDER
 USE_PROTOTYPES: Use full ANSI prototypes.
#define NO_LVALUE_CASTING
#define VMAPICALL   _stdcall
#define VMCALL   _cdecl
#define EXE_EXTENSION_CHAR   '.'
#define DIR_SEPARATOR   '\\'
#define DIR_SEPARATOR_STR   "\\"
#define HY_PRIORITY_MAP
#define GLOBAL_DATA(symbol)   ((void*)&(symbol))
#define GLOBAL_TABLE(symbol)   GLOBAL_DATA(symbol)
#define PVMCALL   VMCALL *
#define HYCONST64(x)   x##L
#define HY_DEFAULT_SCHED   SCHED_OTHER
 By default, pthreads platforms use the SCHED_OTHER thread scheduling policy.
#define FALSE   ((BOOLEAN) 0)
#define TRUE   ((BOOLEAN) (!FALSE))
#define NULL   ((void *)0)
#define USE_PROTOTYPES
#define PROTOTYPE(x)   x
#define VARARGS   , ...
#define PLATFORM_LINE_DELIMITER   "\015\012"
 Assign the default line delimiter, if it was not set.
#define MAX_IMAGE_PATH_LENGTH   (2048)
 Set the max path length, if it was not set.
#define CLEAR_U64(u64)   (u64 = (U_64)0)
 Helpers for U_64s.
#define LOW_LONG(l)   (*((U_32 *) &(l)))
#define HIGH_LONG(l)   (*(((U_32 *) &(l)) + 1))
#define I8(x)   ((I_8) (x))
#define I8P(x)   ((I_8 *) (x))
#define U16(x)   ((U_16) (x))
#define I16(x)   ((I_16) (x))
#define I16P(x)   ((I_16 *) (x))
#define U32(x)   ((U_32) (x))
#define I32(x)   ((I_32) (x))
#define I32P(x)   ((I_32 *) (x))
#define U16P(x)   ((U_16 *) (x))
#define U32P(x)   ((U_32 *) (x))
#define OBJP(x)   ((HyObject *) (x))
#define OBJPP(x)   ((HyObject **) (x))
#define OBJPPP(x)   ((HyObject ***) (x))
#define CLASSP(x)   ((Class *) (x))
#define CLASSPP(x)   ((Class **) (x))
#define BYTEP(x)   ((BYTE *) (x))
#define ESCHAR(x)   ((CHARACTER) (x))
 Test - was conflicting with OS2.h.
#define FLT(x)   ((FLOAT) x)
#define FLTP(x)   ((FLOAT *) (x))
#define LI8(x)   (*((I_8 *) &(x)))
#define LI8P(x)   (*((I_8 **) &(x)))
#define LU16(x)   (*((U_16 *) &(x)))
#define LI16(x)   (*((I_16 *) &(x)))
#define LU32(x)   (*((U_32 *) &(x)))
#define LI32(x)   (*((I_32 *) &(x)))
#define LI32P(x)   (*((I_32 **) &(x)))
#define LU16P(x)   (*((U_16 **) &(x)))
#define LU32P(x)   (*((U_32 **) &(x)))
#define LOBJP(x)   (*((HyObject **) &(x)))
#define LOBJPP(x)   (*((HyObject ***) &(x)))
#define LOBJPPP(x)   (*((HyObject ****) &(x))
#define LCLASSP(x)   (*((Class **) &(x)))
#define LBYTEP(x)   (*((BYTE **) &(x)))
#define LCHAR(x)   (*((CHARACTER) &(x)))
#define LFLT(x)   (*((FLOAT) &x))
#define LFLTP(x)   (*((FLOAT *) &(x)))
#define HIGH_WORD(x)   U16(U32((x)) >> 16)
 Macros for converting between words and longs and accessing bits.
#define LOW_WORD(x)   U16(U32((x)) & 0xFFFF)
#define LOW_BIT(o)   (U32((o)) & 1)
#define LOW_2_BITS(o)   (U32((o)) & 3)
#define LOW_3_BITS(o)   (U32((o)) & 7)
#define LOW_4_BITS(o)   (U32((o)) & 15)
#define MAKE_32(h, l)   ((U32((h)) << 16) | U32((l)))
#define MAKE_64(h, l)   ((((I_64)(h)) << 32) | (l))
#define HY_CFUNC
#define HY_CDATA
#define READSVMTHREAD
 Macros for tagging functions which read/write the vm thread.
#define WRITESVMTHREAD
#define REQUIRESSTACKFRAME
#define NORETURN
 Macro for tagging functions, which never return.
#define PTR_LONG_STORE(dstPtr, aLongPtr)   (*(dstPtr) = *(aLongPtr))
 Macros for accessing I_64 values.
#define PTR_LONG_VALUE(dstPtr, aLongPtr)   (*(aLongPtr) = *(dstPtr))
#define HYCONST_TABLE   const
 Macro used when declaring tables which require relocations.
#define HY_SORT(base, nmemb, size, compare)   qsort((base), (nmemb), (size), (compare))
 ANSI qsort is not always available.

Typedefs

typedef __int64 I_64
 Provide some reasonable defaults for the VM types:.
typedef unsigned __int64 U_64
typedef double SYS_FLOAT
typedef unsigned int UDATA
typedef unsigned int U_32
typedef unsigned short U_16
typedef unsigned char U_8
typedef int IDATA
typedef int I_32
typedef short I_16
typedef char I_8
typedef double ESDOUBLE
typedef float ESSINGLE


Define Documentation

#define hycomp_h

#define HY_PLATFORM_DOUBLE_ORDER

USE_PROTOTYPES: Use full ANSI prototypes.

CLOCK_PRIMS: We want the timer/clock prims to be used

LITTLE_ENDIAN: This is for the intel machines or other little endian processors. Defaults to big endian.

NO_LVALUE_CASTING: This is for compilers that don't like the left side of assigns to be cast. It hacks around to do the right thing.

ATOMIC_FLOAT_ACCESS: So that float operations will work.

LINKED_USER_PRIMITIVES: Indicates that user primitives are statically linked with the VM executeable.

OLD_SPACE_SIZE_DIFF: The 68k uses a different amount of old space. This "legitimizes" the change.

SIMPLE_SIGNAL: For machines that don't use real signals in C. (eg: PC, 68k)

OS_NAME_LOOKUP: Use nlist to lookup user primitive addresses.

VMCALL: Tag for all functions called by the VM.

VMAPICALL: Tag for all functions called via the PlatformFunction callWith: mechanism.

SYS_FLOAT: For some math functions where extended types (80 or 96 bits) are returned Most platforms return as a double

FLOAT_EXTENDED: If defined, the type name for extended precision floats.

PLATFORM_IS_ASCII: Must be defined if the platform is ASCII

EXE_EXTENSION_CHAR: the executable has a delimiter that we want to stop at as part of argv[0].

By default order doubles in the native (that is big/little endian) ordering.

#define NO_LVALUE_CASTING

#define VMAPICALL   _stdcall

#define VMCALL   _cdecl

#define EXE_EXTENSION_CHAR   '.'

#define DIR_SEPARATOR   '\\'

#define DIR_SEPARATOR_STR   "\\"

#define HY_PRIORITY_MAP

Value:

{ \
  THREAD_PRIORITY_IDLE,             /* 0 */\
  THREAD_PRIORITY_LOWEST,           /* 1 */\
  THREAD_PRIORITY_BELOW_NORMAL,     /* 2 */\
  THREAD_PRIORITY_BELOW_NORMAL,     /* 3 */\
  THREAD_PRIORITY_BELOW_NORMAL,     /* 4 */\
  THREAD_PRIORITY_NORMAL,           /* 5 */\
  THREAD_PRIORITY_ABOVE_NORMAL,     /* 6 */\
  THREAD_PRIORITY_ABOVE_NORMAL,     /* 7 */\
  THREAD_PRIORITY_ABOVE_NORMAL,     /* 8 */\
  THREAD_PRIORITY_ABOVE_NORMAL,     /* 9 */\
  THREAD_PRIORITY_HIGHEST,          /*10 */\
  THREAD_PRIORITY_TIME_CRITICAL     /*11 */}

#define GLOBAL_DATA ( symbol   )     ((void*)&(symbol))

#define GLOBAL_TABLE ( symbol   )     GLOBAL_DATA(symbol)

#define PVMCALL   VMCALL *

#define HYCONST64 (  )     x##L

#define HY_DEFAULT_SCHED   SCHED_OTHER

By default, pthreads platforms use the SCHED_OTHER thread scheduling policy.

#define FALSE   ((BOOLEAN) 0)

#define TRUE   ((BOOLEAN) (!FALSE))

#define NULL   ((void *)0)

#define USE_PROTOTYPES

#define PROTOTYPE (  )     x

#define VARARGS   , ...

#define PLATFORM_LINE_DELIMITER   "\015\012"

Assign the default line delimiter, if it was not set.

#define MAX_IMAGE_PATH_LENGTH   (2048)

Set the max path length, if it was not set.

#define CLEAR_U64 ( u64   )     (u64 = (U_64)0)

Helpers for U_64s.

#define LOW_LONG (  )     (*((U_32 *) &(l)))

#define HIGH_LONG (  )     (*(((U_32 *) &(l)) + 1))

#define I8 (  )     ((I_8) (x))

#define I8P (  )     ((I_8 *) (x))

#define U16 (  )     ((U_16) (x))

#define I16 (  )     ((I_16) (x))

#define I16P (  )     ((I_16 *) (x))

#define U32 (  )     ((U_32) (x))

#define I32 (  )     ((I_32) (x))

#define I32P (  )     ((I_32 *) (x))

#define U16P (  )     ((U_16 *) (x))

#define U32P (  )     ((U_32 *) (x))

#define OBJP (  )     ((HyObject *) (x))

#define OBJPP (  )     ((HyObject **) (x))

#define OBJPPP (  )     ((HyObject ***) (x))

#define CLASSP (  )     ((Class *) (x))

#define CLASSPP (  )     ((Class **) (x))

#define BYTEP (  )     ((BYTE *) (x))

#define ESCHAR (  )     ((CHARACTER) (x))

Test - was conflicting with OS2.h.

#define FLT (  )     ((FLOAT) x)

#define FLTP (  )     ((FLOAT *) (x))

#define LI8 (  )     (*((I_8 *) &(x)))

#define LI8P (  )     (*((I_8 **) &(x)))

#define LU16 (  )     (*((U_16 *) &(x)))

#define LI16 (  )     (*((I_16 *) &(x)))

#define LU32 (  )     (*((U_32 *) &(x)))

#define LI32 (  )     (*((I_32 *) &(x)))

#define LI32P (  )     (*((I_32 **) &(x)))

#define LU16P (  )     (*((U_16 **) &(x)))

#define LU32P (  )     (*((U_32 **) &(x)))

#define LOBJP (  )     (*((HyObject **) &(x)))

#define LOBJPP (  )     (*((HyObject ***) &(x)))

#define LOBJPPP (  )     (*((HyObject ****) &(x))

#define LCLASSP (  )     (*((Class **) &(x)))

#define LBYTEP (  )     (*((BYTE **) &(x)))

#define LCHAR (  )     (*((CHARACTER) &(x)))

#define LFLT (  )     (*((FLOAT) &x))

#define LFLTP (  )     (*((FLOAT *) &(x)))

#define HIGH_WORD (  )     U16(U32((x)) >> 16)

Macros for converting between words and longs and accessing bits.

#define LOW_WORD (  )     U16(U32((x)) & 0xFFFF)

#define LOW_BIT (  )     (U32((o)) & 1)

#define LOW_2_BITS (  )     (U32((o)) & 3)

#define LOW_3_BITS (  )     (U32((o)) & 7)

#define LOW_4_BITS (  )     (U32((o)) & 15)

#define MAKE_32 ( h,
 )     ((U32((h)) << 16) | U32((l)))

#define MAKE_64 ( h,
 )     ((((I_64)(h)) << 32) | (l))

#define HY_CFUNC

#define HY_CDATA

#define READSVMTHREAD

Macros for tagging functions which read/write the vm thread.

#define WRITESVMTHREAD

#define REQUIRESSTACKFRAME

#define NORETURN

Macro for tagging functions, which never return.

#define PTR_LONG_STORE ( dstPtr,
aLongPtr   )     (*(dstPtr) = *(aLongPtr))

Macros for accessing I_64 values.

#define PTR_LONG_VALUE ( dstPtr,
aLongPtr   )     (*(aLongPtr) = *(dstPtr))

#define HYCONST_TABLE   const

Macro used when declaring tables which require relocations.

#define HY_SORT ( base,
nmemb,
size,
compare   )     qsort((base), (nmemb), (size), (compare))

ANSI qsort is not always available.


Typedef Documentation

typedef __int64 I_64

Provide some reasonable defaults for the VM types:.

typedef unsigned __int64 U_64

typedef double SYS_FLOAT

typedef unsigned int UDATA

typedef unsigned int U_32

typedef unsigned short U_16

typedef unsigned char U_8

typedef int IDATA

typedef int I_32

typedef short I_16

typedef char I_8

typedef double ESDOUBLE

typedef float ESSINGLE


Genereated on Tue Mar 11 19:25:22 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.