Exemple #1
0
        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);
        }
Exemple #2
0
 private void WriteBytecode(IBigEndianWriter writer, CodeAttribute attribute)
 {
     using var segment = writer.WithU4Length();
     _assembler.Assemble(attribute.Instructions, segment);
 }