Improved based on feedback

This commit is contained in:
Syrus
2019-12-20 19:03:49 -08:00
parent 527d7072b3
commit 2404203ae4
2 changed files with 3 additions and 26 deletions

View File

@ -174,7 +174,7 @@ pub struct InstanceImage {
} }
/// A `CodeVersion` is a container for a unit of generated code for a module. /// A `CodeVersion` is a container for a unit of generated code for a module.
// #[derive(Debug, Clone)] #[derive(Clone)]
pub struct CodeVersion { pub struct CodeVersion {
/// Indicates if this code version is the baseline version. /// Indicates if this code version is the baseline version.
pub baseline: bool, pub baseline: bool,

View File

@ -54,10 +54,10 @@ static ARCH: Architecture = Architecture::Aarch64;
#[allow(dead_code)] #[allow(dead_code)]
static ARCH: Architecture = Architecture::X64; static ARCH: Architecture = Architecture::X64;
/// Inline breakpoint size for (x86-64, singlepass). /// Inline breakpoint size for x86-64.
pub const INLINE_BREAKPOINT_SIZE_X86_SINGLEPASS: usize = 7; pub const INLINE_BREAKPOINT_SIZE_X86_SINGLEPASS: usize = 7;
/// Inline breakpoint size for (aarch64, singlepass). /// Inline breakpoint size for aarch64.
pub const INLINE_BREAKPOINT_SIZE_AARCH64_SINGLEPASS: usize = 12; pub const INLINE_BREAKPOINT_SIZE_AARCH64_SINGLEPASS: usize = 12;
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
@ -949,29 +949,6 @@ impl X64FunctionCode {
.insert(m.state.wasm_inst_offset, SuspendOffset::Trappable(offset)); .insert(m.state.wasm_inst_offset, SuspendOffset::Trappable(offset));
} }
// #[allow(dead_code)]
// fn mark_inline_breakpoint(
// a: &mut Assembler,
// m: &Machine,
// fsm: &mut FunctionStateMap,
// control_stack: &mut [ControlFrame],
// ) {
// let state_diff_id = Self::get_state_diff(m, fsm, control_stack);
// let offset = a.get_offset().0;
// fsm.trappable_offsets.insert(
// offset,
// OffsetInfo {
// end_offset: offset
// + self.get_inline_breakpoint_size(ARCH)
// .expect("cannot get inline breakpoint size"),
// activate_offset: offset,
// diff_id: state_diff_id,
// },
// );
// fsm.wasm_offset_to_target_offset
// .insert(m.state.wasm_inst_offset, SuspendOffset::Trappable(offset));
// }
/// Moves `loc` to a valid location for `div`/`idiv`. /// Moves `loc` to a valid location for `div`/`idiv`.
fn emit_relaxed_xdiv( fn emit_relaxed_xdiv(
a: &mut Assembler, a: &mut Assembler,