Skip to content

Commit

Permalink
Renamed 'gen_unwind_info' to 'gen_dwarf_unwind_info' for better clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Mar 17, 2022
1 parent 324a251 commit aebcb3e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/compiler-singlepass/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5903,7 +5903,7 @@ impl<'a, M: Machine> FuncGen<'a, M> {
let (unwind_info, fde) = {
match self.calling_convention {
CallingConvention::SystemV | CallingConvention::AppleAarch64 => {
let unwind_info = self.machine.gen_unwind_info(body_len);
let unwind_info = self.machine.gen_dwarf_unwind_info(body_len);
if let Some(unwind) = unwind_info {
let fde = unwind.to_fde(Address::Symbol {
symbol: WriterRelocate::FUNCTION_SYMBOL,
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler-singlepass/src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ pub trait Machine {
calling_convention: CallingConvention,
) -> CustomSection;
/// generate eh_frame instruction (or None if not possible / supported)
fn gen_unwind_info(&mut self, code_len: usize) -> Option<UnwindInstructions>;
fn gen_dwarf_unwind_info(&mut self, code_len: usize) -> Option<UnwindInstructions>;
/// generate Windows unwind instructions (or None if not possible / supported)
fn gen_windows_unwind_info(&mut self, code_len: usize) -> Option<Vec<u8>>;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler-singlepass/src/machine_arm64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5221,7 +5221,7 @@ impl Machine for MachineARM64 {
gen_import_call_trampoline_arm64(vmoffsets, index, sig, calling_convention)
}
#[cfg(feature = "unwind")]
fn gen_unwind_info(&mut self, code_len: usize) -> Option<UnwindInstructions> {
fn gen_dwarf_unwind_info(&mut self, code_len: usize) -> Option<UnwindInstructions> {
let mut instructions = vec![];
for &(instruction_offset, ref inst) in &self.unwind_ops {
let instruction_offset = instruction_offset as u32;
Expand Down Expand Up @@ -5272,7 +5272,7 @@ impl Machine for MachineARM64 {
})
}
#[cfg(not(feature = "unwind"))]
fn gen_unwind_info(&mut self, _code_len: usize) -> Option<UnwindInstructions> {
fn gen_dwarf_unwind_info(&mut self, _code_len: usize) -> Option<UnwindInstructions> {
None
}

Expand Down
4 changes: 2 additions & 2 deletions lib/compiler-singlepass/src/machine_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7158,7 +7158,7 @@ impl Machine for MachineX86_64 {
}
}
#[cfg(feature = "unwind")]
fn gen_unwind_info(&mut self, code_len: usize) -> Option<UnwindInstructions> {
fn gen_dwarf_unwind_info(&mut self, code_len: usize) -> Option<UnwindInstructions> {
let mut instructions = vec![];
for &(instruction_offset, ref inst) in &self.unwind_ops {
let instruction_offset = instruction_offset as u32;
Expand Down Expand Up @@ -7192,7 +7192,7 @@ impl Machine for MachineX86_64 {
})
}
#[cfg(not(feature = "unwind"))]
fn gen_unwind_info(&mut self, _code_len: usize) -> Option<UnwindInstructions> {
fn gen_dwarf_unwind_info(&mut self, _code_len: usize) -> Option<UnwindInstructions> {
None
}

Expand Down

0 comments on commit aebcb3e

Please sign in to comment.