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
6 changes: 3 additions & 3 deletions crates/cranelift/src/func_environ.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5927,13 +5927,13 @@ impl FuncEnvironment<'_> {
let dst = builder
.ins()
.iadd_imm_s(base, i64::try_from(i.checked_mul(16).unwrap()).unwrap());
let flags = self.element_segment_memflags(builder.func);
match ty.heap_type.top() {
WasmHeapTopType::Extern | WasmHeapTopType::Any | WasmHeapTopType::Exn => {
let ty = WasmStorageType::Val(WasmValType::Ref(*ty));
gc::init_field_at_addr(self, builder, ty, dst, val)?;
gc::gc_compiler(self)?
.translate_init_gc_reference(self, builder, *ty, dst, val, flags)?;
}
WasmHeapTopType::Func | WasmHeapTopType::Cont => {
let flags = self.element_segment_memflags(builder.func);
builder.ins().store(
flags,
val,
Expand Down
6 changes: 3 additions & 3 deletions tests/disas/startup-passive-segment.wat
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
;; }
;;
;; function u2415919104:0(i64 vmctx, i64) tail {
;; region0 = 536870912 "GcHeap"
;; region0 = 2080374784 "ElementSegment"
;; sig0 = (i64 vmctx, i32) -> i64 tail
;; fn0 = colocated u805306368:4 sig0
;;
;; block0(v0: i64, v1: i64):
;; v2 = iconst.i32 0
;; v3 = call fn0(v0, v2) ; v2 = 0
;; v5 = iconst.i32 1
;; store user2 little region0 v5, v3 ; v5 = 1
;; store notrap aligned little region0 v5, v3 ; v5 = 1
;; v24 = iconst.i32 3
;; v16 = iconst.i64 16
;; v17 = iadd v3, v16 ; v16 = 16
;; store user2 little region0 v24, v17 ; v24 = 3
;; store notrap aligned little region0 v24, v17 ; v24 = 3
;; return
;; }
Loading