public bool ApplyTransform(Context context, BaseTransformation transformation, List <Operand> virtualRegisters = null) { if (!transformation.Match(context, this)) { return(false); } TraceBefore(context, transformation); if (virtualRegisters != null) { CollectVirtualRegisters(context, virtualRegisters); } // TODO: note last virtual register # // TODO: note the node transformation.Transform(context, this); // TODO: add all NEW virtual register to the collection TraceAfter(context); return(true); }
public bool ApplyTransform(Context context, BaseTransformation transformation, List <Operand> virtualRegisters = null) { if (!transformation.Match(context, this)) { return(false); } TraceBefore(context, transformation); if (virtualRegisters != null) { CollectVirtualRegisters(context, virtualRegisters); } transformation.Transform(context, this); TraceAfter(context); return(true); }