coins.ffront
Class ComplexConstNode
java.lang.Object
coins.ffront.Pair
coins.ffront.ComplexConstNode
- All Implemented Interfaces:
- HasConstValue, Node
- public class ComplexConstNode
- extends Pair
- implements HasConstValue
Complex constant
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ComplexConstNode
public ComplexConstNode(Node pReal,
Node pImag,
FirToHir pfHir)
getReal
Node getReal()
getImag
Node getImag()
print
public void print(int level,
java.lang.String spaces)
- Specified by:
print in interface Node- Overrides:
print in class Pair
makeExp
public Exp makeExp()
- Make HIR Exp node of this complex constant.
- Specified by:
makeExp in interface Node- Overrides:
makeExp in class Pair
- Returns:
- HIR Exp.
makeArgAddr
public Exp makeArgAddr(FStmt pCallStmt)
- Make HIR Exp node from this complex constant
as a call-by-address parameter in pCallStmt.
typedef struct { float _real; float _imag; } _complex_struct;
_complex_struct dummyName;
dummyName._real = left;
dummyName._imag = right;
return Exp node of address of dummyName
- Specified by:
makeArgAddr in interface Node- Overrides:
makeArgAddr in class Pair
- Parameters:
pCallStmt -
- Returns:
- HIR Exp.
makeRealExp
Exp makeRealExp(Node pNode)
getConstValue
public FNumber getConstValue()
- Specified by:
getConstValue in interface HasConstValue