Deploy to GitHub pages

This commit is contained in:
github-actions[bot] 2023-03-13 00:20:19 +00:00 • committed by GitHub
commit 2ef2c469d1
850 changed files with 332608 additions and 0 deletions

364
compiler/ic/bitabs.html Normal file
View file

@ -0,0 +1,364 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/bitabs</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/bitabs</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#BiTable" title="BiTable[T] = object">BiTable</a></li>
<li><a class="reference" href="#LitId" title="LitId = distinct uint32">LitId</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">$
<li><a class="reference" href="#%24%2CLitId" title="`$`(x: LitId): string">`$`(x: LitId): string</a></li>
</ul>
<ul class="simple nested-toc-section"><
<li><a class="reference" href="#%3C%2CLitId%2CLitId" title="`&lt;`(x, y: LitId): bool">`&lt;`(x, y: LitId): bool</a></li>
</ul>
<ul class="simple nested-toc-section"><=
<li><a class="reference" href="#%3C%3D%2CLitId%2CLitId" title="`&lt;=`(x, y: LitId): bool">`&lt;=`(x, y: LitId): bool</a></li>
</ul>
<ul class="simple nested-toc-section">==
<li><a class="reference" href="#%3D%3D%2CLitId%2CLitId" title="`==`(x, y: LitId): bool">`==`(x, y: LitId): bool</a></li>
</ul>
<ul class="simple nested-toc-section">[]
<li><a class="reference" href="#%5B%5D%2CBiTable%5BT%5D%2CLitId_2" title="`[]`[T](t: BiTable[T]; litId: LitId): lent T">`[]`[T](t: BiTable[T]; litId: LitId): lent T</a></li>
<li><a class="reference" href="#%5B%5D%2CBiTable%5BT%5D%2CLitId" title="`[]`[T](t: var BiTable[T]; litId: LitId): var T">`[]`[T](t: var BiTable[T]; litId: LitId): var T</a></li>
</ul>
<ul class="simple nested-toc-section">getKeyId
<li><a class="reference" href="#getKeyId%2CBiTable%5BT%5D%2CT" title="getKeyId[T](t: BiTable[T]; v: T): LitId">getKeyId[T](t: BiTable[T]; v: T): LitId</a></li>
</ul>
<ul class="simple nested-toc-section">getOrIncl
<li><a class="reference" href="#getOrIncl%2CBiTable%5BT%5D%2CT" title="getOrIncl[T](t: var BiTable[T]; v: T): LitId">getOrIncl[T](t: var BiTable[T]; v: T): LitId</a></li>
</ul>
<ul class="simple nested-toc-section">hash
<li><a class="reference" href="#hash%2CLitId" title="hash(x: LitId): Hash">hash(x: LitId): Hash</a></li>
<li><a class="reference" href="#hash%2CBiTable%5BT%5D" title="hash[T](t: BiTable[T]): Hash">hash[T](t: BiTable[T]): Hash</a></li>
</ul>
<ul class="simple nested-toc-section">hasLitId
<li><a class="reference" href="#hasLitId%2CBiTable%5BT%5D%2CLitId" title="hasLitId[T](t: BiTable[T]; x: LitId): bool">hasLitId[T](t: BiTable[T]; x: LitId): bool</a></li>
</ul>
<ul class="simple nested-toc-section">len
<li><a class="reference" href="#len%2CBiTable%5BT%5D" title="len[T](t: BiTable[T]): int">len[T](t: BiTable[T]): int</a></li>
</ul>
<ul class="simple nested-toc-section">load
<li><a class="reference" href="#load%2CRodFile%2CBiTable%5BT%5D" title="load[T](f: var RodFile; t: var BiTable[T])">load[T](f: var RodFile; t: var BiTable[T])</a></li>
</ul>
<ul class="simple nested-toc-section">store
<li><a class="reference" href="#store%2CRodFile%2CBiTable%5BT%5D" title="store[T](f: var RodFile; t: BiTable[T])">store[T](f: var RodFile; t: BiTable[T])</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">A BiTable is a table that can be seen as an optimized pair of <tt class="docutils literal"><span class="pre"><span class="Punctuation">(</span><span class="Identifier">Table</span><span class="Punctuation">[</span><span class="Identifier">LitId</span><span class="Punctuation">,</span> <span class="Identifier">Val</span><span class="Punctuation">]</span><span class="Punctuation">,</span> <span class="Identifier">Table</span><span class="Punctuation">[</span><span class="Identifier">Val</span><span class="Punctuation">,</span> <span class="Identifier">LitId</span><span class="Punctuation">]</span><span class="Punctuation">)</span></span></tt>.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="rodfiles.html">rodfiles</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="BiTable">
<dt><pre><a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span>
</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L12" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L12" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="LitId">
<dt><pre><a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">uint32</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L10" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L10" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="$-procs-all">
<div id="$,LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#%24%2CLitId"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L22" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L22" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="&lt;-procs-all">
<div id="<,LitId,LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#%3C%2CLitId%2CLitId"><span class="Identifier">`&lt;`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L23" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L23" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="&lt;=-procs-all">
<div id="<=,LitId,LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#%3C%3D%2CLitId%2CLitId"><span class="Identifier">`&lt;=`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L24" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L24" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="==-procs-all">
<div id="==,LitId,LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#%3D%3D%2CLitId%2CLitId"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L25" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L25" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="[]-procs-all">
<div id="[],BiTable[T],LitId_2">
<dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CBiTable%5BT%5D%2CLitId_2"><span class="Identifier">`[]`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">litId</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">lent</span> <span class="Identifier">T</span> {.<span class="Identifier">inline</span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L101" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L101" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="[],BiTable[T],LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CBiTable%5BT%5D%2CLitId"><span class="Identifier">`[]`</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">litId</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</span> {.<span class="Identifier">inline</span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L96" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L96" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getKeyId-procs-all">
<div id="getKeyId,BiTable[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#getKeyId%2CBiTable%5BT%5D%2CT"><span class="Identifier">getKeyId</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">v</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L58" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L58" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="getOrIncl-procs-all">
<div id="getOrIncl,BiTable[T],T">
<dt><pre><span class="Keyword">proc</span> <a href="#getOrIncl%2CBiTable%5BT%5D%2CT"><span class="Identifier">getOrIncl</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">v</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L69" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L69" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="hash-procs-all">
<div id="hash,LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#hash%2CLitId"><span class="Identifier">hash</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Hash</span> {.<span class="Identifier">borrow</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L26" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L26" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="hash,BiTable[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#hash%2CBiTable%5BT%5D"><span class="Identifier">hash</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Hash</span></pre></dt>
<dd>
as the keys are hashes of the values, we simply use them instead
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L106" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L106" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="hasLitId-procs-all">
<div id="hasLitId,BiTable[T],LitId">
<dt><pre><span class="Keyword">proc</span> <a href="#hasLitId%2CBiTable%5BT%5D%2CLitId"><span class="Identifier">hasLitId</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">x</span><span class="Other">:</span> <a href="bitabs.html#LitId"><span class="Identifier">LitId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L42" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L42" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="len-procs-all">
<div id="len,BiTable[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#len%2CBiTable%5BT%5D"><span class="Identifier">len</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L29" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L29" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="load-procs-all">
<div id="load,RodFile,BiTable[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#load%2CRodFile%2CBiTable%5BT%5D"><span class="Identifier">load</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">t</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L117" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L117" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="store-procs-all">
<div id="store,RodFile,BiTable[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#store%2CRodFile%2CBiTable%5BT%5D"><span class="Identifier">store</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">t</span><span class="Other">:</span> <a href="bitabs.html#BiTable"><span class="Identifier">BiTable</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/bitabs.nim#L113" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/bitabs.nim#L113" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:13 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

19
compiler/ic/bitabs.idx Normal file
View file

@ -0,0 +1,19 @@
nimTitle bitabs ic/bitabs.html module compiler/ic/bitabs 0
nim LitId ic/bitabs.html#LitId type LitId 10
nim BiTable ic/bitabs.html#BiTable object BiTable 12
nim `$` ic/bitabs.html#$,LitId proc `$`(x: LitId): string 22
nim `<` ic/bitabs.html#<,LitId,LitId proc `<`(x, y: LitId): bool 23
nim `<=` ic/bitabs.html#<=,LitId,LitId proc `<=`(x, y: LitId): bool 24
nim `==` ic/bitabs.html#==,LitId,LitId proc `==`(x, y: LitId): bool 25
nim hash ic/bitabs.html#hash,LitId proc hash(x: LitId): Hash 26
nim len ic/bitabs.html#len,BiTable[T] proc len[T](t: BiTable[T]): int 29
nim hasLitId ic/bitabs.html#hasLitId,BiTable[T],LitId proc hasLitId[T](t: BiTable[T]; x: LitId): bool 42
nim getKeyId ic/bitabs.html#getKeyId,BiTable[T],T proc getKeyId[T](t: BiTable[T]; v: T): LitId 58
nim getOrIncl ic/bitabs.html#getOrIncl,BiTable[T],T proc getOrIncl[T](t: var BiTable[T]; v: T): LitId 69
nim `[]` ic/bitabs.html#[],BiTable[T],LitId proc `[]`[T](t: var BiTable[T]; litId: LitId): var T 96
nim `[]` ic/bitabs.html#[],BiTable[T],LitId_2 proc `[]`[T](t: BiTable[T]; litId: LitId): lent T 101
nim hash ic/bitabs.html#hash,BiTable[T] proc hash[T](t: BiTable[T]): Hash 106
nim store ic/bitabs.html#store,RodFile,BiTable[T] proc store[T](f: var RodFile; t: BiTable[T]) 113
nim load ic/bitabs.html#load,RodFile,BiTable[T] proc load[T](f: var RodFile; t: var BiTable[T]) 117
nimgrp hash ic/bitabs.html#hash-procs-all proc 26
nimgrp [] ic/bitabs.html#[]-procs-all proc 96

121
compiler/ic/cbackend.html Normal file
View file

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/cbackend</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/cbackend</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">generateCode
<li><a class="reference" href="#generateCode%2CModuleGraph" title="generateCode(g: ModuleGraph)">generateCode(g: ModuleGraph)</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/cbackend.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/cbackend.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">New entry point into our C/C++ code generator. Ideally somebody would rewrite the old backend (which is 8000 lines of crufty Nim code) to work on packed trees directly and produce the C code as an AST which can then be rendered to text in a very simple manner. Unfortunately nobody wrote this code. So instead we wrap the existing cgen.nim and its friends so that we call directly into the existing code generation logic but avoiding the naive, outdated <tt class="docutils literal"><span class="pre"><span class="Identifier">passes</span></span></tt> design. Thus you will see some <tt class="docutils literal"><span class="pre"><span class="Identifier">useAliveDataFromDce</span> <span class="Keyword">in</span> <span class="Identifier">flags</span></span></tt> checks in the old code -- the old code is also doing cross-module dependency tracking and DCE that we don't need anymore. DCE is now done as prepass over the entire packed module graph.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="../ast.html">../ast</a>, <a class="reference external" href="../options.html">../options</a>, <a class="reference external" href="../lineinfos.html">../lineinfos</a>, <a class="reference external" href="../modulegraphs.html">../modulegraphs</a>, <a class="reference external" href="../cgendata.html">../cgendata</a>, <a class="reference external" href="../cgen.html">../cgen</a>, <a class="reference external" href="../pathutils.html">../pathutils</a>, <a class="reference external" href="../extccomp.html">../extccomp</a>, <a class="reference external" href="../msgs.html">../msgs</a>, <a class="reference external" href="../modulepaths.html">../modulepaths</a>, <a class="reference external" href="packed_ast.html">packed_ast</a>, <a class="reference external" href="ic.html">ic</a>, <a class="reference external" href="dce.html">dce</a>, <a class="reference external" href="rodfiles.html">rodfiles</a>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="generateCode-procs-all">
<div id="generateCode,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#generateCode%2CModuleGraph"><span class="Identifier">generateCode</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">OSError</span><span class="Other">,</span>
<span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">,</span>
<span class="Identifier">ReadEnvEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">WriteDirEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">TimeEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
The single entry point, generate C(++) code for the entire Nim program aka <tt class="docutils literal"><span class="pre"><span class="Identifier">ModuleGraph</span></span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/cbackend.nim#L140" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/cbackend.nim#L140" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:18 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

2
compiler/ic/cbackend.idx Normal file
View file

@ -0,0 +1,2 @@
nimTitle cbackend ic/cbackend.html module compiler/ic/cbackend 0
nim generateCode ic/cbackend.html#generateCode,ModuleGraph proc generateCode(g: ModuleGraph) 140

175
compiler/ic/dce.html Normal file
View file

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/dce</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/dce</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#AliveContext" title="AliveContext = object">AliveContext</a></li>
<li><a class="reference" href="#AliveSyms" title="AliveSyms = seq[IntSet]">AliveSyms</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">computeAliveSyms
<li><a class="reference" href="#computeAliveSyms%2CPackedModuleGraph%2CConfigRef" title="computeAliveSyms(g: PackedModuleGraph; conf: ConfigRef): AliveSyms">computeAliveSyms(g: PackedModuleGraph; conf: ConfigRef): AliveSyms</a></li>
</ul>
<ul class="simple nested-toc-section">isAlive
<li><a class="reference" href="#isAlive%2CAliveSyms%2Cint%2Cint32" title="isAlive(a: AliveSyms; module: int; item: int32): bool">isAlive(a: AliveSyms; module: int; item: int32): bool</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/dce.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/dce.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">Dead code elimination (=DCE) for IC.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="../ast.html">../ast</a>, <a class="reference external" href="../options.html">../options</a>, <a class="reference external" href="../lineinfos.html">../lineinfos</a>, <a class="reference external" href="../types.html">../types</a>, <a class="reference external" href="packed_ast.html">packed_ast</a>, <a class="reference external" href="ic.html">ic</a>, <a class="reference external" href="bitabs.html">bitabs</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="AliveContext">
<dt><pre><a href="dce.html#AliveContext"><span class="Identifier">AliveContext</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
</pre></dt>
<dd>
Purpose is to fill the 'alive' field.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/dce.nim#L23" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/dce.nim#L23" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="AliveSyms">
<dt><pre><a href="dce.html#AliveSyms"><span class="Identifier">AliveSyms</span></a> <span class="Other">=</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">IntSet</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/dce.nim#L22" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/dce.nim#L22" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="computeAliveSyms-procs-all">
<div id="computeAliveSyms,PackedModuleGraph,ConfigRef">
<dt><pre><span class="Keyword">proc</span> <a href="#computeAliveSyms%2CPackedModuleGraph%2CConfigRef"><span class="Identifier">computeAliveSyms</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="ic.html#PackedModuleGraph"><span class="Identifier">PackedModuleGraph</span></a><span class="Other">;</span> <span class="Identifier">conf</span><span class="Other">:</span> <a href="../options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">)</span><span class="Other">:</span> <a href="dce.html#AliveSyms"><span class="Identifier">AliveSyms</span></a> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Entry point for our DCE algorithm.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/dce.nim#L147" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/dce.nim#L147" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="isAlive-procs-all">
<div id="isAlive,AliveSyms,int,int32">
<dt><pre><span class="Keyword">proc</span> <a href="#isAlive%2CAliveSyms%2Cint%2Cint32"><span class="Identifier">isAlive</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="dce.html#AliveSyms"><span class="Identifier">AliveSyms</span></a><span class="Other">;</span> <span class="Identifier">module</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">;</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">int32</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Backends use this to query if a symbol is <tt class="docutils literal"><span class="pre"><span class="Identifier">alive</span></span></tt> which means we need to produce (C/C++/etc) code for it.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/dce.nim#L161" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/dce.nim#L161" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:18 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

5
compiler/ic/dce.idx Normal file
View file

@ -0,0 +1,5 @@
nimTitle dce ic/dce.html module compiler/ic/dce 0
nim AliveSyms ic/dce.html#AliveSyms type AliveSyms 22
nim AliveContext ic/dce.html#AliveContext object AliveContext 23
nim computeAliveSyms ic/dce.html#computeAliveSyms,PackedModuleGraph,ConfigRef proc computeAliveSyms(g: PackedModuleGraph; conf: ConfigRef): AliveSyms 147
nim isAlive ic/dce.html#isAlive,AliveSyms,int,int32 proc isAlive(a: AliveSyms; module: int; item: int32): bool 161

1233
compiler/ic/ic.html Normal file

File diff suppressed because it is too large Load diff

66
compiler/ic/ic.idx Normal file
View file

@ -0,0 +1,66 @@
nimTitle ic ic/ic.html module compiler/ic/ic 0
nim PackedConfig ic/ic.html#PackedConfig object PackedConfig 21
nim HasDatInitProc ic/ic.html#HasDatInitProc ModuleBackendFlag.HasDatInitProc 28
nim HasModuleInitProc ic/ic.html#HasModuleInitProc ModuleBackendFlag.HasModuleInitProc 28
nim ModuleBackendFlag ic/ic.html#ModuleBackendFlag enum ModuleBackendFlag 28
nim PackedModule ic/ic.html#PackedModule object PackedModule 32
nim PackedEncoder ic/ic.html#PackedEncoder object PackedEncoder 64
nim toString ic/ic.html#toString,PackedTree,NodePos,PackedModule,int,string proc toString(tree: PackedTree; n: NodePos; m: PackedModule; nesting: int;\n result: var string) 76
nim toString ic/ic.html#toString,PackedTree,NodePos,PackedModule proc toString(tree: PackedTree; n: NodePos; m: PackedModule): string 113
nim debug ic/ic.html#debug,PackedTree,PackedModule proc debug(tree: PackedTree; m: PackedModule) 117
nim isActive ic/ic.html#isActive,PackedEncoder proc isActive(e: PackedEncoder): bool 120
nim rememberStartupConfig ic/ic.html#rememberStartupConfig,PackedConfig,ConfigRef proc rememberStartupConfig(dest: var PackedConfig; config: ConfigRef) 167
nim toFileIndex ic/ic.html#toFileIndex,LitId,PackedModule,ConfigRef proc toFileIndex(x: LitId; m: PackedModule; config: ConfigRef): FileIndex 194
nim initEncoder ic/ic.html#initEncoder,PackedEncoder,PackedModule,PSym,ConfigRef,PackedConfig proc initEncoder(c: var PackedEncoder; m: var PackedModule; moduleSym: PSym;\n config: ConfigRef; pc: PackedConfig) 203
nim addIncludeFileDep ic/ic.html#addIncludeFileDep,PackedEncoder,PackedModule,FileIndex proc addIncludeFileDep(c: var PackedEncoder; m: var PackedModule; f: FileIndex) 225
nim addImportFileDep ic/ic.html#addImportFileDep,PackedEncoder,PackedModule,FileIndex proc addImportFileDep(c: var PackedEncoder; m: var PackedModule; f: FileIndex) 228
nim addHidden ic/ic.html#addHidden,PackedEncoder,PackedModule,PSym proc addHidden(c: var PackedEncoder; m: var PackedModule; s: PSym) 231
nim addExported ic/ic.html#addExported,PackedEncoder,PackedModule,PSym proc addExported(c: var PackedEncoder; m: var PackedModule; s: PSym) 235
nim addConverter ic/ic.html#addConverter,PackedEncoder,PackedModule,PSym proc addConverter(c: var PackedEncoder; m: var PackedModule; s: PSym) 239
nim addTrmacro ic/ic.html#addTrmacro,PackedEncoder,PackedModule,PSym proc addTrmacro(c: var PackedEncoder; m: var PackedModule; s: PSym) 243
nim addPureEnum ic/ic.html#addPureEnum,PackedEncoder,PackedModule,PSym proc addPureEnum(c: var PackedEncoder; m: var PackedModule; s: PSym) 246
nim addMethod ic/ic.html#addMethod,PackedEncoder,PackedModule,PSym proc addMethod(c: var PackedEncoder; m: var PackedModule; s: PSym) 250
nim addReexport ic/ic.html#addReexport,PackedEncoder,PackedModule,PSym proc addReexport(c: var PackedEncoder; m: var PackedModule; s: PSym) 253
nim addCompilerProc ic/ic.html#addCompilerProc,PackedEncoder,PackedModule,PSym proc addCompilerProc(c: var PackedEncoder; m: var PackedModule; s: PSym) 258
nim toPackedNode ic/ic.html#toPackedNode,PNode,PackedTree,PackedEncoder,PackedModule proc toPackedNode(n: PNode; ir: var PackedTree; c: var PackedEncoder;\n m: var PackedModule) 262
nim storeSym ic/ic.html#storeSym,PSym,PackedEncoder,PackedModule proc storeSym(s: PSym; c: var PackedEncoder; m: var PackedModule): PackedItemId 263
nim storeTypeInst ic/ic.html#storeTypeInst,PackedEncoder,PackedModule,PSym,PType proc storeTypeInst(c: var PackedEncoder; m: var PackedModule; s: PSym; inst: PType) 475
nim addPragmaComputation ic/ic.html#addPragmaComputation,PackedEncoder,PackedModule,PNode proc addPragmaComputation(c: var PackedEncoder; m: var PackedModule; n: PNode) 478
nim toPackedNodeTopLevel ic/ic.html#toPackedNodeTopLevel,PNode,PackedEncoder,PackedModule proc toPackedNodeTopLevel(n: PNode; encoder: var PackedEncoder; m: var PackedModule) 518
nim toPackedGeneratedProcDef ic/ic.html#toPackedGeneratedProcDef,PSym,PackedEncoder,PackedModule proc toPackedGeneratedProcDef(s: PSym; encoder: var PackedEncoder;\n m: var PackedModule) 522
nim storeAttachedProcDef ic/ic.html#storeAttachedProcDef,PType,TTypeAttachedOp,PSym,PackedEncoder,PackedModule proc storeAttachedProcDef(t: PType; op: TTypeAttachedOp; s: PSym;\n encoder: var PackedEncoder; m: var PackedModule) 531
nim storeInstantiation ic/ic.html#storeInstantiation,PackedEncoder,PackedModule,PSym,PInstantiation proc storeInstantiation(c: var PackedEncoder; m: var PackedModule; s: PSym;\n i: PInstantiation) 540
nim storeExpansion ic/ic.html#storeExpansion,PackedEncoder,PackedModule,TLineInfo,PSym proc storeExpansion(c: var PackedEncoder; m: var PackedModule; info: TLineInfo;\n s: PSym) 549
nim toRodFile ic/ic.html#toRodFile,ConfigRef,AbsoluteFile proc toRodFile(conf: ConfigRef; f: AbsoluteFile; ext = RodExt): AbsoluteFile 562
nim loadRodFile ic/ic.html#loadRodFile,AbsoluteFile,PackedModule,ConfigRef proc loadRodFile(filename: AbsoluteFile; m: var PackedModule; config: ConfigRef;\n ignoreConfig = false): RodFileError 566
nim saveRodFile ic/ic.html#saveRodFile,AbsoluteFile,PackedEncoder,PackedModule proc saveRodFile(filename: AbsoluteFile; encoder: var PackedEncoder;\n m: var PackedModule) 634
nim PackedDecoder ic/ic.html#PackedDecoder object PackedDecoder 704
nim undefined ic/ic.html#undefined ModuleStatus.undefined 712
nim storing ic/ic.html#storing ModuleStatus.storing 712
nim loading ic/ic.html#loading ModuleStatus.loading 712
nim loaded ic/ic.html#loaded ModuleStatus.loaded 712
nim outdated ic/ic.html#outdated ModuleStatus.outdated 712
nim stored ic/ic.html#stored ModuleStatus.stored 712
nim ModuleStatus ic/ic.html#ModuleStatus enum ModuleStatus 712
nim LoadedModule ic/ic.html#LoadedModule object LoadedModule 720
nim PackedModuleGraph ic/ic.html#PackedModuleGraph type PackedModuleGraph 731
nim toFileIndexCached ic/ic.html#toFileIndexCached,PackedDecoder,PackedModuleGraph,int,LitId proc toFileIndexCached(c: var PackedDecoder; g: PackedModuleGraph; thisModule: int;\n f: LitId): FileIndex 736
nim loadNodes ic/ic.html#loadNodes,PackedDecoder,PackedModuleGraph,int,PackedTree,NodePos proc loadNodes(c: var PackedDecoder; g: var PackedModuleGraph; thisModule: int;\n tree: PackedTree; n: NodePos): PNode 751
nim initPackedDecoder ic/ic.html#initPackedDecoder,ConfigRef,IdentCache proc initPackedDecoder(config: ConfigRef; cache: IdentCache): PackedDecoder 787
nim moduleIndex ic/ic.html#moduleIndex,PackedDecoder,PackedModuleGraph,int,PackedItemId proc moduleIndex(c: var PackedDecoder; g: var PackedModuleGraph; thisModule: int;\n s: PackedItemId): int32 820
nim moduleFromRodFile ic/ic.html#moduleFromRodFile,PackedModuleGraph,ConfigRef,IdentCache,FileIndex,seq[FileIndex] proc moduleFromRodFile(g: var PackedModuleGraph; conf: ConfigRef; cache: IdentCache;\n fileIdx: FileIndex; cachedModules: var seq[FileIndex]): PSym 1026
nim loadProcBody ic/ic.html#loadProcBody,ConfigRef,IdentCache,PackedModuleGraph,PSym proc loadProcBody(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph;\n s: PSym): PNode 1046
nim loadTypeFromId ic/ic.html#loadTypeFromId,ConfigRef,IdentCache,PackedModuleGraph,int,PackedItemId proc loadTypeFromId(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph;\n module: int; id: PackedItemId): PType 1059
nim loadSymFromId ic/ic.html#loadSymFromId,ConfigRef,IdentCache,PackedModuleGraph,int,PackedItemId proc loadSymFromId(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph;\n module: int; id: PackedItemId): PSym 1074
nim translateId ic/ic.html#translateId,PackedItemId,PackedModuleGraph,int,ConfigRef proc translateId(id: PackedItemId; g: PackedModuleGraph; thisModule: int;\n config: ConfigRef): ItemId 1089
nim simulateLoadedModule ic/ic.html#simulateLoadedModule,PackedModuleGraph,ConfigRef,IdentCache,PSym,PackedModule proc simulateLoadedModule(g: var PackedModuleGraph; conf: ConfigRef;\n cache: IdentCache; moduleSym: PSym; m: PackedModule) 1108
nim RodIter ic/ic.html#RodIter object RodIter 1122
nim initRodIter ic/ic.html#initRodIter,RodIter,ConfigRef,IdentCache,PackedModuleGraph,FileIndex,PIdent,bool proc initRodIter(it: var RodIter; config: ConfigRef; cache: IdentCache;\n g: var PackedModuleGraph; module: FileIndex; name: PIdent;\n importHidden: bool): PSym 1132
nim initRodIterAllSyms ic/ic.html#initRodIterAllSyms,RodIter,ConfigRef,IdentCache,PackedModuleGraph,FileIndex,bool proc initRodIterAllSyms(it: var RodIter; config: ConfigRef; cache: IdentCache;\n g: var PackedModuleGraph; module: FileIndex;\n importHidden: bool): PSym 1148
nim nextRodIter ic/ic.html#nextRodIter,RodIter,PackedModuleGraph proc nextRodIter(it: var RodIter; g: var PackedModuleGraph): PSym 1165
nim interfaceSymbols ic/ic.html#interfaceSymbols.i,ConfigRef,IdentCache,PackedModuleGraph,FileIndex,PIdent,bool iterator interfaceSymbols(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph;\n module: FileIndex; name: PIdent; importHidden: bool): PSym 1170
nim interfaceSymbol ic/ic.html#interfaceSymbol,ConfigRef,IdentCache,PackedModuleGraph,FileIndex,PIdent,bool proc interfaceSymbol(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph;\n module: FileIndex; name: PIdent; importHidden: bool): PSym 1180
nim idgenFromLoadedModule ic/ic.html#idgenFromLoadedModule,LoadedModule proc idgenFromLoadedModule(m: LoadedModule): IdGenerator 1187
nim searchForCompilerproc ic/ic.html#searchForCompilerproc,LoadedModule,string proc searchForCompilerproc(m: LoadedModule; name: string): int32 1191
nim rodViewer ic/ic.html#rodViewer,AbsoluteFile,ConfigRef,IdentCache proc rodViewer(rodfile: AbsoluteFile; config: ConfigRef; cache: IdentCache) 1200
nimgrp tostring ic/ic.html#toString-procs-all proc 76

120
compiler/ic/integrity.html Normal file
View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/integrity</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/integrity</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">checkIntegrity
<li><a class="reference" href="#checkIntegrity%2CModuleGraph" title="checkIntegrity(g: ModuleGraph)">checkIntegrity(g: ModuleGraph)</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/integrity.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/integrity.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">Integrity checking for a set of .rod files. The set must cover a complete Nim project.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="../ast.html">../ast</a>, <a class="reference external" href="../modulegraphs.html">../modulegraphs</a>, <a class="reference external" href="packed_ast.html">packed_ast</a>, <a class="reference external" href="bitabs.html">bitabs</a>, <a class="reference external" href="ic.html">ic</a>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="checkIntegrity-procs-all">
<div id="checkIntegrity,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#checkIntegrity%2CModuleGraph"><span class="Identifier">checkIntegrity</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/integrity.nim#L141" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/integrity.nim#L141" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:18 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

View file

@ -0,0 +1,2 @@
nimTitle integrity ic/integrity.html module compiler/ic/integrity 0
nim checkIntegrity ic/integrity.html#checkIntegrity,ModuleGraph proc checkIntegrity(g: ModuleGraph) 141

180
compiler/ic/navigator.html Normal file
View file

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/navigator</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/navigator</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">navDefinition
<li><a class="reference" href="#navDefinition%2CModuleGraph" title="navDefinition(g: ModuleGraph)">navDefinition(g: ModuleGraph)</a></li>
</ul>
<ul class="simple nested-toc-section">navDefusages
<li><a class="reference" href="#navDefusages%2CModuleGraph" title="navDefusages(g: ModuleGraph)">navDefusages(g: ModuleGraph)</a></li>
</ul>
<ul class="simple nested-toc-section">navUsages
<li><a class="reference" href="#navUsages%2CModuleGraph" title="navUsages(g: ModuleGraph)">navUsages(g: ModuleGraph)</a></li>
</ul>
<ul class="simple nested-toc-section">writeRodFiles
<li><a class="reference" href="#writeRodFiles%2CModuleGraph" title="writeRodFiles(g: ModuleGraph)">writeRodFiles(g: ModuleGraph)</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/navigator.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/navigator.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">Supports the &quot;nim check --ic:on --defusages:FILE,LINE,COL&quot; IDE-like features. It uses the set of .rod files to accomplish its task. The set must cover a complete Nim project.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="../ast.html">../ast</a>, <a class="reference external" href="../modulegraphs.html">../modulegraphs</a>, <a class="reference external" href="../msgs.html">../msgs</a>, <a class="reference external" href="../options.html">../options</a>, <a class="reference external" href="packed_ast.html">packed_ast</a>, <a class="reference external" href="bitabs.html">bitabs</a>, <a class="reference external" href="ic.html">ic</a>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="navDefinition-procs-all">
<div id="navDefinition,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#navDefinition%2CModuleGraph"><span class="Identifier">navDefinition</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span>
<span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadDirEffect</span><span class="Other">,</span>
<span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span>
<span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/navigator.nim#L160" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/navigator.nim#L160" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="navDefusages-procs-all">
<div id="navDefusages,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#navDefusages%2CModuleGraph"><span class="Identifier">navDefusages</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span>
<span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadDirEffect</span><span class="Other">,</span>
<span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span>
<span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/navigator.nim#L162" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/navigator.nim#L162" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="navUsages-procs-all">
<div id="navUsages,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#navUsages%2CModuleGraph"><span class="Identifier">navUsages</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span>
<span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadDirEffect</span><span class="Other">,</span>
<span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span>
<span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/navigator.nim#L161" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/navigator.nim#L161" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="writeRodFiles-procs-all">
<div id="writeRodFiles,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#writeRodFiles%2CModuleGraph"><span class="Identifier">writeRodFiles</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">OSError</span><span class="Other">,</span>
<span class="Identifier">KeyError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">WriteDirEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">,</span>
<span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadDirEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/navigator.nim#L164" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/navigator.nim#L164" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:18 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

View file

@ -0,0 +1,5 @@
nimTitle navigator ic/navigator.html module compiler/ic/navigator 0
nim navDefinition ic/navigator.html#navDefinition,ModuleGraph proc navDefinition(g: ModuleGraph) 160
nim navUsages ic/navigator.html#navUsages,ModuleGraph proc navUsages(g: ModuleGraph) 161
nim navDefusages ic/navigator.html#navDefusages,ModuleGraph proc navDefusages(g: ModuleGraph) 162
nim writeRodFiles ic/navigator.html#writeRodFiles,ModuleGraph proc writeRodFiles(g: ModuleGraph) 164

1250
compiler/ic/packed_ast.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,68 @@
nimTitle packed_ast ic/packed_ast.html module compiler/ic/packed_ast 0
nim SymId ic/packed_ast.html#SymId type SymId 23
nim ModuleId ic/packed_ast.html#ModuleId type ModuleId 24
nim NodePos ic/packed_ast.html#NodePos type NodePos 25
nim NodeId ic/packed_ast.html#NodeId type NodeId 27
nim PackedItemId ic/packed_ast.html#PackedItemId object PackedItemId 29
nim nilItemId ic/packed_ast.html#nilItemId const nilItemId 34
nim emptyNodeId ic/packed_ast.html#emptyNodeId const emptyNodeId 37
nim PackedLineInfo ic/packed_ast.html#PackedLineInfo object PackedLineInfo 40
nim PackedLib ic/packed_ast.html#PackedLib object PackedLib 45
nim PackedSym ic/packed_ast.html#PackedSym object PackedSym 52
nim PackedType ic/packed_ast.html#PackedType object PackedType 74
nim PackedNode ic/packed_ast.html#PackedNode object PackedNode 91
nim PackedTree ic/packed_ast.html#PackedTree object PackedTree 101
nim PackedInstantiation ic/packed_ast.html#PackedInstantiation object PackedInstantiation 104
nim `==` ic/packed_ast.html#==,SymId,SymId proc `==`(a, b: SymId): bool 108
nim hash ic/packed_ast.html#hash,SymId proc hash(a: SymId): Hash 109
nim `==` ic/packed_ast.html#==,NodePos,NodePos proc `==`(a, b: NodePos): bool 111
nim `==` ic/packed_ast.html#==,NodeId,NodeId proc `==`(a, b: NodeId): bool 113
nim newTreeFrom ic/packed_ast.html#newTreeFrom,PackedTree proc newTreeFrom(old: PackedTree): PackedTree 115
nim throwAwayLastNode ic/packed_ast.html#throwAwayLastNode,PackedTree proc throwAwayLastNode(tree: var PackedTree) 135
nim addIdent ic/packed_ast.html#addIdent,PackedTree,LitId,PackedLineInfo proc addIdent(tree: var PackedTree; s: LitId; info: PackedLineInfo) 138
nim addSym ic/packed_ast.html#addSym,PackedTree,int32,PackedLineInfo proc addSym(tree: var PackedTree; s: int32; info: PackedLineInfo) 141
nim addModuleId ic/packed_ast.html#addModuleId,PackedTree,ModuleId,PackedLineInfo proc addModuleId(tree: var PackedTree; s: ModuleId; info: PackedLineInfo) 144
nim addSymDef ic/packed_ast.html#addSymDef,PackedTree,SymId,PackedLineInfo proc addSymDef(tree: var PackedTree; s: SymId; info: PackedLineInfo) 147
nim isAtom ic/packed_ast.html#isAtom,PackedTree,int proc isAtom(tree: PackedTree; pos: int): bool 150
nim copyTree ic/packed_ast.html#copyTree,PackedTree,PackedTree,NodePos proc copyTree(dest: var PackedTree; tree: PackedTree; n: NodePos) 152
nim prepare ic/packed_ast.html#prepare,PackedTree,TNodeKind,TNodeFlags,PackedItemId,PackedLineInfo proc prepare(tree: var PackedTree; kind: TNodeKind; flags: TNodeFlags;\n typeId: PackedItemId; info: PackedLineInfo): PatchPos 177
nim prepare ic/packed_ast.html#prepare,PackedTree,PackedTree,NodePos proc prepare(dest: var PackedTree; source: PackedTree; sourcePos: NodePos): PatchPos 182
nim patch ic/packed_ast.html#patch,PackedTree,PatchPos proc patch(tree: var PackedTree; pos: PatchPos) 186
nim len ic/packed_ast.html#len,PackedTree proc len(tree: PackedTree): int 192
nim `[]` ic/packed_ast.html#[],PackedTree,int proc `[]`(tree: PackedTree; i: int): lent PackedNode 194
nim sonsReadonly ic/packed_ast.html#sonsReadonly.i,PackedTree,NodePos iterator sonsReadonly(tree: PackedTree; n: NodePos): NodePos 204
nim sons ic/packed_ast.html#sons.i,PackedTree,PackedTree,NodePos iterator sons(dest: var PackedTree; tree: PackedTree; n: NodePos): NodePos 213
nim isons ic/packed_ast.html#isons.i,PackedTree,PackedTree,NodePos iterator isons(dest: var PackedTree; tree: PackedTree; n: NodePos): (int, NodePos) 218
nim sonsFrom1 ic/packed_ast.html#sonsFrom1.i,PackedTree,NodePos iterator sonsFrom1(tree: PackedTree; n: NodePos): NodePos 225
nim sonsWithoutLast2 ic/packed_ast.html#sonsWithoutLast2.i,PackedTree,NodePos iterator sonsWithoutLast2(tree: PackedTree; n: NodePos): NodePos 236
nim parent ic/packed_ast.html#parent.t,NodePos template parent(n: NodePos): NodePos 257
nim hasXsons ic/packed_ast.html#hasXsons,PackedTree,NodePos,int proc hasXsons(tree: PackedTree; n: NodePos; x: int): bool 259
nim hasAtLeastXsons ic/packed_ast.html#hasAtLeastXsons,PackedTree,NodePos,int proc hasAtLeastXsons(tree: PackedTree; n: NodePos; x: int): bool 265
nim firstSon ic/packed_ast.html#firstSon,PackedTree,NodePos proc firstSon(tree: PackedTree; n: NodePos): NodePos 273
nim kind ic/packed_ast.html#kind,PackedTree,NodePos proc kind(tree: PackedTree; n: NodePos): TNodeKind 275
nim litId ic/packed_ast.html#litId,PackedTree,NodePos proc litId(tree: PackedTree; n: NodePos): LitId 277
nim info ic/packed_ast.html#info,PackedTree,NodePos proc info(tree: PackedTree; n: NodePos): PackedLineInfo 279
nim typ ic/packed_ast.html#typ.t,NodePos template typ(n: NodePos): PackedItemId 282
nim flags ic/packed_ast.html#flags.t,NodePos template flags(n: NodePos): TNodeFlags 284
nim operand ic/packed_ast.html#operand.t,NodePos template operand(n: NodePos): int32 287
nim span ic/packed_ast.html#span,PackedTree,int proc span(tree: PackedTree; pos: int): int 290
nim sons2 ic/packed_ast.html#sons2,PackedTree,NodePos proc sons2(tree: PackedTree; n: NodePos): (NodePos, NodePos) 293
nim sons3 ic/packed_ast.html#sons3,PackedTree,NodePos proc sons3(tree: PackedTree; n: NodePos): (NodePos, NodePos, NodePos) 299
nim ithSon ic/packed_ast.html#ithSon,PackedTree,NodePos,int proc ithSon(tree: PackedTree; n: NodePos; i: int): NodePos 306
nim kind ic/packed_ast.html#kind.t,NodePos template kind(n: NodePos): TNodeKind 318
nim info ic/packed_ast.html#info.t,NodePos template info(n: NodePos): PackedLineInfo 319
nim litId ic/packed_ast.html#litId.t,NodePos template litId(n: NodePos): LitId 320
nim symId ic/packed_ast.html#symId.t,NodePos template symId(n: NodePos): SymId 322
nim firstSon ic/packed_ast.html#firstSon,NodePos proc firstSon(n: NodePos): NodePos 324
nim externIntLit ic/packed_ast.html#externIntLit const externIntLit 353
nim externSIntLit ic/packed_ast.html#externSIntLit const externSIntLit 364
nim externUIntLit ic/packed_ast.html#externUIntLit const externUIntLit 365
nim directIntLit ic/packed_ast.html#directIntLit const directIntLit 366
nim copyInto ic/packed_ast.html#copyInto.t,,, template copyInto(dest, n, body) 379
nim copyIntoKind ic/packed_ast.html#copyIntoKind.t,,,, template copyIntoKind(dest, kind, info, body) 384
nim getNodeId ic/packed_ast.html#getNodeId,PackedTree proc getNodeId(tree: PackedTree): NodeId 402
nim allNodes ic/packed_ast.html#allNodes.i,PackedTree iterator allNodes(tree: PackedTree): NodePos 411
nim toPackedItemId ic/packed_ast.html#toPackedItemId,int32 proc toPackedItemId(item: int32): PackedItemId 418
nimgrp prepare ic/packed_ast.html#prepare-procs-all proc 177
nimgrp firstson ic/packed_ast.html#firstSon-procs-all proc 273
nimgrp == ic/packed_ast.html#==-procs-all proc 108

160
compiler/ic/replayer.html Normal file
View file

@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/replayer</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/replayer</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#6" id="56">Imports</a>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">replayBackendProcs
<li><a class="reference" href="#replayBackendProcs%2CModuleGraph%2Cint" title="replayBackendProcs(g: ModuleGraph; module: int)">replayBackendProcs(g: ModuleGraph; module: int)</a></li>
</ul>
<ul class="simple nested-toc-section">replayGenericCacheInformation
<li><a class="reference" href="#replayGenericCacheInformation%2CModuleGraph%2Cint" title="replayGenericCacheInformation(g: ModuleGraph; module: int)">replayGenericCacheInformation(g: ModuleGraph; module: int)</a></li>
</ul>
<ul class="simple nested-toc-section">replayStateChanges
<li><a class="reference" href="#replayStateChanges%2CPSym%2CModuleGraph" title="replayStateChanges(module: PSym; g: ModuleGraph)">replayStateChanges(module: PSym; g: ModuleGraph)</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/replayer.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/replayer.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">Module that contains code to replay global VM state changes and pragma state like <tt class="docutils literal"><span class="pre">{.compile: &quot;foo.c&quot;.}</span></tt>. For IC (= Incremental compilation) support.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="../ast.html">../ast</a>, <a class="reference external" href="../modulegraphs.html">../modulegraphs</a>, <a class="reference external" href="../trees.html">../trees</a>, <a class="reference external" href="../extccomp.html">../extccomp</a>, <a class="reference external" href="../btrees.html">../btrees</a>, <a class="reference external" href="../msgs.html">../msgs</a>, <a class="reference external" href="../lineinfos.html">../lineinfos</a>, <a class="reference external" href="../pathutils.html">../pathutils</a>, <a class="reference external" href="../options.html">../options</a>, <a class="reference external" href="../cgmeth.html">../cgmeth</a>, <a class="reference external" href="packed_ast.html">packed_ast</a>, <a class="reference external" href="ic.html">ic</a>, <a class="reference external" href="bitabs.html">bitabs</a>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="replayBackendProcs-procs-all">
<div id="replayBackendProcs,ModuleGraph,int">
<dt><pre><span class="Keyword">proc</span> <a href="#replayBackendProcs%2CModuleGraph%2Cint"><span class="Identifier">replayBackendProcs</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">;</span> <span class="Identifier">module</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/replayer.nim#L92" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/replayer.nim#L92" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="replayGenericCacheInformation-procs-all">
<div id="replayGenericCacheInformation,ModuleGraph,int">
<dt><pre><span class="Keyword">proc</span> <a href="#replayGenericCacheInformation%2CModuleGraph%2Cint"><span class="Identifier">replayGenericCacheInformation</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">;</span> <span class="Identifier">module</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span> {.
<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span>
<span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
We remember the generic instantiations a module performed in order to to avoid the code bloat that generic code tends to imply. This is cheaper than deduplication of identical generic instantiations. However, deduplication is more powerful and general and I hope to implement it soon too (famous last words).
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/replayer.nim#L106" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/replayer.nim#L106" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="replayStateChanges-procs-all">
<div id="replayStateChanges,PSym,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#replayStateChanges%2CPSym%2CModuleGraph"><span class="Identifier">replayStateChanges</span></a><span class="Other">(</span><span class="Identifier">module</span><span class="Other">:</span> <a href="../ast.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">;</span> <span class="Identifier">g</span><span class="Other">:</span> <a href="../modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span>
<span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">,</span> <span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">EOFError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span>
<span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">,</span>
<span class="Identifier">WriteDirEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/replayer.nim#L24" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/replayer.nim#L24" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:18 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

4
compiler/ic/replayer.idx Normal file
View file

@ -0,0 +1,4 @@
nimTitle replayer ic/replayer.html module compiler/ic/replayer 0
nim replayStateChanges ic/replayer.html#replayStateChanges,PSym,ModuleGraph proc replayStateChanges(module: PSym; g: ModuleGraph) 24
nim replayBackendProcs ic/replayer.html#replayBackendProcs,ModuleGraph,int proc replayBackendProcs(g: ModuleGraph; module: int) 92
nim replayGenericCacheInformation ic/replayer.html#replayGenericCacheInformation,ModuleGraph,int proc replayGenericCacheInformation(g: ModuleGraph; module: int) 106

412
compiler/ic/rodfiles.html Normal file
View file

@ -0,0 +1,412 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>compiler/ic/rodfiles</title>
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="../nimdoc.out.css">
<!-- JS -->
<script type="text/javascript" src="../dochack.js"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">compiler/ic/rodfiles</h1>
<div class="row">
<div class="three columns">
<div class="theme-select-wrapper">
<label for="theme-select">Theme:&nbsp;</label>
<select id="theme-select" onchange="setTheme(this.value)">
<option value="auto">🌗 Match OS</option>
<option value="dark">🌑 Dark</option>
<option value="light">🌕 Light</option>
</select>
</div>
<div id="global-links">
<ul class="simple">
<li><a id="indexLink" href="../theindex.html">Index</a></li>
</ul>
</div>
<div id="searchInputDiv">
Search: <input type="search" id="searchInput" onkeyup="search()"/>
</div>
<div>
Group by:
<select onchange="groupBy(this.value)">
<option value="section">Section</option>
<option value="type">Type</option>
</select>
</div>
<ul class="simple simple-toc" id="toc-list">
<li><a class="reference" id="overview_toc" href="#overview">Overview</a></li>
<ul class="simple"><li><a class="reference" id="overview-a-basic-but-wrong-example-of-the-lifecyclecolon_toc" href="#overview-a-basic-but-wrong-example-of-the-lifecyclecolon">A basic but &quot;wrong&quot; example of the lifecycle:</a></li>
<ul class="simple"><li><a class="reference" id="a-basic-but-wrong-example-of-the-lifecyclecolon-issues-with-the-example_toc" href="#a-basic-but-wrong-example-of-the-lifecyclecolon-issues-with-the-example">Issues with the Example</a></li>
</ul></ul><li><a class="reference" id="api-notes_toc" href="#api-notes">API Notes</a></li>
<ul class="simple"><li><a class="reference" id="api-notes-valid-inputs-for-rod-files_toc" href="#api-notes-valid-inputs-for-rod-files">Valid inputs for Rod files</a></li>
<li><a class="reference" id="api-notes-note-on-error-handling-style_toc" href="#api-notes-note-on-error-handling-style">Note on error handling style</a></li>
<li><a class="reference" id="api-notes-misc_toc" href="#api-notes-misc">Misc</a></li>
</ul><li>
<details open>
<summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#RodFile" title="RodFile = object
f*: File
currentSection*: RodSection
err*: RodFileError">RodFile</a></li>
<li><a class="reference" href="#RodFileError" title="RodFileError = enum
ok, tooBig, cannotOpen, ioFailure, wrongHeader, wrongSection, configMismatch,
includeFileChanged">RodFileError</a></li>
<li><a class="reference" href="#RodSection" title="RodSection = enum
versionSection, configSection, stringsSection, checkSumsSection, depsSection,
numbersSection, exportsSection, hiddenSection, reexportsSection,
compilerProcsSection, trmacrosSection, convertersSection, methodsSection,
pureEnumsSection, toReplaySection, topLevelSection, bodiesSection,
symsSection, typesSection, typeInstCacheSection, procInstCacheSection,
attachedOpsSection, methodsPerTypeSection, enumToStringProcsSection,
typeInfoSection, backendFlagsSection, aliveSymsSection">RodSection</a></li>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">close
<li><a class="reference" href="#close%2CRodFile" title="close(f: var RodFile)">close(f: var RodFile)</a></li>
</ul>
<ul class="simple nested-toc-section">create
<li><a class="reference" href="#create%2Cstring" title="create(filename: string): RodFile">create(filename: string): RodFile</a></li>
</ul>
<ul class="simple nested-toc-section">loadHeader
<li><a class="reference" href="#loadHeader%2CRodFile" title="loadHeader(f: var RodFile)">loadHeader(f: var RodFile)</a></li>
</ul>
<ul class="simple nested-toc-section">loadPrim
<li><a class="reference" href="#loadPrim%2CRodFile%2Cstring" title="loadPrim(f: var RodFile; s: var string)">loadPrim(f: var RodFile; s: var string)</a></li>
<li><a class="reference" href="#loadPrim%2CRodFile%2CT" title="loadPrim[T](f: var RodFile; x: var T)">loadPrim[T](f: var RodFile; x: var T)</a></li>
</ul>
<ul class="simple nested-toc-section">loadSection
<li><a class="reference" href="#loadSection%2CRodFile%2CRodSection" title="loadSection(f: var RodFile; expected: RodSection)">loadSection(f: var RodFile; expected: RodSection)</a></li>
</ul>
<ul class="simple nested-toc-section">loadSeq
<li><a class="reference" href="#loadSeq%2CRodFile%2Cseq%5BT%5D" title="loadSeq[T](f: var RodFile; s: var seq[T])">loadSeq[T](f: var RodFile; s: var seq[T])</a></li>
</ul>
<ul class="simple nested-toc-section">open
<li><a class="reference" href="#open%2Cstring" title="open(filename: string): RodFile">open(filename: string): RodFile</a></li>
</ul>
<ul class="simple nested-toc-section">storeHeader
<li><a class="reference" href="#storeHeader%2CRodFile" title="storeHeader(f: var RodFile)">storeHeader(f: var RodFile)</a></li>
</ul>
<ul class="simple nested-toc-section">storePrim
<li><a class="reference" href="#storePrim%2CRodFile%2Cstring" title="storePrim(f: var RodFile; s: string)">storePrim(f: var RodFile; s: string)</a></li>
<li><a class="reference" href="#storePrim%2CRodFile%2CT" title="storePrim[T](f: var RodFile; x: T)">storePrim[T](f: var RodFile; x: T)</a></li>
</ul>
<ul class="simple nested-toc-section">storeSection
<li><a class="reference" href="#storeSection%2CRodFile%2CRodSection" title="storeSection(f: var RodFile; s: RodSection)">storeSection(f: var RodFile; s: RodSection)</a></li>
</ul>
<ul class="simple nested-toc-section">storeSeq
<li><a class="reference" href="#storeSeq%2CRodFile%2Cseq%5BT%5D" title="storeSeq[T](f: var RodFile; s: seq[T])">storeSeq[T](f: var RodFile; s: seq[T])</a></li>
</ul>
</ul>
</details>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc"><p>Low level binary format used by the compiler to store and load various AST and related data.</p>
<p>NB: this is incredibly low level and if you're interested in how the compiler works and less a storage format, you're probably looking for the <tt class="docutils literal"><span class="pre"><span class="Identifier">ic</span></span></tt> or <tt class="docutils literal"><span class="pre"><span class="Identifier">packed_ast</span></span></tt> modules to understand the logical format.</p>
<h1><a class="toc-backref" id="overview" href="#overview">Overview</a></h1><p><tt class="docutils literal"><span class="pre"><span class="Identifier">RodFile</span></span></tt> represents a Rod File (versioned binary format), and the associated data for common interactions such as IO and error tracking (<tt class="docutils literal"><span class="pre"><span class="Identifier">RodFileError</span></span></tt>). The file format broken up into sections (<tt class="docutils literal"><span class="pre"><span class="Identifier">RodSection</span></span></tt>) and preceded by a header (see: <tt class="docutils literal"><span class="pre"><span class="Identifier">cookie</span></span></tt>). The precise layout, section ordering and data following the section are determined by the user. See <tt class="docutils literal"><span class="pre"><span class="Identifier">ic</span><span class="Operator">.</span><span class="Identifier">loadRodFile</span></span></tt>.</p>
<h2><a class="toc-backref" id="overview-a-basic-but-wrong-example-of-the-lifecyclecolon" href="#overview-a-basic-but-wrong-example-of-the-lifecyclecolon">A basic but &quot;wrong&quot; example of the lifecycle:</a></h2><ol class="simple"><li><tt class="docutils literal"><span class="pre"><span class="Identifier">create</span></span></tt> or <tt class="docutils literal"><span class="pre"><span class="Identifier">open</span></span></tt> - create a new one or open an existing</li>
<li><tt class="docutils literal"><span class="pre"><span class="Identifier">storeHeader</span></span></tt> - header info</li>
<li><tt class="docutils literal"><span class="pre"><span class="Identifier">storePrim</span></span></tt> or <tt class="docutils literal"><span class="pre"><span class="Identifier">storeSeq</span></span></tt> - save your stuff</li>
<li><tt class="docutils literal"><span class="pre"><span class="Identifier">close</span></span></tt> - and we're done</li>
</ol>
<p>Now read the bits below to understand what's missing.</p>
<h3><a class="toc-backref" id="a-basic-but-wrong-example-of-the-lifecyclecolon-issues-with-the-example" href="#a-basic-but-wrong-example-of-the-lifecyclecolon-issues-with-the-example">Issues with the Example</a></h3><p>Missing Sections: This is a low level API, so headers and sections need to be stored and loaded by the user, see <tt class="docutils literal"><span class="pre"><span class="Identifier">storeHeader</span></span></tt> &amp; <tt class="docutils literal"><span class="pre"><span class="Identifier">loadHeader</span></span></tt> and <tt class="docutils literal"><span class="pre"><span class="Identifier">storeSection</span></span></tt> &amp; <tt class="docutils literal"><span class="pre"><span class="Identifier">loadSection</span></span></tt>, respectively.</p>
<p>No Error Handling: The API is centered around IO and prone to error, each operation checks or sets the <tt class="docutils literal"><span class="pre"><span class="Identifier">RodFile</span><span class="Operator">.</span><span class="Identifier">err</span></span></tt> field. A user of this API needs to handle these appropriately.</p>
<h1><a class="toc-backref" id="api-notes" href="#api-notes">API Notes</a></h1>
<h2><a class="toc-backref" id="api-notes-valid-inputs-for-rod-files" href="#api-notes-valid-inputs-for-rod-files">Valid inputs for Rod files</a></h2><p>ASTs, hopes, dreams, and anything as long as it and any children it may have support <tt class="docutils literal"><span class="pre"><span class="Identifier">copyMem</span></span></tt>. This means anything that is not a pointer and that does not contain a pointer. At a glance these are:</p>
<ul class="simple"><li>string</li>
<li>objects &amp; tuples (fields are recursed)</li>
<li>sequences AKA <tt class="docutils literal"><span class="pre"><span class="Identifier">seq</span><span class="Punctuation">[</span><span class="Identifier">T</span><span class="Punctuation">]</span></span></tt></li>
</ul>
<h2><a class="toc-backref" id="api-notes-note-on-error-handling-style" href="#api-notes-note-on-error-handling-style">Note on error handling style</a></h2><p>A flag based approach is used where operations no-op in case of a preexisting error and set the flag if they encounter one.</p>
<h2><a class="toc-backref" id="api-notes-misc" href="#api-notes-misc">Misc</a></h2><ul class="simple"><li>'Prim' is short for 'primitive', as in a non-sequence type</li>
</ul>
</p>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="RodFile">
<dt><pre><a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">f</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">File</span>
<span class="Identifier">currentSection</span><span class="Operator">*</span><span class="Other">:</span> <a href="rodfiles.html#RodSection"><span class="Identifier">RodSection</span></a>
<span class="Identifier">err</span><span class="Operator">*</span><span class="Other">:</span> <a href="rodfiles.html#RodFileError"><span class="Identifier">RodFileError</span></a>
</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L105" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L105" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="RodFileError">
<dt><pre><a href="rodfiles.html#RodFileError"><span class="Identifier">RodFileError</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">ok</span><span class="Other">,</span> <span class="Identifier">tooBig</span><span class="Other">,</span> <span class="Identifier">cannotOpen</span><span class="Other">,</span> <span class="Identifier">ioFailure</span><span class="Other">,</span> <span class="Identifier">wrongHeader</span><span class="Other">,</span> <span class="Identifier">wrongSection</span><span class="Other">,</span> <span class="Identifier">configMismatch</span><span class="Other">,</span>
<span class="Identifier">includeFileChanged</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L101" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L101" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="RodSection">
<dt><pre><a href="rodfiles.html#RodSection"><span class="Identifier">RodSection</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">versionSection</span><span class="Other">,</span> <span class="Identifier">configSection</span><span class="Other">,</span> <span class="Identifier">stringsSection</span><span class="Other">,</span> <span class="Identifier">checkSumsSection</span><span class="Other">,</span> <span class="Identifier">depsSection</span><span class="Other">,</span>
<span class="Identifier">numbersSection</span><span class="Other">,</span> <span class="Identifier">exportsSection</span><span class="Other">,</span> <span class="Identifier">hiddenSection</span><span class="Other">,</span> <span class="Identifier">reexportsSection</span><span class="Other">,</span>
<span class="Identifier">compilerProcsSection</span><span class="Other">,</span> <span class="Identifier">trmacrosSection</span><span class="Other">,</span> <span class="Identifier">convertersSection</span><span class="Other">,</span> <span class="Identifier">methodsSection</span><span class="Other">,</span>
<span class="Identifier">pureEnumsSection</span><span class="Other">,</span> <span class="Identifier">toReplaySection</span><span class="Other">,</span> <span class="Identifier">topLevelSection</span><span class="Other">,</span> <span class="Identifier">bodiesSection</span><span class="Other">,</span>
<span class="Identifier">symsSection</span><span class="Other">,</span> <span class="Identifier">typesSection</span><span class="Other">,</span> <span class="Identifier">typeInstCacheSection</span><span class="Other">,</span> <span class="Identifier">procInstCacheSection</span><span class="Other">,</span>
<span class="Identifier">attachedOpsSection</span><span class="Other">,</span> <span class="Identifier">methodsPerTypeSection</span><span class="Other">,</span> <span class="Identifier">enumToStringProcsSection</span><span class="Other">,</span>
<span class="Identifier">typeInfoSection</span><span class="Other">,</span> <span class="Identifier">backendFlagsSection</span><span class="Other">,</span> <span class="Identifier">aliveSymsSection</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L72" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L72" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
<dl class="item">
<div id="close-procs-all">
<div id="close,RodFile">
<dt><pre><span class="Keyword">proc</span> <a href="#close%2CRodFile"><span class="Identifier">close</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L244" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L244" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="create-procs-all">
<div id="create,string">
<dt><pre><span class="Keyword">proc</span> <a href="#create%2Cstring"><span class="Identifier">create</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
create the file and open it for writing
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L239" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L239" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadHeader-procs-all">
<div id="loadHeader,RodFile">
<dt><pre><span class="Keyword">proc</span> <a href="#loadHeader%2CRodFile"><span class="Identifier">loadHeader</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadIOEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Loads the header which is described by <tt class="docutils literal"><span class="pre"><span class="Identifier">cookie</span></span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L215" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L215" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadPrim-procs-all">
<div id="loadPrim,RodFile,string">
<dt><pre><span class="Keyword">proc</span> <a href="#loadPrim%2CRodFile%2Cstring"><span class="Identifier">loadPrim</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">string</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Read a string, the length was stored as a prefix
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L168" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L168" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="loadPrim,RodFile,T">
<dt><pre><span class="Keyword">proc</span> <a href="#loadPrim%2CRodFile%2CT"><span class="Identifier">loadPrim</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">x</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">T</span><span class="Other">)</span></pre></dt>
<dd>
Load a non-sequence/string <tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L180" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L180" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadSection-procs-all">
<div id="loadSection,RodFile,RodSection">
<dt><pre><span class="Keyword">proc</span> <a href="#loadSection%2CRodFile%2CRodSection"><span class="Identifier">loadSection</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">expected</span><span class="Other">:</span> <a href="rodfiles.html#RodSection"><span class="Identifier">RodSection</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
read the bytes value of s, sets and error if the section is incorrect.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L231" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L231" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadSeq-procs-all">
<div id="loadSeq,RodFile,seq[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#loadSeq%2CRodFile%2Cseq%5BT%5D"><span class="Identifier">loadSeq</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <span class="Keyword">var</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span></pre></dt>
<dd>
<tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt> must be compatible with <tt class="docutils literal"><span class="pre"><span class="Identifier">copyMem</span></span></tt>, see <tt class="docutils literal"><span class="pre"><span class="Identifier">loadPrim</span></span></tt>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L198" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L198" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="open-procs-all">
<div id="open,string">
<dt><pre><span class="Keyword">proc</span> <a href="#open%2Cstring"><span class="Identifier">open</span></a><span class="Other">(</span><span class="Identifier">filename</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
open the file for reading
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L246" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L246" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="storeHeader-procs-all">
<div id="storeHeader,RodFile">
<dt><pre><span class="Keyword">proc</span> <a href="#storeHeader%2CRodFile"><span class="Identifier">storeHeader</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
stores the header which is described by <tt class="docutils literal"><span class="pre"><span class="Identifier">cookie</span></span></tt>.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L209" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L209" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="storePrim-procs-all">
<div id="storePrim,RodFile,string">
<dt><pre><span class="Keyword">proc</span> <a href="#storePrim%2CRodFile%2Cstring"><span class="Identifier">storePrim</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Stores a string. The len is prefixed to allow for later retreival.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L120" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L120" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="storePrim,RodFile,T">
<dt><pre><span class="Keyword">proc</span> <a href="#storePrim%2CRodFile%2CT"><span class="Identifier">storePrim</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span></pre></dt>
<dd>
Stores a non-sequence/string <tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt>. If <tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt> doesn't support <tt class="docutils literal"><span class="pre"><span class="Identifier">copyMem</span></span></tt> and is an object or tuple then the fields are written -- the user from context will need to know which <tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt> to load.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L135" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L135" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="storeSection-procs-all">
<div id="storeSection,RodFile,RodSection">
<dt><pre><span class="Keyword">proc</span> <a href="#storeSection%2CRodFile%2CRodSection"><span class="Identifier">storeSection</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <a href="rodfiles.html#RodSection"><span class="Identifier">RodSection</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">IOError</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">WriteIOEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
update <tt class="docutils literal"><span class="pre"><span class="Identifier">currentSection</span></span></tt> and writes the bytes value of s.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L224" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L224" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="storeSeq-procs-all">
<div id="storeSeq,RodFile,seq[T]">
<dt><pre><span class="Keyword">proc</span> <a href="#storeSeq%2CRodFile%2Cseq%5BT%5D"><span class="Identifier">storeSeq</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="rodfiles.html#RodFile"><span class="Identifier">RodFile</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">)</span></pre></dt>
<dd>
Stores a sequence of <tt class="docutils literal"><span class="pre"><span class="Identifier">T</span></span></tt>s, with the len as a prefix for later retrieval.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ic/rodfiles.nim#L155" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ic/rodfiles.nim#L155" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
</div>
</div>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br>
<small style="color: var(--hint);">Made with Nim. Generated: 2023-03-13 00:20:13 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
</body>
</html>

61
compiler/ic/rodfiles.idx Normal file
View file

@ -0,0 +1,61 @@
nimTitle rodfiles ic/rodfiles.html module compiler/ic/rodfiles 0
nim versionSection ic/rodfiles.html#versionSection RodSection.versionSection 72
nim configSection ic/rodfiles.html#configSection RodSection.configSection 72
nim stringsSection ic/rodfiles.html#stringsSection RodSection.stringsSection 72
nim checkSumsSection ic/rodfiles.html#checkSumsSection RodSection.checkSumsSection 72
nim depsSection ic/rodfiles.html#depsSection RodSection.depsSection 72
nim numbersSection ic/rodfiles.html#numbersSection RodSection.numbersSection 72
nim exportsSection ic/rodfiles.html#exportsSection RodSection.exportsSection 72
nim hiddenSection ic/rodfiles.html#hiddenSection RodSection.hiddenSection 72
nim reexportsSection ic/rodfiles.html#reexportsSection RodSection.reexportsSection 72
nim compilerProcsSection ic/rodfiles.html#compilerProcsSection RodSection.compilerProcsSection 72
nim trmacrosSection ic/rodfiles.html#trmacrosSection RodSection.trmacrosSection 72
nim convertersSection ic/rodfiles.html#convertersSection RodSection.convertersSection 72
nim methodsSection ic/rodfiles.html#methodsSection RodSection.methodsSection 72
nim pureEnumsSection ic/rodfiles.html#pureEnumsSection RodSection.pureEnumsSection 72
nim toReplaySection ic/rodfiles.html#toReplaySection RodSection.toReplaySection 72
nim topLevelSection ic/rodfiles.html#topLevelSection RodSection.topLevelSection 72
nim bodiesSection ic/rodfiles.html#bodiesSection RodSection.bodiesSection 72
nim symsSection ic/rodfiles.html#symsSection RodSection.symsSection 72
nim typesSection ic/rodfiles.html#typesSection RodSection.typesSection 72
nim typeInstCacheSection ic/rodfiles.html#typeInstCacheSection RodSection.typeInstCacheSection 72
nim procInstCacheSection ic/rodfiles.html#procInstCacheSection RodSection.procInstCacheSection 72
nim attachedOpsSection ic/rodfiles.html#attachedOpsSection RodSection.attachedOpsSection 72
nim methodsPerTypeSection ic/rodfiles.html#methodsPerTypeSection RodSection.methodsPerTypeSection 72
nim enumToStringProcsSection ic/rodfiles.html#enumToStringProcsSection RodSection.enumToStringProcsSection 72
nim typeInfoSection ic/rodfiles.html#typeInfoSection RodSection.typeInfoSection 72
nim backendFlagsSection ic/rodfiles.html#backendFlagsSection RodSection.backendFlagsSection 72
nim aliveSymsSection ic/rodfiles.html#aliveSymsSection RodSection.aliveSymsSection 72
nim RodSection ic/rodfiles.html#RodSection enum RodSection 72
nim ok ic/rodfiles.html#ok RodFileError.ok 101
nim tooBig ic/rodfiles.html#tooBig RodFileError.tooBig 101
nim cannotOpen ic/rodfiles.html#cannotOpen RodFileError.cannotOpen 101
nim ioFailure ic/rodfiles.html#ioFailure RodFileError.ioFailure 101
nim wrongHeader ic/rodfiles.html#wrongHeader RodFileError.wrongHeader 101
nim wrongSection ic/rodfiles.html#wrongSection RodFileError.wrongSection 101
nim configMismatch ic/rodfiles.html#configMismatch RodFileError.configMismatch 101
nim includeFileChanged ic/rodfiles.html#includeFileChanged RodFileError.includeFileChanged 101
nim RodFileError ic/rodfiles.html#RodFileError enum RodFileError 101
nim RodFile ic/rodfiles.html#RodFile object RodFile 105
nim storePrim ic/rodfiles.html#storePrim,RodFile,string proc storePrim(f: var RodFile; s: string) 120
nim storePrim ic/rodfiles.html#storePrim,RodFile,T proc storePrim[T](f: var RodFile; x: T) 135
nim storeSeq ic/rodfiles.html#storeSeq,RodFile,seq[T] proc storeSeq[T](f: var RodFile; s: seq[T]) 155
nim loadPrim ic/rodfiles.html#loadPrim,RodFile,string proc loadPrim(f: var RodFile; s: var string) 168
nim loadPrim ic/rodfiles.html#loadPrim,RodFile,T proc loadPrim[T](f: var RodFile; x: var T) 180
nim loadSeq ic/rodfiles.html#loadSeq,RodFile,seq[T] proc loadSeq[T](f: var RodFile; s: var seq[T]) 198
nim storeHeader ic/rodfiles.html#storeHeader,RodFile proc storeHeader(f: var RodFile) 209
nim loadHeader ic/rodfiles.html#loadHeader,RodFile proc loadHeader(f: var RodFile) 215
nim storeSection ic/rodfiles.html#storeSection,RodFile,RodSection proc storeSection(f: var RodFile; s: RodSection) 224
nim loadSection ic/rodfiles.html#loadSection,RodFile,RodSection proc loadSection(f: var RodFile; expected: RodSection) 231
nim create ic/rodfiles.html#create,string proc create(filename: string): RodFile 239
nim close ic/rodfiles.html#close,RodFile proc close(f: var RodFile) 244
nim open ic/rodfiles.html#open,string proc open(filename: string): RodFile 246
nimgrp storeprim ic/rodfiles.html#storePrim-procs-all proc 120
nimgrp loadprim ic/rodfiles.html#loadPrim-procs-all proc 168
heading Overview ic/rodfiles.html#overview Overview 0
heading A basic but "wrong" example of the lifecycle: ic/rodfiles.html#overview-a-basic-but-wrong-example-of-the-lifecyclecolon A basic but &quot;wrong&quot; example of the lifecycle: 0
heading Issues with the Example ic/rodfiles.html#a-basic-but-wrong-example-of-the-lifecyclecolon-issues-with-the-example Issues with the Example 0
heading API Notes ic/rodfiles.html#api-notes API Notes 0
heading Valid inputs for Rod files ic/rodfiles.html#api-notes-valid-inputs-for-rod-files Valid inputs for Rod files 0
heading Note on error handling style ic/rodfiles.html#api-notes-note-on-error-handling-style Note on error handling style 0
heading Misc ic/rodfiles.html#api-notes-misc Misc 0