Skip to content

Commit

Permalink
Update mlton compile options
Browse files Browse the repository at this point in the history
Closes 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.
  • Loading branch information
MatthewFluet committed Nov 21, 2017
1 parent 58ed308 commit 47848a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion script/mlton.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion script/profile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 47848a0

Please sign in to comment.