coins.backend.lir
クラス LirNode

java.lang.Object
  |
  +--coins.backend.lir.LirNode
直系の既知のサブクラス:
LirBinOp, LirFconst, LirIconst, LirLabelRef, LirNaryOp, LirString, LirSymRef, LirUnaOp

public abstract class LirNode
extends java.lang.Object

New LIR node's basic structure


入れ子クラスの概要
static class LirNode.Scanner
          Scanner for LIR expression tree.
 
フィールドの概要
 int id
          Key to bind related information
 int opCode
          Instruction Code
 ImList opt
          Optional arguments list (op opr1 opr2 &hogehoge ...)
 int type
          Type of this node's result
 
コンストラクタの概要
(パッケージプライベート) LirNode(int id, int opCode, int type, ImList opt)
          Create LIR node
 
メソッドの概要
abstract  void accept(LirVisitor v)
          Accept visitor v
 boolean equals(java.lang.Object x)
          Return true if this object equals to x
 Label[] getTargets()
          Return jump target labels.
 int hashCode()
          Return hash value of LirNode.
 boolean isBranch()
          Return true if node is a branch instruction.
 boolean isPhysicalRegister()
          Return true if node is a physical register.
 boolean isRegisterOperand()
          Is register operand?
 LirNode kid(int n)
          Return nth operand; Subclass responsibility
abstract  LirNode makeCopy(LirFactory fac)
          Return a deep copy of this node
 LirNode makeShallowCopy(LirFactory fac)
          Return a shallow copy of this node.
 int nKids()
          Return number of operands
 int nSrcs()
          推奨されていません。 use nKids instead.
 void pickUpDefs(PickUpVariable receiver)
          Pick up definitions of register variables in this L-expression.
 void pickUpUses(PickUpVariable receiver)
          Pick up uses of register variables in this L-expression.
 void replaceLabel(Label x, Label y, LirFactory fac)
          Replace target label y for x.
abstract  LirNode replaceOptions(LirFactory fac, ImList newOpt)
          Return a copy of this node without options.
 void setKid(int n, LirNode kid)
          Set nth operand; Subclass responsibility
 void setSrc(int n, LirNode src)
          推奨されていません。 use setKid instead.
 LirNode src(int n)
          推奨されていません。 use kid instead.
 java.lang.Object toSexp()
          Convert to external LIR format.
 java.lang.String toString()
          Visualize
 java.lang.String toStringExp()
          推奨されていません。  
 
クラス java.lang.Object から継承したメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

id

public final int id
Key to bind related information


opCode

public final int opCode
Instruction Code


type

public final int type
Type of this node's result


opt

public final ImList opt
Optional arguments list (op opr1 opr2 &hogehoge ...)

コンストラクタの詳細

LirNode

LirNode(int id,
        int opCode,
        int type,
        ImList opt)
Create LIR node

メソッドの詳細

makeCopy

public abstract LirNode makeCopy(LirFactory fac)
Return a deep copy of this node


makeShallowCopy

public LirNode makeShallowCopy(LirFactory fac)
Return a shallow copy of this node. Default action is same as makeCopy.


replaceOptions

public abstract LirNode replaceOptions(LirFactory fac,
                                       ImList newOpt)
Return a copy of this node without options.


nSrcs

public int nSrcs()
推奨されていません。 use nKids instead.

Return number of operands


nKids

public int nKids()
Return number of operands


src

public LirNode src(int n)
推奨されていません。 use kid instead.

Return nth operand


kid

public LirNode kid(int n)
Return nth operand; Subclass responsibility


setSrc

public void setSrc(int n,
                   LirNode src)
推奨されていません。 use setKid instead.

Set nth operand


setKid

public void setKid(int n,
                   LirNode kid)
Set nth operand; Subclass responsibility


getTargets

public Label[] getTargets()
Return jump target labels. Targets are packed in an array of Label.


replaceLabel

public void replaceLabel(Label x,
                         Label y,
                         LirFactory fac)
Replace target label y for x.


isBranch

public boolean isBranch()
Return true if node is a branch instruction.


isPhysicalRegister

public boolean isPhysicalRegister()
Return true if node is a physical register. (must be overriden by subclasses)


isRegisterOperand

public boolean isRegisterOperand()
Is register operand?


pickUpUses

public final void pickUpUses(PickUpVariable receiver)
Pick up uses of register variables in this L-expression. Picked up variables are passed thru call-back object receiver.


pickUpDefs

public final void pickUpDefs(PickUpVariable receiver)
Pick up definitions of register variables in this L-expression. Picked up variables are passed thru call-back object receiver.


toSexp

public java.lang.Object toSexp()
Convert to external LIR format.


toString

public java.lang.String toString()
Visualize

オーバーライド:
クラス java.lang.Object 内の toString

hashCode

public int hashCode()
Return hash value of LirNode.

オーバーライド:
クラス java.lang.Object 内の hashCode

equals

public boolean equals(java.lang.Object x)
Return true if this object equals to x

オーバーライド:
クラス java.lang.Object 内の equals

accept

public abstract void accept(LirVisitor v)
Accept visitor v


toStringExp

public java.lang.String toStringExp()
推奨されていません。  

Convert integer or address constant to string.