CPPCode Class Reference

#include <CPPCode.hpp>

Inheritance diagram for CPPCode:
[legend]

Public Member Functions

void * operator new (size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
 CPPCode (size_t, PCPPM, size_t, bool)
 
 CPPCode (RESTORETYPE restoreType)
 
void liveGeneral (int reason)
 
RexxObjectunflatten (RexxEnvelope *envelope)
 
void run (RexxActivity *, RexxMethod *, RexxObject *, RexxString *, RexxObject **, size_t, size_t, ProtectedObject &)
 
- Public Member Functions inherited from BaseCode
virtual void call (RexxActivity *, RoutineClass *, RexxString *, RexxObject **, size_t, size_t, RexxString *, RexxString *, int, ProtectedObject &)
 
virtual void call (RexxActivity *, RoutineClass *, RexxString *, RexxObject **, size_t, size_t, ProtectedObject &)
 
virtual RexxArraygetSource ()
 
virtual RexxObjectsetSecurityManager (RexxObject *manager)
 
virtual RexxSourcegetSourceObject ()
 
virtual RexxClassfindClass (RexxString *className)
 
virtual BaseCodesetSourceObject (RexxSource *s)
 
virtual PackageClassgetPackage ()
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
virtual RexxObjectcopy ()
 
virtual RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
virtual RexxObjectgetValue (RexxActivation *)
 
virtual RexxObjectgetValue (RexxVariableDictionary *)
 
virtual RexxObjectgetRealValue (RexxActivation *)
 
virtual RexxObjectgetRealValue (RexxVariableDictionary *)
 
virtual void uninit ()
 
virtual HashCode hash ()
 
virtual HashCode getHashValue ()
 
HashCode identityHash ()
 
virtual bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
virtual RexxStringmakeString ()
 
virtual void copyIntoTail (RexxCompoundTail *buffer)
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxArraymakeArray ()
 
virtual RexxStringstringValue ()
 
virtual RexxIntegerintegerValue (size_t)
 
virtual bool numberValue (wholenumber_t &result, size_t precision)
 
virtual bool numberValue (wholenumber_t &result)
 
virtual bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
virtual bool unsignedNumberValue (stringsize_t &result)
 
virtual bool doubleValue (double &result)
 
virtual RexxNumberStringnumberString ()
 
virtual bool isEqual (RexxObject *)
 
virtual bool isInstanceOf (RexxClass *)
 
virtual RexxMethodinstanceMethod (RexxString *)
 
virtual RexxSupplierinstanceMethods (RexxClass *)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual void live (size_t)
 
virtual void flatten (RexxEnvelope *)
 

Static Public Member Functions

static CPPCoderesolveExportedMethod (const char *, PCPPM targetMethod, size_t argcount, bool passNamedArgs)
 
- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 

Static Public Attributes

static PCPPM exportedMethods []
 

Protected Attributes

uint16_t methodIndex
 
uint16_t argumentCount
 
bool passNamedArguments
 
PCPPM cppEntry
 

Additional Inherited Members

- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 
- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Detailed Description

Class for a method-wrappered CPP internal method.

Definition at line 48 of file CPPCode.hpp.

Constructor & Destructor Documentation

◆ CPPCode() [1/2]

CPPCode::CPPCode ( size_t  index,
PCPPM  entry,
size_t  argcount,
bool  passNamedArgs 
)

Constructor for a CPPCode object.

Parameters
indexThe index of the method used to restore unflattened internal method.
entryThe entry point address.
argcountThe number of arguments this method expects.
passNamedArgsTrue if the named arguments must be passed.

Definition at line 70 of file CPPCode.cpp.

References argumentCount, cppEntry, methodIndex, and passNamedArguments.

Referenced by resolveExportedMethod().

◆ CPPCode() [2/2]

CPPCode::CPPCode ( RESTORETYPE  restoreType)
inline

Definition at line 56 of file CPPCode.hpp.

Member Function Documentation

◆ liveGeneral()

void CPPCode::liveGeneral ( int  reason)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 79 of file CPPCode.cpp.

References cppEntry, exportedMethods, methodIndex, and RESTORINGIMAGE.

◆ operator delete() [1/2]

void CPPCode::operator delete ( void *  )
inline

Definition at line 53 of file CPPCode.hpp.

◆ operator delete() [2/2]

void CPPCode::operator delete ( void *  ,
void *   
)
inline

Definition at line 54 of file CPPCode.hpp.

◆ operator new() [1/2]

void* CPPCode::operator new ( size_t  size,
void *  ptr 
)
inline

Definition at line 52 of file CPPCode.hpp.

◆ operator new() [2/2]

void * CPPCode::operator new ( size_t  size)

Allocate a new CPP code object.

Parameters
sizethe allocation size.
Returns
A pointer to the newly allocated object.

Definition at line 55 of file CPPCode.cpp.

References new_object(), and T_CPPCode.

◆ resolveExportedMethod()

CPPCode * CPPCode::resolveExportedMethod ( const char *  name,
PCPPM  targetMethod,
size_t  argumentCount,
bool  passNamedArgs 
)
static

Resolve the entry point of a CPP method into a CPPCode wrapper for that method.

Parameters
nameThe name of the method (used for error reporting)
targetMethodThe method to wrapper
argumentCountThe argument descriptor.
Returns
A CPPCode object for the wrappered method.

Definition at line 1113 of file CPPCode.cpp.

References argumentCount, CPPCode(), exportedMethods, and Interpreter::logicError().

Referenced by RexxMemory::createImage(), and RexxBehaviour::define().

◆ run()

void CPPCode::run ( RexxActivity activity,
RexxMethod method,
RexxObject receiver,
RexxString messageName,
RexxObject **  argPtr,
size_t  count,
size_t  named_count,
ProtectedObject result 
)
virtual

Run (or call) a CPPMethod.

Parameters
activityThe activity we're running under.
methodThe method to run.
receiverThe receiver object.
messageNameThe name used to invoke the message.
argPtrThe actual arguments.
countThe argument count.
resultThe returned result.

Reimplemented from BaseCode.

Definition at line 113 of file CPPCode.cpp.

References A_COUNT, argumentCount, cppEntry, Error_Incorrect_method_maxarg, passNamedArguments, and reportException().

◆ unflatten()

RexxObject * CPPCode::unflatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 91 of file CPPCode.cpp.

References cppEntry, exportedMethods, and methodIndex.

Member Data Documentation

◆ argumentCount

uint16_t CPPCode::argumentCount
protected

Definition at line 68 of file CPPCode.hpp.

Referenced by CPPCode(), resolveExportedMethod(), and run().

◆ cppEntry

PCPPM CPPCode::cppEntry
protected

Definition at line 70 of file CPPCode.hpp.

Referenced by CPPCode(), liveGeneral(), run(), and unflatten().

◆ exportedMethods

PCPPM CPPCode::exportedMethods
static

Definition at line 64 of file CPPCode.hpp.

Referenced by liveGeneral(), resolveExportedMethod(), and unflatten().

◆ methodIndex

uint16_t CPPCode::methodIndex
protected

Definition at line 67 of file CPPCode.hpp.

Referenced by CPPCode(), liveGeneral(), and unflatten().

◆ passNamedArguments

bool CPPCode::passNamedArguments
protected

Definition at line 69 of file CPPCode.hpp.

Referenced by CPPCode(), and run().


The documentation for this class was generated from the following files: