#include <DoInstruction.hpp>
Public Attributes | |
RexxObject * | initial |
RexxObject * | to |
RexxObject * | by |
RexxVariableBase * | control |
RexxString * | label |
RexxObject * | conditional |
RexxInstruction * | end |
RexxObject * | forcount |
uint8_t | type |
uint8_t | expressions [3] |
Public Attributes inherited from RexxInstruction | |
uint16_t | instructionType |
uint16_t | instructionFlags |
SourceLocation | instructionLocation |
RexxInstruction * | nextInstruction |
Public Attributes inherited from RexxInternalObject | |
ObjectHeader | header |
RexxBehaviour * | behaviour |
Additional Inherited Members | |
Static Public Member Functions inherited from RexxInternalObject | |
static size_t | getObjectHeaderSize () |
Protected Member Functions inherited from RexxVirtualBase | |
virtual | ~RexxVirtualBase () |
virtual void | baseVirtual () |
Definition at line 67 of file DoInstruction.hpp.
|
inline |
Definition at line 76 of file DoInstruction.hpp.
|
inline |
Definition at line 77 of file DoInstruction.hpp.
bool RexxInstructionDo::checkControl | ( | RexxActivation * | context, |
RexxExpressionStack * | stack, | ||
RexxDoBlock * | doblock, | ||
bool | increment | ||
) |
Definition at line 615 of file DoInstruction.cpp.
References callOperatorMethod(), control, forcount, RexxDoBlock::getBy(), RexxDoBlock::getCompare(), RexxDoBlock::getTo(), RexxInternalObject::getValue(), OPERATOR_PLUS, OREF_NULL, RexxVariableBase::set(), RexxDoBlock::testFor(), TheTrueObject, to, and RexxActivation::traceResult().
Referenced by execute(), and reExecute().
bool RexxInstructionDo::checkOver | ( | RexxActivation * | context, |
RexxExpressionStack * | stack, | ||
RexxDoBlock * | doblock | ||
) |
Definition at line 582 of file DoInstruction.cpp.
References RexxVariableBase::assign(), control, RexxArray::get(), RexxDoBlock::getFor(), RexxDoBlock::getTo(), OREF_NULL, RexxDoBlock::setFor(), RexxArray::size(), TheNilObject, and RexxActivation::traceResult().
Referenced by execute(), and reExecute().
void RexxInstructionDo::controlSetup | ( | RexxActivation * | context, |
RexxExpressionStack * | stack, | ||
RexxDoBlock * | doblock | ||
) |
Definition at line 459 of file DoInstruction.cpp.
References RexxVariableBase::assign(), by, callOperatorMethod(), control, Numerics::DEFAULT_DIGITS, RexxActivation::digits(), Error_Invalid_whole_number_for, RexxInternalObject::evaluate(), EXP_BY, EXP_FOR, EXP_TO, expressions, forcount, RexxInternalObject::getValue(), initial, IntegerOne, RexxObject::integerValue(), IntegerZero, isOfClass, number_digits(), OPERATOR_GREATERTHAN, OPERATOR_LESSTHAN, OPERATOR_PLUS, OREF_NULL, reportException(), REQUEST_STRING(), RexxObject::requestNumber(), RexxDoBlock::setBy(), RexxDoBlock::setCompare(), RexxDoBlock::setFor(), RexxDoBlock::setTo(), TheNilObject, TheTrueObject, to, and RexxActivation::traceResult().
Referenced by execute().
|
virtual |
Reimplemented from RexxInstruction.
Definition at line 210 of file DoInstruction.cpp.
References RexxActivation::addBlock(), callOperatorMethod(), checkControl(), checkOver(), RexxActivation::conditionalPauseInstruction(), CONTROLLED_DO, CONTROLLED_UNTIL, CONTROLLED_WHILE, controlSetup(), Numerics::DEFAULT_DIGITS, RexxActivation::digits(), DO_COUNT, DO_COUNT_UNTIL, DO_COUNT_WHILE, DO_FOREVER, DO_OVER, DO_OVER_UNTIL, DO_OVER_WHILE, DO_UNTIL, DO_WHILE, Error_Execution_noarray, Error_Invalid_whole_number_repeat, RexxInternalObject::evaluate(), forcount, RexxActivation::getIndent(), getLabel(), RexxInternalObject::getValue(), initial, isOfClass, RexxArray::makeArray(), RexxActivation::newDo(), number_digits(), OPERATOR_PLUS, OREF_NULL, RexxActivation::removeBlock(), reportException(), REQUEST_ARRAY(), REQUEST_STRING(), RexxObject::requestNumber(), RexxDoBlock::setFor(), RexxActivation::setNext(), RexxDoBlock::setTo(), SIMPLE_DO, terminate(), RexxDoBlock::testFor(), TheNilObject, RexxActivation::traceInstruction(), RexxActivation::traceResult(), type, and whileCondition().
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 177 of file DoInstruction.cpp.
References cleanUpFlatten, flatten_reference, and setUpFlatten.
RexxInstruction* RexxInstructionDo::getEnd | ( | ) |
|
virtual |
Get the label for this block instruction.
Reimplemented from RexxBlockInstruction.
Definition at line 128 of file DoInstruction.cpp.
References label.
Referenced by execute(), matchEnd(), and matchLabel().
|
virtual |
Check for a label match on a block instruction.
name | The target block name. |
Reimplemented from RexxBlockInstruction.
Definition at line 118 of file DoInstruction.cpp.
References label.
|
virtual |
Tests to see if this is a loop instruction.
Reimplemented from RexxBlockInstruction.
Definition at line 138 of file DoInstruction.cpp.
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 144 of file DoInstruction.cpp.
References by, conditional, control, end, forcount, initial, label, memory_mark, RexxInstruction::nextInstruction, and to.
|
virtual |
Reimplemented from RexxVirtualBase.
Definition at line 160 of file DoInstruction.cpp.
References by, conditional, control, end, forcount, initial, label, memory_mark_general, RexxInstruction::nextInstruction, and to.
|
virtual |
Reimplemented from RexxBlockInstruction.
Definition at line 83 of file DoInstruction.cpp.
References DO_BLOCK, end, getLabel(), LABELED_DO_BLOCK, LOOP_BLOCK, matchLabel(), OREF_NULL, OrefSet, RexxInstructionEnd::setStyle(), SIMPLE_DO, and type.
void RexxInstructionDo::matchLabel | ( | RexxInstructionEnd * | end, |
RexxSource * | source | ||
) |
Definition at line 57 of file DoInstruction.cpp.
References RexxSource::error(), Error_Unexpected_end_control, Error_Unexpected_end_nocontrol, getLabel(), RexxInstruction::getLineNumber(), RexxInstruction::getLocation(), RexxInstructionEnd::name, new_array(), new_integer(), and OREF_NULL.
Referenced by matchEnd().
|
inline |
Definition at line 72 of file DoInstruction.hpp.
|
inline |
Definition at line 73 of file DoInstruction.hpp.
|
inline |
Definition at line 71 of file DoInstruction.hpp.
void RexxInstructionDo::reExecute | ( | RexxActivation * | context, |
RexxExpressionStack * | stack, | ||
RexxDoBlock * | doblock | ||
) |
Definition at line 657 of file DoInstruction.cpp.
References checkControl(), checkOver(), CONTROLLED_DO, CONTROLLED_UNTIL, CONTROLLED_WHILE, DO_COUNT, DO_COUNT_UNTIL, DO_COUNT_WHILE, DO_FOREVER, DO_OVER, DO_OVER_UNTIL, DO_OVER_WHILE, DO_UNTIL, DO_WHILE, end, RexxActivation::indent(), RexxInstruction::nextInstruction, RexxActivation::popBlock(), RexxActivation::removeBlock(), RexxActivation::setNext(), RexxDoBlock::testFor(), RexxActivation::traceInstruction(), type, RexxActivation::unindent(), untilCondition(), and whileCondition().
|
virtual |
Reimplemented from RexxBlockInstruction.
Definition at line 197 of file DoInstruction.cpp.
References end, RexxDoBlock::getIndent(), RexxInstruction::nextInstruction, RexxActivation::setNext(), and RexxActivation::terminateBlock().
Referenced by execute().
bool RexxInstructionDo::untilCondition | ( | RexxActivation * | context, |
RexxExpressionStack * | stack | ||
) |
Definition at line 775 of file DoInstruction.cpp.
References conditional, Error_Logical_value_until, RexxInternalObject::evaluate(), TheFalseObject, TheTrueObject, RexxActivation::traceResult(), and RexxObject::truthValue().
Referenced by reExecute().
bool RexxInstructionDo::whileCondition | ( | RexxActivation * | context, |
RexxExpressionStack * | stack | ||
) |
Definition at line 802 of file DoInstruction.cpp.
References conditional, Error_Logical_value_while, RexxInternalObject::evaluate(), TheFalseObject, TheTrueObject, RexxActivation::traceResult(), and RexxObject::truthValue().
Referenced by execute(), and reExecute().
RexxObject* RexxInstructionDo::by |
Definition at line 100 of file DoInstruction.hpp.
Referenced by controlSetup(), RexxSource::createDoLoop(), live(), and liveGeneral().
RexxObject* RexxInstructionDo::conditional |
Definition at line 103 of file DoInstruction.hpp.
Referenced by RexxSource::createDoLoop(), live(), liveGeneral(), untilCondition(), and whileCondition().
RexxVariableBase* RexxInstructionDo::control |
Definition at line 101 of file DoInstruction.hpp.
Referenced by checkControl(), checkOver(), controlSetup(), RexxSource::createDoLoop(), live(), and liveGeneral().
RexxInstruction* RexxInstructionDo::end |
Definition at line 104 of file DoInstruction.hpp.
Referenced by live(), liveGeneral(), matchEnd(), reExecute(), and terminate().
uint8_t RexxInstructionDo::expressions[3] |
Definition at line 107 of file DoInstruction.hpp.
Referenced by controlSetup(), and RexxSource::createDoLoop().
RexxObject* RexxInstructionDo::forcount |
Definition at line 105 of file DoInstruction.hpp.
Referenced by checkControl(), controlSetup(), RexxSource::createDoLoop(), execute(), live(), and liveGeneral().
RexxObject* RexxInstructionDo::initial |
Definition at line 98 of file DoInstruction.hpp.
Referenced by controlSetup(), RexxSource::createDoLoop(), execute(), live(), and liveGeneral().
RexxString* RexxInstructionDo::label |
Definition at line 102 of file DoInstruction.hpp.
Referenced by RexxSource::createDoLoop(), getLabel(), isLabel(), live(), and liveGeneral().
RexxObject* RexxInstructionDo::to |
Definition at line 99 of file DoInstruction.hpp.
Referenced by checkControl(), controlSetup(), RexxSource::createDoLoop(), live(), and liveGeneral().
uint8_t RexxInstructionDo::type |
Definition at line 106 of file DoInstruction.hpp.
Referenced by RexxSource::createDoLoop(), execute(), isLoop(), matchEnd(), and reExecute().