Merge remote-tracking branch 'origin/master' into feature/llvm-osr

This commit is contained in:
losfair
2019-08-14 16:33:26 -07:00
289 changed files with 35513 additions and 7333 deletions

View File

@ -15,7 +15,7 @@ use crate::{
};
use std::{any::Any, ptr::NonNull};
use hashbrown::HashMap;
use std::collections::HashMap;
pub mod sys {
pub use crate::sys::*;
@ -32,6 +32,7 @@ pub enum Backend {
impl Backend {
pub fn variants() -> &'static [&'static str] {
&[
#[cfg(feature = "backend-cranelift")]
"cranelift",
#[cfg(feature = "backend-singlepass")]
"singlepass",
@ -110,14 +111,20 @@ impl Default for MemoryBoundCheckMode {
}
}
#[derive(Debug, Default)]
pub struct Features {
pub simd: bool,
}
/// Configuration data for the compiler
#[derive(Default)]
#[derive(Debug, Default)]
pub struct CompilerConfig {
/// Symbol information generated from emscripten; used for more detailed debug messages
pub symbol_map: Option<HashMap<u32, String>>,
pub memory_bound_check_mode: MemoryBoundCheckMode,
pub enforce_stack_check: bool,
pub track_state: bool,
pub features: Features,
}
pub trait Compiler {