Class OperationInstr
- All Implemented Interfaces:
Comparable<OperationInstr>, INode
For example in the case of normal classes/traits/components etc. this would just be a method.
In the case of a function it would also be a method but with a name of 'call' and the normal function signature would be applied (to the 'call' operation).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(INodeVisitor visitor) intOrders the operations of a construct in the emitted IR (viaIRConstruct.getOperations()).getBody()The fully qualified return types of the parent declarations this operation overrides with a NARROWER (covariant) return - set by IR generation (phase 7,CovariantBridges) from the symbols, so no back end has to re-derive it.The resolved, arity-aware backend method name for this operation — the name a back-end MUST emit for the DEFINITION, and never re-derive from the operator glyph.setBody(BasicBlockInstr basicBlockBody) voidsetBridgeReturnTypes(List<String> bridgeReturnTypes) toString()
-
Constructor Details
-
OperationInstr
-
-
Method Details
-
getBody
-
setBody
-
getSymbol
-
getBridgeReturnTypes
The fully qualified return types of the parent declarations this operation overrides with a NARROWER (covariant) return - set by IR generation (phase 7,CovariantBridges) from the symbols, so no back end has to re-derive it. A back end whose method identity includes the return type (the JVM's descriptor does) must make this operation reachable under each of them as well, or a call through the parent's type never reaches the override (N07, Contract 11 in EK9_BACKEND_IR_CONTRACTS.md). Empty when the operation overrides nothing or keeps every return type. -
setBridgeReturnTypes
-
getResolvedMethodName
The resolved, arity-aware backend method name for this operation — the name a back-end MUST emit for the DEFINITION, and never re-derive from the operator glyph. MirrorsCallDetails.methodNameon the call side so both planes agree. In particular the arity-overloadedoperator -resolves to_negatewhen arg-less (unary negate) and_subwhen arg-bearing (binary subtract) — the IR carries the correct name so the back-ends stop deducing (and stop mis-deducing arg-less-as_sub). Computed lazily from the symbol so the method's parameter list is always fully populated by read time. Non-operator methods return their plain name.- Returns:
- the resolved runtime method name for this operation
-
getDebugInfo
-
toString
-
accept
-
compareTo
Orders the operations of a construct in the emitted IR (viaIRConstruct.getOperations()).The key is the FRIENDLY name, so the order is by return type, then method name, then the parameter list AS DISPLAYED - which includes the parameter NAMES. Renaming a parameter therefore re-orders that construct's OperationDfn blocks and churns its @IR/@BYTECODE goldens, even though nothing about the code changed (naming the two synthetic enum constructors 'other' and 'name' instead of 'arg' moved the String constructor ahead of the copy constructor, 2026-09-24). That is cosmetic churn, not a defect - but do not read this order as a signature order, and expect the goldens to move whenever a parameter is renamed.
- Specified by:
compareToin interfaceComparable<OperationInstr>
-