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

Method function_compiler

crates/cranelift/src/compiler.rs:1252–1272  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

1250 }
1251
1252 fn function_compiler(&self) -> FunctionCompiler<'_> {
1253 let saved_context = self.contexts.lock().unwrap().pop();
1254 FunctionCompiler {
1255 compiler: self,
1256 cx: saved_context
1257 .map(|mut ctx| {
1258 ctx.codegen_context.clear();
1259 ctx
1260 })
1261 .unwrap_or_else(|| CompilerContext {
1262 incremental_cache_ctx: self.cache_store.as_ref().map(|cache_store| {
1263 IncrementalCacheContext {
1264 cache_store: cache_store.clone(),
1265 num_hits: 0,
1266 num_cached: 0,
1267 }
1268 }),
1269 ..Default::default()
1270 }),
1271 }
1272 }
1273
1274 /// Invokes the `raise` libcall in `vmctx` if the `succeeded` value
1275 /// indicates if a trap happened.

Calls 7

popMethod · 0.45
unwrapMethod · 0.45
lockMethod · 0.45
mapMethod · 0.45
clearMethod · 0.45
as_refMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected