public override void Emit (EmitContext ec) { // It can be null for static initializers if (base_ctor == null) return; var call = new CallEmitter (); call.InstanceExpression = new CompilerGeneratedThis (type, loc); call.EmitPredefined (ec, base_ctor, argument_list); }
public override void Emit (EmitContext ec) { // // It can be null for struct initializers or System.Object // if (base_ctor == null) { if (type == ec.BuiltinTypes.Object) return; ec.Emit (OpCodes.Ldarg_0); ec.Emit (OpCodes.Initobj, type); return; } var call = new CallEmitter (); call.InstanceExpression = new CompilerGeneratedThis (type, loc); call.EmitPredefined (ec, base_ctor, argument_list, false); }
public override void EmitStatement (EmitContext ec) { if (conditionalAccessReceiver) { ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ()) { Statement = true }; } var call = new CallEmitter (); call.InstanceExpression = InstanceExpr; call.EmitStatement (ec, method, arguments, loc); if (conditionalAccessReceiver) ec.CloseConditionalAccess (null); }
public override void Emit (EmitContext ec) { if (conditionalAccessReceiver) { ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ()); } // // Invocation on delegates call the virtual Invoke member // so we are always `instance' calls // var call = new CallEmitter (); call.InstanceExpression = InstanceExpr; call.Emit (ec, method, arguments, loc); if (conditionalAccessReceiver) ec.CloseConditionalAccess (type.IsNullableType && type != method.ReturnType ? type : null); }
public override void Emit (EmitContext ec) { // // Invocation on delegates call the virtual Invoke member // so we are always `instance' calls // var call = new CallEmitter (); call.InstanceExpression = InstanceExpr; call.EmitPredefined (ec, method, arguments); }
public override void EmitStatement (EmitContext ec) { var call = new CallEmitter (); call.InstanceExpression = InstanceExpr; call.EmitStatement (ec, method, arguments, loc); }