EmitBne_Un_S() private method

private EmitBne_Un_S ( System target ) : void
target System
return void
コード例 #1
0
ファイル: Emittion.cs プロジェクト: purplecow/msgpack-cli
		private static void EmitCompareNull( TracingILGenerator il, LocalBuilder value, Label targetIfNotNull )
		{
			if ( value.LocalType == typeof( MessagePackObject ) )
			{
				il.EmitAnyLdloca( value );
				il.EmitGetProperty( Metadata._MessagePackObject.IsNil );
				il.EmitBrfalse_S( targetIfNotNull );
			}
			else if ( value.LocalType.GetIsValueType() )
			{
				Contract.Assert( Nullable.GetUnderlyingType( value.LocalType ) != null, value.LocalType.FullName );
				il.EmitAnyLdloca( value );
				il.EmitGetProperty( value.LocalType.GetProperty( "HasValue" ) );
				il.EmitBrtrue_S( targetIfNotNull );
			}
			else // ref type
			{
				il.EmitAnyLdloc( value );
				il.EmitLdnull();
				il.EmitBne_Un_S( targetIfNotNull );
			}
		}