Fix a number of warnings cropping up on nightly Rust (#2767)
Various small issues here and there, nothing major
This commit is contained in:
@@ -3582,7 +3582,7 @@ pub(crate) fn define(
|
|||||||
"fmin_pseudo",
|
"fmin_pseudo",
|
||||||
r#"
|
r#"
|
||||||
Floating point pseudo-minimum, propagating NaNs. This behaves differently from ``fmin``.
|
Floating point pseudo-minimum, propagating NaNs. This behaves differently from ``fmin``.
|
||||||
See https://github.com/WebAssembly/simd/pull/122 for background.
|
See <https://github.com/WebAssembly/simd/pull/122> for background.
|
||||||
|
|
||||||
The behaviour is defined as ``fmin_pseudo(a, b) = (b < a) ? b : a``, and the behaviour
|
The behaviour is defined as ``fmin_pseudo(a, b) = (b < a) ? b : a``, and the behaviour
|
||||||
for zero or NaN inputs follows from the behaviour of ``<`` with such inputs.
|
for zero or NaN inputs follows from the behaviour of ``<`` with such inputs.
|
||||||
@@ -3614,7 +3614,7 @@ pub(crate) fn define(
|
|||||||
"fmax_pseudo",
|
"fmax_pseudo",
|
||||||
r#"
|
r#"
|
||||||
Floating point pseudo-maximum, propagating NaNs. This behaves differently from ``fmax``.
|
Floating point pseudo-maximum, propagating NaNs. This behaves differently from ``fmax``.
|
||||||
See https://github.com/WebAssembly/simd/pull/122 for background.
|
See <https://github.com/WebAssembly/simd/pull/122> for background.
|
||||||
|
|
||||||
The behaviour is defined as ``fmax_pseudo(a, b) = (a < b) ? b : a``, and the behaviour
|
The behaviour is defined as ``fmax_pseudo(a, b) = (a < b) ? b : a``, and the behaviour
|
||||||
for zero or NaN inputs follows from the behaviour of ``<`` with such inputs.
|
for zero or NaN inputs follows from the behaviour of ``<`` with such inputs.
|
||||||
@@ -4102,7 +4102,7 @@ pub(crate) fn define(
|
|||||||
This will double the lane width and halve the number of lanes. So the resulting
|
This will double the lane width and halve the number of lanes. So the resulting
|
||||||
vector has the same number of bits as `x` and `y` do (individually).
|
vector has the same number of bits as `x` and `y` do (individually).
|
||||||
|
|
||||||
See https://github.com/WebAssembly/simd/pull/127 for background info.
|
See <https://github.com/WebAssembly/simd/pull/127> for background info.
|
||||||
"#,
|
"#,
|
||||||
&formats.binary,
|
&formats.binary,
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ impl<'a> Writer<'a> {
|
|||||||
|
|
||||||
/// The supported unwind codes for the x64 Windows ABI.
|
/// The supported unwind codes for the x64 Windows ABI.
|
||||||
///
|
///
|
||||||
/// See: https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64
|
/// See: <https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64>
|
||||||
/// Only what is needed to describe the prologues generated by the Cranelift x86 ISA are represented here.
|
/// Only what is needed to describe the prologues generated by the Cranelift x86 ISA are represented here.
|
||||||
/// Note: the Cranelift x86 ISA RU enum matches the Windows unwind GPR encoding values.
|
/// Note: the Cranelift x86 ISA RU enum matches the Windows unwind GPR encoding values.
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
@@ -195,7 +195,7 @@ pub(crate) trait RegisterMapper<Reg> {
|
|||||||
/// Represents Windows x64 unwind information.
|
/// Represents Windows x64 unwind information.
|
||||||
///
|
///
|
||||||
/// For information about Windows x64 unwind info, see:
|
/// For information about Windows x64 unwind info, see:
|
||||||
/// https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64
|
/// <https://docs.microsoft.com/en-us/cpp/build/exception-handling-x64>
|
||||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||||
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
|
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
|
||||||
pub struct UnwindInfo {
|
pub struct UnwindInfo {
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
//! support the SpiderMonkey Wasm ABI. For details of the multi-value return
|
//! support the SpiderMonkey Wasm ABI. For details of the multi-value return
|
||||||
//! ABI, see:
|
//! ABI, see:
|
||||||
//!
|
//!
|
||||||
//! https://searchfox.org/mozilla-central/rev/bc3600def806859c31b2c7ac06e3d69271052a89/js/src/wasm/WasmStubs.h#134
|
//! <https://searchfox.org/mozilla-central/rev/bc3600def806859c31b2c7ac06e3d69271052a89/js/src/wasm/WasmStubs.h#134>
|
||||||
//!
|
//!
|
||||||
//! In brief:
|
//! In brief:
|
||||||
//! - Return values are processed in *reverse* order.
|
//! - Return values are processed in *reverse* order.
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
//! Our current implementation uses a sorted array of compressed intervals, represented by their
|
//! Our current implementation uses a sorted array of compressed intervals, represented by their
|
||||||
//! boundaries (Block, Inst), sorted by Block. This is a simple data structure, enables coalescing of
|
//! boundaries (Block, Inst), sorted by Block. This is a simple data structure, enables coalescing of
|
||||||
//! intervals easily, and shows some nice performance behavior. See
|
//! intervals easily, and shows some nice performance behavior. See
|
||||||
//! https://github.com/bytecodealliance/cranelift/issues/1084 for benchmarks against using a
|
//! <https://github.com/bytecodealliance/cranelift/issues/1084> for benchmarks against using a
|
||||||
//! bforest::Map<Block, Inst>.
|
//! bforest::Map<Block, Inst>.
|
||||||
//!
|
//!
|
||||||
//! ## block ordering
|
//! ## block ordering
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
//! the necessary API to make coalescing easy, nor does it optimize for our types' sizes.
|
//! the necessary API to make coalescing easy, nor does it optimize for our types' sizes.
|
||||||
//!
|
//!
|
||||||
//! Even the specialized `bforest::Map<Block, Inst>` implementation is slower than a plain sorted
|
//! Even the specialized `bforest::Map<Block, Inst>` implementation is slower than a plain sorted
|
||||||
//! array, see https://github.com/bytecodealliance/cranelift/issues/1084 for details.
|
//! array, see <https://github.com/bytecodealliance/cranelift/issues/1084> for details.
|
||||||
|
|
||||||
use crate::entity::SparseMapValue;
|
use crate::entity::SparseMapValue;
|
||||||
use crate::ir::{Block, ExpandedProgramPoint, Inst, Layout, ProgramOrder, ProgramPoint, Value};
|
use crate::ir::{Block, ExpandedProgramPoint, Inst, Layout, ProgramOrder, ProgramPoint, Value};
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
//! In: Jhala R., De Bosschere K. (eds) Compiler Construction. CC 2013.
|
//! In: Jhala R., De Bosschere K. (eds) Compiler Construction. CC 2013.
|
||||||
//! Lecture Notes in Computer Science, vol 7791. Springer, Berlin, Heidelberg
|
//! Lecture Notes in Computer Science, vol 7791. Springer, Berlin, Heidelberg
|
||||||
//!
|
//!
|
||||||
//! https://link.springer.com/content/pdf/10.1007/978-3-642-37051-9_6.pdf
|
//! <https://link.springer.com/content/pdf/10.1007/978-3-642-37051-9_6.pdf>
|
||||||
|
|
||||||
use crate::Variable;
|
use crate::Variable;
|
||||||
use alloc::vec::Vec;
|
use alloc::vec::Vec;
|
||||||
|
|||||||
@@ -64,11 +64,11 @@
|
|||||||
//! 32X4 and 64X2 types from CLIF and instead have a single V128 type.
|
//! 32X4 and 64X2 types from CLIF and instead have a single V128 type.
|
||||||
//!
|
//!
|
||||||
//! For further background see also:
|
//! For further background see also:
|
||||||
//! https://github.com/bytecodealliance/wasmtime/issues/1147
|
//! <https://github.com/bytecodealliance/wasmtime/issues/1147>
|
||||||
//! ("Too many raw_bitcasts in SIMD code")
|
//! ("Too many raw_bitcasts in SIMD code")
|
||||||
//! https://github.com/bytecodealliance/cranelift/pull/1251
|
//! <https://github.com/bytecodealliance/cranelift/pull/1251>
|
||||||
//! ("Add X128 type to represent WebAssembly's V128 type")
|
//! ("Add X128 type to represent WebAssembly's V128 type")
|
||||||
//! https://github.com/bytecodealliance/cranelift/pull/1236
|
//! <https://github.com/bytecodealliance/cranelift/pull/1236>
|
||||||
//! ("Relax verification to allow I8X16 to act as a default vector type")
|
//! ("Relax verification to allow I8X16 to act as a default vector type")
|
||||||
|
|
||||||
use super::{hash_map, HashMap};
|
use super::{hash_map, HashMap};
|
||||||
|
|||||||
@@ -110,8 +110,7 @@ pub fn parse_type_section<'a>(
|
|||||||
for entry in types {
|
for entry in types {
|
||||||
match entry? {
|
match entry? {
|
||||||
TypeDef::Func(wasm_func_ty) => {
|
TypeDef::Func(wasm_func_ty) => {
|
||||||
let mut sig =
|
let mut sig = Signature::new(environ.target_config().default_call_conv);
|
||||||
Signature::new(ModuleEnvironment::target_config(environ).default_call_conv);
|
|
||||||
sig.params.extend(wasm_func_ty.params.iter().map(|ty| {
|
sig.params.extend(wasm_func_ty.params.iter().map(|ty| {
|
||||||
let cret_arg: ir::Type = type_to_type(*ty, environ)
|
let cret_arg: ir::Type = type_to_type(*ty, environ)
|
||||||
.expect("only numeric types are supported in function signatures");
|
.expect("only numeric types are supported in function signatures");
|
||||||
|
|||||||
@@ -13,8 +13,9 @@
|
|||||||
//! here may not be super well documented. This file is 100% lifted from
|
//! here may not be super well documented. This file is 100% lifted from
|
||||||
//! SpiderMonkey and then adapted for Wasmtime's purposes. Credit for almost
|
//! SpiderMonkey and then adapted for Wasmtime's purposes. Credit for almost
|
||||||
//! all of this file goes to SpiderMonkey for figuring out all the fiddly bits.
|
//! all of this file goes to SpiderMonkey for figuring out all the fiddly bits.
|
||||||
//! See also https://searchfox.org/mozilla-central/source/js/src/wasm/WasmSignalHandlers.cpp for
|
//! See also
|
||||||
//! the original code.
|
//! <https://searchfox.org/mozilla-central/source/js/src/wasm/WasmSignalHandlers.cpp>
|
||||||
|
//! for the original code.
|
||||||
//!
|
//!
|
||||||
//! The high-level overview is that when using mach ports a thread is blocked
|
//! The high-level overview is that when using mach ports a thread is blocked
|
||||||
//! when it generates an exception and then a message can be read from the
|
//! when it generates an exception and then a message can be read from the
|
||||||
@@ -45,7 +46,8 @@ use std::cell::Cell;
|
|||||||
use std::mem;
|
use std::mem;
|
||||||
use std::thread;
|
use std::thread;
|
||||||
|
|
||||||
/// Other `mach` declarations awaiting https://github.com/fitzgen/mach/pull/64 to be merged.
|
/// Other `mach` declarations awaiting <https://github.com/fitzgen/mach/pull/64>
|
||||||
|
/// to be merged.
|
||||||
mod mach_addons {
|
mod mach_addons {
|
||||||
#![allow(non_camel_case_types)]
|
#![allow(non_camel_case_types)]
|
||||||
#![allow(non_upper_case_globals)]
|
#![allow(non_upper_case_globals)]
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ use crate::{sig_registry::SignatureRegistry, trampoline::StoreInstanceHandle};
|
|||||||
use crate::{Config, Extern, FuncType, Store, Trap, Val, ValType};
|
use crate::{Config, Extern, FuncType, Store, Trap, Val, ValType};
|
||||||
use anyhow::{bail, Context as _, Result};
|
use anyhow::{bail, Context as _, Result};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use std::any::Any;
|
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
@@ -43,7 +42,7 @@ impl HostFunc {
|
|||||||
let func = Box::new(move |caller_vmctx, values_vec: *mut u128| {
|
let func = Box::new(move |caller_vmctx, values_vec: *mut u128| {
|
||||||
// Lookup the last registered store as host functions have no associated store
|
// Lookup the last registered store as host functions have no associated store
|
||||||
let store = wasmtime_runtime::with_last_info(|last| {
|
let store = wasmtime_runtime::with_last_info(|last| {
|
||||||
last.and_then(Any::downcast_ref::<Store>)
|
last.and_then(|s| s.downcast_ref::<Store>())
|
||||||
.cloned()
|
.cloned()
|
||||||
.expect("Host function called without thread state")
|
.expect("Host function called without thread state")
|
||||||
});
|
});
|
||||||
@@ -401,7 +400,7 @@ impl Func {
|
|||||||
let func = Box::new(move |caller_vmctx, values_vec: *mut u128| {
|
let func = Box::new(move |caller_vmctx, values_vec: *mut u128| {
|
||||||
// Lookup the last registered store as host functions have no associated store
|
// Lookup the last registered store as host functions have no associated store
|
||||||
let store = wasmtime_runtime::with_last_info(|last| {
|
let store = wasmtime_runtime::with_last_info(|last| {
|
||||||
last.and_then(Any::downcast_ref::<Store>)
|
last.and_then(|s| s.downcast_ref::<Store>())
|
||||||
.cloned()
|
.cloned()
|
||||||
.expect("function called without thread state")
|
.expect("function called without thread state")
|
||||||
});
|
});
|
||||||
@@ -1586,7 +1585,7 @@ macro_rules! impl_into_func {
|
|||||||
let func = &*(state as *const _ as *const F);
|
let func = &*(state as *const _ as *const F);
|
||||||
|
|
||||||
let store = wasmtime_runtime::with_last_info(|last| {
|
let store = wasmtime_runtime::with_last_info(|last| {
|
||||||
last.and_then(Any::downcast_ref::<Store>)
|
last.and_then(|s| s.downcast_ref::<Store>())
|
||||||
.cloned()
|
.cloned()
|
||||||
.expect("function called without thread state")
|
.expect("function called without thread state")
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user