Exemplo n.º 1
0
 public DebugIdentifierOperand(ConstantOperand <string> name, bool isReadOnly, int frameIndex, int id)
 {
     Name       = name;
     IsReadOnly = isReadOnly;
     FrameIndex = frameIndex;
     Id         = id;
 }
Exemplo n.º 2
0
        public ConstantOperand <T> GetOperand(T value)
        {
            if (_operands.TryGetValue(value, out var operand))
            {
                return(operand);
            }

            operand = new ConstantOperand <T>(_nextId++, value);
            _operands.Add(value, operand);
            return(operand);
        }
Exemplo n.º 3
0
 public int LoadField(ConstantOperand <string> operand)
 {
     Emit(new Instruction(InstructionType.LdFld, operand));
     return(-1 + 1);
 }
Exemplo n.º 4
0
 public int StoreField(ConstantOperand <string> operand)
 {
     Emit(new Instruction(InstructionType.StFld, operand));
     return(-2);
 }