Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/compiler/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1795,6 +1795,14 @@ impl SsaBuilder {
.clone()
.into_iter()
.map(|ret_ty| {
// An aggregate is held by address: a scalar
// zero in its place is no address at all.
if matches!(
ret_ty,
HirType::Struct(_) | HirType::Array(_, _) | HirType::Union(_)
) {
return self.create_value(ret_ty, HirValueKind::Undef);
}
let konst = default_const_for(&ret_ty);
self.create_value(ret_ty, HirValueKind::Constant(konst))
})
Expand Down
4 changes: 2 additions & 2 deletions crates/compiler/src/tiered_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2820,7 +2820,7 @@ impl TieredBackend {
queue.request_compile(ctx.bead_id, Some(count))
}
_ => {
let code = osr::lazy_compile(ctx.bead_id);
let code = osr::try_lazy_compile(ctx.bead_id);
if !code.is_null() {
return Some(code);
}
Expand Down Expand Up @@ -4781,7 +4781,7 @@ fn ensure_baseline(
return true;
}
if lazy {
return !osr::lazy_compile(bead_id).is_null() || bound.bead().compiled().is_some();
return !osr::try_lazy_compile(bead_id).is_null() || bound.bead().compiled().is_some();
}
let existing = cranelift.with_lock(|be| be.get_function_ptr(func_id));
let entry = match existing {
Expand Down
Loading
Loading