59 #include "SystemInterpreter.hpp"
1026 return temp->
copyData(o - 1, (
char *)r, l);
1352 return ((
RexxArray *)a)->getDimension();
1648 return context.
ret(((
RexxStem *)s)->getElement(n));
1685 return context.
ret(((
RexxStem *)s)->getElement((
size_t)i));
1698 ((
RexxStem *)s)->dropElement((
size_t)i);
1723 return context.
ret(((
RexxStem *)s)->getStemValue());
void reportException(wholenumber_t error)
RexxArray * new_array(size_t s)
RexxBuffer * new_buffer(size_t s)
RexxDirectory * new_directory()
RexxNumberString * new_numberstringFromDouble(double n)
RexxPointer * new_pointer(void *p)
RexxString * REQUEST_STRING(RexxObject *object)
bool isString(RexxObject *o)
bool isArray(RexxObject *o)
#define Error_Incorrect_method_positive
#define Error_Interpretation
RexxString * raw_string(stringsize_t l)
RexxString * new_string(const char *s, stringsize_t l)
RexxString * new_upper_string(const char *s, stringsize_t l)
RexxSupplier * new_supplier(RexxArray *c, RexxArray *f)
RexxMutableBufferObject RexxEntry NewMutableBuffer(RexxThreadContext *c, size_t l)
logical_t RexxEntry IsString(RexxThreadContext *c, RexxObjectPtr o)
RexxArrayObject RexxEntry ArrayOfFour(RexxThreadContext *c, RexxObjectPtr o1, RexxObjectPtr o2, RexxObjectPtr o3, RexxObjectPtr o4)
RexxStringObject RexxEntry NewStringFromAsciiz(RexxThreadContext *c, CSTRING s)
RexxObjectPtr RexxEntry UnsignedInt64ToObject(RexxThreadContext *c, uint64_t n)
POINTER RexxEntry SetMutableBufferCapacity(RexxThreadContext *c, RexxMutableBufferObject b, size_t length)
size_t RexxEntry ArrayAppend(RexxThreadContext *c, RexxArrayObject a, RexxObjectPtr o)
RexxArrayObject RexxEntry NewArray(RexxThreadContext *c, size_t s)
void RexxEntry SetThreadTrace(RexxThreadContext *c, logical_t setting)
void RexxEntry DirectoryPut(RexxThreadContext *c, RexxDirectoryObject t, RexxObjectPtr o, CSTRING i)
logical_t RexxEntry ObjectToStringSize(RexxThreadContext *c, RexxObjectPtr o, stringsize_t *n)
RexxObjectPtr RexxEntry StringSizeToObject(RexxThreadContext *c, stringsize_t n)
RexxObjectPtr RexxEntry SupplierIndex(RexxThreadContext *c, RexxSupplierObject o)
void RexxEntry RaiseException4(RexxThreadContext *c, size_t n, RexxObjectPtr o1, RexxObjectPtr o2, RexxObjectPtr o3, RexxObjectPtr o4)
logical_t RexxEntry RegisterLibrary(RexxThreadContext *c, CSTRING n, RexxPackageEntry *e)
POINTER RexxEntry MutableBufferData(RexxThreadContext *c, RexxMutableBufferObject b)
void RexxEntry APIRaiseException(RexxThreadContext *c, size_t n, RexxArrayObject a)
void RexxEntry RaiseException2(RexxThreadContext *c, size_t n, RexxObjectPtr o1, RexxObjectPtr o2)
logical_t RexxEntry IsBuffer(RexxThreadContext *c, RexxObjectPtr o)
RexxDirectoryObject RexxEntry GetPackageRoutines(RexxThreadContext *c, RexxPackageObject m)
logical_t RexxEntry ObjectToUnsignedInt64(RexxThreadContext *c, RexxObjectPtr o, uint64_t *n)
CSTRING RexxEntry StringData(RexxThreadContext *c, RexxStringObject s)
RexxPackageObject RexxEntry LoadPackageFromData(RexxThreadContext *c, CSTRING n, CSTRING d, size_t l)
void RexxEntry ClearCondition(RexxThreadContext *c)
RexxObjectPtr RexxEntry DoubleToObjectWithPrecision(RexxThreadContext *c, double n, size_t precision)
RexxObjectPtr RexxEntry DoubleToObject(RexxThreadContext *c, double n)
void RexxEntry RaiseException5(RexxThreadContext *c, size_t n, RexxObjectPtr o1, RexxObjectPtr o2, RexxObjectPtr o3, RexxObjectPtr o4, RexxObjectPtr o5)
logical_t RexxEntry IsArray(RexxThreadContext *c, RexxObjectPtr o)
RexxArrayObject RexxEntry ArrayOfTwo(RexxThreadContext *c, RexxObjectPtr o1, RexxObjectPtr o2)
RexxArrayObject RexxEntry ArrayOfFive(RexxThreadContext *c, RexxObjectPtr o1, RexxObjectPtr o2, RexxObjectPtr o3, RexxObjectPtr o4, RexxObjectPtr o5)
size_t RexxEntry ArrayDimension(RexxThreadContext *c, RexxArrayObject a)
logical_t RexxEntry IsMethod(RexxThreadContext *c, RexxObjectPtr o)
RexxObjectPtr RexxEntry LogicalToObject(RexxThreadContext *c, logical_t n)
RexxClassObject RexxEntry FindClass(RexxThreadContext *c, CSTRING n)
RexxObjectPtr RexxEntry GetStemElement(RexxThreadContext *c, RexxStemObject s, CSTRING n)
logical_t RexxEntry ObjectToLogical(RexxThreadContext *c, RexxObjectPtr o, logical_t *n)
size_t RexxEntry StringLength(RexxThreadContext *c, RexxStringObject s)
RexxBufferStringObject RexxEntry NewBufferString(RexxThreadContext *c, size_t l)
RexxArrayObject RexxEntry ArrayOfOne(RexxThreadContext *c, RexxObjectPtr o)
RexxStringObject RexxEntry ObjectToString(RexxThreadContext *c, RexxObjectPtr o)
RexxObjectPtr RexxEntry WholeNumberToObject(RexxThreadContext *c, wholenumber_t n)
RexxPackageObject RexxEntry LoadPackage(RexxThreadContext *c, CSTRING n)
logical_t RexxEntry SupplierAvailable(RexxThreadContext *c, RexxSupplierObject o)
logical_t RexxEntry ObjectToValue(RexxThreadContext *c, RexxObjectPtr o, ValueDescriptor *d)
RexxObjectPtr RexxEntry GetStemValue(RexxThreadContext *c, RexxStemObject s)
void RexxEntry DetachThread(RexxThreadContext *c)
void RexxEntry ReleaseGlobalReference(RexxThreadContext *c, RexxObjectPtr o)
void RexxEntry SetStemElement(RexxThreadContext *c, RexxStemObject s, CSTRING n, RexxObjectPtr v)
RexxStringObject RexxEntry FinishBufferString(RexxThreadContext *c, RexxBufferStringObject s, size_t l)
logical_t RexxEntry IsRoutine(RexxThreadContext *c, RexxObjectPtr o)
size_t RexxEntry ArraySize(RexxThreadContext *c, RexxArrayObject a)
void RexxEntry HaltThread(RexxThreadContext *c)
logical_t RexxEntry ObjectToUnsignedInt32(RexxThreadContext *c, RexxObjectPtr o, uint32_t *n)
RexxBufferObject RexxEntry NewBuffer(RexxThreadContext *c, size_t l)
void RexxEntry DropStemArrayElement(RexxThreadContext *c, RexxStemObject s, size_t i)
RexxStemObject RexxEntry NewStem(RexxThreadContext *c, CSTRING n)
void RexxEntry RaiseException0(RexxThreadContext *c, size_t n)
RexxDirectoryObject RexxEntry GetLocalEnvironment(RexxThreadContext *c)
RexxDirectoryObject RexxEntry GetPackagePublicClasses(RexxThreadContext *c, RexxPackageObject m)
RexxObjectPtr RexxEntry CallProgram(RexxThreadContext *c, const char *p, RexxArrayObject a)
size_t RexxEntry StringGet(RexxThreadContext *c, RexxStringObject s, size_t o, POINTER r, size_t l)
RexxObjectPtr RexxEntry SendMessage0(RexxThreadContext *c, RexxObjectPtr o, CSTRING m)
logical_t RexxEntry ObjectToUintptr(RexxThreadContext *c, RexxObjectPtr o, uintptr_t *n)
size_t RexxEntry BufferLength(RexxThreadContext *c, RexxBufferObject b)
RexxSupplierObject RexxEntry NewSupplier(RexxThreadContext *c, RexxArrayObject values, RexxArrayObject names)
void RexxEntry ArrayPut(RexxThreadContext *c, RexxArrayObject a, RexxObjectPtr o, size_t i)
RexxArrayObject RexxEntry ValuesToObject(RexxThreadContext *c, ValueDescriptor *d, size_t count)
RexxObjectPtr RexxEntry GetStemArrayElement(RexxThreadContext *c, RexxStemObject s, size_t i)
logical_t RexxEntry IsOfType(RexxThreadContext *c, RexxObjectPtr o, CSTRING cn)
logical_t RexxEntry CheckCondition(RexxThreadContext *c)
logical_t RexxEntry IsMutableBuffer(RexxThreadContext *c, RexxObjectPtr o)
RexxDirectoryObject RexxEntry GetPackageMethods(RexxThreadContext *c, RexxPackageObject m)
logical_t RexxEntry IsDirectory(RexxThreadContext *c, RexxObjectPtr o)
logical_t RexxEntry LoadLibraryPackage(RexxThreadContext *c, CSTRING n)
RexxObjectPtr RexxEntry Int64ToObject(RexxThreadContext *c, int64_t n)
RexxPackageObject RexxEntry GetRoutinePackage(RexxThreadContext *c, RexxRoutineObject o)
POINTER RexxEntry ObjectToCSelfScoped(RexxThreadContext *c, RexxObjectPtr o, RexxObjectPtr s)
RexxDirectoryObject RexxEntry GetGlobalEnvironment(RexxThreadContext *c)
RexxMethodObject RexxEntry NewMethod(RexxThreadContext *c, CSTRING n, CSTRING source, stringsize_t length)
RexxObjectPtr RexxEntry UintptrToObject(RexxThreadContext *c, uintptr_t n)
RexxRoutineObject RexxEntry NewRoutine(RexxThreadContext *c, CSTRING n, CSTRING source, stringsize_t length)
RexxObjectPtr RexxEntry IntptrToObject(RexxThreadContext *c, intptr_t n)
CSTRING RexxEntry ObjectToStringValue(RexxThreadContext *c, RexxObjectPtr o)
size_t RexxEntry BufferStringLength(RexxThreadContext *c, RexxBufferStringObject s)
RexxDirectoryObject RexxEntry NewDirectory(RexxThreadContext *c)
wholenumber_t RexxEntry DisplayCondition(RexxThreadContext *c)
RexxObjectPtr RexxEntry SendMessage2(RexxThreadContext *c, RexxObjectPtr o, CSTRING m, RexxObjectPtr a1, RexxObjectPtr a2)
logical_t RexxEntry HasMethod(RexxThreadContext *c, RexxObjectPtr o, CSTRING n)
RexxStringObject RexxEntry StringUpper(RexxThreadContext *c, RexxStringObject s)
RexxObjectPtr RexxEntry DirectoryRemove(RexxThreadContext *c, RexxDirectoryObject t, CSTRING i)
logical_t RexxEntry ObjectToInt32(RexxThreadContext *c, RexxObjectPtr o, int32_t *n)
RexxObjectPtr RexxEntry RequestGlobalReference(RexxThreadContext *c, RexxObjectPtr o)
RexxObjectPtr RexxEntry ValueToObject(RexxThreadContext *c, ValueDescriptor *d)
RexxDirectoryObject RexxEntry GetAllStemElements(RexxThreadContext *c, RexxStemObject s)
RexxStringObject RexxEntry NewString(RexxThreadContext *c, CSTRING s, size_t l)
logical_t RexxEntry ObjectToWholeNumber(RexxThreadContext *c, RexxObjectPtr o, wholenumber_t *n)
void RexxEntry RaiseException3(RexxThreadContext *c, size_t n, RexxObjectPtr o1, RexxObjectPtr o2, RexxObjectPtr o3)
size_t RexxEntry ArrayItems(RexxThreadContext *c, RexxArrayObject a)
size_t RexxEntry SetMutableBufferLength(RexxThreadContext *c, RexxMutableBufferObject b, size_t length)
logical_t RexxEntry IsPointer(RexxThreadContext *c, RexxObjectPtr o)
RexxStringObject RexxEntry StringLower(RexxThreadContext *c, RexxStringObject s)
POINTER RexxEntry PointerValue(RexxThreadContext *c, RexxPointerObject o)
void RexxEntry DecodeConditionInfo(RexxThreadContext *c, RexxDirectoryObject d, RexxCondition *cd)
RexxPackageObject RexxEntry GetMethodPackage(RexxThreadContext *c, RexxMethodObject o)
logical_t RexxEntry ObjectToInt64(RexxThreadContext *c, RexxObjectPtr o, int64_t *n)
void RexxEntry SetStemArrayElement(RexxThreadContext *c, RexxStemObject s, size_t i, RexxObjectPtr v)
logical_t RexxEntry ObjectToIntptr(RexxThreadContext *c, RexxObjectPtr o, intptr_t *n)
POINTER RexxEntry BufferData(RexxThreadContext *c, RexxBufferObject b)
POINTER RexxEntry BufferStringData(RexxThreadContext *c, RexxBufferStringObject s)
RexxClassObject RexxEntry FindClassFromPackage(RexxThreadContext *c, RexxPackageObject m, CSTRING n)
void RexxEntry SupplierNext(RexxThreadContext *c, RexxSupplierObject o)
logical_t RexxEntry ObjectToDouble(RexxThreadContext *c, RexxObjectPtr o, double *n)
RexxObjectPtr RexxEntry SupplierItem(RexxThreadContext *c, RexxSupplierObject o)
logical_t RexxEntry IsInstanceOf(RexxThreadContext *c, RexxObjectPtr o, RexxClassObject cl)
void RexxEntry RaiseCondition(RexxThreadContext *c, CSTRING n, RexxStringObject desc, RexxObjectPtr add, RexxObjectPtr result)
void RexxEntry ReleaseLocalReference(RexxThreadContext *c, RexxObjectPtr o)
size_t RexxEntry ArrayAppendString(RexxThreadContext *c, RexxArrayObject a, CSTRING s, size_t l)
RexxDirectoryObject RexxEntry GetPackageClasses(RexxThreadContext *c, RexxPackageObject m)
RexxObjectPtr RexxEntry CallRoutine(RexxThreadContext *c, RexxRoutineObject r, RexxArrayObject a)
void RexxEntry RaiseException1(RexxThreadContext *c, size_t n, RexxObjectPtr o1)
RexxObjectPtr RexxEntry SendMessageArray(RexxThreadContext *c, RexxObjectPtr o, CSTRING m, RexxArrayObject a)
RexxDirectoryObject RexxEntry GetConditionInfo(RexxThreadContext *c)
RexxObjectPtr RexxEntry SendMessage1(RexxThreadContext *c, RexxObjectPtr o, CSTRING m, RexxObjectPtr a1)
RexxObjectPtr RexxEntry ArrayAt(RexxThreadContext *c, RexxArrayObject a, size_t i)
size_t RexxEntry MutableBufferLength(RexxThreadContext *c, RexxMutableBufferObject b)
RexxDirectoryObject RexxEntry GetPackagePublicRoutines(RexxThreadContext *c, RexxPackageObject m)
RexxObjectPtr RexxEntry DirectoryAt(RexxThreadContext *c, RexxDirectoryObject t, CSTRING i)
RexxObjectPtr RexxEntry Int32ToObject(RexxThreadContext *c, int32_t n)
POINTER RexxEntry ObjectToCSelf(RexxThreadContext *c, RexxObjectPtr o)
RexxObjectPtr RexxEntry UnsignedInt32ToObject(RexxThreadContext *c, uint32_t n)
RexxArrayObject RexxEntry ArrayOfThree(RexxThreadContext *c, RexxObjectPtr o1, RexxObjectPtr o2, RexxObjectPtr o3)
RexxPointerObject RexxEntry NewPointer(RexxThreadContext *c, POINTER p)
logical_t RexxEntry IsStem(RexxThreadContext *c, RexxObjectPtr o)
size_t RexxEntry MutableBufferCapacity(RexxThreadContext *c, RexxMutableBufferObject b)
void RexxEntry DropStemElement(RexxThreadContext *c, RexxStemObject s, CSTRING n)
RexxNativeActivation * context
RexxObjectPtr ret(RexxObject *o)
static void decodeConditionData(RexxDirectory *conditionObj, RexxCondition *condData)
void addGlobalReference(RexxObject *o)
void removeGlobalReference(RexxObject *o)
PackageClass * loadRequires(RexxActivity *activity, RexxString *shortName, const char *data, size_t length)
RexxString * resolveProgramName(RexxString *name, RexxString *dir, RexxString *ext)
static const wholenumber_t MIN_WHOLENUMBER
static bool objectToUintptr(RexxObject *source, uintptr_t &result)
static RexxObject * stringsizeToObject(stringsize_t v)
static const wholenumber_t MAX_WHOLENUMBER
static RexxObject * uintptrToObject(uintptr_t v)
static bool objectToUnsignedInt64(RexxObject *o, uint64_t &result)
static bool objectToUnsignedInteger(RexxObject *o, size_t &result, size_t max)
static bool objectToWholeNumber(RexxObject *o, wholenumber_t &result, wholenumber_t max, wholenumber_t min)
static RexxObject * int64ToObject(int64_t v)
static bool objectToIntptr(RexxObject *source, intptr_t &result)
static RexxObject * wholenumberToObject(wholenumber_t v)
static bool objectToStringSize(RexxObject *o, stringsize_t &result, stringsize_t max)
static bool objectToSignedInteger(RexxObject *o, ssize_t &result, ssize_t max, ssize_t min)
static RexxObject * intptrToObject(intptr_t v)
static bool objectToInt64(RexxObject *o, int64_t &result)
static RexxObject * uint64ToObject(uint64_t v)
static LibraryPackage * loadLibrary(RexxString *name)
static bool registerPackage(RexxString *name, RexxPackageEntry *p)
wholenumber_t displayCondition(RexxDirectory *conditionObject)
InterpreterInstance * getInstance()
RexxDirectory * getLocal()
bool raiseCondition(RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *)
bool objectToValue(RexxObject *o, ValueDescriptor *value)
RexxClass * findClass(RexxString *className)
RexxDirectory * getConditionInfo()
RexxObject * valueToObject(ValueDescriptor *value)
void removeLocalReference(RexxObject *objr)
void setConditionInfo(RexxDirectory *info)
void enableConditionTrap()
RexxArray * valuesToObject(ValueDescriptor *value, size_t count)
bool isInstanceOf(RexxClass *)
const char * getStringData()
size_t copyData(size_t, char *, size_t)
void finish(stringsize_t l)
#define THREAD_INTERFACE_VERSION
struct _RexxPackageObject * RexxPackageObject
struct _RexxClassObject * RexxClassObject
struct _RexxMutableBufferObject * RexxMutableBufferObject
struct _RexxStringObject * RexxStringObject
struct _RexxArrayObject * RexxArrayObject
struct _RexxBufferStringObject * RexxBufferStringObject
struct _RexxObjectPtr * RexxObjectPtr
struct _RexxRoutineObject * RexxRoutineObject
struct _RexxDirectoryObject * RexxDirectoryObject
struct _RexxSupplierObject * RexxSupplierObject
struct _RexxMethodObject * RexxMethodObject
struct _RexxBufferObject * RexxBufferObject
struct _RexxPointerObject * RexxPointerObject
struct _RexxStemObject * RexxStemObject
unsigned __int64 uint64_t