57 return EnlargeArray(incoming, incoming.Length * 2);
62 T[]
array =
new T[requiredSize];
68 : this(methodBuilder, 64)
140 return GetMemberRefSignature(call, returnType, parameterTypes, requiredCustomModifiers, optionalCustomModifiers, optionalParameterTypes, 0);
145 return ((
ModuleBuilder)
m_methodBuilder.
Module).GetMemberRefSignature(call, returnType, parameterTypes, requiredCustomModifiers, optionalCustomModifiers, optionalParameterTypes, cGenericParameters);
166 if (num < -128 || num > 127)
246 m_fixupInstSize = instSize
260 for (
int j = i + 1; j <
exceptions.Length; j++)
297 [CLSCompliant(
false)]
357 if (arg >= -128 && arg <= 127)
376 if ((uint)arg <= 255u)
381 if ((uint)arg <= 65535u)
389 if ((uint)arg <= 255u)
394 if ((uint)arg <= 65535u)
402 if ((uint)arg <= 255u)
407 if ((uint)arg <= 65535u)
441 if (optionalParameterTypes !=
null && (callingConvention &
CallingConventions.VarArgs) == 0)
449 if (returnType != typeof(
void))
453 if (parameterTypes !=
null)
455 num -= parameterTypes.Length;
457 if (optionalParameterTypes !=
null)
459 num -= optionalParameterTypes.Length;
476 if (parameterTypes !=
null)
478 num2 = parameterTypes.Length;
481 if (parameterTypes !=
null)
483 for (
int i = 0; i < num2; i++)
488 if (returnType != typeof(
void))
492 if (parameterTypes !=
null)
506 if (methodInfo ==
null)
515 int methodToken =
GetMethodToken(methodInfo, optionalParameterTypes, useMethodDef:
false);
523 if (parameterTypes !=
null)
525 num -= parameterTypes.Length;
531 if (optionalParameterTypes !=
null)
533 num -= optionalParameterTypes.Length;
542 if (signature ==
null)
549 int value = signatureToken;
579 if (parameterTypes !=
null)
581 num -= parameterTypes.Length;
642 int num = labels.Length;
704 if (localIndex <= 255)
728 if (localIndex <= 255)
751 if (localIndex > 255)
830 if (exceptionType !=
null)
838 if (exceptionType ==
null)
868 if (currentState != 0)
923 if (constructor ==
null)
934 Type[] types =
new Type[1] { typeof(
string) };
956 array[0] = localType;
989 array[0] = fieldType;
1006 if (methodBuilder ==
null)
1014 if (localType ==
null)
1028 if (usingNamespace ==
null)
1032 if (usingNamespace.Length == 0)
1037 if (methodBuilder ==
null)
1042 if (currentActiveScopeIndex == -1)
static unsafe void Copy(Array sourceArray, Array destinationArray, int length)
static unsafe int SingleToInt32Bits(float value)
static unsafe long DoubleToInt64Bits(double value)
static void WriteInt32LittleEndian(Span< byte > destination, int value)
static void WriteInt16BigEndian(Span< byte > destination, short value)
static void WriteInt16LittleEndian(Span< byte > destination, short value)
static void WriteInt64LittleEndian(Span< byte > destination, long value)
static byte Max(byte val1, byte val2)
virtual void EndExceptionBlock()
static void SortExceptions(__ExceptionInfo[] exceptions)
virtual void Emit(OpCode opcode, float arg)
virtual void EmitCalli(OpCode opcode, CallingConvention unmanagedCallConv, Type? returnType, Type[]? parameterTypes)
void UpdateStackSize(OpCode opcode, int stackchange)
virtual void Emit(OpCode opcode, LocalBuilder local)
void AddFixup(Label lbl, int pos, int instSize)
virtual void Emit(OpCode opcode, Type cls)
void PutInteger4(int value)
virtual void ThrowException([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)] Type excType)
virtual void EmitWriteLine(FieldInfo fld)
void EnsureCapacity(int size)
virtual SignatureHelper GetMemberRefSignature(CallingConventions call, Type returnType, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers, Type[] optionalParameterTypes)
SignatureHelper GetMemberRefSignature(CallingConventions call, Type returnType, Type[] parameterTypes, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers, Type[] optionalParameterTypes, int cGenericParameters)
virtual LocalBuilder DeclareLocal(Type localType)
virtual void MarkLabel(Label loc)
MethodInfo m_methodBuilder
static T[] EnlargeArray< T >(T[] incoming)
__FixupData[] m_fixupData
ILGenerator(MethodInfo methodBuilder)
virtual void BeginFinallyBlock()
virtual void Emit(OpCode opcode)
virtual void Emit(OpCode opcode, MethodInfo meth)
__ExceptionInfo[] m_currExcStack
virtual void RecordTokenFixup()
virtual void Emit(OpCode opcode, SignatureHelper signature)
virtual void BeginScope()
int GetLabelPos(Label lbl)
virtual void Emit(OpCode opcode, FieldInfo field)
virtual void Emit(OpCode opcode, int arg)
virtual LocalBuilder DeclareLocal(Type localType, bool pinned)
virtual void Emit(OpCode opcode, double arg)
virtual void EmitWriteLine(LocalBuilder localBuilder)
virtual Label BeginExceptionBlock()
virtual void Emit(OpCode opcode, ConstructorInfo con)
virtual void Emit(OpCode opcode, Label label)
void IncreaseCapacity(int size)
virtual Label DefineLabel()
virtual void UsingNamespace(string usingNamespace)
SignatureHelper m_localSignature
virtual void EmitCalli(OpCode opcode, CallingConventions callingConvention, Type? returnType, Type[]? parameterTypes, Type[]? optionalParameterTypes)
__ExceptionInfo[] m_exceptions
virtual void EmitWriteLine(string value)
virtual void EmitCall(OpCode opcode, MethodInfo methodInfo, Type[]? optionalParameterTypes)
__ExceptionInfo[] GetExceptions()
virtual void BeginExceptFilterBlock()
void InternalEmit(OpCode opcode)
virtual void BeginFaultBlock()
__ExceptionInfo?[] CurrExcStack
void Emit(OpCode opcode, sbyte arg)
virtual void Emit(OpCode opcode, Label[] labels)
virtual void Emit(OpCode opcode, string str)
ILGenerator(MethodInfo methodBuilder, int size)
virtual void Emit(OpCode opcode, long arg)
SignatureHelper GetMemberRefSignature(CallingConventions call, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes)
virtual void BeginCatchBlock(Type exceptionType)
virtual void Emit(OpCode opcode, byte arg)
virtual void Emit(OpCode opcode, short arg)
int GetMethodToken(MethodBase method, Type[] optionalParameterTypes, bool useMethodDef)
MethodInfo GetMethodBuilder()
void AddUsingNamespace(string strNamespace)
LocalSymInfo m_localSymInfo
ILGenerator GetILGenerator()
static int GetStringConstant(QCallModule module, string str, int length)
int GetTypeTokenInternal(Type type)
int GetFieldToken(FieldInfo field)
int GetTypeToken(Type type)
int GetSignatureToken(SignatureHelper sigHelper)
static readonly OpCode Ldloca
static readonly OpCode Leave
static readonly OpCode Ldarg_2
static readonly OpCode Stloc_S
static readonly OpCode Stloc_0
static readonly OpCode Callvirt
static readonly OpCode Stloc
static readonly OpCode Newobj
static readonly OpCode Ldloc_2
static readonly OpCode Ldarg_S
static readonly OpCode Ldc_I4_6
static readonly OpCode Stloc_3
static readonly OpCode Ldftn
static readonly OpCode Ldc_I4
static readonly OpCode Endfinally
static bool TakesSingleByteArgument(OpCode inst)
static readonly OpCode Ldc_I4_M1
static readonly OpCode Ldarg_3
static readonly OpCode Stloc_1
static readonly OpCode Ldfld
static readonly OpCode Ldarga
static readonly OpCode Ldc_I4_5
static readonly OpCode Ldloc_0
static readonly OpCode Ldc_I4_1
static readonly OpCode Starg_S
static readonly OpCode Ldc_I4_0
static readonly OpCode Throw
static readonly OpCode Ldstr
static readonly OpCode Ldarg_1
static readonly OpCode Ldsfld
static readonly OpCode Endfilter
static readonly OpCode Ldloc_3
static readonly OpCode Stloc_2
static readonly OpCode Ldtoken
static readonly OpCode Ldloc_1
static readonly OpCode Ldc_I4_8
static readonly OpCode Call
static readonly OpCode Ldloc
static readonly OpCode Ldc_I4_7
static readonly OpCode Ldloc_S
static readonly OpCode Starg
static readonly OpCode Ldarg_0
static readonly OpCode Ldc_I4_S
static readonly OpCode Ldarga_S
static readonly OpCode Ldvirtftn
static readonly OpCode Calli
static readonly OpCode Ldc_I4_2
static readonly OpCode Ldloca_S
static readonly OpCode Ldarg
static readonly OpCode Ldc_I4_3
static readonly OpCode Ldc_I4_4
void AddUsingNamespaceToCurrentScope(string strNamespace)
int GetCurrentActiveScopeIndex()
void AddScopeInfo(ScopeAction sa, int iOffset)
static SignatureHelper GetLocalVarSigHelper()
void AddArgument(Type clsArgument)
static SignatureHelper GetMethodSigHelper(Module? mod, Type? returnType, Type[]? parameterTypes)
void MarkFinallyAddr(int finallyAddr, int endCatchAddr)
void SetFinallyEndLabel(Label lbl)
void MarkFilterAddr(int filterAddr)
void MarkFaultAddr(int faultAddr)
void MarkCatchAddr(int catchAddr, Type catchException)
FieldAttributes Attributes
virtual Type[] GetParameterTypes()
static string Argument_UnmatchedMethodForLocal
static string Argument_MissingDefaultConstructor
static string Argument_ShouldNotSpecifyExceptionType
static string Format(string resourceFormat, object p1)
static string Argument_BadLabelContent
static string Argument_UnclosedExceptionBlock
static string InvalidOperation_NotAVarArgCallingConvention
static string InvalidOperation_BadILGeneratorUsage
static string InvalidOperation_TypeHasBeenCreated
static string Argument_BadExceptionCodeGen
static string Argument_NotMethodCallOpcode
static string Argument_RedefinedLabel
static string NotSupported_IllegalOneByteBranch
static string Argument_InvalidLabel
static string Argument_NotExceptionType
static string InvalidOperation_BadInstructionOrIndexOutOfBound
static string Argument_EmptyName
static string Argument_BadLabel
static string NotSupported_OutputStreamUsingTypeBuilder
static string Argument_EmitWriteLineType
static string Argument_NotInExceptionBlock
static string InvalidOperation_MethodBaked
static ? Type GetType(string typeName, bool throwOnError, bool ignoreCase)
ConstructorInfo? GetConstructor(Type[] types)
virtual bool IsSubclassOf(Type c)
static readonly Type[] EmptyTypes
virtual bool IsGenericTypeDefinition
DynamicallyAccessedMemberTypes
StackBehaviour StackBehaviourPop
StackBehaviour StackBehaviourPush
override bool Equals([NotNullWhen(true)] object? obj)