public string ParseInstruction() { StringBuilder sb = new StringBuilder("\t"); sb.Append(LRefHelper.GetIdentifierOf(Result)).Append(" = ").Append(LKeywords.Zext); sb.Append(Value.ParseType()).Append(" ").Append(LRefHelper.GetValueOrIdentifierOf(Value)); sb.Append(" ").Append(LKeywords.To).Append(" ").Append(Result.ParseType()); return(sb.ToString()); }
public LPointerRef(LBaseRef parentRef) { string identifier = LRefHelper.GetIdentifierOf(parentRef); if (String.IsNullOrEmpty(identifier)) { throw new Exception("Parent references which don't use any identifier are not valid."); } Identifier = identifier; ParentRef = parentRef; }
public string ParseInstruction() { StringBuilder sb = new StringBuilder("\t"); sb.Append(LRefHelper.GetIdentifierOf(Result)); sb.Append(" = ").Append(LKeywords.Icmp).Append(" "); sb.Append(Condition.Parse()).Append(" "); sb.Append(Result.ParseType()).Append(" "); sb.Append(LRefHelper.GetValueOrIdentifierOf(Op1)).Append(", "); sb.Append(LRefHelper.GetValueOrIdentifierOf(Op2)); return(sb.ToString()); }
public string ParseInstruction() { StringBuilder sb = new StringBuilder("\t"); sb.Append(LRefHelper.GetIdentifierOf(FnType.ReturnType)).Append(" "); sb.Append(" = ").Append(LKeywords.Call).Append(" "); sb.Append(FnType.Parse()).Append(" "); sb.Append(FnIdentifier).Append("("); for (int i = 0; i < FnType.Parameters.Length; ++i) { if (i > 0) { sb.Append(", "); } sb.Append(FnType.Parameters[i].ParseType()).Append(" "); sb.Append(LRefHelper.GetValueOrIdentifierOf(FnType.Parameters[i])); } sb.Append(")"); return(sb.ToString()); }