RelOp class
Represents a relational comparison operation in Balbismo.
A relational operation compares two values and returns an integer result (0 for false, 1 for true). Supports all standard comparison operators for both integer and floating-point values with appropriate LLVM instructions.
Example Balbismo code:
int a = 5;
int b = 10;
int result = a < b && a != 0; // Multiple RelOp nodes
This generates LLVM IR comparison instructions:
%temp.0 = icmp slt i64 %a, %b // signed less than for integers
%temp.1 = fcmp olt double %x, %y // ordered less than for floats
%relOp.0 = zext i1 %temp.0 to i64 // convert boolean to integer
- Inheritance
-
- Object
- Node<
RelOperator, LangVal< LangType> > - RelOp
Constructors
Properties
-
children
→ List<
Node> -
Child nodes that form the structure of this node.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ int
-
Unique identifier for this node, used for LLVM register naming.
getter/setter pairinherited
-
left
→ Node<
dynamic, LangVal< LangType> > -
no setter
- nodeValue → RelOperator
-
The primary value associated with this node (varies by node type).
finalinherited
-
right
→ Node<
dynamic, LangVal< LangType> > -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
evaluate(
SymbolTable table) → LangVal< LangType> -
Evaluates this AST node and generates corresponding LLVM IR code.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited