Skip to content

Instantly share code, notes, and snippets.

@solson
Created December 29, 2015 00:17
Show Gist options
  • Save solson/480175dcf7639df69906 to your computer and use it in GitHub Desktop.
Save solson/480175dcf7639df69906 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.38.0 (20140413.2041)
-->
<!-- Title: Mir Pages: 1 -->
<svg width="863pt" height="1257pt"
viewBox="0.00 0.00 863.00 1257.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 1253)">
<title>Mir</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-1253 859,-1253 859,4 -4,4"/>
<text text-anchor="start" x="245.5" y="-262.8" font-family="monospace" font-size="14.00">fn(a0: usize) &#45;&gt; usize</text>
<text text-anchor="start" x="245.5" y="-247.8" font-family="monospace" font-size="14.00">let v0: usize; // n</text>
<text text-anchor="start" x="245.5" y="-232.8" font-family="monospace" font-size="14.00">let mut v1: usize; // prod</text>
<text text-anchor="start" x="245.5" y="-217.8" font-family="monospace" font-size="14.00">let v2: (); // _result</text>
<text text-anchor="start" x="245.5" y="-202.8" font-family="monospace" font-size="14.00">let mut v3: core::ops::Range&lt;usize&gt;; // iter</text>
<text text-anchor="start" x="245.5" y="-187.8" font-family="monospace" font-size="14.00">let v4: usize; // x</text>
<text text-anchor="start" x="245.5" y="-172.8" font-family="monospace" font-size="14.00">let t0: ();</text>
<text text-anchor="start" x="245.5" y="-157.8" font-family="monospace" font-size="14.00">let t1: ();</text>
<text text-anchor="start" x="245.5" y="-142.8" font-family="monospace" font-size="14.00">let t2: core::ops::Range&lt;usize&gt;;</text>
<text text-anchor="start" x="245.5" y="-127.8" font-family="monospace" font-size="14.00">let t3: core::ops::Range&lt;usize&gt;;</text>
<text text-anchor="start" x="245.5" y="-112.8" font-family="monospace" font-size="14.00">let t4: usize;</text>
<text text-anchor="start" x="245.5" y="-97.8" font-family="monospace" font-size="14.00">let t5: core::option::Option&lt;usize&gt;;</text>
<text text-anchor="start" x="245.5" y="-82.8" font-family="monospace" font-size="14.00">let t6: &amp;mut core::ops::Range&lt;usize&gt;;</text>
<text text-anchor="start" x="245.5" y="-67.8" font-family="monospace" font-size="14.00">let t7: &amp;mut core::ops::Range&lt;usize&gt;;</text>
<text text-anchor="start" x="245.5" y="-52.8" font-family="monospace" font-size="14.00">let t8: ();</text>
<text text-anchor="start" x="245.5" y="-37.8" font-family="monospace" font-size="14.00">let t9: usize;</text>
<text text-anchor="start" x="245.5" y="-22.8" font-family="monospace" font-size="14.00">let t10: ();</text>
<text text-anchor="start" x="245.5" y="-7.8" font-family="monospace" font-size="14.00">let t11: usize;</text>
<!-- bb0 -->
<g id="node1" class="node"><title>bb0</title>
<polygon fill="gray" stroke="none" points="32.5,-1224 32.5,-1245 847.5,-1245 847.5,-1224 32.5,-1224"/>
<polygon fill="none" stroke="black" points="32.5,-1224 32.5,-1245 847.5,-1245 847.5,-1224 32.5,-1224"/>
<text text-anchor="start" x="435.5" y="-1230.8" font-family="monospace" font-size="14.00">0</text>
<polygon fill="none" stroke="black" points="32.5,-1158 32.5,-1224 847.5,-1224 847.5,-1158 32.5,-1158"/>
<text text-anchor="start" x="35.5" y="-1209.8" font-family="monospace" font-size="14.00">v0 = a0</text>
<text text-anchor="start" x="35.5" y="-1194.8" font-family="monospace" font-size="14.00">v1 = 1</text>
<text text-anchor="start" x="35.5" y="-1179.8" font-family="monospace" font-size="14.00">t4 = v0</text>
<text text-anchor="start" x="35.5" y="-1164.8" font-family="monospace" font-size="14.00">t3 = Aggregate&lt;Adt(core::ops::Range, 0, Substs[types=[[usize];[];[]], regions=[[];[];[]]])&gt;[1, t4]</text>
<polygon fill="none" stroke="black" points="32.5,-1137 32.5,-1158 847.5,-1158 847.5,-1137 32.5,-1137"/>
<text text-anchor="start" x="35.5" y="-1143.8" font-family="monospace" font-size="14.00">t2 = core::iter::IntoIterator::into_iter(t3)</text>
</g>
<!-- bb3 -->
<g id="node4" class="node"><title>bb3</title>
<polygon fill="gray" stroke="none" points="226.5,-1056.5 226.5,-1077.5 290.5,-1077.5 290.5,-1056.5 226.5,-1056.5"/>
<polygon fill="none" stroke="black" points="226.5,-1056.5 226.5,-1077.5 290.5,-1077.5 290.5,-1056.5 226.5,-1056.5"/>
<text text-anchor="start" x="254" y="-1063.3" font-family="monospace" font-size="14.00">3</text>
<polygon fill="none" stroke="black" points="226.5,-1035.5 226.5,-1056.5 290.5,-1056.5 290.5,-1035.5 226.5,-1035.5"/>
<text text-anchor="start" x="229.5" y="-1042.3" font-family="monospace" font-size="14.00">v3 = t2</text>
<polygon fill="none" stroke="black" points="226.5,-1014.5 226.5,-1035.5 290.5,-1035.5 290.5,-1014.5 226.5,-1014.5"/>
<text text-anchor="start" x="229.5" y="-1021.3" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb0&#45;&gt;bb3 -->
<g id="edge1" class="edge"><title>bb0&#45;&gt;bb3</title>
<path fill="none" stroke="black" d="M366.923,-1132.86C346.71,-1116.95 325.254,-1100.05 306.81,-1085.53"/>
<polygon fill="black" stroke="black" points="308.585,-1082.48 298.563,-1079.04 304.255,-1087.98 308.585,-1082.48"/>
<text text-anchor="middle" x="369.5" y="-1103.8" font-family="monospace" font-size="14.00">return</text>
</g>
<!-- bb4 -->
<g id="node5" class="node"><title>bb4</title>
<polygon fill="gray" stroke="none" points="423.5,-507 423.5,-528 487.5,-528 487.5,-507 423.5,-507"/>
<polygon fill="none" stroke="black" points="423.5,-507 423.5,-528 487.5,-528 487.5,-507 423.5,-507"/>
<text text-anchor="start" x="451" y="-513.8" font-family="monospace" font-size="14.00">4</text>
<polygon fill="none" stroke="black" points="423.5,-471 423.5,-507 487.5,-507 487.5,-471 423.5,-471"/>
<text text-anchor="start" x="426.5" y="-492.8" font-family="monospace" font-size="14.00">drop t2</text>
<text text-anchor="start" x="426.5" y="-477.8" font-family="monospace" font-size="14.00">drop t3</text>
<polygon fill="none" stroke="black" points="423.5,-450 423.5,-471 487.5,-471 487.5,-450 423.5,-450"/>
<text text-anchor="start" x="426.5" y="-456.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb0&#45;&gt;bb4 -->
<g id="edge2" class="edge"><title>bb0&#45;&gt;bb4</title>
<path fill="none" stroke="black" d="M448.854,-1132.96C452.355,-1106.97 455.5,-1075.76 455.5,-1047.5 455.5,-1047.5 455.5,-1047.5 455.5,-656 455.5,-618.033 455.5,-575.181 455.5,-542.526"/>
<polygon fill="black" stroke="black" points="459,-542.302 455.5,-532.302 452,-542.302 459,-542.302"/>
<text text-anchor="middle" x="480.5" y="-858.8" font-family="monospace" font-size="14.00">unwind</text>
</g>
<!-- bb1 -->
<g id="node2" class="node"><title>bb1</title>
<polygon fill="gray" stroke="none" points="279.5,-321 279.5,-342 335.5,-342 335.5,-321 279.5,-321"/>
<polygon fill="none" stroke="black" points="279.5,-321 279.5,-342 335.5,-342 335.5,-321 279.5,-321"/>
<text text-anchor="start" x="303" y="-327.8" font-family="monospace" font-size="14.00">1</text>
<polygon fill="none" stroke="black" points="279.5,-300 279.5,-321 335.5,-321 335.5,-300 279.5,-300"/>
<text text-anchor="start" x="282.5" y="-306.8" font-family="monospace" font-size="14.00">return</text>
</g>
<!-- bb2 -->
<g id="node3" class="node"><title>bb2</title>
<polygon fill="gray" stroke="none" points="423.5,-321 423.5,-342 487.5,-342 487.5,-321 423.5,-321"/>
<polygon fill="none" stroke="black" points="423.5,-321 423.5,-342 487.5,-342 487.5,-321 423.5,-321"/>
<text text-anchor="start" x="451" y="-327.8" font-family="monospace" font-size="14.00">2</text>
<polygon fill="none" stroke="black" points="423.5,-300 423.5,-321 487.5,-321 487.5,-300 423.5,-300"/>
<text text-anchor="start" x="426.5" y="-306.8" font-family="monospace" font-size="14.00">diverge</text>
</g>
<!-- bb6 -->
<g id="node7" class="node"><title>bb6</title>
<polygon fill="gray" stroke="none" points="8.5,-949 8.5,-970 419.5,-970 419.5,-949 8.5,-949"/>
<polygon fill="none" stroke="black" points="8.5,-949 8.5,-970 419.5,-970 419.5,-949 8.5,-949"/>
<text text-anchor="start" x="209.5" y="-955.8" font-family="monospace" font-size="14.00">6</text>
<polygon fill="none" stroke="black" points="8.5,-913 8.5,-949 419.5,-949 419.5,-913 8.5,-913"/>
<text text-anchor="start" x="11.5" y="-934.8" font-family="monospace" font-size="14.00">t7 = &amp;ReScope(CodeExtent(77/Misc(154))) Mut v3</text>
<text text-anchor="start" x="11.5" y="-919.8" font-family="monospace" font-size="14.00">t6 = &amp;ReScope(CodeExtent(77/Misc(154))) Mut (*t7)</text>
<polygon fill="none" stroke="black" points="8.5,-892 8.5,-913 419.5,-913 419.5,-892 8.5,-892"/>
<text text-anchor="start" x="11.5" y="-898.8" font-family="monospace" font-size="14.00">t5 = core::iter::Iterator::next(t6)</text>
</g>
<!-- bb3&#45;&gt;bb6 -->
<g id="edge3" class="edge"><title>bb3&#45;&gt;bb6</title>
<path fill="none" stroke="black" d="M244.754,-1010.83C241.339,-1002.22 237.606,-992.801 233.946,-983.569"/>
<polygon fill="black" stroke="black" points="237.114,-982.063 230.174,-974.057 230.607,-984.643 237.114,-982.063"/>
</g>
<!-- bb4&#45;&gt;bb2 -->
<g id="edge4" class="edge"><title>bb4&#45;&gt;bb2</title>
<path fill="none" stroke="black" d="M455.5,-445.682C455.5,-417.99 455.5,-382.272 455.5,-356.345"/>
<polygon fill="black" stroke="black" points="459,-356.232 455.5,-346.232 452,-356.232 459,-356.232"/>
</g>
<!-- bb5 -->
<g id="node6" class="node"><title>bb5</title>
<polygon fill="gray" stroke="none" points="226.5,-552 226.5,-573 389.5,-573 389.5,-552 226.5,-552"/>
<polygon fill="none" stroke="black" points="226.5,-552 226.5,-573 389.5,-573 389.5,-552 226.5,-552"/>
<text text-anchor="start" x="303.5" y="-558.8" font-family="monospace" font-size="14.00">5</text>
<polygon fill="none" stroke="black" points="226.5,-426 226.5,-552 389.5,-552 389.5,-426 226.5,-426"/>
<text text-anchor="start" x="229.5" y="-537.8" font-family="monospace" font-size="14.00">drop v3</text>
<text text-anchor="start" x="229.5" y="-522.8" font-family="monospace" font-size="14.00">drop t2</text>
<text text-anchor="start" x="229.5" y="-507.8" font-family="monospace" font-size="14.00">drop t3</text>
<text text-anchor="start" x="229.5" y="-492.8" font-family="monospace" font-size="14.00">t10 = v2</text>
<text text-anchor="start" x="229.5" y="-477.8" font-family="monospace" font-size="14.00">t1 = t10</text>
<text text-anchor="start" x="229.5" y="-462.8" font-family="monospace" font-size="14.00">drop t1</text>
<text text-anchor="start" x="229.5" y="-447.8" font-family="monospace" font-size="14.00">t11 = v1</text>
<text text-anchor="start" x="229.5" y="-432.8" font-family="monospace" font-size="14.00">ReturnPointer = t11</text>
<polygon fill="none" stroke="black" points="226.5,-405 226.5,-426 389.5,-426 389.5,-405 226.5,-405"/>
<text text-anchor="start" x="229.5" y="-411.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb5&#45;&gt;bb1 -->
<g id="edge5" class="edge"><title>bb5&#45;&gt;bb1</title>
<path fill="none" stroke="black" d="M307.5,-400.625C307.5,-385.003 307.5,-369.589 307.5,-356.603"/>
<polygon fill="black" stroke="black" points="311,-356.316 307.5,-346.316 304,-356.316 311,-356.316"/>
</g>
<!-- bb7 -->
<g id="node8" class="node"><title>bb7</title>
<polygon fill="gray" stroke="none" points="169.5,-794 169.5,-815 258.5,-815 258.5,-794 169.5,-794"/>
<polygon fill="none" stroke="black" points="169.5,-794 169.5,-815 258.5,-815 258.5,-794 169.5,-794"/>
<text text-anchor="start" x="209.5" y="-800.8" font-family="monospace" font-size="14.00">7</text>
<polygon fill="none" stroke="black" points="169.5,-773 169.5,-794 258.5,-794 258.5,-773 169.5,-773"/>
<text text-anchor="start" x="172.5" y="-779.8" font-family="monospace" font-size="14.00">switch(t5)</text>
</g>
<!-- bb6&#45;&gt;bb7 -->
<g id="edge6" class="edge"><title>bb6&#45;&gt;bb7</title>
<path fill="none" stroke="black" d="M213.5,-887.656C213.5,-868.957 213.5,-847.253 213.5,-829.554"/>
<polygon fill="black" stroke="black" points="217,-829.113 213.5,-819.113 210,-829.113 217,-829.113"/>
<text text-anchor="middle" x="238.5" y="-858.8" font-family="monospace" font-size="14.00">return</text>
</g>
<!-- bb8 -->
<g id="node9" class="node"><title>bb8</title>
<polygon fill="gray" stroke="none" points="307.5,-812 307.5,-833 371.5,-833 371.5,-812 307.5,-812"/>
<polygon fill="none" stroke="black" points="307.5,-812 307.5,-833 371.5,-833 371.5,-812 307.5,-812"/>
<text text-anchor="start" x="335" y="-818.8" font-family="monospace" font-size="14.00">8</text>
<polygon fill="none" stroke="black" points="307.5,-776 307.5,-812 371.5,-812 371.5,-776 307.5,-776"/>
<text text-anchor="start" x="310.5" y="-797.8" font-family="monospace" font-size="14.00">drop t6</text>
<text text-anchor="start" x="310.5" y="-782.8" font-family="monospace" font-size="14.00">drop t7</text>
<polygon fill="none" stroke="black" points="307.5,-755 307.5,-776 371.5,-776 371.5,-755 307.5,-755"/>
<text text-anchor="start" x="310.5" y="-761.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb6&#45;&gt;bb8 -->
<g id="edge7" class="edge"><title>bb6&#45;&gt;bb8</title>
<path fill="none" stroke="black" d="M253.021,-887.656C265.688,-874.085 279.831,-858.931 292.951,-844.874"/>
<polygon fill="black" stroke="black" points="295.854,-846.893 300.119,-837.194 290.737,-842.117 295.854,-846.893"/>
<text text-anchor="middle" x="305.5" y="-858.8" font-family="monospace" font-size="14.00">unwind</text>
</g>
<!-- bb11 -->
<g id="node12" class="node"><title>bb11</title>
<polygon fill="gray" stroke="none" points="254.5,-675 254.5,-696 318.5,-696 318.5,-675 254.5,-675"/>
<polygon fill="none" stroke="black" points="254.5,-675 254.5,-696 318.5,-696 318.5,-675 254.5,-675"/>
<text text-anchor="start" x="278" y="-681.8" font-family="monospace" font-size="14.00">11</text>
<polygon fill="none" stroke="black" points="254.5,-639 254.5,-675 318.5,-675 318.5,-639 254.5,-639"/>
<text text-anchor="start" x="257.5" y="-660.8" font-family="monospace" font-size="14.00">drop t6</text>
<text text-anchor="start" x="257.5" y="-645.8" font-family="monospace" font-size="14.00">drop t7</text>
<polygon fill="none" stroke="black" points="254.5,-618 254.5,-639 318.5,-639 318.5,-618 254.5,-618"/>
<text text-anchor="start" x="257.5" y="-624.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb7&#45;&gt;bb11 -->
<g id="edge8" class="edge"><title>bb7&#45;&gt;bb11</title>
<path fill="none" stroke="black" d="M226.551,-768.865C235.518,-752.282 247.759,-729.645 258.842,-709.148"/>
<polygon fill="black" stroke="black" points="261.994,-710.677 263.672,-700.216 255.837,-707.347 261.994,-710.677"/>
<text text-anchor="middle" x="269.5" y="-721.8" font-family="monospace" font-size="14.00">None</text>
</g>
<!-- bb12 -->
<g id="node13" class="node"><title>bb12</title>
<polygon fill="gray" stroke="none" points="54.5,-667 54.5,-688 217.5,-688 217.5,-667 54.5,-667"/>
<polygon fill="none" stroke="black" points="54.5,-667 54.5,-688 217.5,-688 217.5,-667 54.5,-667"/>
<text text-anchor="start" x="127.5" y="-673.8" font-family="monospace" font-size="14.00">12</text>
<polygon fill="none" stroke="black" points="54.5,-646 54.5,-667 217.5,-667 217.5,-646 54.5,-646"/>
<text text-anchor="start" x="57.5" y="-652.8" font-family="monospace" font-size="14.00">v4 = (t5 as Some).0</text>
<polygon fill="none" stroke="black" points="54.5,-625 54.5,-646 217.5,-646 217.5,-625 54.5,-625"/>
<text text-anchor="start" x="57.5" y="-631.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb7&#45;&gt;bb12 -->
<g id="edge9" class="edge"><title>bb7&#45;&gt;bb12</title>
<path fill="none" stroke="black" d="M199.555,-768.865C188.724,-750.118 173.42,-723.631 160.488,-701.249"/>
<polygon fill="black" stroke="black" points="163.513,-699.487 155.479,-692.58 157.452,-702.989 163.513,-699.487"/>
<text text-anchor="middle" x="194.5" y="-721.8" font-family="monospace" font-size="14.00">Some</text>
</g>
<!-- bb9 -->
<g id="node10" class="node"><title>bb9</title>
<polygon fill="gray" stroke="none" points="354.5,-667 354.5,-688 418.5,-688 418.5,-667 354.5,-667"/>
<polygon fill="none" stroke="black" points="354.5,-667 354.5,-688 418.5,-688 418.5,-667 354.5,-667"/>
<text text-anchor="start" x="382" y="-673.8" font-family="monospace" font-size="14.00">9</text>
<polygon fill="none" stroke="black" points="354.5,-646 354.5,-667 418.5,-667 418.5,-646 354.5,-646"/>
<text text-anchor="start" x="357.5" y="-652.8" font-family="monospace" font-size="14.00">drop v3</text>
<polygon fill="none" stroke="black" points="354.5,-625 354.5,-646 418.5,-646 418.5,-625 354.5,-625"/>
<text text-anchor="start" x="357.5" y="-631.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb8&#45;&gt;bb9 -->
<g id="edge10" class="edge"><title>bb8&#45;&gt;bb9</title>
<path fill="none" stroke="black" d="M354.242,-750.656C359.637,-735.159 365.751,-717.598 371.194,-701.963"/>
<polygon fill="black" stroke="black" points="374.502,-703.107 374.485,-692.513 367.891,-700.806 374.502,-703.107"/>
</g>
<!-- bb9&#45;&gt;bb4 -->
<g id="edge11" class="edge"><title>bb9&#45;&gt;bb4</title>
<path fill="none" stroke="black" d="M400.965,-621.201C410.573,-598.085 423.354,-567.336 434.128,-541.417"/>
<polygon fill="black" stroke="black" points="437.39,-542.687 437.997,-532.109 430.927,-540 437.39,-542.687"/>
</g>
<!-- bb10 -->
<g id="node11" class="node"><title>bb10</title>
<polygon fill="gray" stroke="none" points="53.5,-514 53.5,-535 192.5,-535 192.5,-514 53.5,-514"/>
<polygon fill="none" stroke="black" points="53.5,-514 53.5,-535 192.5,-535 192.5,-514 53.5,-514"/>
<text text-anchor="start" x="114.5" y="-520.8" font-family="monospace" font-size="14.00">10</text>
<polygon fill="none" stroke="black" points="53.5,-463 53.5,-514 192.5,-514 192.5,-463 53.5,-463"/>
<text text-anchor="start" x="56.5" y="-499.8" font-family="monospace" font-size="14.00">t9 = v4</text>
<text text-anchor="start" x="56.5" y="-484.8" font-family="monospace" font-size="14.00">v1 = Mul(v1, t9)</text>
<text text-anchor="start" x="56.5" y="-469.8" font-family="monospace" font-size="14.00">drop t8</text>
<polygon fill="none" stroke="black" points="53.5,-442 53.5,-463 192.5,-463 192.5,-442 53.5,-442"/>
<text text-anchor="start" x="56.5" y="-448.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb13 -->
<g id="node14" class="node"><title>bb13</title>
<polygon fill="gray" stroke="none" points="11.5,-339 11.5,-360 75.5,-360 75.5,-339 11.5,-339"/>
<polygon fill="none" stroke="black" points="11.5,-339 11.5,-360 75.5,-360 75.5,-339 11.5,-339"/>
<text text-anchor="start" x="35" y="-345.8" font-family="monospace" font-size="14.00">13</text>
<polygon fill="none" stroke="black" points="11.5,-303 11.5,-339 75.5,-339 75.5,-303 11.5,-303"/>
<text text-anchor="start" x="14.5" y="-324.8" font-family="monospace" font-size="14.00">drop t6</text>
<text text-anchor="start" x="14.5" y="-309.8" font-family="monospace" font-size="14.00">drop t7</text>
<polygon fill="none" stroke="black" points="11.5,-282 11.5,-303 75.5,-303 75.5,-282 11.5,-282"/>
<text text-anchor="start" x="14.5" y="-288.8" font-family="monospace" font-size="14.00">goto</text>
</g>
<!-- bb10&#45;&gt;bb13 -->
<g id="edge12" class="edge"><title>bb10&#45;&gt;bb13</title>
<path fill="none" stroke="black" d="M98.7974,-438.195C89.0624,-417.739 77.7947,-394.062 67.9805,-373.44"/>
<polygon fill="black" stroke="black" points="71.0419,-371.728 63.5843,-364.202 64.7212,-374.736 71.0419,-371.728"/>
</g>
<!-- bb11&#45;&gt;bb5 -->
<g id="edge13" class="edge"><title>bb11&#45;&gt;bb5</title>
<path fill="none" stroke="black" d="M291.854,-613.682C292.898,-605.428 294.032,-596.462 295.197,-587.254"/>
<polygon fill="black" stroke="black" points="298.687,-587.55 296.47,-577.19 291.742,-586.672 298.687,-587.55"/>
</g>
<!-- bb12&#45;&gt;bb10 -->
<g id="edge14" class="edge"><title>bb12&#45;&gt;bb10</title>
<path fill="none" stroke="black" d="M132.775,-621.201C131.153,-600.487 129.05,-573.644 127.171,-549.64"/>
<polygon fill="black" stroke="black" points="130.651,-549.248 126.381,-539.552 123.672,-549.794 130.651,-549.248"/>
</g>
<!-- bb13&#45;&gt;bb6 -->
<g id="edge15" class="edge"><title>bb13&#45;&gt;bb6</title>
<path fill="none" stroke="black" d="M32.7513,-364.339C25.2219,-397.702 16.5,-445.517 16.5,-488 16.5,-795 16.5,-795 16.5,-795 16.5,-833.891 42.9484,-862.407 76.4633,-882.929"/>
<polygon fill="black" stroke="black" points="74.7221,-885.965 85.1245,-887.975 78.2463,-879.917 74.7221,-885.965"/>
</g>
</g>
</svg>
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#![feature(rustc_attrs)]
#![allow(dead_code)]
#[rustc_mir(graphviz = "empty.dot")]
fn empty() {}
#[rustc_mir(graphviz = "constant.dot")]
fn constant() -> i32 {
42
}
#[rustc_mir(graphviz = "increment.dot")]
fn increment(x: i32) -> i32 {
x + 1
}
#[rustc_mir(graphviz = "factorial_recursive.dot")]
fn factorial_recursive(n: usize) -> usize {
if n == 0 {
1
} else {
n * factorial_recursive(n - 1)
}
}
#[rustc_mir(graphviz = "factorial_iterative.dot")]
fn factorial_iterative(n: usize) -> usize {
let mut prod = 1;
for x in 1..n {
prod *= x;
}
prod
}
#[rustc_mir(graphviz = "factorial_fold.dot")]
fn factorial_fold(n: usize) -> usize {
(1..n).fold(1, |prod, x| prod * x)
}
#[rustc_mir(graphviz = "wat.dot")]
fn wat(n: usize) -> usize {
let mut prod = 1;
(1..n).fold((), |(), x| { prod *= x; });
prod
}
#[rustc_mir(graphviz = "multi_switch.dot")]
fn multi_switch(n: usize) -> usize {
match n {
5 | 10 | 15 => 3,
20 | 30 => 2,
_ => 1,
}
}
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment