$search
#include <tree.h>
Public Member Functions | |
ArrayReadNode (const SourcePos &sourcePos, unsigned arrayAddr, unsigned arraySize, const std::wstring &arrayName) | |
Constructor. | |
virtual void | emit (PreLinkBytecode &bytecodes) const |
Generate bytecode. | |
virtual unsigned | getVectorAddr () const |
return the address of the left-most operand, or E_NOVAL if none | |
virtual unsigned | getVectorSize () const |
return the children's size, check for equal size, or E_NOVAL if no child | |
virtual Node * | optimize (std::wostream *dump) |
Optimize this node, return the optimized node. | |
virtual ArrayReadNode * | 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 | |
unsigned | arrayAddr |
address of the first element of the array | |
std::wstring | arrayName |
name of the array (for debug) | |
unsigned | arraySize |
size of the array, might be used to assert compile-time access checks |
Node for reading from an array. children[0] is the index in the array
Definition at line 426 of file tree.h.
virtual unsigned Aseba::ArrayReadNode::getVectorAddr | ( | ) | const [inline, virtual] |
return the address of the left-most operand, or E_NOVAL if none
Reimplemented from Aseba::Node.
virtual unsigned Aseba::ArrayReadNode::getVectorSize | ( | ) | const [inline, virtual] |
return the children's size, check for equal size, or E_NOVAL if no child
Reimplemented from Aseba::Node.
virtual ArrayReadNode* Aseba::ArrayReadNode::shallowCopy | ( | ) | [inline, virtual] |
Return a shallow copy of the object (children point to the same objects).
Implements Aseba::Node.
virtual std::wstring Aseba::ArrayReadNode::toNodeName | ( | ) | const [inline, virtual] |
Return a string representation of the name of this node.
Implements Aseba::Node.
virtual ReturnType Aseba::ArrayReadNode::typeCheck | ( | ) | const [inline, virtual] |
Typecheck this node, throw an exception if there is any type violation.
Reimplemented from Aseba::Node.
unsigned Aseba::ArrayReadNode::arrayAddr |
std::wstring Aseba::ArrayReadNode::arrayName |
unsigned Aseba::ArrayReadNode::arraySize |