Exemplo n.º 1
0
		public void InitializeFrom(InstructionOptions options) {
			Code = options.Code;
			InstructionOperandVM.WriteValue(Code, options.Operand);
			SequencePoint = options.SequencePoint;
		}
Exemplo n.º 2
0
		public InstructionOptions(Dictionary<object, object> ops, Instruction instr) {
			this.Code = instr.OpCode.Code;
			this.Operand = BodyUtils.ToOperandVM(ops, instr.Operand);
			this.SequencePoint = instr.SequencePoint;
		}
Exemplo n.º 3
0
		void AddSequencePoints(CilBody body, ISymbolMethod method) {
			int numSeqs = method.SequencePointCount;
			var offsets = new int[numSeqs];
			var documents = new ISymbolDocument[numSeqs];
			var lines = new int[numSeqs];
			var columns = new int[numSeqs];
			var endLines = new int[numSeqs];
			var endColumns = new int[numSeqs];
			method.GetSequencePoints(offsets, documents, lines, columns, endLines, endColumns);

			int instrIndex = 0;
			for (int i = 0; i < numSeqs; i++) {
				var instr = GetInstruction(body.Instructions, offsets[i], ref instrIndex);
				if (instr == null)
					continue;
				var seqPoint = new SequencePoint() {
					Document = Add_NoLock(new PdbDocument(documents[i])),
					StartLine = lines[i],
					StartColumn = columns[i],
					EndLine = endLines[i],
					EndColumn = endColumns[i],
				};
				instr.SequencePoint = seqPoint;
			}
		}