mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-24 06:01:33 +00:00
Merge branch 'master' of github.com:wasmerio/wasmer into simd
This commit is contained in:
@ -33,9 +33,9 @@ impl Backend {
|
||||
pub fn variants() -> &'static [&'static str] {
|
||||
&[
|
||||
"cranelift",
|
||||
#[cfg(feature = "backend:singlepass")]
|
||||
#[cfg(feature = "backend-singlepass")]
|
||||
"singlepass",
|
||||
#[cfg(feature = "backend:llvm")]
|
||||
#[cfg(feature = "backend-llvm")]
|
||||
"llvm",
|
||||
]
|
||||
}
|
||||
@ -117,6 +117,7 @@ pub struct CompilerConfig {
|
||||
pub symbol_map: Option<HashMap<u32, String>>,
|
||||
pub memory_bound_check_mode: MemoryBoundCheckMode,
|
||||
pub enforce_stack_check: bool,
|
||||
pub track_state: bool,
|
||||
}
|
||||
|
||||
pub trait Compiler {
|
||||
|
@ -111,7 +111,13 @@ impl ModuleStateMap {
|
||||
.unwrap();
|
||||
|
||||
match fsm.call_offsets.get(&(ip - base)) {
|
||||
Some(x) => Some((fsm, fsm.diffs[x.diff_id].build_state(fsm))),
|
||||
Some(x) => {
|
||||
if x.diff_id < fsm.diffs.len() {
|
||||
Some((fsm, fsm.diffs[x.diff_id].build_state(fsm)))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
@ -132,7 +138,13 @@ impl ModuleStateMap {
|
||||
.unwrap();
|
||||
|
||||
match fsm.trappable_offsets.get(&(ip - base)) {
|
||||
Some(x) => Some((fsm, fsm.diffs[x.diff_id].build_state(fsm))),
|
||||
Some(x) => {
|
||||
if x.diff_id < fsm.diffs.len() {
|
||||
Some((fsm, fsm.diffs[x.diff_id].build_state(fsm)))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
@ -149,7 +161,13 @@ impl ModuleStateMap {
|
||||
.unwrap();
|
||||
|
||||
match fsm.loop_offsets.get(&(ip - base)) {
|
||||
Some(x) => Some((fsm, fsm.diffs[x.diff_id].build_state(fsm))),
|
||||
Some(x) => {
|
||||
if x.diff_id < fsm.diffs.len() {
|
||||
Some((fsm, fsm.diffs[x.diff_id].build_state(fsm)))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
None => None,
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ pub struct InternalCtx {
|
||||
/// A pointer to an array of locally-defined globals, indexed by `GlobalIndex`.
|
||||
pub globals: *mut *mut LocalGlobal,
|
||||
|
||||
/// A pointer to an array of imported memories, indexed by `MemoryIndex,
|
||||
/// A pointer to an array of imported memories, indexed by `MemoryIndex`,
|
||||
pub imported_memories: *mut *mut LocalMemory,
|
||||
|
||||
/// A pointer to an array of imported tables, indexed by `TableIndex`.
|
||||
|
Reference in New Issue
Block a user