public override void Emit(EmitContext ec) { var call = new CallEmitter(); call.InstanceExpression = Child; call.EmitPredefined(ec, NullableInfo.GetValue(Child.Type), null); }
public override void Emit(EmitContext ec) { Store(ec); var call = new CallEmitter(); call.InstanceExpression = this; // // Using GetGetValueOrDefault is prefered because JIT can possibly // inline it whereas Value property contains a throw which is very // unlikely to be inlined // if (useDefaultValue) { call.EmitPredefined(ec, NullableInfo.GetGetValueOrDefault(expr.Type), null); } else { call.EmitPredefined(ec, NullableInfo.GetValue(expr.Type), null); } }