//=========================================================== // 追加 //=========================================================== private static void WriteStackAllocate(LanguageWriter w, IStackAllocateExpression exp) { TypeRef type = new TypeRef(exp.Type); w.Write("("); type.WriteNameWithRef(w); w.Write("*)::"); w.WriteReference("_alloca", "Crt 関数 #include <malloc.h>", null); w.Write("("); w.WriteKeyword("sizeof"); w.Write("("); type.WriteName(w); w.Write(")*"); WriteExpression(w, exp.Expression, PREC_BI_MUL > GetExpressionPrecedence(exp.Expression)); w.Write(")"); }
public virtual void VisitStackAllocateExpression(IStackAllocateExpression value) { VisitType(value.Type); VisitExpression(value.Expression); }
private void WriteStackAllocateExpression(IStackAllocateExpression expression, IFormatter formatter) { formatter.WriteKeyword("stackalloc"); formatter.Write(" "); this.WriteType(expression.Type, formatter); formatter.Write("["); this.WriteExpression(expression.Expression, formatter); formatter.Write("]"); }
public override void VisitStackAllocateExpression(IStackAllocateExpression value) { WriteUnsupported(value); }
public virtual void VisitStackAllocateExpression(IStackAllocateExpression value) { this.VisitType(value.Type); this.VisitExpression(value.Expression); }
public virtual IExpression TransformStackAllocateExpression(IStackAllocateExpression value) { value.Expression = this.TransformExpression(value.Expression); return value; }