Example #1
0
        public void Resolve(int offset)
        {
            Contract.Requires(!Offset.HasValue);
            Offset = offset;
            var offsetAsBytes = BitConverter.GetBytes(offset);

            foreach (var unresolvedOffset in _unresolvedOffsets.Offsets)
            {
                Buffer.BlockCopy(offsetAsBytes, 0, _emitter.RawBuffer, unresolvedOffset, sizeof(int));
            }
            _unresolvedOffsets = EmptyUnresolvedOffsets;
        }
Example #2
0
 public void AppendUnresolved(int offset)
 {
     _unresolvedOffsets = _unresolvedOffsets.Append(offset);
 }
Example #3
0
 public Label(ByteCodeEmitter emitter)
 {
     Contract.Requires(emitter != null);
     _emitter           = emitter;
     _unresolvedOffsets = EmptyUnresolvedOffsets;
 }