| ... | ... | @@ -2449,6 +2449,7 @@ pub fn updateNav(wasm: *Wasm, pt: Zcu.PerThread, nav_index: InternPool.Nav.Index |
| 2449 | 2449 | const comp = wasm.base.comp; |
| 2450 | 2450 | const gpa = comp.gpa; |
| 2451 | 2451 | const is_obj = comp.config.output_mode == .Obj; |
| 2452 | const target = &comp.root_mod.resolved_target.result; |
| 2452 | 2453 | |
| 2453 | 2454 | const nav_init, const chased_nav_index = switch (ip.indexToKey(nav.status.resolved.val)) { |
| 2454 | 2455 | .func => return, // global const which is a function alias |
| ... | ... | @@ -2465,6 +2466,9 @@ pub fn updateNav(wasm: *Wasm, pt: Zcu.PerThread, nav_index: InternPool.Nav.Index |
| 2465 | 2466 | try wasm.function_imports.ensureUnusedCapacity(gpa, 1); |
| 2466 | 2467 | const zcu_import = wasm.addZcuImportReserved(ext.owner_nav); |
| 2467 | 2468 | wasm.function_imports.putAssumeCapacity(name, .fromZcuImport(zcu_import, wasm)); |
| 2469 | // Ensure there is a corresponding function type table entry. |
| 2470 | const fn_info = zcu.typeToFunc(.fromInterned(ext.ty)).?; |
| 2471 | _ = try internFunctionType(wasm, fn_info.cc, fn_info.param_types.get(ip), .fromInterned(fn_info.return_type), target); |
| 2468 | 2472 | } else { |
| 2469 | 2473 | @panic("TODO extern data"); |
| 2470 | 2474 | } |