Remove unnecessary fields from CodeInfo

This commit is contained in:
bjorn3
2022-01-03 19:33:30 +01:00
parent e98a85e1e2
commit 4915162230
9 changed files with 7 additions and 98 deletions

View File

@@ -1460,8 +1460,6 @@ impl MachBufferFinalized {
sink.put1(*byte);
}
sink.begin_jumptables();
sink.begin_rodata();
sink.end_codegen();
}
@@ -2091,8 +2089,6 @@ mod test {
fn trap(&mut self, t: TrapCode, _: SourceLoc) {
self.traps.push((self.offset, t));
}
fn begin_jumptables(&mut self) {}
fn begin_rodata(&mut self) {}
fn end_codegen(&mut self) {}
fn add_call_site(&mut self, op: Opcode, _: SourceLoc) {
self.callsites.push((self.offset, op));

View File

@@ -367,12 +367,8 @@ pub struct MachCompileResult {
impl MachCompileResult {
/// Get a `CodeInfo` describing section sizes from this compilation result.
pub fn code_info(&self) -> CodeInfo {
let code_size = self.buffer.total_size();
CodeInfo {
code_size,
jumptables_size: 0,
rodata_size: 0,
total_size: code_size,
total_size: self.buffer.total_size(),
}
}
}