#include <tree.h>
Public Member Functions | |
virtual Node * | expandToAsebaTree (std::wostream *dump, unsigned int index=0) |
Second pass to expand "abstract" nodes into more concrete ones. | |
virtual unsigned | getVectorAddr () const |
virtual unsigned | getVectorSize () const |
return the vector's length | |
bool | isAddressStatic () const |
return whether this node accesses a static address | |
MemoryVectorNode (const SourcePos &sourcePos, unsigned arrayAddr, unsigned arraySize, const std::wstring &arrayName) | |
Constructor. | |
virtual void | setWrite (bool write) |
virtual MemoryVectorNode * | 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. | |
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 | |
bool | write |
expand to a node for storing or loading data? |
Node for accessing a memory as a vector, in read or write operations If write == true, will expand to StoreNode or ArrayWriteNode If write == false, will expand to LoadNode or ArrayReadNode children[0] is an optional index If children[0] is a StaticVector of one elements (int), it will be foo[x] If children[0] is a StaticVector of two elements (int), it will be foo[x:y] If children[0] is another type of node, it will be foo[whatever] If children[0] doesn't exist, access to the full array is considered
Node * Aseba::MemoryVectorNode::expandToAsebaTree | ( | std::wostream * | dump, |
unsigned int | index = 0 |
||
) | [virtual] |
Second pass to expand "abstract" nodes into more concrete ones.
Reimplemented from Aseba::Node.
Definition at line 104 of file tree-expand.cpp.
unsigned Aseba::MemoryVectorNode::getVectorAddr | ( | ) | const [virtual] |
return the compile-time base address of the memory range, taking into account an immediate index foo[n] or foo[n:m] return E_NOVAL if foo[expr]
Reimplemented from Aseba::Node.
Definition at line 322 of file tree-expand.cpp.
unsigned Aseba::MemoryVectorNode::getVectorSize | ( | ) | const [virtual] |
return the vector's length
Reimplemented from Aseba::Node.
Definition at line 348 of file tree-expand.cpp.
bool Aseba::MemoryVectorNode::isAddressStatic | ( | ) | const |
return whether this node accesses a static address
Definition at line 387 of file tree-expand.cpp.
virtual void Aseba::MemoryVectorNode::setWrite | ( | bool | write | ) | [inline, virtual] |
virtual MemoryVectorNode* Aseba::MemoryVectorNode::shallowCopy | ( | ) | [inline, virtual] |
Return a shallow copy of the object (children point to the same objects)
Implements Aseba::Node.
virtual std::wstring Aseba::MemoryVectorNode::toNodeName | ( | ) | const [inline, virtual] |
Return a string representation of the name of this node.
Implements Aseba::Node.
unsigned Aseba::MemoryVectorNode::arrayAddr |
std::wstring Aseba::MemoryVectorNode::arrayName |
unsigned Aseba::MemoryVectorNode::arraySize |