#include <tree.h>
Public Member Functions | |
virtual void | emit (PreLinkBytecode &bytecodes) const |
Generate bytecode. | |
virtual Node * | expandToAsebaTree (std::wostream *dump, unsigned int index=0) |
Second pass to expand "abstract" nodes into more concrete ones. | |
virtual unsigned | getStackDepth () const |
Return the stack depth requirement for this node and its children. | |
virtual unsigned | getVectorSize () const |
return the children's size, check for equal size, or E_NOVAL if no child | |
ImmediateNode (const SourcePos &sourcePos, int value) | |
Constructor. | |
virtual Node * | optimize (std::wostream *dump) |
Optimize this node, return the optimized node. | |
virtual ImmediateNode * | shallowCopy () |
Return a shallow copy of the object (children point to the same objects) | |
virtual std::wstring | toNodeName () const |
Return a string representation of the name of this node. | |
virtual std::wstring | toWString () const |
Return a string representation of this node. | |
virtual ReturnType | typeCheck () const |
Typecheck this node, throw an exception if there is any type violation. | |
Public Attributes | |
int | value |
value to push on stack |
Node for pushing immediate value on stack. Might generate either Small Immediate or Large Immediate bytecode depending on the range of value no children
Aseba::ImmediateNode::ImmediateNode | ( | const SourcePos & | sourcePos, |
int | value | ||
) | [inline] |
virtual Node* Aseba::ImmediateNode::expandToAsebaTree | ( | std::wostream * | dump, |
unsigned int | index = 0 |
||
) | [inline, virtual] |
Second pass to expand "abstract" nodes into more concrete ones.
Reimplemented from Aseba::Node.
virtual unsigned Aseba::ImmediateNode::getVectorSize | ( | ) | const [inline, virtual] |
return the children's size, check for equal size, or E_NOVAL if no child
Reimplemented from Aseba::Node.
virtual ImmediateNode* Aseba::ImmediateNode::shallowCopy | ( | ) | [inline, virtual] |
Return a shallow copy of the object (children point to the same objects)
Implements Aseba::Node.
virtual std::wstring Aseba::ImmediateNode::toNodeName | ( | ) | const [inline, virtual] |
Return a string representation of the name of this node.
Implements Aseba::Node.
virtual ReturnType Aseba::ImmediateNode::typeCheck | ( | ) | const [inline, virtual] |
Typecheck this node, throw an exception if there is any type violation.
Reimplemented from Aseba::Node.