From 5986bc9250f7651e55280dc3b537278011cdcae5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 9 Dec 2020 09:45:38 -0700 Subject: [PATCH] Chez Scheme: adjust optimizer test for profiling mode --- racket/src/ChezScheme/mats/8.ms | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/racket/src/ChezScheme/mats/8.ms b/racket/src/ChezScheme/mats/8.ms index e1375e581a..c0519eead2 100644 --- a/racket/src/ChezScheme/mats/8.ms +++ b/racket/src/ChezScheme/mats/8.ms @@ -9324,19 +9324,21 @@ (lambda (x) (parameterize ([optimize-level 2] [enable-cp0 #t] [#%$suppress-primitive-inlining #f] [current-eval compile]) (eval x)))) #t) - (equivalent-expansion? - (parameterize ([optimize-level 2] [enable-cp0 #t] [#%$suppress-primitive-inlining #f]) - (expand/optimize - '(lambda (x y z) - (import (testfile-clo-4a)) - (list - (f x y z) - (g x y z))))) - '(begin - (#3%$invoke-library '(testfile-clo-4a) '() 'testfile-clo-4a) - (lambda (x y z) - (#2%list (#2%list x y z) - ((#3%$top-level-value 'g) x y z))))) + (or + (and (compile-profile) #t) ; => testfile-clo-4a was compiled with profiling, so not quite the same as below + (equivalent-expansion? + (parameterize ([optimize-level 2] [enable-cp0 #t] [#%$suppress-primitive-inlining #f]) + (expand/optimize + '(lambda (x y z) + (import (testfile-clo-4a)) + (list + (f x y z) + (g x y z))))) + '(begin + (#3%$invoke-library '(testfile-clo-4a) '() 'testfile-clo-4a) + (lambda (x y z) + (#2%list (#2%list x y z) + ((#3%$top-level-value 'g) x y z)))))) ) (mat lots-of-libraries