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 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; }
protected override ICode VisitVariableAddress(ExprVariableAddress e) { this.Visit(e.Variable); return e; //throw new InvalidOperationException("Should never get here"); }
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; }