sun::types::SliceType
class · Source (opens in a new tab)
class sun::types::SliceType : public sun::types::TypeSlice type: builtin struct for array/matrix indexing Represents a range [start, end) or a single index (when end = start + 1) Used with IIndexable interface for uniform slice handling LLVM representation: { i64 start, i64 end }.
Inherits
- sun::types::Type (public)
Public Functions
SliceType
public · function · Source (opens in a new tab)
sun::types::SliceType::SliceType()=defaultCreates an instance with its default state.
equals
public · function · Source (opens in a new tab)
bool sun::types::SliceType::equals(const Type &other) const overrideReports whether the other type has the same semantic identity.
Related: Type
getKind
public · function · Source (opens in a new tab)
Kind sun::types::SliceType::getKind() const overrideReturns the type category used for semantic checks and dispatch.
Related: Kind
getSliceStructType
public · function · static · Source (opens in a new tab)
static llvm::StructType * sun::types::SliceType::getSliceStructType(llvm::LLVMContext &ctx)Get the LLVM struct type for slice: { i64, i64 }.
isSingleIndex
public · function · static · Source (opens in a new tab)
static bool sun::types::SliceType::isSingleIndex(int64_t start, int64_t end)Helper to check if a slice is a single index (end == start + 1) This is used to distinguish m[5] from m[5:6].
toLLVMType
public · function · Source (opens in a new tab)
llvm::Type * sun::types::SliceType::toLLVMType(llvm::LLVMContext &ctx) const overrideReturns the LLVM type used to represent values of this semantic type.
toString
public · function · Source (opens in a new tab)
std::string sun::types::SliceType::toString() const overrideReturns a readable representation for diagnostics and debugging.
Public Fields
StaticKind
public · variable · static · Source (opens in a new tab)
Kind sun::types::SliceType::StaticKind = Kind::SliceNo documentation comment.
Related: Kind, Kind::Slice