예제 #1
0
		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);
		}
예제 #2
0
		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);
		}
예제 #3
0
파일: delegate.cs 프로젝트: psni/mono
		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);
		}
예제 #4
0
파일: delegate.cs 프로젝트: psni/mono
		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);
		}
예제 #5
0
파일: delegate.cs 프로젝트: bruceyue/mono
		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);
		}
예제 #6
0
파일: delegate.cs 프로젝트: frje/SharpLang
		public override void EmitStatement (EmitContext ec)
		{
			var call = new CallEmitter ();
			call.InstanceExpression = InstanceExpr;
			call.EmitStatement (ec, method, arguments, loc);
		}