本文整理汇总了C#中CodeGen.EmitStelemHelper方法的典型用法代码示例。如果您正苦于以下问题:C# CodeGen.EmitStelemHelper方法的具体用法?C# CodeGen.EmitStelemHelper怎么用?C# CodeGen.EmitStelemHelper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeGen
的用法示例。
在下文中一共展示了CodeGen.EmitStelemHelper方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EmitGet
internal override void EmitGet(CodeGen g)
{
g.EmitI4Helper(elements.Length);
g.IL.Emit(OpCodes.Newarr, type);
for (int i = 0; i < elements.Length; i++)
{
g.IL.Emit(OpCodes.Dup);
g.EmitI4Helper(i);
g.EmitStelemHelper(type, elements[i], false);
}
}
示例2: EmitGet
protected internal override void EmitGet(CodeGen g)
{
OperandExtensions.SetLeakedState(this, false);
g.EmitI4Helper(_elements.Length);
g.IL.Emit(OpCodes.Newarr, _type);
for (int i = 0; i < _elements.Length; i++)
{
g.IL.Emit(OpCodes.Dup);
g.EmitI4Helper(i);
g.EmitStelemHelper(_type, _elements[i], false);
}
}
示例3: EmitSet
internal override void EmitSet(CodeGen g, Operand value, bool allowExplicitConversion)
{
LoadArrayAndIndexes(g);
if (indexes.Length == 1)
{
g.EmitStelemHelper(Type, value, allowExplicitConversion);
}
else
{
throw new NotImplementedException();
}
}
示例4: EmitSet
protected internal override void EmitSet(CodeGen g, Operand value, bool allowExplicitConversion)
{
OperandExtensions.SetLeakedState(this, false);
LoadArrayAndIndexes(g);
if (_indexes.Length == 1)
{
g.EmitStelemHelper(GetReturnType(g.TypeMapper), value, allowExplicitConversion);
}
else
{
g.EmitGetHelper(value, GetReturnType(g.TypeMapper), allowExplicitConversion);
g.EmitCallHelper(
(MethodBase)g.TypeMapper.TypeInfo.FindMethod(
_array.GetReturnType(g.TypeMapper),
"Set",
ArrayUtils.Combine(_indexes, value),
false).Method.Member,
_array);
}
}