Remove CodeSink

This commit is contained in:
bjorn3
2022-01-11 17:10:37 +01:00
parent a48a60f958
commit 55d722db05
8 changed files with 23 additions and 103 deletions

View File

@@ -7,8 +7,7 @@ mod memorysink;
mod stack_map;
pub use self::memorysink::{
MemoryCodeSink, NullRelocSink, NullStackMapSink, NullTrapSink, RelocSink, StackMapSink,
TrapSink,
NullRelocSink, NullStackMapSink, NullTrapSink, RelocSink, StackMapSink, TrapSink,
};
pub use self::stack_map::StackMap;
use core::fmt;
@@ -98,12 +97,3 @@ pub struct CodeInfo {
/// Number of bytes in total.
pub total_size: CodeOffset,
}
/// Abstract interface for adding bytes to the code segment.
///
/// A `CodeSink` will receive all of the machine code for a function. It also accepts relocations
/// which are locations in the code section that need to be fixed up when linking.
pub trait CodeSink {
/// Add 1 byte to the code section.
fn put1(&mut self, _: u8);
}