HLVM API Documentation

Node Class Reference

Abstract Base Class of All HLVM AST Nodes. More...

#include <Node.h>

Inheritance diagram for Node:

Inheritance graph
[legend]
List of all members.

Constructors

Accessors

Mutators

Protected Attributes

Data

Friends


Detailed Description

Abstract Base Class of All HLVM AST Nodes.

This class is the abstract base class of all the Abstract Syntax Tree (AST) node types. All other AST nodes are subclasses of this class. This class must only provide functionality that is common to all AST Node subclasses. It provides for class identification, insertion of nodes, management of a set of flags,

Definition at line 278 of file Node.h.


Constructor & Destructor Documentation

Node NodeIDs  ID  )  [inline, protected]
 

Definition at line 283 of file Node.h.

~Node  )  [virtual]
 

Definition at line 41 of file Node.cpp.


Member Function Documentation

static bool classof const Node  )  [inline, static]
 

Provide support for isa<X> and friends.

Reimplemented in NegateOp, ComplementOp, PreIncrOp, PostIncrOp, PreDecrOp, PostDecrOp, SizeOfOp, LengthOp, ConvertOp, AddOp, SubtractOp, MultiplyOp, DivideOp, ModuloOp, BAndOp, BOrOp, BXorOp, BNorOp, AST, Block, ResultOp, NotOp, AndOp, OrOp, NorOp, XorOp, LessThanOp, GreaterThanOp, LessEqualOp, GreaterEqualOp, EqualityOp, InequalityOp, Bundle, Import, Constant, ConstantValue, ConstantAny, ConstantBoolean, ConstantCharacter, ConstantEnumerator, ConstantInteger, ConstantReal, ConstantString, ConstantPointer, ConstantAggregate, ConstantArray, ConstantVector, ConstantStructure, ConstantContinuation, ConstantExpression, PointerType, ArrayType, VectorType, NamedType, DisparateContainerType, StructureType, ContinuationType, SignatureType, SelectOp, SwitchOp, WhileOp, UnlessOp, UntilOp, LoopOp, ReturnOp, BreakOp, ContinueOp, CallOp, OpenOp, CloseOp, ReadOp, WriteOp, Linkable, Variable, Argument, Function, Program, AllocateOp, DeallocateOp, LoadOp, StoreOp, AutoVarOp, GetOp, GetFieldOp, GetIndexOp, Documentation, Documentable, Value, Operator, NilaryOperator, UnaryOperator, BinaryOperator, TernaryOperator, MultiOperator, IsPInfOp, IsNInfOp, IsNanOp, TruncOp, RoundOp, FloorOp, CeilingOp, LogEOp, Log2Op, Log10Op, SquareRootOp, CubeRootOp, FactorialOp, PowerOp, RootOp, GCDOp, LCMOp, TextType, StreamType, BufferType, StrInsertOp, StrEraseOp, StrReplaceOp, StrConcatOp, Type, AnyType, BooleanType, CharacterType, StringType, IntegerType, RangeType, EnumerationType, RealType, RationalType, and OpaqueType.

Definition at line 398 of file Node.h.

Bundle * getContainingBundle  )  const
 

Return the bundle that contains this Node.

Definition at line 59 of file Node.cpp.

References hlvm::BundleID, Node::getParent(), and Node::is().

unsigned getFlags  )  const [inline]
 

Get the flags.

Definition at line 304 of file Node.h.

References Node::flags.

NodeIDs getID  )  const [inline]
 

Get the type of node.

Definition at line 298 of file Node.h.

const Locator* getLocator  )  const [inline]
 

Get the Locator.

Definition at line 307 of file Node.h.

References Node::loc.

Node* getParent  )  const [inline]
 

Get the parent node.

Definition at line 301 of file Node.h.

References Node::parent.

AST * getRoot  ) 
 

Get the AST root node that this Node is part of.

Definition at line 46 of file Node.cpp.

References Node::parent.

void insertChild Node child  )  [protected, virtual]
 

Reimplemented in AST, Block, Bundle, ConstantAggregate, Function, NilaryOperator, UnaryOperator, BinaryOperator, TernaryOperator, MultiOperator, and Type.

Definition at line 69 of file Node.cpp.

References hlvmNotImplemented.

bool is NodeIDs  kind  )  const [inline]
 

Determine if the node is a specific kind.

Definition at line 310 of file Node.h.

bool isBinaryOperator  )  const [inline]
 

Definition at line 377 of file Node.h.

References hlvm::FirstBinaryOperatorID, and hlvm::LastBinaryOperatorID.

bool isConstant  )  const [inline]
 

Determine if the node is one of the Constant values.

Reimplemented in Variable.

Definition at line 346 of file Node.h.

References hlvm::FirstConstantID, and hlvm::LastConstantID.

bool isConstantAggregate  )  const [inline]
 

Determine if the node is one of the ConstantAggregate values.

Definition at line 354 of file Node.h.

References hlvm::FirstConstantAggregateID, and hlvm::LastConstantAggregateID.

bool isConstantValue  )  const [inline]
 

Determine if the node is one of the Constant values.

Definition at line 350 of file Node.h.

References hlvm::FirstConstantValueID, and hlvm::LastConstantValueID.

bool isContainerType  )  const [inline]
 

Determine if the node is a container type.

Definition at line 342 of file Node.h.

References hlvm::FirstContainerTypeID, and hlvm::LastContainerTypeID.

bool isDisparateContainerType  )  const [inline]
 

Determine if the node is a disparate container type.

Definition at line 332 of file Node.h.

References hlvm::FirstDisparateContainerTypeID, and hlvm::LastDisparateContainerTypeID.

bool isDocumentable  )  const [inline]
 

Determine if the node is a Documentable Node.

Definition at line 387 of file Node.h.

References hlvm::FirstDocumentableID, and hlvm::LastDocumentableID.

bool isFunction  )  const [inline]
 

Definition at line 394 of file Node.h.

References hlvm::FunctionID, and hlvm::ProgramID.

bool isIntegralType  )  const [inline]
 

Definition at line 317 of file Node.h.

References hlvm::BooleanTypeID, hlvm::CharacterTypeID, hlvm::EnumerationTypeID, hlvm::IntegerTypeID, and hlvm::RangeTypeID.

bool isLinkable  )  const [inline]
 

Determine if the node is a Linkable.

Definition at line 358 of file Node.h.

References hlvm::FirstLinkableID, and hlvm::LastLinkableID.

bool isLoop  )  const [inline]
 

Definition at line 368 of file Node.h.

References hlvm::LoopOpID, hlvm::UntilOpID, and hlvm::WhileOpID.

bool isMultiOperator  )  const [inline]
 

Definition at line 383 of file Node.h.

References hlvm::FirstMultiOperatorID, and hlvm::LastMultiOperatorID.

bool isNilaryOperator  )  const [inline]
 

Definition at line 371 of file Node.h.

References hlvm::FirstNilaryOperatorID, and hlvm::LastNilaryOperatorID.

bool isNumericType  )  const [inline]
 

Definition at line 322 of file Node.h.

References Node::isIntegralType(), and hlvm::RealTypeID.

bool isOperator  )  const [inline]
 

Determine if the node is any of the Operators.

Definition at line 362 of file Node.h.

References hlvm::FirstOperatorID, and hlvm::LastOperatorID.

bool isRuntimeType  )  const [inline]
 

Determine if the node is a runtime type.

Definition at line 337 of file Node.h.

References hlvm::FirstRuntimeTypeID, and hlvm::LastRuntimeTypeID.

bool isTerminator  )  const [inline]
 

Definition at line 365 of file Node.h.

References hlvm::BreakOpID, hlvm::ReturnOpID, and hlvm::ThrowOpID.

bool isTernaryOperator  )  const [inline]
 

Definition at line 380 of file Node.h.

References hlvm::FirstTernaryOperatorID, and hlvm::LastTernaryOperatorID.

bool isType  )  const [inline]
 

Determine if the node is a Type.

Definition at line 313 of file Node.h.

References hlvm::FirstTypeID, and hlvm::LastTypeID.

bool isUnaryOperator  )  const [inline]
 

Definition at line 374 of file Node.h.

References hlvm::FirstUnaryOperatorID, and hlvm::LastUnaryOperatorID.

bool isUniformContainerType  )  const [inline]
 

Determine if the node is a uniform container type.

Definition at line 326 of file Node.h.

References hlvm::FirstUniformContainerTypeID, and hlvm::LastUniformContainerTypeID.

bool isValue  )  const [inline]
 

Determine if the node is a Value.

Definition at line 391 of file Node.h.

References hlvm::FirstValueID, and hlvm::LastValueID.

void removeChild Node child  )  [protected, virtual]
 

Reimplemented in AST, Block, Bundle, ConstantAggregate, Function, NilaryOperator, UnaryOperator, BinaryOperator, TernaryOperator, and MultiOperator.

Definition at line 75 of file Node.cpp.

References hlvmNotImplemented.

void setFlags uint16_t  f  )  [inline]
 

Definition at line 405 of file Node.h.

References Node::flags.

void setLocator const Locator l  )  [inline]
 

Definition at line 404 of file Node.h.

References Node::loc.

void setParent Node parent  )  [virtual]
 

Reimplemented in AST.

Definition at line 81 of file Node.cpp.

References Node::insertChild(), Node::parent, and Node::removeChild().


Friends And Related Function Documentation

friend class AST [friend]
 

Reimplemented in NegateOp, ComplementOp, PreIncrOp, PostIncrOp, PreDecrOp, PostDecrOp, SizeOfOp, LengthOp, ConvertOp, AddOp, SubtractOp, MultiplyOp, DivideOp, ModuloOp, BAndOp, BOrOp, BXorOp, BNorOp, Block, ResultOp, NotOp, AndOp, OrOp, NorOp, XorOp, LessThanOp, GreaterThanOp, LessEqualOp, GreaterEqualOp, EqualityOp, InequalityOp, Bundle, Import, Constant, ConstantValue, ConstantAny, ConstantBoolean, ConstantCharacter, ConstantEnumerator, ConstantInteger, ConstantReal, ConstantString, ConstantPointer, ConstantAggregate, ConstantArray, ConstantVector, ConstantStructure, ConstantContinuation, ConstantExpression, PointerType, ArrayType, VectorType, NamedType, StructureType, ContinuationType, SignatureType, SelectOp, SwitchOp, WhileOp, UnlessOp, UntilOp, LoopOp, ReturnOp, BreakOp, ContinueOp, CallOp, OpenOp, CloseOp, ReadOp, WriteOp, Linkable, Variable, Argument, Function, Program, AllocateOp, DeallocateOp, LoadOp, StoreOp, AutoVarOp, GetOp, GetFieldOp, GetIndexOp, Documentation, Documentable, Value, Operator, NilaryOperator, UnaryOperator, BinaryOperator, TernaryOperator, MultiOperator, IsPInfOp, IsNInfOp, IsNanOp, TruncOp, RoundOp, FloorOp, CeilingOp, LogEOp, Log2Op, Log10Op, SquareRootOp, CubeRootOp, FactorialOp, PowerOp, RootOp, GCDOp, LCMOp, RuntimeType, TextType, StreamType, BufferType, StrInsertOp, StrEraseOp, StrReplaceOp, StrConcatOp, Type, AnyType, BooleanType, CharacterType, StringType, IntegerType, RangeType, EnumerationType, RealType, RationalType, and OpaqueType.

Definition at line 421 of file Node.h.


Member Data Documentation

uint16_t flags [protected]
 

16 flags, subclass dependent interpretation

Definition at line 417 of file Node.h.

uint16_t id [protected]
 

Really a value in NodeIDs.

Definition at line 416 of file Node.h.

const Locator* loc [protected]
 

The source location corresponding to node.

Definition at line 419 of file Node.h.

Node* parent [protected]
 

The node that owns this node.

Definition at line 418 of file Node.h.


The documentation for this class was generated from the following files: