#include <MethodClass.hpp>
Static Public Member Functions | |
static RexxMethod * | newMethodObject (RexxString *, RexxObject *, RexxObject *, RexxSource *a, bool isBlock=false) |
static RexxMethod * | restore (RexxBuffer *, char *, size_t length) |
static void | createInstance () |
Static Public Member Functions inherited from RexxObject | |
static void | decodeMessageName (RexxObject *target, RexxObject *message, RexxString *&messageName, RexxObject *&startScope) |
static void | createInstance () |
Static Public Member Functions inherited from RexxInternalObject | |
static size_t | getObjectHeaderSize () |
Static Public Attributes | |
static RexxClass * | classInstance = OREF_NULL |
Static Public Attributes inherited from RexxObject | |
static PCPPM | operatorMethods [] |
static RexxClass * | classInstance = OREF_NULL |
Protected Types | |
enum | { PRIVATE_FLAG = 0x01 , UNGUARDED_FLAG = 0x02 , PROTECTED_FLAG = 0x40 } |
Protected Attributes | |
size_t | methodFlags |
RexxClass * | scope |
Protected Attributes inherited from BaseExecutable | |
RexxString * | executableName |
BaseCode * | code |
Additional Inherited Members | |
Public Attributes inherited from RexxInternalObject | |
ObjectHeader | header |
RexxBehaviour * | behaviour |
Protected Member Functions inherited from RexxVirtualBase | |
virtual | ~RexxVirtualBase () |
virtual void | baseVirtual () |
Definition at line 102 of file MethodClass.hpp.
|
protected |
Enumerator | |
---|---|
PRIVATE_FLAG | |
UNGUARDED_FLAG | |
PROTECTED_FLAG |
Definition at line 159 of file MethodClass.hpp.
RexxMethod::RexxMethod | ( | RexxString * | name, |
BaseCode * | codeObj | ||
) |
Initialize a Routine object from a generated code object. Generally used for routines generated from ::METHOD directives.
name | The routine name. |
codeObj | The associated code object. |
Definition at line 179 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, and OrefSet.
RexxMethod::RexxMethod | ( | RexxString * | name, |
RexxSource * | _source | ||
) |
Generate a method directly from a source object.
source | The source object. |
Definition at line 158 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, RexxSource::generateCode(), and OrefSet.
RexxMethod::RexxMethod | ( | RexxString * | name | ) |
Initialize a RexxMethod object from a file source.
name | The routine name (and the resolved name of the file). |
Definition at line 191 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, RexxSource::generateCode(), and OrefSet.
RexxMethod::RexxMethod | ( | RexxString * | name, |
RexxBuffer * | buf | ||
) |
Initialize a Routine object using a buffered source.
name | The name of the routine. |
source | the source buffer. |
Definition at line 213 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, RexxSource::generateCode(), and OrefSet.
RexxMethod::RexxMethod | ( | RexxString * | name, |
const char * | data, | ||
size_t | length | ||
) |
Initialize a Routine object using directly provided source.
name | The name of the routine. |
data | The source data buffer pointer. |
length | the length of the source buffer. |
Definition at line 236 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, RexxSource::generateCode(), and OrefSet.
RexxMethod::RexxMethod | ( | RexxString * | name, |
RexxArray * | s | ||
) |
Initialize a Routine object using an array source.
name | The name of the routine. |
source | the source buffer. |
Definition at line 258 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, RexxSource::generateCode(), and OrefSet.
|
inline |
Definition at line 113 of file MethodClass.hpp.
|
static |
Create initial class object at bootstrap time.
Definition at line 74 of file MethodClass.cpp.
References CLASS_CREATE.
Referenced by RexxMemory::createImage().
void RexxMethod::execute | ( | RexxObject * | , |
RexxObject * | |||
) |
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 295 of file MethodClass.cpp.
References cleanUpFlatten, flatten_reference, and setUpFlatten.
|
inline |
Definition at line 147 of file MethodClass.hpp.
References BaseExecutable::code.
|
inline |
Definition at line 145 of file MethodClass.hpp.
References scope.
Referenced by RexxObject::checkPrivate(), InternalActivationFrame::createStackFrame(), RexxBehaviour::define(), RexxNativeActivation::methodVariables(), RexxObject::objectName(), RexxObject::objectNameEquals(), RexxActivation::RexxActivation(), AttributeGetterCode::run(), AttributeSetterCode::run(), and RexxBehaviour::superMethod().
|
inline |
Definition at line 134 of file MethodClass.hpp.
References methodFlags, and UNGUARDED_FLAG.
Referenced by RexxNativeActivation::methodVariables(), RexxActivation::RexxActivation(), AttributeGetterCode::run(), and AttributeSetterCode::run().
RexxObject * RexxMethod::isGuardedRexx | ( | ) |
Return the Guarded setting for a method object.
Definition at line 412 of file MethodClass.cpp.
References TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 135 of file MethodClass.hpp.
References methodFlags, and PRIVATE_FLAG.
Referenced by RexxObject::messageSend().
RexxObject * RexxMethod::isPrivateRexx | ( | ) |
Return the Private setting for a method object.
Definition at line 422 of file MethodClass.cpp.
References TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 136 of file MethodClass.hpp.
References methodFlags, and PROTECTED_FLAG.
Referenced by RexxObject::messageSend().
RexxObject * RexxMethod::isProtectedRexx | ( | ) |
Return the Protected setting for a method object.
Definition at line 432 of file MethodClass.cpp.
References TheFalseObject, and TheTrueObject.
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 137 of file MethodClass.hpp.
References methodFlags, PRIVATE_FLAG, and PROTECTED_FLAG.
Referenced by RexxObject::messageSend().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 273 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, and memory_mark.
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 284 of file MethodClass.cpp.
References BaseExecutable::code, BaseExecutable::executableName, and memory_mark_general.
RexxMethod * RexxMethod::loadExternalMethod | ( | RexxString * | name, |
RexxString * | descriptor | ||
) |
Create a method from an external library source.
name | The method name. |
Definition at line 871 of file MethodClass.cpp.
References Error_Translation_bad_external, RexxArray::get(), RexxString::getBLength(), RexxString::getStringData(), PackageManager::loadMethod(), OREF_NULL, reportException(), RexxArray::size(), stringArgument(), TheNilObject, and StringUtil::words().
Referenced by RexxMemory::createImage().
RexxMethod * RexxMethod::newFileRexx | ( | RexxString * | filename | ) |
Definition at line 664 of file MethodClass.cpp.
References ARG_ONE, RexxInternalObject::hasUninit(), RexxObject::sendMessage(), RexxInternalObject::setBehaviour(), setScope(), stringArgument(), and TheNilObject.
Referenced by RexxMemory::createImage().
|
static |
Static method used for constructing new method objects in various contexts (such as the define method on the Class class).
pgmname | The name of the method we're creating. |
source | The method source (either a string or an array). |
position | The position used for reporting errors. This is the position of the source argument for the calling method context. |
parentScope | The parent code we inherit routine scope from. This overrides anything that might be defined in single method code. |
Definition at line 504 of file MethodClass.cpp.
References ActivityManager::currentActivity, Error_Incorrect_method_no_method, Error_Incorrect_method_noarray, Error_Incorrect_method_nostring_inarray, RexxArray::get(), RexxActivity::getCurrentRexxFrame(), RexxArray::getDimension(), BaseExecutable::getSourceObject(), RexxActivation::getSourceObject(), RexxSource::inheritSourceContext(), IntegerTwo, RexxObject::makeString(), RexxArray::makeString(), new_array(), OREF_NULL, RexxArray::put(), reportException(), RexxObject::requestArray(), RexxSource::setIsBlock(), RexxArray::size(), BaseExecutable::source(), and TheNilObject.
Referenced by RexxClass::defineMethod(), RexxClass::methodDictionaryCreate(), newRexx(), RexxObject::run(), RexxDirectory::setMethod(), and RexxObject::setMethod().
RexxMethod * RexxMethod::newRexx | ( | RexxObject ** | init_args, |
size_t | argCount, | ||
size_t | named_argCount | ||
) |
Definition at line 580 of file MethodClass.cpp.
References ARG_ONE, ARG_TWO, Error_Incorrect_call_list, Error_Incorrect_method_argType, Error_Logical_value_method, RexxInternalObject::hasUninit(), IntegerThree, IntegerTwo, isOfClass, new_string(), newMethodObject(), OREF_NULL, RexxClass::processNewArgs(), reportException(), RexxObject::requestString(), requiredArgument(), RexxObject::sendMessage(), RexxInternalObject::setBehaviour(), stringArgument(), TheNilObject, and RexxObject::truthValue().
Referenced by RexxMemory::createImage().
RexxMethod * RexxMethod::newScope | ( | RexxClass * | _scope | ) |
Definition at line 329 of file MethodClass.cpp.
References RexxObject::copy(), OREF_NULL, OrefSet, and scope.
Referenced by RexxClass::defineClassMethod(), RexxClass::defineMethod(), RexxObject::defMethod(), RexxObject::defMethods(), RexxClass::methodDictionaryCreate(), RexxObject::run(), and RexxDirectory::setMethod().
|
inline |
Definition at line 106 of file MethodClass.hpp.
void * RexxMethod::operator new | ( | size_t | size | ) |
Definition at line 479 of file MethodClass.cpp.
References new_object(), and T_Method.
|
static |
Definition at line 688 of file MethodClass.cpp.
References RexxEnvelope::getReceiver(), and RexxEnvelope::puff().
void RexxMethod::run | ( | RexxActivity * | activity, |
RexxObject * | receiver, | ||
RexxString * | msgname, | ||
RexxObject ** | argPtr, | ||
size_t | count, | ||
size_t | named_count, | ||
ProtectedObject & | result | ||
) |
Definition at line 311 of file MethodClass.cpp.
References BaseExecutable::code, and BaseCode::run().
Referenced by RexxDirectory::allIndexesItems(), RexxDirectory::allItems(), RexxDirectory::appendAllIndexesItemsTo(), RexxDirectory::at(), RexxDirectory::indexRexx(), RexxObject::messageSend(), RexxObject::processProtectedMethod(), RexxObject::processUnknown(), RexxDirectory::pushAllIndexesItemsTo(), RexxObject::run(), and RexxDirectory::supplier().
RexxSmartBuffer * RexxMethod::saveMethod | ( | ) |
Definition at line 464 of file MethodClass.cpp.
References RexxEnvelope::getBuffer(), and RexxEnvelope::pack().
void RexxMethod::setAttributes | ( | bool | _private, |
bool | _protected, | ||
bool | _guarded | ||
) |
Set the entire set of method attributes with one call. Used during source compilation.
_private | The private setting. |
_protected | The protected setting. |
_guarded | The guarded setting. |
Definition at line 446 of file MethodClass.cpp.
Referenced by RexxSource::attributeDirective(), RexxSource::createAbstractMethod(), RexxSource::createAttributeGetterMethod(), RexxSource::createAttributeSetterMethod(), RexxSource::createMethod(), and RexxSource::methodDirective().
|
inline |
Definition at line 140 of file MethodClass.hpp.
References methodFlags, and UNGUARDED_FLAG.
RexxObject * RexxMethod::setGuardedRexx | ( | ) |
Definition at line 380 of file MethodClass.cpp.
References OREF_NULL.
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 142 of file MethodClass.hpp.
References methodFlags, and PRIVATE_FLAG.
Referenced by RexxMemory::definePrivateKernelMethod().
RexxObject * RexxMethod::setPrivateRexx | ( | ) |
Definition at line 389 of file MethodClass.cpp.
References OREF_NULL.
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 143 of file MethodClass.hpp.
References methodFlags, and PROTECTED_FLAG.
Referenced by RexxMemory::defineProtectedKernelMethod().
RexxObject * RexxMethod::setProtectedRexx | ( | ) |
Definition at line 398 of file MethodClass.cpp.
References OREF_NULL.
Referenced by RexxMemory::createImage().
void RexxMethod::setScope | ( | RexxClass * | _scope | ) |
Definition at line 361 of file MethodClass.cpp.
References OrefSet.
Referenced by RexxClass::defineMethods(), RexxClass::methodDictionaryCreate(), newFileRexx(), and RexxDirectory::setMethod().
RexxObject * RexxMethod::setSecurityManager | ( | RexxObject * | manager | ) |
Definition at line 352 of file MethodClass.cpp.
References BaseExecutable::code, and BaseCode::setSecurityManager().
Referenced by RexxMemory::createImage().
|
inline |
Definition at line 139 of file MethodClass.hpp.
References methodFlags, and UNGUARDED_FLAG.
Referenced by RexxSource::createConstantGetterMethod().
RexxObject * RexxMethod::setUnguardedRexx | ( | ) |
Definition at line 371 of file MethodClass.cpp.
References OREF_NULL.
Referenced by RexxMemory::createImage().
Definition at line 156 of file MethodClass.hpp.
|
protected |
Definition at line 166 of file MethodClass.hpp.
Referenced by isGuarded(), isPrivate(), isProtected(), isSpecial(), setGuarded(), setPrivate(), setProtected(), and setUnguarded().
|
protected |
Definition at line 167 of file MethodClass.hpp.
Referenced by getScope(), and newScope().