#include <Interpreter.hpp>
Public Types | |
enum | InterpreterStartupMode { SAVE_IMAGE_MODE = 0 , RUN_MODE = 1 } |
Static Public Member Functions | |
static void | init () |
static void | live (size_t) |
static void | liveGeneral (int reason) |
static void | processStartup () |
static void | processShutdown () |
static void | getResourceLock (const char *ds, int di) |
static void | releaseResourceLock (const char *ds, int di) |
static void | createLocks () |
static void | closeLocks () |
static int | createInstance (RexxInstance *&instance, RexxThreadContext *&threadContext, RexxOption *options) |
static bool | terminateInterpreter () |
static void | startInterpreter (InterpreterStartupMode mode, const char *imageTarget) |
static bool | isTerminated () |
static bool | isActive () |
static bool | lastInstance () |
static InterpreterInstance * | createInterpreterInstance (RexxOption *options) |
static InterpreterInstance * | createInterpreterInstance () |
static bool | terminateInterpreterInstance (InterpreterInstance *instance) |
static RexxString * | getVersionNumber () |
static void | initLocal () |
static size_t | getInterpreterVersion () |
static size_t | getLanguageLevel () |
static bool | hasTimeSliceElapsed () |
static int | getWordSize () |
static bool | isBigEndian () |
static void | logicError (const char *desc, const char *info1=NULL, size_t info2=0) |
static wholenumber_t | messageNumber (RexxString *) |
static void | setTimeSliceElapsed () |
static void | clearTimeSliceElapsed () |
static bool | haltAllActivities (RexxString *) |
static void | decodeConditionData (RexxDirectory *conditionObj, RexxCondition *condData) |
static RexxClass * | findClass (RexxString *className) |
static RexxString * | getCurrentQueue () |
Static Public Attributes | |
static RexxObject * | localServer = OREF_NULL |
Static Protected Attributes | |
static SysMutex | resourceLock |
static int | initializations |
static bool | timeSliceElapsed = false |
static RexxList * | interpreterInstances = OREF_NULL |
static bool | active = false |
static RexxString * | versionNumber = OREF_NULL |
Definition at line 59 of file Interpreter.hpp.
Enumerator | |
---|---|
SAVE_IMAGE_MODE | |
RUN_MODE |
Definition at line 62 of file Interpreter.hpp.
|
inlinestatic |
Definition at line 132 of file Interpreter.hpp.
References timeSliceElapsed.
Referenced by SystemInterpreter::startTimeSlice().
|
inlinestatic |
Definition at line 83 of file Interpreter.hpp.
References SysMutex::close(), and resourceLock.
Referenced by processShutdown().
|
static |
Create a new instance and return the instance context pointers and thread context pointer for the instance.
instance | The returned instance pointer. |
threadContext | The returned thread context pointer. |
options | Options to apply to this interpreter instance. |
Definition at line 258 of file Interpreter.cpp.
References createInterpreterInstance(), RexxActivity::deactivate(), InterpreterInstance::getInstanceContext(), InterpreterInstance::getRootActivity(), InterpreterInstance::getRootThreadContext(), RexxActivity::releaseAccess(), and RXAPI_MEMFAIL.
Referenced by RexxCreateInterpreter().
|
inlinestatic |
Definition at line 95 of file Interpreter.hpp.
References createInterpreterInstance().
Referenced by RexxMemory::createImage(), createInstance(), createInterpreterInstance(), InstanceBlock::InstanceBlock(), and NativeContextBlock::NativeContextBlock().
|
static |
Create a new interpreter instance. An interpreter instance is an accessible set of threads that constitutes an interpreter environment for the purposes API access.
exits | The set of exits to use for this invocation. |
defaultEnvironment | The default addressible environment. |
Definition at line 293 of file Interpreter.cpp.
References RexxList::append(), ActivityManager::getRootActivity(), InterpreterInstance::initialize(), interpreterInstances, OREF_NULL, RUN_MODE, and startInterpreter().
|
inlinestatic |
Definition at line 78 of file Interpreter.hpp.
References SysMutex::create(), and resourceLock.
Referenced by processStartup().
|
static |
Decode a condition directory into a easier to use structure form for a native code user. This breaks the directory into its component pieces, including converting values into primitive form using just a single API call.
conditionObj | A directory object containing the condition information. |
pRexxCondData | The condition data structure that is populated with the condition information. |
Definition at line 462 of file Interpreter.cpp.
References RexxCondition::additional, RexxDirectory::at(), RexxCondition::code, RexxCondition::conditionName, RexxCondition::description, RexxCondition::errortext, RexxCondition::message, messageNumber(), OREF_NULL, RexxCondition::position, RexxCondition::program, and RexxCondition::rc.
Referenced by DecodeConditionInfo().
|
static |
Default class resolution processing done without benefit of a program context.
className | The class name. |
Definition at line 522 of file Interpreter.cpp.
References ActivityManager::getLocalEnvironment(), OREF_NULL, TheEnvironment, and RexxString::upper().
Referenced by RexxNativeActivation::findCallerClass(), BaseCode::findClass(), and RexxNativeActivation::findClass().
|
static |
Return the current queue name.
Definition at line 543 of file Interpreter.cpp.
References ActivityManager::getLocalEnvironment(), OREF_NULL, and RexxObject::sendMessage().
Referenced by RexxActivity::callFunctionExit(), RexxNativeActivation::callRegisteredRoutine(), and RexxNativeActivation::variablePoolFetchPrivate().
|
static |
Get the interpreter version level as a binary number to be returned in the APIs.
Definition at line 92 of file Version.cpp.
References REXX_CURRENT_INTERPRETER_VERSION.
Referenced by InterpreterVersion().
|
static |
Return the current language level implemented by this interpreter version.
Definition at line 103 of file Version.cpp.
References REXX_CURRENT_LANGUAGE_LEVEL.
Referenced by LanguageLevel().
|
inlinestatic |
Definition at line 76 of file Interpreter.hpp.
References SysMutex::request(), and resourceLock.
Referenced by ResourceSection::reacquire(), and ResourceSection::ResourceSection().
|
static |
Definition at line 52 of file Version.cpp.
References build_date, new_string(), OREF_NULL, versionNumber, and work.
Referenced by RexxMemory::createImage(), RexxInstructionParse::execute(), ProgramMetaData::ProgramMetaData(), and RexxNativeActivation::variablePoolFetchPrivate().
|
inlinestatic |
Definition at line 114 of file Interpreter.hpp.
Referenced by ProgramMetaData::ProgramMetaData(), and ProgramMetaData::validate().
|
static |
Tell the interpreter to have all of the instances halt its activities.
Definition at line 351 of file Interpreter.cpp.
References RexxList::firstIndex(), RexxList::getValue(), InterpreterInstance::haltAllActivities(), interpreterInstances, LIST_END, and RexxList::nextIndex().
Referenced by SystemInterpreter::processSignal(), and signalHandler().
|
inlinestatic |
Definition at line 102 of file Interpreter.hpp.
References timeSliceElapsed.
Referenced by RexxActivation::run().
|
static |
Initialize the interpreter subsystem.
Definition at line 77 of file Interpreter.cpp.
References interpreterInstances, and new_list().
Referenced by RexxMemory::createImage(), and RexxMemory::restore().
|
static |
Initialize an instance .local object.
Definition at line 167 of file Interpreter.cpp.
References localServer, RexxObject::messageSend(), and OREF_NULL.
Referenced by InterpreterInstance::initialize().
|
inlinestatic |
Definition at line 92 of file Interpreter.hpp.
References active.
Referenced by RexxHaltThread(), RexxResetThreadTrace(), RexxSetThreadTrace(), startInterpreter(), and terminateInterpreter().
|
inlinestatic |
Definition at line 119 of file Interpreter.hpp.
References LITEND.
Referenced by ProgramMetaData::ProgramMetaData(), and ProgramMetaData::validate().
|
inlinestatic |
|
static |
Quick test if we're down to just a single interpreter instance.
Definition at line 241 of file Interpreter.cpp.
References interpreterInstances, and RexxList::items().
Referenced by InterpreterInstance::terminate().
|
static |
Definition at line 83 of file Interpreter.cpp.
References interpreterInstances, localServer, memory_mark, and versionNumber.
Referenced by RexxMemory::live().
|
static |
Definition at line 90 of file Interpreter.cpp.
References interpreterInstances, localServer, memory_mark_general, memoryObject, RexxMemory::savingImage(), and versionNumber.
Referenced by RexxMemory::liveGeneral().
|
static |
Definition at line 556 of file Interpreter.cpp.
References RC_LOGIC_ERROR.
Referenced by DeadObjectPool::checkObjectGrain(), DeadObjectPool::checkObjectOverlap(), RexxMemory::checkSetOref(), RexxMemory::createImage(), SystemInterpreter::loadImage(), RexxHashTableCollection::makeProxy(), RexxMemory::markGeneral(), RexxMemory::orphanCheckMark(), LibraryPackage::reload(), CPPCode::resolveExportedMethod(), and RexxMemory::saveImageMark().
|
static |
Definition at line 566 of file Interpreter.cpp.
References Error_Expression_result_raise, RexxString::getLength(), RexxString::getStringData(), new_string(), RexxString::numberValue(), reportException(), and RexxString::stringValue().
Referenced by decodeConditionData(), RexxActivity::display(), RexxInstructionRaise::execute(), and RexxActivity::reraiseException().
|
static |
Definition at line 109 of file Interpreter.cpp.
References ActivityManager::closeLocks(), RexxMemory::closeLocks(), and closeLocks().
|
static |
Definition at line 100 of file Interpreter.cpp.
References ActivityManager::createLocks(), RexxMemory::createLocks(), and createLocks().
Referenced by SystemInterpreter::processShutdown(), and SystemInterpreter::processStartup().
|
inlinestatic |
Definition at line 77 of file Interpreter.hpp.
References SysMutex::release(), and resourceLock.
Referenced by ResourceSection::release(), and ResourceSection::~ResourceSection().
|
inlinestatic |
Definition at line 131 of file Interpreter.hpp.
References timeSliceElapsed.
Referenced by TimeSliceControl().
|
static |
Perform interpreter startup processing.
mode | The startup mode. This indicates whether we're saving the image or in shutdown mode. |
Definition at line 124 of file Interpreter.cpp.
References active, env_find, RexxMemory::initialize(), interpreterInstances, isActive(), localServer, memoryObject, RexxObject::messageSend(), new_list(), new_string(), OREF_NULL, RexxCreateSessionQueue(), RUN_MODE, and SystemInterpreter::startInterpreter().
Referenced by createInterpreterInstance(), RexxCreateInterpreterImage(), and RexxInitialize().
|
static |
Terminate the global interpreter environment, shutting down all of the interpreter instances that we can and releasing the object heap memory.
Definition at line 187 of file Interpreter.cpp.
References interpreterInstances, isActive(), RexxList::items(), RexxMemory::lastChanceUninit(), memoryObject, RexxDeleteSessionQueue(), SystemInterpreter::terminateInterpreter(), PackageManager::unload(), and RexxMemory::verboseMessage().
Referenced by RexxStart(), RexxTerminate(), RexxTranslateProgram(), and Terminate().
|
static |
Shutdown an interpreter instance and remove it from the list of accessible items.
instance | The instance we're shutting down. |
Definition at line 337 of file Interpreter.cpp.
References interpreterInstances, and RexxList::removeItem().
Referenced by InterpreterInstance::terminate().
|
staticprotected |
Definition at line 146 of file Interpreter.hpp.
Referenced by isActive(), isTerminated(), and startInterpreter().
|
staticprotected |
Definition at line 143 of file Interpreter.hpp.
Definition at line 145 of file Interpreter.hpp.
Referenced by createInterpreterInstance(), haltAllActivities(), init(), lastInstance(), live(), liveGeneral(), startInterpreter(), terminateInterpreter(), and terminateInterpreterInstance().
|
static |
Definition at line 138 of file Interpreter.hpp.
Referenced by initLocal(), live(), liveGeneral(), and startInterpreter().
|
staticprotected |
Definition at line 142 of file Interpreter.hpp.
Referenced by closeLocks(), createLocks(), getResourceLock(), and releaseResourceLock().
|
staticprotected |
Definition at line 144 of file Interpreter.hpp.
Referenced by clearTimeSliceElapsed(), hasTimeSliceElapsed(), and setTimeSliceElapsed().
|
staticprotected |
Definition at line 147 of file Interpreter.hpp.
Referenced by getVersionNumber(), live(), and liveGeneral().