コード例 #1
0
 static Tile conditionalWithCmpRegReg <T>(string cond_type)
     where T : BinaryOperatorNode
 {
     return(conditionalWithCmp <T, RegisterNode, RegisterNode> (
                (root, reg1, reg2, lbl) => new[] {
         InstructionFactory.Cmp(reg1, reg2),
         InstructionFactory.Jump(cond_type, lbl)
     }
                ));
 }
コード例 #2
0
 static Tile conditionalWithCmpConstReg <T, C>(string cond_type)
     where T : BinaryOperatorNode
 {
     return(conditionalWithCmp <T, ConstantNode <C>, RegisterNode> (
                (root, reg1, con, lbl) => new[] {
         InstructionFactory.Cmp(reg1, con),
         InstructionFactory.Jump(cond_type, lbl)
     }
                ));
 }