MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / display_default

Function display_default

cranelift/codegen/src/settings.rs:485–527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

483
484 #[test]
485 fn display_default() {
486 let b = builder();
487 let f = Flags::new(b);
488 let actual = f.to_string();
489 let expected = r#"[shared]
490regalloc_algorithm = "backtracking"
491opt_level = "none"
492tls_model = "none"
493stack_switch_model = "none"
494libcall_call_conv = "isa_default"
495probestack_size_log2 = 12
496probestack_strategy = "outline"
497bb_padding_log2_minus_one = 0
498log2_min_function_alignment = 0
499regalloc_checker = false
500regalloc_verbose_logs = false
501enable_alias_analysis = true
502enable_verifier = true
503is_pic = false
504use_colocated_libcalls = false
505enable_nan_canonicalization = false
506enable_pinned_reg = false
507enable_llvm_abi_extensions = false
508enable_multi_ret_implicit_sret = false
509unwind_info = true
510preserve_frame_pointers = false
511machine_code_cfg_info = false
512enable_probestack = false
513enable_heap_access_spectre_mitigation = true
514enable_table_access_spectre_mitigation = true
515enable_incremental_compilation_cache_checks = false
516enable_compact_unwind_abi = false
517"#;
518 if actual != expected {
519 panic!(
520 "Default settings do not match expectations:\n\n{}",
521 similar::TextDiff::from_lines(expected, &actual)
522 .unified_diff()
523 .header("expected", "actual")
524 );
525 }
526 assert_eq!(f.opt_level(), super::OptLevel::None);
527 }
528
529 #[test]
530 fn modify_bool() {

Callers

nothing calls this directly

Calls 3

builderFunction · 0.50
newFunction · 0.50
to_stringMethod · 0.45

Tested by

no test coverage detected