org.apache.commons.nabla.forward.instructions
Class Pop2Transformer
java.lang.Object
org.apache.commons.nabla.forward.instructions.Pop2Transformer
- All Implemented Interfaces:
- InstructionsTransformer
public class Pop2Transformer
- extends Object
- implements InstructionsTransformer
Differentiation transformer for POP2 instructions.
POP2 instructions are replaced by a POP instruction
as a reference to a DerivativeStructure
instance uses only one stack slot instead of two.
- Version:
- $Id$
Method Summary |
org.objectweb.asm.tree.InsnList |
getReplacement(org.objectweb.asm.tree.AbstractInsnNode insn,
MethodDifferentiator methodDifferentiator)
Get the replacement instructions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Pop2Transformer
public Pop2Transformer()
- Simple constructor.
getReplacement
public org.objectweb.asm.tree.InsnList getReplacement(org.objectweb.asm.tree.AbstractInsnNode insn,
MethodDifferentiator methodDifferentiator)
throws DifferentiationException
- Get the replacement instructions.
- Specified by:
getReplacement
in interface InstructionsTransformer
- Parameters:
insn
- original instructionmethodDifferentiator
- method differentiator driving this transformer
- Returns:
- replacement instructions
- Throws:
DifferentiationException
- if the method differentiator cannot provide
a temporary variable
Copyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.