本文整理汇总了C#中clojure.lang.CljCompiler.Ast.ObjExpr.GenUnboxedLocal方法的典型用法代码示例。如果您正苦于以下问题:C# ObjExpr.GenUnboxedLocal方法的具体用法?C# ObjExpr.GenUnboxedLocal怎么用?C# ObjExpr.GenUnboxedLocal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clojure.lang.CljCompiler.Ast.ObjExpr
的用法示例。
在下文中一共展示了ObjExpr.GenUnboxedLocal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenCodeUnboxed
public Expression GenCodeUnboxed(RHC rhc, ObjExpr objx, GenContext context)
{
return objx.GenUnboxedLocal(context, _b);
}
示例2: GenCode
public virtual Expression GenCode(RHC rhc, ObjExpr objx, GenContext context)
{
if (IsDefType)
return Expression.Constant(null);
List<Expression> args = new List<Expression>(_closes.count()+1);
if (SupportsMeta)
args.Add(Expression.Constant(null,typeof(IPersistentMap))); // meta
for (ISeq s = RT.keys(_closes); s != null; s = s.next())
{
LocalBinding lb = (LocalBinding)s.first();
if (lb.PrimitiveType != null)
args.Add(objx.GenUnboxedLocal(context, lb));
else
args.Add(objx.GenLocal(context, lb));
}
Expression newExpr = Expression.New(_ctorInfo, args);
return newExpr;
}
示例3: GenLetFnInits
internal Expression GenLetFnInits(GenContext context, ParameterExpression parm, ObjExpr objx, IPersistentSet letFnLocals)
{
ParameterExpression cvtParm = Expression.Parameter(_compiledType,"cvt");
Expression initExpr = Expression.Assign(cvtParm,Expression.Convert(parm, _compiledType));
List<Expression> exprs = new List<Expression>();
exprs.Add(initExpr);
for (ISeq s = RT.keys(_closes); s != null; s = s.next())
{
LocalBinding lb = (LocalBinding)s.first();
if (letFnLocals.contains(lb))
{
FieldBuilder fb;
_closedOverFieldsMap.TryGetValue(lb,out fb);
Type primt = lb.PrimitiveType;
Expression init = primt != null ? objx.GenUnboxedLocal(context, lb) : objx.GenLocal(context,lb);
exprs.Add(Expression.Assign(Expression.Field(_thisParam,fb), init));
}
}
return Expression.Block(new ParameterExpression[] { cvtParm }, exprs);
}