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; }
public void AppendUnresolved(int offset) { _unresolvedOffsets = _unresolvedOffsets.Append(offset); }
public Label(ByteCodeEmitter emitter) { Contract.Requires(emitter != null); _emitter = emitter; _unresolvedOffsets = EmptyUnresolvedOffsets; }