RexxCode Class Reference

#include <RexxCode.hpp>

Inheritance diagram for RexxCode:
[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 *)
 
 RexxCode (RexxSource *, RexxInstruction *, RexxDirectory *, size_t, size_t)
 
 RexxCode (RESTORETYPE restoreType)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
RexxArraygetSource ()
 
RexxObjectsetSecurityManager (RexxObject *)
 
RexxStringgetProgramName ()
 
RexxSourcegetSourceObject ()
 
RexxInstructiongetFirstInstruction ()
 
RexxDirectorygetLabels ()
 
size_t getMaxStackSize ()
 
size_t getLocalVariableSize ()
 
RexxDirectorygetLocalRoutines ()
 
RexxDirectorygetPublicRoutines ()
 
void setLocalRoutines (RexxDirectory *r)
 
void setPublicRoutines (RexxDirectory *r)
 
bool isTraceable ()
 
bool isInterpret ()
 
RexxStringextract (SourceLocation &l)
 
SecurityManagergetSecurityManager ()
 
void install (RexxActivation *activation)
 
RexxCodeinterpret (RexxString *s, size_t n, RexxActivation *activation)
 
RexxDirectorygetMethods ()
 
RexxDirectorygetRoutines ()
 
RoutineClassfindRoutine (RexxString *n)
 
RexxStringresolveProgramName (RexxActivity *activity, RexxString *name)
 
void mergeRequired (RexxSource *s)
 
virtual void run (RexxActivity *, RexxMethod *, RexxObject *, RexxString *, RexxObject **, size_t, size_t, ProtectedObject &)
 
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 &)
 
- Public Member Functions inherited from BaseCode
virtual RexxClassfindClass (RexxString *className)
 
virtual BaseCodesetSourceObject (RexxSource *s)
 
virtual PackageClassgetPackage ()
 
bool isSamePackage (PackageClass *p)
 
- 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 ()
 
void setInRexxPackage ()
 
bool isInRexxPackage ()
 
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 RexxTextmakeText ()
 
virtual void copyIntoTail (RexxCompoundTail *buffer)
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxTextprimitiveMakeText ()
 
virtual RexxArraymakeArray ()
 
virtual RexxStringstringValue ()
 
virtual RexxTexttextValue ()
 
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 *)
 
virtual RexxObjectdynamicTarget (RexxObject **arguments, size_t count, size_t named_count)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual RexxObjectunflatten (RexxEnvelope *)
 

Protected Attributes

RexxSourcesource
 
RexxInstructionstart
 
RexxDirectorylabels
 
size_t maxStack
 
size_t vdictSize
 

Additional Inherited Members

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

Detailed Description

Definition at line 58 of file RexxCode.hpp.

Constructor & Destructor Documentation

◆ RexxCode() [1/2]

RexxCode::RexxCode ( RexxSource _source,
RexxInstruction _start,
RexxDirectory _labels,
size_t  maxstack,
size_t  variable_index 
)

Definition at line 59 of file RexxCode.cpp.

References labels, maxStack, OrefSet, source, start, and vdictSize.

◆ RexxCode() [2/2]

RexxCode::RexxCode ( RESTORETYPE  restoreType)
inline

Definition at line 67 of file RexxCode.hpp.

Member Function Documentation

◆ call() [1/2]

void RexxCode::call ( RexxActivity activity,
RoutineClass routine,
RexxString msgname,
RexxObject **  argPtr,
size_t  argcount,
size_t  named_argcount,
ProtectedObject result 
)
virtual

Process a detached ::requires type call.

Parameters
activityThe current activity,
routineThe routine object we're executing.
msgnameThe name this was invoked under.
argPtrThe pointer to the call arguments,
argcountThe count of arguments,
resultThe returned result.

Reimplemented from BaseCode.

Definition at line 88 of file RexxCode.cpp.

References call(), EXTERNALCALL, and OREF_NULL.

◆ call() [2/2]

void RexxCode::call ( RexxActivity activity,
RoutineClass routine,
RexxString msgname,
RexxObject **  arguments,
size_t  argcount,
size_t  named_argcount,
RexxString ct,
RexxString env,
int  context,
ProtectedObject result 
)
virtual

Invoke a code element as a call target. This form is generally only used for calls from Rexx code to Rexx code or for top level program invocation.

Parameters
activityThe activity we're running under.
msgnameThe name of the program or name used to invoke the routine.
argumentsThe arguments to the method.
argcountThe count of positional arguments.
named_argcountThe count of named arguments.
ctThe call context.
envThe current address environment.
contextThe type of call being made (program call, internal call, interpret, etc.)
resultThe returned result.

Reimplemented from BaseCode.

Definition at line 95 of file RexxCode.cpp.

References RexxActivity::checkStackSpace(), RexxActivity::getCurrentRexxFrame(), ActivityManager::newActivation(), OREF_NULL, RexxActivity::pushStackFrame(), and RexxActivation::run().

Referenced by call().

◆ extract()

RexxString* RexxCode::extract ( SourceLocation l)
inline

Definition at line 85 of file RexxCode.hpp.

References RexxSource::extract(), and source.

◆ findRoutine()

RoutineClass* RexxCode::findRoutine ( RexxString n)
inline

Definition at line 91 of file RexxCode.hpp.

References RexxSource::findRoutine(), and source.

Referenced by RexxActivation::externalCall().

◆ flatten()

void RexxCode::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 167 of file RexxCode.cpp.

References cleanUpFlatten, flatten_reference, and setUpFlatten.

◆ getFirstInstruction()

RexxInstruction* RexxCode::getFirstInstruction ( )
inline

Definition at line 75 of file RexxCode.hpp.

References start.

Referenced by RexxActivation::run().

◆ getLabels()

RexxDirectory* RexxCode::getLabels ( )
inline

Definition at line 76 of file RexxCode.hpp.

References labels.

Referenced by RexxActivation::getLabels().

◆ getLocalRoutines()

RexxDirectory* RexxCode::getLocalRoutines ( )
inline

Definition at line 79 of file RexxCode.hpp.

References RexxSource::getLocalRoutines(), and source.

Referenced by RexxActivation::addLocalRoutine().

◆ getLocalVariableSize()

size_t RexxCode::getLocalVariableSize ( )
inline

Definition at line 78 of file RexxCode.hpp.

References vdictSize.

Referenced by RexxActivation::RexxActivation().

◆ getMaxStackSize()

size_t RexxCode::getMaxStackSize ( )
inline

Definition at line 77 of file RexxCode.hpp.

References maxStack.

Referenced by RexxActivation::RexxActivation().

◆ getMethods()

RexxDirectory* RexxCode::getMethods ( )
inline

Definition at line 89 of file RexxCode.hpp.

References RexxSource::getMethods(), and source.

Referenced by RexxActivation::rexxVariable().

◆ getProgramName()

RexxString * RexxCode::getProgramName ( )

REXX

Definition at line 208 of file RexxCode.cpp.

References RexxSource::getProgramName(), and source.

Referenced by RexxActivation::getProgramName().

◆ getPublicRoutines()

RexxDirectory* RexxCode::getPublicRoutines ( )
inline

Definition at line 80 of file RexxCode.hpp.

References RexxSource::getPublicRoutines(), and source.

Referenced by RexxActivation::getPublicRoutines().

◆ getRoutines()

RexxDirectory* RexxCode::getRoutines ( )
inline

Definition at line 90 of file RexxCode.hpp.

References RexxSource::getRoutines(), and source.

Referenced by RexxActivation::rexxVariable().

◆ getSecurityManager()

SecurityManager* RexxCode::getSecurityManager ( )
inline

Definition at line 86 of file RexxCode.hpp.

References RexxSource::getSecurityManager(), and source.

Referenced by RexxActivation::RexxActivation().

◆ getSource()

RexxArray * RexxCode::getSource ( )
virtual

Return source informaton for a BaseCode object. If not representing an element in a source file, this returns an empty array.

Returns
A null array.

Reimplemented from BaseCode.

Definition at line 181 of file RexxCode.cpp.

References RexxSource::extractSource(), SourceLocation::getEndLine(), SourceLocation::getEndOffset(), RexxInstruction::getLocation(), new_array(), RexxInstruction::nextInstruction, OREF_NULL, SourceLocation::setEndLine(), SourceLocation::setEndOffset(), source, and start.

◆ getSourceObject()

RexxSource* RexxCode::getSourceObject ( )
inlinevirtual

Retrieve the source object associated with a code object.

Returns

Reimplemented from BaseCode.

Definition at line 74 of file RexxCode.hpp.

References source.

Referenced by RexxActivation::addLocalRoutine(), RexxActivation::RexxActivation(), and RexxActivation::traceClause().

◆ install()

void RexxCode::install ( RexxActivation activation)
inline

Definition at line 87 of file RexxCode.hpp.

References RexxSource::install(), and source.

Referenced by RexxActivation::run().

◆ interpret()

RexxCode* RexxCode::interpret ( RexxString s,
size_t  n,
RexxActivation activation 
)
inline

Definition at line 88 of file RexxCode.hpp.

References RexxSource::interpret(), labels, and source.

Referenced by RexxActivation::debugInterpret(), and RexxActivation::interpret().

◆ isInterpret()

bool RexxCode::isInterpret ( )
inline

Definition at line 84 of file RexxCode.hpp.

References RexxSource::isInterpret(), and source.

◆ isTraceable()

◆ live()

void RexxCode::live ( size_t  liveMark)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 142 of file RexxCode.cpp.

References labels, memory_mark, source, and start.

◆ liveGeneral()

void RexxCode::liveGeneral ( int  reason)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 152 of file RexxCode.cpp.

References labels, memory_mark_general, SAVINGIMAGE, RexxInternalObject::setInRexxPackage(), source, and start.

◆ mergeRequired()

void RexxCode::mergeRequired ( RexxSource s)
inline

Definition at line 93 of file RexxCode.hpp.

References RexxSource::mergeRequired(), and source.

Referenced by RexxActivation::callExternalRexx().

◆ operator delete() [1/2]

void RexxCode::operator delete ( void *  )
inline

Definition at line 63 of file RexxCode.hpp.

◆ operator delete() [2/2]

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

Definition at line 64 of file RexxCode.hpp.

◆ operator new() [1/2]

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

Definition at line 62 of file RexxCode.hpp.

◆ operator new() [2/2]

void * RexxCode::operator new ( size_t  size)

Definition at line 218 of file RexxCode.cpp.

References new_object(), and T_RexxCode.

◆ resolveProgramName()

RexxString* RexxCode::resolveProgramName ( RexxActivity activity,
RexxString name 
)
inline

Definition at line 92 of file RexxCode.hpp.

References RexxSource::resolveProgramName(), and source.

Referenced by RexxActivation::resolveProgramName().

◆ run()

void RexxCode::run ( RexxActivity activity,
RexxMethod method,
RexxObject receiver,
RexxString msgname,
RexxObject **  arguments,
size_t  argCount,
size_t  named_argCount,
ProtectedObject result 
)
virtual

Run this code as a method invocation.

Parameters
activityThe current activity.
methodThe method we're invoking.
receiverThe method target object.
msgnameThe name the method was invoked under.
argCountThe count of positional arguments.
named_argCountThe count of named arguments.
argumentsThe argument pointer.
resultThe returned result.

Reimplemented from BaseCode.

Definition at line 120 of file RexxCode.cpp.

References RexxActivity::getCurrentRexxFrame(), ActivityManager::newActivation(), OREF_NULL, RexxActivity::pushStackFrame(), RexxActivity::relinquish(), and RexxActivation::run().

◆ setLocalRoutines()

void RexxCode::setLocalRoutines ( RexxDirectory r)
inline

Definition at line 81 of file RexxCode.hpp.

References RexxSource::setLocalRoutines(), and source.

◆ setPublicRoutines()

void RexxCode::setPublicRoutines ( RexxDirectory r)
inline

Definition at line 82 of file RexxCode.hpp.

References RexxSource::setPublicRoutines(), and source.

◆ setSecurityManager()

RexxObject * RexxCode::setSecurityManager ( RexxObject manager)
virtual

Set the security manager in the code source context.

Parameters
managerThe new security manager.
Returns
Returns true if the manager could be set. Non-Rexx code objects just return false unconditionally.

Reimplemented from BaseCode.

Definition at line 227 of file RexxCode.cpp.

References RexxSource::setSecurityManager(), source, and TheTrueObject.

Member Data Documentation

◆ labels

RexxDirectory* RexxCode::labels
protected

Definition at line 102 of file RexxCode.hpp.

Referenced by getLabels(), interpret(), live(), liveGeneral(), and RexxCode().

◆ maxStack

size_t RexxCode::maxStack
protected

Definition at line 103 of file RexxCode.hpp.

Referenced by getMaxStackSize(), and RexxCode().

◆ source

◆ start

RexxInstruction* RexxCode::start
protected

Definition at line 101 of file RexxCode.hpp.

Referenced by getFirstInstruction(), getSource(), live(), liveGeneral(), and RexxCode().

◆ vdictSize

size_t RexxCode::vdictSize
protected

Definition at line 104 of file RexxCode.hpp.

Referenced by getLocalVariableSize(), and RexxCode().


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