Class AspectProxyInstr

java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.AspectProxyInstr
All Implemented Interfaces:
INode

public final class AspectProxyInstr extends IRInstr
High-level IR instruction for creating an aspect-woven proxy.

This instruction tells the backend to generate a synthetic proxy class that wraps a delegate component with ordered aspect instances. The proxy extends the base type and, for each public non-operator method, generates a wrapped version with before/after advice chains.

All instance construction (delegate, aspects, their dependencies) happens via normal CALL/RETAIN/SCOPE_REGISTER instructions before this instruction. This instruction takes the pre-constructed instances and returns a wired proxy.

The backend is responsible for:

  • Generating a proxy class extending baseType
  • Creating fields for delegate and aspect instances
  • For each public non-operator method: JoinPoint creation, before-chain, delegate call (with try/finally), after-chain (reverse order)
  • Proxy naming via source token hash