ArrayType class
Represents an array type in Balbismo.
Arrays in Balbismo are represented as pointers to the element type in LLVM IR. This class extends LangType to provide array-specific functionality, including proper LLVM IR type representation with pointer notation.
Arrays are dynamically sized at runtime and are allocated on the stack. They cannot be resized after creation but can be passed by reference to functions.
Example usage:
final intArrayType = ArrayType(PrimitiveTypes.int); // represents 'int[]' in Balbismo
final floatArrayType = ArrayType(PrimitiveTypes.float); // represents 'float[]' in Balbismo
Constructors
- ArrayType.new(PrimitiveTypes primitiveType)
-
Constructs an array type for the specified primitive element type.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- irType → String
-
Returns the LLVM IR type representation for this array type.
no setteroverride
- primitiveType → PrimitiveTypes
-
The underlying primitive type that forms the basis of this language type.
finalinherited
-
props
→ List<
Object> -
Equatable implementation for proper type comparison.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the LLVM IR type string representation of this language type.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited