protected override ICode VisitVariableAddress(ExprVariableAddress e) { //this.code.AppendFormat("@[local:{0}]", e.Index); this.code.AppendFormat("@(<{0}>", e.Type); this.Visit(e.Variable); this.code.Append(")"); return(e); }
private Stmt LdLoca(int idx) { var type = this.localTypes[idx]; var var = this.locals[idx]; var expr = new ExprVariableAddress(this.ctx, var, type); this.stack.Push(expr); return(null); }
protected override ICode VisitVariableAddress(ExprVariableAddress e) { if (e.Type.IsBoolean(true) && !e.Variable.Type.IsBoolean()) { var ctx = e.Ctx; return(new ExprJsExplicit(ctx, "!!expr", ctx.Boolean, e.Variable.Named("expr"))); // HACK } return(base.VisitVariableAddress(e)); }
protected virtual ICode VisitVariableAddress(ExprVariableAddress e) { this.ThrowOnNoOverride(); var variable = (Expr)this.Visit(e.Variable); if (variable != e.Variable) { return(new ExprVariableAddress(e.Ctx, variable, e.ElementType)); } else { return(e); } }
protected override ICode VisitVariableAddress(ExprVariableAddress e) { this.Visit(e.Variable); return(e); //throw new InvalidOperationException("Should never get here"); }