Port over more common components.

This commit is contained in:
losfair
2020-04-27 23:07:42 +08:00
parent 4bce29c06d
commit aa7e5030e0
4 changed files with 184 additions and 1 deletions

View File

@@ -12,6 +12,15 @@ pub struct SinglepassConfig {
/// deterministically across different architectures.
pub enable_nan_canonicalization: bool,
/// Enable stack check.
///
/// When enabled, an explicit stack depth check will be performed on entry
/// to each function to prevent stack overflow.
///
/// Note that this doesn't guarantee deterministic execution across
/// different platforms.
pub enable_stack_check: bool,
features: Features,
target: Target,
}
@@ -22,6 +31,7 @@ impl SinglepassConfig {
pub fn new() -> Self {
Self {
enable_nan_canonicalization: true,
enable_stack_check: false,
features: Default::default(),
target: Default::default(),
}