harpoon.IR.Jasmin
Class Jasmin

java.lang.Object
  extended by harpoon.IR.Jasmin.Jasmin

public class Jasmin
extends Object

Jasmin converts from QuadWithTry to bytecode formatted for the Jasmin assembler. Note: Requires patch on 1.06 to do sane things with fields.

Version:
$Id: Jasmin.java,v 1.6 2004/02/08 03:21:15 cananian Exp $
Author:
Brian Demsky <bdemsky@mit.edu>

Constructor Summary
Jasmin(HCode[] hc, HMethod[] hm, HClass hclass)
          Creates a Jasmin object.
Jasmin(HCode[] hc, HMethod[] hm, HClass hclass, int andmask, int ormask)
          Creates a Jasmin object.
 
Method Summary
 Object[] buildmap(HCode code, TypeMap tp)
          buildmap takes in a HCode and a TypeMap and returns a Map and number of local variables used.
 void outputClass(PrintStream out)
          Takes in a PrintStream 'out' and dumps Jasmin formatted assembly code to it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jasmin

public Jasmin(HCode[] hc,
              HMethod[] hm,
              HClass hclass)
Creates a Jasmin object.


Jasmin

public Jasmin(HCode[] hc,
              HMethod[] hm,
              HClass hclass,
              int andmask,
              int ormask)
Creates a Jasmin object.

Method Detail

outputClass

public void outputClass(PrintStream out)
Takes in a PrintStream 'out' and dumps Jasmin formatted assembly code to it.


buildmap

public final Object[] buildmap(HCode code,
                               TypeMap tp)
buildmap takes in a HCode and a TypeMap and returns a Map and number of local variables used. Buildmap maps each temp either to the stack or to a localvariable.