本文整理汇总了C#中IKVM.Internal.CodeEmitter.EmitBrtrue方法的典型用法代码示例。如果您正苦于以下问题:C# CodeEmitter.EmitBrtrue方法的具体用法?C# CodeEmitter.EmitBrtrue怎么用?C# CodeEmitter.EmitBrtrue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IKVM.Internal.CodeEmitter
的用法示例。
在下文中一共展示了CodeEmitter.EmitBrtrue方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EmitThrowNoSuchMethodErrorForSetter
internal static void EmitThrowNoSuchMethodErrorForSetter(CodeEmitter ilgen, MemberWrapper member)
{
#if STATIC_COMPILER
StaticCompiler.IssueMessage(Message.EmittedNoSuchMethodError, "<unknown>", member.DeclaringType.Name + "." + member.Name + member.Signature);
#endif
// HACK the branch around the throw is to keep the verifier happy
CodeEmitterLabel label = ilgen.DefineLabel();
ilgen.Emit(OpCodes.Ldc_I4_0);
ilgen.EmitBrtrue(label);
ilgen.EmitThrow("java.lang.NoSuchMethodError");
ilgen.MarkLabel(label);
ilgen.Emit(OpCodes.Pop);
if (!member.IsStatic)
{
ilgen.Emit(OpCodes.Pop);
}
}
示例2: EmitCall
internal override void EmitCall(CodeEmitter ilgen)
{
ilgen.Emit(OpCodes.Dup);
ilgen.Emit(OpCodes.Isinst, CoreClasses.java.lang.Cloneable.Wrapper.TypeAsBaseType);
CodeEmitterLabel label1 = ilgen.DefineLabel();
ilgen.EmitBrtrue(label1);
CodeEmitterLabel label2 = ilgen.DefineLabel();
ilgen.EmitBrfalse(label2);
ilgen.EmitThrow("java.lang.CloneNotSupportedException");
ilgen.MarkLabel(label2);
ilgen.EmitThrow("java.lang.NullPointerException");
ilgen.MarkLabel(label1);
ilgen.Emit(OpCodes.Call, Types.Object.GetMethod("MemberwiseClone", BindingFlags.Instance | BindingFlags.NonPublic, null, Type.EmptyTypes, null));
}
示例3: EmitThrowNoSuchMethodErrorForSetter
internal static void EmitThrowNoSuchMethodErrorForSetter(CodeEmitter ilgen, bool isStatic)
{
// HACK the branch around the throw is to keep the verifier happy
CodeEmitterLabel label = ilgen.DefineLabel();
ilgen.Emit(OpCodes.Ldc_I4_0);
ilgen.EmitBrtrue(label);
ilgen.EmitThrow("java.lang.NoSuchMethodError");
ilgen.MarkLabel(label);
ilgen.Emit(OpCodes.Pop);
if (!isStatic)
{
ilgen.Emit(OpCodes.Pop);
}
}
示例4: EmitThrowNoSuchMethodErrorForGetter
internal static void EmitThrowNoSuchMethodErrorForGetter(CodeEmitter ilgen, TypeWrapper type, bool isStatic)
{
// HACK the branch around the throw is to keep the verifier happy
CodeEmitterLabel label = ilgen.DefineLabel();
ilgen.Emit(OpCodes.Ldc_I4_0);
ilgen.EmitBrtrue(label);
ilgen.EmitThrow("java.lang.NoSuchMethodError");
ilgen.MarkLabel(label);
if (!isStatic)
{
ilgen.Emit(OpCodes.Pop);
}
ilgen.Emit(OpCodes.Ldloc, ilgen.DeclareLocal(type.TypeAsLocalOrStackType));
}
示例5: Emit
internal override void Emit(CodeEmitter ilgen, CodeEmitterLabel label)
{
ilgen.EmitBrtrue(label);
}
示例6: Generate
internal override void Generate(CodeGenContext context, CodeEmitter ilgen)
{
base.Generate(context, ilgen);
if(typeType != null)
{
ilgen.Emit(OpCodes.Isinst, typeType);
}
else
{
if(typeWrapper.IsGhost || typeWrapper.IsGhostArray)
{
ilgen.Emit(OpCodes.Dup);
// NOTE we pass a null context, but that shouldn't be a problem, because
// typeWrapper should never be an UnloadableTypeWrapper
typeWrapper.EmitInstanceOf(null, ilgen);
CodeEmitterLabel endLabel = ilgen.DefineLabel();
ilgen.EmitBrtrue(endLabel);
ilgen.Emit(OpCodes.Pop);
ilgen.Emit(OpCodes.Ldnull);
ilgen.MarkLabel(endLabel);
}
else
{
ilgen.Emit(OpCodes.Isinst, typeWrapper.TypeAsTBD);
}
}
}
示例7: Generate
internal override void Generate(CodeGenContext context, CodeEmitter ilgen)
{
base.Generate(context, ilgen);
if(typeType != null)
{
ilgen.Emit(OpCodes.Isinst, typeType);
}
else
{
if(typeWrapper.IsGhost || typeWrapper.IsGhostArray)
{
ilgen.Emit(OpCodes.Dup);
typeWrapper.EmitInstanceOf(ilgen);
CodeEmitterLabel endLabel = ilgen.DefineLabel();
ilgen.EmitBrtrue(endLabel);
ilgen.Emit(OpCodes.Pop);
ilgen.Emit(OpCodes.Ldnull);
ilgen.MarkLabel(endLabel);
}
else
{
ilgen.Emit(OpCodes.Isinst, typeWrapper.TypeAsTBD);
}
}
}