From 47848a0d5c79a60a0a029f7cfbe3d1697587a947 Mon Sep 17 00:00:00 2001 From: Matthew Fluet Date: Tue, 21 Nov 2017 12:04:42 -0500 Subject: [PATCH] Update mlton compile options Closes RedPRL/sml-redprl#437 MLton's `polyvariance` optimization duplicates small higher-order functions. One (unresolved, though usually not significant) issue is that polyvariance can duplicate code local to a function, even if it doesn't depend on the higher-orderness (see http://www.mlton.org/pipermail/mlton-devel/2002-January/021211.html). This seems consistent with the discussion at MLton/mlton#196. --- script/mlton.sh | 2 +- script/profile.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/script/mlton.sh b/script/mlton.sh index 651c9b620..207db4b03 100755 --- a/script/mlton.sh +++ b/script/mlton.sh @@ -6,4 +6,4 @@ mlyacc src/redprl/redprl.grm mllex src/redprl/redprl.lex mkdir -p bin -mlton -native-live-transfer 0 -verbose 2 -mlb-path-var "LIBS $LIBS" -output bin/redprl src/frontend.mlb +mlton -verbose 2 -polyvariance false -mlb-path-var "LIBS $LIBS" -output bin/redprl src/frontend.mlb diff --git a/script/profile.sh b/script/profile.sh index e00c1b79c..ed67833e1 100755 --- a/script/profile.sh +++ b/script/profile.sh @@ -6,4 +6,4 @@ mlyacc src/redprl/redprl.grm mllex src/redprl/redprl.lex mkdir -p bin -mlton -profile time -mlb-path-var "LIBS $LIBS" -output bin/redprl-profile src/frontend.mlb +mlton -profile time -polyvariance false -mlb-path-var "LIBS $LIBS" -output bin/redprl-profile src/frontend.mlb