private void BuildBytecode(Stream stream, CodeAttribute attribute) { using var ms = new MemoryStream(); _assembler.Assemble(attribute.Instructions, ms); stream.WriteU4((uint)ms.Length); ms.CopyTo(stream); }
private void WriteBytecode(IBigEndianWriter writer, CodeAttribute attribute) { using var segment = writer.WithU4Length(); _assembler.Assemble(attribute.Instructions, segment); }