1 write to Definition
ILAssembler (1)
GrammarVisitor.cs (1)
991Definition = definition;
97 references to Definition
ILAssembler (97)
GrammarVisitor.cs (97)
1964for (int i = 0; i < _currentMethod.Definition.GenericParameters.Count; i++) 1966EntityRegistry.GenericParameterEntity? genericParameter = _currentMethod.Definition.GenericParameters[i]; 2358int ilOffset = _currentMethod.Definition.MethodBody.Offset; 2359_currentMethod.Definition.DebugInfo.DocumentPath ??= _currentDocumentPath; 2364_currentMethod.Definition.DebugInfo.SequencePoints.Add( 2369_currentMethod.Definition.DebugInfo.SequencePoints.Add( 2717LabelHandle start = _currentMethod!.Definition.MethodBody.DefineLabel(); 2718_currentMethod.Definition.MethodBody.MarkLabel(start); 2724var start = _currentMethod!.Labels.TryGetValue(VisitId(id).Value, out LabelHandle startLabel) ? startLabel : _currentMethod.Labels[VisitId(id).Value] = _currentMethod.Definition.MethodBody.DefineLabel(); 2729var start = _currentMethod!.Definition.MethodBody.DefineLabel(); 2730_currentMethod.Definition.MethodBody.MarkLabel(start, VisitInt32(offset).Value); 2776LabelHandle start = _currentMethod!.Definition.MethodBody.DefineLabel(); 2777_currentMethod.Definition.MethodBody.MarkLabel(start); 2779LabelHandle end = _currentMethod.Definition.MethodBody.DefineLabel(); 2780_currentMethod.Definition.MethodBody.MarkLabel(end); 2786var start = _currentMethod!.Labels.TryGetValue(VisitId(ids[0]).Value, out LabelHandle startLabel) ? startLabel : _currentMethod.Labels[VisitId(ids[0]).Value] = _currentMethod.Definition.MethodBody.DefineLabel(); 2787var end = _currentMethod!.Labels.TryGetValue(VisitId(ids[1]).Value, out LabelHandle endLabel) ? endLabel : _currentMethod.Labels[VisitId(ids[1]).Value] = _currentMethod.Definition.MethodBody.DefineLabel(); 2793var start = _currentMethod!.Definition.MethodBody.DefineLabel(); 2794var end = _currentMethod.Definition.MethodBody.DefineLabel(); 2795_currentMethod.Definition.MethodBody.MarkLabel(start, VisitInt32(offsets[0]).Value); 2796_currentMethod.Definition.MethodBody.MarkLabel(end, VisitInt32(offsets[1]).Value); 2951handle = _currentMethod.Definition.MethodBody.DefineLabel(); 2959_currentMethod.Definition.MethodBody.Branch(opcode, handle); 2964LabelHandle label = _currentMethod!.Definition.MethodBody.DefineLabel(); 2965_currentMethod.Definition.MethodBody.Branch(opcode, label); 2966_currentMethod.Definition.MethodBody.MarkLabel(label, _currentMethod.Definition.MethodBody.Offset + offset); 2972_currentMethod!.Definition.MethodBody.OpCode(opcode); 2975_currentMethod.Definition.MethodBody.Token(VisitMdtoken(mdtoken).Value.Handle); 2982memberRef.RecordBlobToWriteResolvedHandle(_currentMethod.Definition.MethodBody.CodeBuilder.ReserveBytes(4)); 2986_currentMethod.Definition.MethodBody.Token(fieldRef.Handle); 2996_currentMethod!.Definition.MethodBody.LoadConstantI4(arg); 3000_currentMethod!.Definition.MethodBody.OpCode(opcode); 3001_currentMethod.Definition.MethodBody.CodeBuilder.WriteByte((byte)arg); 3007_currentMethod!.Definition.MethodBody.LoadConstantI8(VisitInt64(context.int64()).Value); 3015_currentMethod!.Definition.MethodBody.OpCode(opcode); 3019memberRef.RecordBlobToWriteResolvedHandle(_currentMethod.Definition.MethodBody.CodeBuilder.ReserveBytes(4)); 3023_currentMethod.Definition.MethodBody.Token(methodRef.Handle); 3033_currentMethod!.Definition.MethodBody.OpCode(opcode); 3071_currentMethod!.Definition.MethodBody.LoadConstantR4((float)value); 3075_currentMethod!.Definition.MethodBody.LoadConstantR8(value); 3093_currentMethod!.Definition.MethodBody.Token(_entityRegistry.GetOrCreateStandaloneSignature(signature).Handle); 3135_currentMethod!.Definition.MethodBody.LoadString(_metadataBuilder.GetOrAddUserString(str)); 3147handle = _currentMethod.Definition.MethodBody.DefineLabel(); 3160LabelHandle labelHandle = _currentMethod!.Definition.MethodBody.DefineLabel(); 3164var switchEncoder = _currentMethod!.Definition.MethodBody.Switch(labels.Count); 3174_currentMethod.Definition.MethodBody.MarkLabel(label.Label, _currentMethod.Definition.MethodBody.Offset + offset); 3181_currentMethod!.Definition.MethodBody.OpCode(opcode); 3182_currentMethod.Definition.MethodBody.Token(tok.Handle); 3187_currentMethod!.Definition.MethodBody.OpCode(opcode); 3188_currentMethod.Definition.MethodBody.Token(arg.Handle); 3195_currentMethod!.Definition.MethodBody.OpCode(opcode); 3202_currentMethod.Definition.MethodBody.CodeBuilder.WriteByte((byte)value); 3206_currentMethod.Definition.MethodBody.CodeBuilder.WriteInt32(value); 3220if (_currentMethod.Definition.SignatureHeader.IsInstance) 3251_currentMethod.Definition.MethodBody.CodeBuilder.WriteByte((byte)index.Value); 3255_currentMethod.Definition.MethodBody.CodeBuilder.WriteInt32(index.Value); 3423label = _currentMethod.Definition.MethodBody.DefineLabel(); 3426_currentMethod.Definition.MethodBody.MarkLabel(label); 3617currentMethod.Definition.MethodBody.CodeBuilder.WriteByte((byte)VisitInt32(context.GetChild<CILParser.Int32Context>(0)).Value); 3621_entityRegistry.EntryPoint = currentMethod.Definition; 3625currentMethod.Definition.BodyAttributes = MethodBodyAttributes.InitLocals; 3629currentMethod.Definition.MaxStack = VisitInt32(context.GetChild<CILParser.Int32Context>(0)).Value; 3636currentMethod.Definition.BodyAttributes = MethodBodyAttributes.InitLocals; 3664label = currentMethod.Definition.MethodBody.DefineLabel(); 3667currentMethod.Definition.MethodBody.MarkLabel(label); 3675currentMethod.Definition.ExportOrdinal = ordinal; 3676currentMethod.Definition.ExportAlias = alias; 3684currentMethod.Definition.VTableEntry = vtableEntry; 3685currentMethod.Definition.VTableSlot = vtableSlot; 3689BlobBuilder signature = currentMethod.Definition.MethodSignature!; 3717_currentTypeDefinition.PeekOrDefault()!.MethodImplementations.Add(EntityRegistry.CreateUnrecordedMethodImplementation(currentMethod.Definition, methodRef)); 3733if (index < 0 || index >= currentMethod.Definition.GenericParameters.Count) 3740param = currentMethod.Definition.GenericParameters[index]; 3745foreach (var genericParam in currentMethod.Definition.GenericParameters) 3774if (index < 0 || index >= currentMethod.Definition.GenericParameters.Count) 3781param = currentMethod.Definition.GenericParameters[index]; 3786foreach (var genericParam in currentMethod.Definition.GenericParameters) 3817currentMethod.Definition.GenericParameterConstraints.Add(constraint); 3829if (index < 0 || index >= currentMethod.Definition.Parameters.Count) 3839var param = currentMethod.Definition.Parameters[index]; 3859declarativeSecurity?.Parent = currentMethod.Definition; 4703_currentMethod!.Definition.MethodBody.ControlFlowBuilder!.AddFinallyRegion(tryStart, tryEnd, finallyClause.Start, finallyClause.End); 4706_currentMethod!.Definition.MethodBody.ControlFlowBuilder!.AddFaultRegion(tryStart, tryEnd, faultClause.Start, faultClause.End); 4709_currentMethod!.Definition.MethodBody.ControlFlowBuilder!.AddCatchRegion(tryStart, tryEnd, catchClause.Start, catchClause.End, catchClause.Type.Handle); 4712_currentMethod!.Definition.MethodBody.ControlFlowBuilder!.AddFilterRegion(tryStart, tryEnd, filterClause.Start, filterClause.End, filterClause.FilterStart); 4974LabelHandle start = _currentMethod!.Definition.MethodBody.DefineLabel(); 4975_currentMethod.Definition.MethodBody.MarkLabel(start); 4977LabelHandle end = _currentMethod.Definition.MethodBody.DefineLabel(); 4978_currentMethod.Definition.MethodBody.MarkLabel(end); 4984var start = _currentMethod!.Labels.TryGetValue(VisitId(ids[0]).Value, out LabelHandle startLabel) ? startLabel : _currentMethod.Labels[VisitId(ids[0]).Value] = _currentMethod.Definition.MethodBody.DefineLabel(); 4985var end = _currentMethod!.Labels.TryGetValue(VisitId(ids[1]).Value, out LabelHandle endLabel) ? endLabel : _currentMethod.Labels[VisitId(ids[1]).Value] = _currentMethod.Definition.MethodBody.DefineLabel(); 4991var start = _currentMethod!.Definition.MethodBody.DefineLabel(); 4992var end = _currentMethod.Definition.MethodBody.DefineLabel(); 4993_currentMethod.Definition.MethodBody.MarkLabel(start, VisitInt32(offsets[0]).Value); 4994_currentMethod.Definition.MethodBody.MarkLabel(end, VisitInt32(offsets[1]).Value);