at.dms.kjc.sir.lowering
Class SimplifyPopPeekPush

java.lang.Object
  extended by at.dms.kjc.sir.lowering.SimplifyPopPeekPush

public class SimplifyPopPeekPush
extends Object

Re-write code so push, pop, and peek are separate statements, and arguments to them are either literal, local, field, or array access.

Author:
Allyn Dimock

Constructor Summary
SimplifyPopPeekPush()
           
 
Method Summary
static void simplify(SIRStream str)
          Re-write code so push, pop, and peek are separate statements, and arguments to them are either literal, local, field, or array access.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplifyPopPeekPush

public SimplifyPopPeekPush()
Method Detail

simplify

public static void simplify(SIRStream str)
Re-write code so push, pop, and peek are separate statements, and arguments to them are either literal, local, field, or array access. In the case of array access, the array access will not involve the result of another peek or pop.

Parameters:
str - : a SIRStream, rewritten in place.