Skip to content

Commit 37870fa

Browse files
vouillonhhugo
authored andcommitted
Fix call graph analysis
This has to be coherent with the generation of calls in Generate.
1 parent 2d48ea9 commit 37870fa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#dev
22

33
## Features/Changes
4-
* Compiler/wasm: omit code pointer from closures when not used (#2059)
4+
* Compiler/wasm: omit code pointer from closures when not used (#2059, #2093)
5+
6+
## Bug fixes
57
* Compiler: fix purity of comparison functions (again) (#2092)
68

79
# 6.2.0 (2025-07-30) - Lille

compiler/lib-wasm/call_graph_analysis.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ let block_deps ~info ~non_escaping ~ambiguous ~blocks pc =
1515
let block = Addr.Map.find pc blocks in
1616
List.iter block.body ~f:(fun i ->
1717
match i with
18-
| Let (_, Apply { f; _ }) -> (
18+
| Let (_, Apply { f; exact; _ }) -> (
1919
match get_approx info f with
2020
| Top -> ()
2121
| Values { known; others } ->
22-
if others || Var.Set.cardinal known > 1
22+
if (not exact) || others || Var.Set.cardinal known > 1
2323
then Var.Set.iter (fun x -> Var.Hashtbl.replace ambiguous x ()) known;
2424
if debug ()
2525
then

0 commit comments

Comments
 (0)