4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>Polyvariance</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
30 <div class="sectionbody">
31 <div class="paragraph"><p>Polyvariance is an optimization pass for the <a href="SXML">SXML</a>
32 <a href="IntermediateLanguage">IntermediateLanguage</a>, invoked from <a href="SXMLSimplify">SXMLSimplify</a>.</p></div>
36 <h2 id="_description">Description</h2>
37 <div class="sectionbody">
38 <div class="paragraph"><p>This pass duplicates a higher-order, <span class="monospaced">let</span> bound function at each
39 variable reference, if the cost is smaller than some threshold.</p></div>
43 <h2 id="_implementation">Implementation</h2>
44 <div class="sectionbody">
45 <div class="ulist"><ul>
48 <a href="https://github.com/MLton/mlton/blob/master/mlton/xml/polyvariance.fun"><span class="monospaced">polyvariance.fun</span></a>
55 <h2 id="_details_and_notes">Details and Notes</h2>
56 <div class="sectionbody">
57 <div class="paragraph"><p></p></div>
61 <div id="footnotes"><hr></div>
63 <div id="footer-text">
65 <div id="footer-badges">