From dc674a7320e4684e4dbe3ccf618c644bd83796ca Mon Sep 17 00:00:00 2001 From: Thomas Bauereiss Date: Mon, 4 May 2020 17:57:49 +0100 Subject: Mono: Try to fix bug in inter-procedural analysis The monomorphisation analysis decides whether to split function arguments in the callee or in callers. The code previously used a datastructure that can hold results of either the one case or the other, but there might be functions that are called in different contexts leading to different decisions. This patch changes the datastructure to support storing all instances of either case. --- test/mono/itself_rewriting.sail | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/mono/itself_rewriting.sail b/test/mono/itself_rewriting.sail index 4d67ee1a..4540f1a5 100644 --- a/test/mono/itself_rewriting.sail +++ b/test/mono/itself_rewriting.sail @@ -90,6 +90,13 @@ function transitive_itself(n) = { () } +val transitive_split : bool -> unit + +function transitive_split(x) = { + let n = if x then 8 else 16; + transitive_itself(n); +} + val run : unit -> unit effect {escape} function run () = { @@ -98,4 +105,6 @@ function run () = { willsplit(true); willsplit(false); transitive_itself(16); + transitive_split(true); + transitive_split(false); } -- cgit v1.2.3