本文整理汇总了C#中CodeGen.EmitCallHelper方法的典型用法代码示例。如果您正苦于以下问题:C# CodeGen.EmitCallHelper方法的具体用法?C# CodeGen.EmitCallHelper怎么用?C# CodeGen.EmitCallHelper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CodeGen
的用法示例。
在下文中一共展示了CodeGen.EmitCallHelper方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EmitGet
internal override void EmitGet(CodeGen g)
{
MethodBase mb = (MethodBase)method.Method.Member;
if (!mb.IsStatic)
target.EmitRef(g);
method.EmitArgs(g, args);
g.EmitCallHelper(mb, target);
}
示例2: EmitGet
protected internal override void EmitGet(CodeGen g)
{
OperandExtensions.SetLeakedState(this, false);
MethodBase mb = (MethodBase)_method.Method.Member;
if (!mb.IsStatic)
_target.EmitRef(g);
_method.EmitArgs(g, _args);
g.EmitCallHelper(mb, _target);
}
示例3: EmitGet
internal override void EmitGet(CodeGen g)
{
PropertyInfo pi = (PropertyInfo)property.Method.Member;
MethodInfo mi = pi.GetGetMethod(true);
if (mi == null)
{
base.EmitGet(g);
return;
}
if (!mi.IsStatic)
target.EmitRef(g);
property.EmitArgs(g, indexes);
g.EmitCallHelper(mi, target);
}
示例4: EmitGet
protected internal override void EmitGet(CodeGen g)
{
OperandExtensions.SetLeakedState(this, false);
PropertyInfo pi = (PropertyInfo)_property.Method.Member;
MethodInfo mi = pi.GetGetMethod(true);
if (mi == null)
{
base.EmitGet(g);
return;
}
if (!mi.IsStatic)
_target.EmitRef(g);
_property.EmitArgs(g, _indexes);
g.EmitCallHelper(mi, _target);
}
示例5: EmitSet
internal override void EmitSet(CodeGen g, Operand value, bool allowExplicitConversion)
{
PropertyInfo pi = (PropertyInfo)property.Method.Member;
MethodInfo mi = pi.GetSetMethod(true);
if (mi == null)
{
base.EmitSet(g, value, allowExplicitConversion);
return;
}
if (!mi.IsStatic)
target.EmitRef(g);
property.EmitArgs(g, indexes);
g.EmitGetHelper(value, Type, allowExplicitConversion);
g.EmitCallHelper(mi, target);
}
示例6: 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);
}
}
示例7: EmitGet
protected internal override void EmitGet(CodeGen g)
{
OperandExtensions.SetLeakedState(this, false);
LoadArrayAndIndexes(g);
if (_indexes.Length == 1)
{
g.EmitLdelemHelper(GetReturnType(g.TypeMapper));
}
else
{
g.EmitCallHelper(
(MethodBase)g.TypeMapper.TypeInfo.FindMethod(
_array.GetReturnType(g.TypeMapper),
"Get",
_indexes,
false).Method.Member,
_array);
}
}
示例8: EmitSet
protected internal override void EmitSet(CodeGen g, Operand value, bool allowExplicitConversion)
{
OperandExtensions.SetLeakedState(this, false);
PropertyInfo pi = (PropertyInfo)_property.Method.Member;
MethodInfo mi = pi.GetSetMethod(true);
if (mi == null)
{
base.EmitSet(g, value, allowExplicitConversion);
return;
}
if (!mi.IsStatic)
_target.EmitRef(g);
_property.EmitArgs(g, _indexes);
g.EmitGetHelper(value, GetReturnType(g.TypeMapper), allowExplicitConversion);
g.EmitCallHelper(mi, _target);
}