public AddedOrChangedMethodInfo( DebugId methodId, ImmutableArray <EncLocalInfo> locals, ImmutableArray <LambdaDebugInfo> lambdaDebugInfo, ImmutableArray <ClosureDebugInfo> closureDebugInfo, string?stateMachineTypeName, ImmutableArray <EncHoistedLocalInfo> stateMachineHoistedLocalSlotsOpt, ImmutableArray <Cci.ITypeReference?> stateMachineAwaiterSlotsOpt, StateMachineStatesDebugInfo stateMachineStates) { // An updated method will carry its id over, // an added method id has generation set to the current generation ordinal. Debug.Assert(methodId.Generation >= 0); // each state machine has to have awaiters: Debug.Assert(stateMachineAwaiterSlotsOpt.IsDefault == stateMachineTypeName is null); // a state machine might not have hoisted variables: Debug.Assert(stateMachineHoistedLocalSlotsOpt.IsDefault || stateMachineTypeName is not null); MethodId = methodId; Locals = locals; LambdaDebugInfo = lambdaDebugInfo; ClosureDebugInfo = closureDebugInfo; StateMachineTypeName = stateMachineTypeName; StateMachineHoistedLocalSlotsOpt = stateMachineHoistedLocalSlotsOpt; StateMachineAwaiterSlotsOpt = stateMachineAwaiterSlotsOpt; StateMachineStates = stateMachineStates; }
public MethodBody( ImmutableArray <byte> ilBits, ushort maxStack, Cci.IMethodDefinition parent, DebugId methodId, ImmutableArray <Cci.ILocalDefinition> locals, SequencePointList sequencePoints, DebugDocumentProvider debugDocumentProvider, ImmutableArray <Cci.ExceptionHandlerRegion> exceptionHandlers, bool areLocalsZeroed, bool hasStackalloc, ImmutableArray <Cci.LocalScope> localScopes, bool hasDynamicLocalVariables, Cci.IImportScope importScopeOpt, ImmutableArray <LambdaDebugInfo> lambdaDebugInfo, ImmutableArray <ClosureDebugInfo> closureDebugInfo, string stateMachineTypeNameOpt, ImmutableArray <StateMachineHoistedLocalScope> stateMachineHoistedLocalScopes, ImmutableArray <EncHoistedLocalInfo> stateMachineHoistedLocalSlots, ImmutableArray <Cci.ITypeReference?> stateMachineAwaiterSlots, StateMachineStatesDebugInfo stateMachineStatesDebugInfo, StateMachineMoveNextBodyDebugInfo stateMachineMoveNextDebugInfoOpt, DynamicAnalysisMethodBodyData dynamicAnalysisDataOpt) { Debug.Assert(!locals.IsDefault); Debug.Assert(!exceptionHandlers.IsDefault); Debug.Assert(!localScopes.IsDefault); _ilBits = ilBits; _maxStack = maxStack; _parent = parent; _methodId = methodId; _locals = locals; _exceptionHandlers = exceptionHandlers; _areLocalsZeroed = areLocalsZeroed; HasStackalloc = hasStackalloc; _localScopes = localScopes; _hasDynamicLocalVariables = hasDynamicLocalVariables; _importScopeOpt = importScopeOpt; _lambdaDebugInfo = lambdaDebugInfo; _closureDebugInfo = closureDebugInfo; _stateMachineTypeNameOpt = stateMachineTypeNameOpt; _stateMachineHoistedLocalScopes = stateMachineHoistedLocalScopes; _stateMachineHoistedLocalSlots = stateMachineHoistedLocalSlots; _stateMachineAwaiterSlots = stateMachineAwaiterSlots; _stateMachineStatesDebugInfo = stateMachineStatesDebugInfo; _stateMachineMoveNextDebugInfoOpt = stateMachineMoveNextDebugInfoOpt; _dynamicAnalysisDataOpt = dynamicAnalysisDataOpt; _sequencePoints = GetSequencePoints(sequencePoints, debugDocumentProvider); }