protected override ICode VisitIsInst(ExprIsInst e) {
     var ctx = e.Ctx;
     var mIsInst = ctx.Module.Import(((Func<object, Type, object>)InternalFunctions.IsInst).Method);
     var eType = new ExprJsTypeVarName(ctx, e.Type);
     var expr = new ExprCall(ctx, e.Type, mIsInst, null, e.Expr, eType);
     return expr;
 }
 protected override ICode VisitIsInst(ExprIsInst e) {
     this.code.AppendFormat("({0}?)", e.Type);
     this.Visit(e.Expr);
     return e;
 }
示例#3
0
 protected override ICode VisitIsInst(ExprIsInst e) {
     throw new InvalidOperationException("This should never occur");
 }
 private Stmt IsInst(TypeReference toType) {
     var expr = new ExprIsInst(this.ctx, this.stack.Pop(), toType);
     return this.SsaLocalAssignment(expr);
 }