本文整理汇总了C#中clojure.lang.CljCompiler.Ast.ObjExpr.EmitUnboxedLocal方法的典型用法代码示例。如果您正苦于以下问题:C# ObjExpr.EmitUnboxedLocal方法的具体用法?C# ObjExpr.EmitUnboxedLocal怎么用?C# ObjExpr.EmitUnboxedLocal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clojure.lang.CljCompiler.Ast.ObjExpr
的用法示例。
在下文中一共展示了ObjExpr.EmitUnboxedLocal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Emit
public virtual void Emit(RHC rhc, ObjExpr objx, CljILGen ilg)
{
//emitting a Fn means constructing an instance, feeding closed-overs from enclosing scope, if any
//objx arg is enclosing objx, not this
if (IsDefType)
ilg.Emit(OpCodes.Ldnull);
else
{
if (SupportsMeta)
{
ilg.Emit(OpCodes.Ldnull);
ilg.Emit(OpCodes.Castclass, typeof(IPersistentMap));
}
for (ISeq s = RT.keys(Closes); s != null; s = s.next())
{
LocalBinding lb = (LocalBinding)s.first();
if (lb.PrimitiveType != null)
objx.EmitUnboxedLocal(ilg, lb);
else
objx.EmitLocal(ilg, lb);
}
ilg.Emit(OpCodes.Newobj, _ctorInfo);
}
if (rhc == RHC.Statement)
ilg.Emit(OpCodes.Pop);
}
示例2: EmitLetFnInits
internal void EmitLetFnInits(CljILGen ilg, LocalBuilder localBuilder, ObjExpr objx, IPersistentSet letFnLocals)
{
if (_typeBuilder != null)
{
// Full compile
ilg.Emit(OpCodes.Castclass, _typeBuilder);
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;
ilg.Emit(OpCodes.Dup); // this
if (primt != null)
{
objx.EmitUnboxedLocal(ilg, lb);
ilg.MaybeEmitVolatileOp(IsVolatile(lb));
ilg.Emit(OpCodes.Stfld, fb);
}
else
{
objx.EmitLocal(ilg, lb);
ilg.MaybeEmitVolatileOp(IsVolatile(lb));
ilg.Emit(OpCodes.Stfld, fb);
}
}
}
ilg.Emit(OpCodes.Pop);
}
}
示例3: EmitUnboxed
public void EmitUnboxed(RHC rhc, ObjExpr objx, CljILGen ilg)
{
objx.EmitUnboxedLocal(ilg, _b);
}