Dead
This commit is contained in:
parent
a96de034ce
commit
cd3c103fa1
|
@ -1,7 +1,7 @@
|
|||
use std::mem;
|
||||
use std::ptr::NonNull;
|
||||
|
||||
use jit::{cached_code, JitState};
|
||||
use jit::JitState;
|
||||
use page::Page;
|
||||
use state_flags::CachedStateFlags;
|
||||
|
||||
|
@ -25,14 +25,6 @@ pub fn rust_setup() {
|
|||
}));
|
||||
}
|
||||
|
||||
pub fn jit_find_cache_entry(phys_address: u32, state_flags: CachedStateFlags) -> u32 {
|
||||
let cached_code {
|
||||
wasm_table_index,
|
||||
initial_state,
|
||||
} = ::jit::jit_find_cache_entry(phys_address, state_flags);
|
||||
wasm_table_index as u32 | (initial_state as u32) << 16
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
/// Called from JS, not C
|
||||
pub fn codegen_finalize_finished(
|
||||
|
|
|
@ -1818,13 +1818,13 @@ pub unsafe fn cycle_internal() {
|
|||
*previous_ip = *instruction_pointer;
|
||||
let phys_addr = return_on_pagefault!(get_phys_eip()) as u32;
|
||||
let state_flags = pack_current_state_flags();
|
||||
let entry = ::c_api::jit_find_cache_entry(phys_addr, state_flags);
|
||||
let entry = ::jit::jit_find_cache_entry(phys_addr, state_flags);
|
||||
|
||||
if 0 != entry {
|
||||
if entry != ::jit::cached_code::NONE {
|
||||
profiler::stat_increment(RUN_FROM_CACHE);
|
||||
let initial_tsc = *timestamp_counter;
|
||||
let wasm_table_index = (entry & 0xFFFF) as u16;
|
||||
let initial_state = (entry >> 16) as u16;
|
||||
let wasm_table_index = entry.wasm_table_index;
|
||||
let initial_state = entry.initial_state;
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
in_jit = true;
|
||||
|
@ -1956,9 +1956,9 @@ unsafe fn jit_run_interpreted(phys_addr: i32) {
|
|||
if CHECK_MISSED_ENTRY_POINTS {
|
||||
let phys_addr = return_on_pagefault!(get_phys_eip()) as u32;
|
||||
let state_flags = pack_current_state_flags();
|
||||
let entry = ::c_api::jit_find_cache_entry(phys_addr, state_flags);
|
||||
let entry = ::jit::jit_find_cache_entry(phys_addr, state_flags);
|
||||
|
||||
if entry != 0 {
|
||||
if entry != ::jit::cached_code::NONE {
|
||||
profiler::stat_increment(RUN_INTERPRETED_MISSED_COMPILED_ENTRY_RUN_INTERPRETED);
|
||||
//dbg_log!(
|
||||
// "missed entry point at {:x} prev_opcode={:x} opcode={:x}",
|
||||
|
|
|
@ -358,14 +358,14 @@ struct BasicBlock {
|
|||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone)]
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub struct cached_code {
|
||||
pub wasm_table_index: u16,
|
||||
pub initial_state: u16,
|
||||
}
|
||||
|
||||
impl cached_code {
|
||||
const NONE: cached_code = cached_code {
|
||||
pub const NONE: cached_code = cached_code {
|
||||
wasm_table_index: 0,
|
||||
initial_state: 0,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue