Class GetElemExpr

Inheritance Relationships

Base Type

Class Documentation

class GetElemExpr : public seq::Expr

Public Functions

GetElemExpr(Expr *rec, std::string memb, GetElemExpr *orig, std::vector<types::Type *> types = {})
GetElemExpr(Expr *rec, std::string memb, std::vector<types::Type *> types = {})
GetElemExpr(Expr *rec, unsigned memb, std::vector<types::Type *> types = {})
Expr *getRec()
std::string getMemb()
bool isRealized() const
void setRealizeTypes(std::vector<types::Type *> types)
void resolveTypes()

Performs type resolution on this expression and all sub-expressions/statements/etc. This is called prior to Expr::getType().

Value *codegen0(BaseFunc *base, llvm::BasicBlock *&block)

Performs code generation for this expression.

Return

value representing expression result; possibly null if type is void

Parameters
  • base: the function containing this expression

  • block: reference to block where code should be generated; possibly modified to point to a new block where codegen should resume

types::Type *getType0() const

Determines and returns the type of this expression.

GetElemExpr *clone(Generic *ref)

Clones this expression. ref is used internally to keep track of cloned objects, and to make sure we don’t clone certain objects twice.

Return

cloned expression

Parameters
  • ref: generic object that is being cloned