Rename alternative_stack to fault.

This commit is contained in:
losfair 2019-07-04 01:27:19 +08:00
parent 650f67a339
commit 5c5ecfff7d
9 changed files with 10 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# NOTE: Keep this consistent with `alternative_stack.rs`.
# NOTE: Keep this consistent with `fault.rs`.
.globl run_on_alternative_stack
run_on_alternative_stack:

View File

@ -1,4 +1,4 @@
# NOTE: Keep this consistent with `alternative_stack.rs`.
# NOTE: Keep this consistent with `fault.rs`.
.globl _run_on_alternative_stack
_run_on_alternative_stack:

View File

@ -44,7 +44,7 @@ pub mod vmcalls;
#[cfg(all(unix, target_arch = "x86_64"))]
pub use trampoline_x64 as trampoline;
#[cfg(all(unix, target_arch = "x86_64"))]
pub mod alternative_stack;
pub mod fault;
pub mod state;
use self::error::CompileResult;

View File

@ -362,7 +362,7 @@ impl InstanceImage {
#[cfg(all(unix, target_arch = "x86_64"))]
pub mod x64 {
use super::*;
use crate::alternative_stack::{catch_unsafe_unwind, run_on_alternative_stack};
use crate::fault::{catch_unsafe_unwind, run_on_alternative_stack};
use crate::codegen::BkptMap;
use crate::structures::TypedIndex;
use crate::types::LocalGlobalIndex;

View File

@ -211,7 +211,7 @@ fn get_intrinsics_for_module(m: &ModuleInfo) -> *const Intrinsics {
#[cfg(all(unix, target_arch = "x86_64"))]
fn get_interrupt_signal_mem() -> *mut u8 {
unsafe { crate::alternative_stack::get_wasm_interrupt_signal_mem() }
unsafe { crate::fault::get_wasm_interrupt_signal_mem() }
}
#[cfg(not(all(unix, target_arch = "x86_64")))]

View File

@ -1236,6 +1236,9 @@ impl X64FunctionCode {
match *param {
Location::GPR(x) => {
let content = m.state.register_values[X64Register::GPR(x).to_index().0];
// FIXME: There might be some corner cases (release -> emit_call_sysv -> acquire?) that cause this assertion to fail.
// Hopefully nothing would be incorrect at runtime.
//assert!(content != MachineValue::Undefined);
m.state.stack_values.push(content);
}

View File

@ -11,7 +11,7 @@
//!
use std::any::Any;
use std::cell::Cell;
use wasmer_runtime_core::alternative_stack::{
use wasmer_runtime_core::fault::{
begin_unsafe_unwind, catch_unsafe_unwind, ensure_sighandler,
};
use wasmer_runtime_core::codegen::BkptMap;

View File

@ -514,7 +514,7 @@ fn execute_wasm(options: &Run) -> Result<(), String> {
#[cfg(feature = "backend:singlepass")]
unsafe {
if options.backend == Backend::Singlepass {
use wasmer_runtime_core::alternative_stack::{
use wasmer_runtime_core::fault::{
catch_unsafe_unwind, ensure_sighandler,
};
use wasmer_runtime_core::state::{