Mutate() 공개 메소드

public Mutate ( Mono.CSharp.TypeParameterMutator mutator ) : MethodSpec
mutator Mono.CSharp.TypeParameterMutator
리턴 MethodSpec
예제 #1
0
파일: codegen.cs 프로젝트: blinds52/mono
		public void Emit (OpCode opcode, MethodSpec method)
		{
			if (IsAnonymousStoreyMutateRequired)
				method = method.Mutate (CurrentAnonymousMethod.Storey.Mutator);

			if (method.IsConstructor)
				ig.Emit (opcode, (ConstructorInfo) method.GetMetaInfo ());
			else
				ig.Emit (opcode, (MethodInfo) method.GetMetaInfo ());
		}
예제 #2
0
파일: codegen.cs 프로젝트: ccflo/mono
		public void Emit (OpCode opcode, MethodSpec method)
		{
			if (IsAnonymousStoreyMutateRequired)
				method = method.Mutate (CurrentAnonymousMethod.Storey.Mutator);

			if (method.IsConstructor)
				ig.Emit (opcode, (ConstructorInfo) method.GetMetaInfo ());
			else
				ig.Emit (opcode, (MethodInfo) method.GetMetaInfo ());

			if (TrackStackTypes) {
				//
				// Don't bother with ldftn/Ldvirtftn they can never appear on open stack
				//
				if (method.IsConstructor) {
					if (opcode == OpCodes.Newobj)
						SetStackType (method.DeclaringType);
				} else {
					if (method.ReturnType.Kind != MemberKind.Void) {
						SetStackType (method.ReturnType);
					}
				}
			}
		}