Class BaseSeqType

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class BaseSeqType : public seq::types::Type

Subclassed by seq::types::SeqType, seq::types::StrType

Public Functions

BaseSeqType(BaseSeqType const&)
void operator=(BaseSeqType const&)
Value *defaultValue(llvm::BasicBlock *block)

Codegens the default value of this type. Usually this is just what you’d expect: zero for integral types, null for pointer and reference types, recursively defined for aggregate types.


value of the default value

  • block: where to codegen the default value

void initFields()

Performs a one-time initialization of this type’s fields.

bool isAtomic() const

Returns whether this type is “atomic”. A type is defined to be atomic if its LLVM representation contains no pointers to heap allocated data. This is used internally by the GC, as we can allocate “atomic” and “non-atomic” blocks separately. Atomic blocks do not need to be scanned when searching for pointers.

Type *getLLVMType(llvm::LLVMContext &context) const

Returns the LLVM type corresponding to this type.

size_t size(llvm::Module *module) const

Returns the size (in bytes) of the LLVM type corresponding to this type.

virtual llvm::Value *make(llvm::Value *ptr, llvm::Value *len, llvm::BasicBlock *block) = 0

Protected Functions

BaseSeqType(std::string name)