Lines Matching refs:engine

49 pub fn check_compatible(engine: &Engine, mmap: &[u8], expected: ObjectKind) -> Result<()> {  in check_compatible()
118 match &engine.config().module_version { in check_compatible()
122 if version != engine.config().module_version.as_str() { in check_compatible()
127 postcard::from_bytes::<Metadata<'_>>(data)?.check_compatible(engine) in check_compatible()
131 pub fn append_compiler_info(engine: &Engine, obj: &mut Object<'_>, metadata: &Metadata<'_>) { in append_compiler_info()
139 let version = engine.config().module_version.as_str(); in append_compiler_info()
193 pub fn new(engine: &Engine) -> Result<Metadata<'static>> { in new()
194 let compiler = engine.try_compiler()?; in new()
199 tunables: engine.tunables().clone(), in new()
200 features: engine.features().bits(), in new()
204 fn check_compatible(mut self, engine: &Engine) -> Result<()> { in check_compatible()
205 self.check_triple(engine)?; in check_compatible()
206 self.check_shared_flags(engine)?; in check_compatible()
207 self.check_isa_flags(engine)?; in check_compatible()
208 self.check_tunables(&engine.tunables())?; in check_compatible()
209 self.check_features(&engine.features())?; in check_compatible()
213 fn check_triple(&self, engine: &Engine) -> Result<()> { in check_triple()
214 let engine_target = engine.target(); in check_triple()
235 fn check_shared_flags(&mut self, engine: &Engine) -> Result<()> { in check_shared_flags()
237 engine in check_shared_flags()
245 fn check_isa_flags(&mut self, engine: &Engine) -> Result<()> { in check_isa_flags()
247 engine in check_isa_flags()
481 let engine = Engine::default(); in test_architecture_mismatch() localVariable
482 let mut metadata = Metadata::new(&engine)?; in test_architecture_mismatch()
485 match metadata.check_compatible(&engine) { in test_architecture_mismatch()
500 let engine = Engine::default(); in test_os_mismatch() localVariable
501 let mut metadata = Metadata::new(&engine)?; in test_os_mismatch()
509 match metadata.check_compatible(&engine) { in test_os_mismatch()
531 let engine = Engine::default(); in test_cranelift_flags_mismatch() localVariable
532 let mut metadata = Metadata::new(&engine)?; in test_cranelift_flags_mismatch()
538 match metadata.check_compatible(&engine) { in test_cranelift_flags_mismatch()
557 let engine = Engine::default(); in test_isa_flags_mismatch() localVariable
558 let mut metadata = Metadata::new(&engine)?; in test_isa_flags_mismatch()
564 match metadata.check_compatible(&engine) { in test_isa_flags_mismatch()
585 let engine = Engine::default(); in test_tunables_int_mismatch() localVariable
586 let mut metadata = Metadata::new(&engine)?; in test_tunables_int_mismatch()
590 match metadata.check_compatible(&engine) { in test_tunables_int_mismatch()
606 let engine = Engine::new(&config)?; in test_tunables_bool_mismatch() localVariable
607 let mut metadata = Metadata::new(&engine)?; in test_tunables_bool_mismatch()
610 match metadata.check_compatible(&engine) { in test_tunables_bool_mismatch()
621 let engine = Engine::new(&config)?; in test_tunables_bool_mismatch() localVariable
622 let mut metadata = Metadata::new(&engine)?; in test_tunables_bool_mismatch()
625 match metadata.check_compatible(&engine) { in test_tunables_bool_mismatch()
643 let engine = Engine::new(&config)?; in test_feature_mismatch() localVariable
644 let mut metadata = Metadata::new(&engine)?; in test_feature_mismatch()
649 metadata.check_compatible(&engine)?; in test_feature_mismatch()
654 let engine = Engine::new(&config)?; in test_feature_mismatch() localVariable
655 let mut metadata = Metadata::new(&engine)?; in test_feature_mismatch()
658 match metadata.check_compatible(&engine) { in test_feature_mismatch()
672 let engine = Engine::default(); in engine_weak_upgrades() localVariable
673 let weak = engine.weak(); in engine_weak_upgrades()
676 drop(engine); in engine_weak_upgrades()
703 let engine = Engine::new(&cfg)?; in cache_accounts_for_opt_level() localVariable
704 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
705 let cache_config = engine in cache_accounts_for_opt_level()
712 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
719 let engine = Engine::new(&cfg)?; in cache_accounts_for_opt_level() localVariable
720 let cache_config = engine in cache_accounts_for_opt_level()
725 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
728 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
735 let engine = Engine::new(&cfg)?; in cache_accounts_for_opt_level() localVariable
736 let cache_config = engine in cache_accounts_for_opt_level()
741 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
744 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
751 let engine = Engine::new(&cfg)?; in cache_accounts_for_opt_level() localVariable
752 let cache_config = engine in cache_accounts_for_opt_level()
757 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
760 Module::new(&engine, "(module (func))")?; in cache_accounts_for_opt_level()
770 let engine = Engine::new(cfg).expect("Config should be valid"); in precompile_compatibility_key_accounts_for_opt_level() localVariable
772 engine.precompile_compatibility_hash().hash(&mut hasher); in precompile_compatibility_key_accounts_for_opt_level()
786 let engine = Engine::new(cfg).expect("Config should be valid"); in precompile_compatibility_key_accounts_for_module_version_strategy() localVariable
788 engine.precompile_compatibility_hash().hash(&mut hasher); in precompile_compatibility_key_accounts_for_module_version_strategy()
830 let engine = Engine::new(&cfg)?; in components_are_cached() localVariable
831 let cache_config = engine in components_are_cached()
836 Component::new(&engine, "(component (core module (func)))")?; in components_are_cached()
839 Component::new(&engine, "(component (core module (func)))")?; in components_are_cached()