Class BaseSeqType

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class seq::types::BaseSeqType : public seq::types::Type

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

Public Functions

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

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() override

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

bool isAtomic() const override

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.

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

Returns the LLVM type corresponding to this type.

size_t size(llvm::Module *module) const override

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

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

Protected Functions

BaseSeqType(std::string name)