|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--coins.casttohir.ToHir
ToHir Offer cooperation with other packages to all classes included in this package, for example, I/O files, compile option information, etc.
フィールドの概要 | |
(パッケージプライベート) Debug |
debug
debug Used to access debugging fields. |
protected java.util.HashSet |
fAssignsForInitiation
|
int |
fDbgLevel
|
protected java.util.Map |
fHirOptMap
|
(パッケージプライベート) HIR |
hir
hir HIR instance (used to create HIR objects). |
(パッケージプライベート) HirRoot |
hirRoot
hirRoot Used to access HIR root fields. |
(パッケージプライベート) IoRoot |
ioRoot
ioRoot Used to access I/O root fields. |
(パッケージプライベート) MachineParam |
machineParam
Define target machine parameters. |
(パッケージプライベート) java.lang.String |
nowFile
nowFile Now procesing file name. |
(パッケージプライベート) int |
nowLine
nowLine Now procesing line number. |
(パッケージプライベート) boolean |
optHirFromC
optHirFromC Optimize HIR-C (temporary switch for development). |
(パッケージプライベート) boolean |
safeArrayAll
|
(パッケージプライベート) Sym |
sym
sym Sym instance (used to create Sym objects). |
(パッケージプライベート) SymRoot |
symRoot
symRoot Used to access symbol root fields. |
(パッケージプライベート) Type |
typeVoidPtr
typeVoidPtr Type of void pointer. |
(パッケージプライベート) boolean |
useArrayParameterSize
useArrayParameterSize Use array parameter size (decided by compiler option). |
(パッケージプライベート) boolean |
useOldLir
useOldLir Use old LIR generator (temporary switch for development). |
(パッケージプライベート) boolean |
useSubsForPtr
useSubsForPtr Use subscripted expression for pointer (decided by compiler option). |
コンストラクタの概要 | |
ToHir(HirRoot pHirRoot,
boolean oldlir,
boolean fromc)
ToHirUtil Constructor to record hirRoot, ioRoot, symRoot to make them available in methods of this class and subclasses. |
メソッドの概要 | |
(パッケージプライベート) Exp |
addrExp(Exp e)
addrExp Create OP_ADDR (= &e) expression node. |
(パッケージプライベート) Type |
compositeType(Type t1,
Type t2,
boolean checkqualifier)
compositeType: Create the composite type that is the resultant type of an expression with t1 and t2 as its operand types. |
(パッケージプライベート) Sym |
createBlockSym()
createBlockSym Create block symbol which has unique name. |
(パッケージプライベート) Label |
createLabel()
createLabel Create label with name which does not overlap. |
(パッケージプライベート) Label |
createLabel(java.lang.String name)
createLabel Create label. |
(パッケージプライベート) Type |
daPromotedType(Type t)
Return the default argument promoted type. |
(パッケージプライベート) Exp |
decayExp(Exp e)
decayExp Create OP_DECAY (convert array to pointer) expression node. |
(パッケージプライベート) void |
error(java.lang.String mes)
error Output error message. |
(パッケージプライベート) void |
error(Sym s,
java.lang.String mes)
|
(パッケージプライベート) void |
fatal(java.lang.String mes)
fatal Throws fatal error. |
(パッケージプライベート) java.lang.String |
getOp(HIR h)
getOp Get operation name of HIR. |
(パッケージプライベート) SymTable |
getSubpTable()
getSubpTable Get symbol table which current subprogram has. |
(パッケージプライベート) Type |
iPromotedType(Type t)
Get the resultant type of integral promotion. |
(パッケージプライベート) boolean |
isArithmetic(Type t)
isArithmetic Is arithmetic type ? |
(パッケージプライベート) boolean |
isCompatible(Type t1,
Type t2,
boolean checkqualifier)
isCompatible Is compatible types ? |
(パッケージプライベート) boolean |
isIntegral(Type t)
isIntegral Is integral type ? |
(パッケージプライベート) boolean |
isModifierIncluded(Type t1,
Type t2)
isModifierIncluded Is type modifier included ? |
(パッケージプライベート) boolean |
isScalar(Type t)
isScalar Is scalar type ? |
(パッケージプライベート) void |
message(int level,
java.lang.String mes)
message Output debug message. |
(パッケージプライベート) ConstNode |
new0Node()
new0Node Create constant 0 node. |
(パッケージプライベート) ConstNode |
new1Node()
new1Node Create constant 1 node. |
(パッケージプライベート) AssignStmt |
newAssignStmt(Exp e1,
Exp e2)
newAssignStmt create assign statement. |
(パッケージプライベート) BlockStmt |
newBlockStmt(Stmt stmt)
newBlockStmt Create block statement with statement stmt. |
(パッケージプライベート) ExpStmt |
newExpStmt(Exp exp)
newExpStmt Create expression statement, and set position. |
(パッケージプライベート) Exp |
newFalseNode()
newFalseNode Create false node. |
(パッケージプライベート) IfStmt |
newIfStmt(Exp condexp,
Stmt thenstmt,
Stmt elsestmt)
newIfStmt Create if statement, and set position. |
(パッケージプライベート) LabeledStmt |
newLabeledStmt(Stmt stmt)
newLabeledStmt create labeled statement which has statement stmt. |
(パッケージプライベート) VarNode |
newTempVarNode(Type t)
newTempVarNode Create temporary variable node, with new variable bymbol. |
(パッケージプライベート) Exp |
newTrueNode()
newTrueNode Create true node. |
(パッケージプライベート) Sym |
searchGlobalOrdinaryId(java.lang.String name)
searchGlobalOrdinaryId Search ordinary identifier (=KIND_VAR,KIND_PARAM,KIND_SUBP,KIND_TYPE) from symTableRoot. |
(パッケージプライベート) Sym |
searchLocalOrdinaryId(java.lang.String name)
searchLocalOrdinaryId Search ordinary identifier (=KIND_VAR,KIND_PARAM,KIND_SUBP,KIND_TYPE) from symTableCurrent. |
(パッケージプライベート) Sym |
searchOrdinaryId(java.lang.String name)
searchOrdinaryId Search ordinary identifier (=KIND_VAR,KIND_PARAM,KIND_SUBP,KIND_TYPE) from symTableCurrent and it's parents. |
(パッケージプライベート) void |
setFlagAddressTaken(Exp e)
setFlagAddressTaken Set FLAG_ADDRESS_TAKEN flag. |
(パッケージプライベート) void |
setFlagPointerOperation(Exp e)
setFlagPointerOperation Set FLAG_POINTER_OPERATION flag. |
(パッケージプライベート) void |
setFlagValueIsAssigned(Exp e)
setFlagValueIsAssigned Set FLAG_VALUE_IS_ASSIGNED flag. |
(パッケージプライベート) Exp |
subsExp(Exp e1,
Exp e2)
subsExp Create OP_SUBS (= e1[e2]) expression node. |
(パッケージプライベート) VectorType |
vectorType(Type t,
long n)
vectorType Create vector type. |
(パッケージプライベート) void |
warning(java.lang.String mes)
warning Output warning message. |
(パッケージプライベート) void |
warning(Sym s,
java.lang.String mes)
|
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
フィールドの詳細 |
final HirRoot hirRoot
final SymRoot symRoot
final IoRoot ioRoot
final Debug debug
final HIR hir
final Sym sym
final Type typeVoidPtr
final MachineParam machineParam
java.lang.String nowFile
int nowLine
final boolean useSubsForPtr
final boolean useArrayParameterSize
final boolean useOldLir
final boolean optHirFromC
protected java.util.Map fHirOptMap
final boolean safeArrayAll
protected java.util.HashSet fAssignsForInitiation
public final int fDbgLevel
コンストラクタの詳細 |
public ToHir(HirRoot pHirRoot, boolean oldlir, boolean fromc)
メソッドの詳細 |
void message(int level, java.lang.String mes)
level
- Debug levelmes
- Debug messagevoid warning(java.lang.String mes)
mes
- Message.void warning(Sym s, java.lang.String mes)
void error(java.lang.String mes)
mes
- Message.void error(Sym s, java.lang.String mes)
void fatal(java.lang.String mes)
mes
- Message.java.lang.String getOp(HIR h)
h
- HIR node.
Sym createBlockSym()
Label createLabel(java.lang.String name)
name
- Label name.
Label createLabel()
SymTable getSubpTable()
Sym searchGlobalOrdinaryId(java.lang.String name)
Sym searchLocalOrdinaryId(java.lang.String name)
Sym searchOrdinaryId(java.lang.String name)
VectorType vectorType(Type t, long n)
t
- Element type.n
- Element count.
boolean isCompatible(Type t1, Type t2, boolean checkqualifier)
t1
- Type.t2
- Type.checkqualifier
- true:Check qualifier completely.
false:Disregard qualifier.
Type compositeType(Type t1, Type t2, boolean checkqualifier)
t1
- Type to be synthesized.t2
- Type to be synthesized.
Type daPromotedType(Type t)
t
- type.
Type iPromotedType(Type t)
If the rank of t < the rank of int then { If (precision of t >= precision of int) and (t is unsigned) then resultant type is unsigned int else resultant type is int. }else do not do integral promotion.
t
- Type
boolean isIntegral(Type t)
t
- Type.
boolean isArithmetic(Type t)
t
- Type.
boolean isScalar(Type t)
t
- Type.
boolean isModifierIncluded(Type t1, Type t2)
t1
- Type.t2
- Type.
void setFlagPointerOperation(Exp e)
e
- Expression which has a variable.void setFlagAddressTaken(Exp e)
e
- Expression which has a variable.void setFlagValueIsAssigned(Exp e)
e
- Expression which has a variable.Exp decayExp(Exp e)
e
- Expression whose type is array.
Exp addrExp(Exp e)
e
- Adress taken expression.
Exp subsExp(Exp e1, Exp e2)
e1
- Array expression.e2
- Index expression.
VarNode newTempVarNode(Type t)
t
- New symbol type.
ConstNode new0Node()
ConstNode new1Node()
Exp newTrueNode()
Exp newFalseNode()
BlockStmt newBlockStmt(Stmt stmt)
stmt
- Stmt
IfStmt newIfStmt(Exp condexp, Stmt thenstmt, Stmt elsestmt)
condexp
- Condition expression.thenstmt
- Then statement.elsestmt
- Else statement.
ExpStmt newExpStmt(Exp exp)
exp
- Exp
AssignStmt newAssignStmt(Exp e1, Exp e2)
e1
- Expe2
- Exp
LabeledStmt newLabeledStmt(Stmt stmt)
stmt
- Stmt
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |