Files
Nim/compiler/ast2nif.html
github-actions[bot] 50dcd7a720 Deploy to GitHub pages
2026-01-14 15:37:41 +00:00

527 lines
51 KiB
HTML

<?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" data-theme="auto">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ast2nif</title>
<!-- 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'/>
<!-- 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?v=2.3.1">
<!-- JS -->
<script type="text/javascript" src="dochack.js?v=2.3.1"></script>
</head>
<body>
<div class="document" id="documentId">
<div class="container">
<h1 class="title">ast2nif</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" oninput="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="#DecodeContext" title="DecodeContext = object">DecodeContext</a></li>
<li><a class="reference" href="#LoadFlag" title="LoadFlag = enum
LoadFullAst, AlwaysLoadInterface">LoadFlag</a></li>
<li><a class="reference" href="#ModuleSuffix" title="ModuleSuffix = distinct string">ModuleSuffix</a></li>
<li><a class="reference" href="#ParsedSymName" title="ParsedSymName = object
name*: string
module*: string
count*: int">ParsedSymName</a></li>
<li><a class="reference" href="#PrecompiledModule" title="PrecompiledModule = object
topLevel*: PNode
deps*: seq[ModuleSuffix]
logOps*: seq[LogEntry]
module*: PSym">PrecompiledModule</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">createDecodeContext
<li><a class="reference" href="#createDecodeContext%2CConfigRef%2CIdentCache" title="createDecodeContext(config: ConfigRef; cache: IdentCache): DecodeContext">createDecodeContext(config: ConfigRef; cache: IdentCache): DecodeContext</a></li>
</ul>
<ul class="simple nested-toc-section">firstSon
<li><a class="reference" href="#firstSon%2CCursor" title="firstSon(n: Cursor): Cursor">firstSon(n: Cursor): Cursor</a></li>
</ul>
<ul class="simple nested-toc-section">isStub
<li><a class="reference" href="#isStub%2CPSym" title="isStub(s: PSym): bool">isStub(s: PSym): bool</a></li>
<li><a class="reference" href="#isStub%2CPType" title="isStub(t: PType): bool">isStub(t: PType): bool</a></li>
</ul>
<ul class="simple nested-toc-section">loadNifModule
<li><a class="reference" href="#loadNifModule%2CDecodeContext%2CFileIndex%2CTStrTable%2CTStrTable%2Cset%5BLoadFlag%5D" title="loadNifModule(c: var DecodeContext; f: FileIndex;
interf, interfHidden: var TStrTable; flags: set[LoadFlag] = {}): PrecompiledModule">loadNifModule(c: var DecodeContext; f: FileIndex;
interf, interfHidden: var TStrTable; flags: set[LoadFlag] = {}): PrecompiledModule</a></li>
<li><a class="reference" href="#loadNifModule%2CDecodeContext%2CModuleSuffix%2CTStrTable%2CTStrTable%2Cset%5BLoadFlag%5D" title="loadNifModule(c: var DecodeContext; suffix: ModuleSuffix;
interf, interfHidden: var TStrTable; flags: set[LoadFlag] = {}): PrecompiledModule">loadNifModule(c: var DecodeContext; suffix: ModuleSuffix;
interf, interfHidden: var TStrTable; flags: set[LoadFlag] = {}): PrecompiledModule</a></li>
</ul>
<ul class="simple nested-toc-section">loadSym
<li><a class="reference" href="#loadSym%2CDecodeContext%2CPSym" title="loadSym(c: var DecodeContext; s: PSym)">loadSym(c: var DecodeContext; s: PSym)</a></li>
</ul>
<ul class="simple nested-toc-section">loadType
<li><a class="reference" href="#loadType%2CDecodeContext%2CPType" title="loadType(c: var DecodeContext; t: PType)">loadType(c: var DecodeContext; t: PType)</a></li>
</ul>
<ul class="simple nested-toc-section">parseSymName
<li><a class="reference" href="#parseSymName%2Cstring" title="parseSymName(s: string): ParsedSymName">parseSymName(s: string): ParsedSymName</a></li>
</ul>
<ul class="simple nested-toc-section">resolveHookSym
<li><a class="reference" href="#resolveHookSym%2CDecodeContext%2C" title="resolveHookSym(c: var DecodeContext; symId: nifstreams.SymId): PSym">resolveHookSym(c: var DecodeContext; symId: nifstreams.SymId): PSym</a></li>
</ul>
<ul class="simple nested-toc-section">toClassSymId
<li><a class="reference" href="#toClassSymId%2CConfigRef%2CItemId" title="toClassSymId(config: ConfigRef; typeId: ItemId): nifstreams.SymId">toClassSymId(config: ConfigRef; typeId: ItemId): nifstreams.SymId</a></li>
</ul>
<ul class="simple nested-toc-section">toConverterIndexEntry
<li><a class="reference" href="#toConverterIndexEntry%2CConfigRef%2CPSym" title="toConverterIndexEntry(config: ConfigRef; converterSym: PSym): (nifstreams.SymId,
nifstreams.SymId)">toConverterIndexEntry(config: ConfigRef; converterSym: PSym): (nifstreams.SymId,
nifstreams.SymId)</a></li>
</ul>
<ul class="simple nested-toc-section">toHookIndexEntry
<li><a class="reference" href="#toHookIndexEntry%2CConfigRef%2CItemId%2CPSym" title="toHookIndexEntry(config: ConfigRef; typeId: ItemId; hookSym: PSym): HookIndexEntry">toHookIndexEntry(config: ConfigRef; typeId: ItemId; hookSym: PSym): HookIndexEntry</a></li>
</ul>
<ul class="simple nested-toc-section">toMethodIndexEntry
<li><a class="reference" href="#toMethodIndexEntry%2CConfigRef%2CPSym%2Cstring" title="toMethodIndexEntry(config: ConfigRef; methodSym: PSym; signature: string): MethodIndexEntry">toMethodIndexEntry(config: ConfigRef; methodSym: PSym; signature: string): MethodIndexEntry</a></li>
</ul>
<ul class="simple nested-toc-section">toNifFilename
<li><a class="reference" href="#toNifFilename%2CConfigRef%2CFileIndex" title="toNifFilename(conf: ConfigRef; f: FileIndex): string">toNifFilename(conf: ConfigRef; f: FileIndex): string</a></li>
</ul>
<ul class="simple nested-toc-section">toNifIndexFilename
<li><a class="reference" href="#toNifIndexFilename%2CConfigRef%2CFileIndex" title="toNifIndexFilename(conf: ConfigRef; f: FileIndex): string">toNifIndexFilename(conf: ConfigRef; f: FileIndex): string</a></li>
</ul>
<ul class="simple nested-toc-section">tryResolveCompilerProc
<li><a class="reference" href="#tryResolveCompilerProc%2CDecodeContext%2Cstring%2CFileIndex" title="tryResolveCompilerProc(c: var DecodeContext; name: string;
moduleFileIdx: FileIndex): PSym">tryResolveCompilerProc(c: var DecodeContext; name: string;
moduleFileIdx: FileIndex): PSym</a></li>
</ul>
<ul class="simple nested-toc-section">writeNifModule
<li><a class="reference" href="#writeNifModule%2CConfigRef%2Cint32%2CPNode%2Cseq%5BLogEntry%5D%2Cseq%5BPNode%5D" title="writeNifModule(config: ConfigRef; thisModule: int32; n: PNode;
opsLog: seq[LogEntry]; replayActions: seq[PNode] = @[])">writeNifModule(config: ConfigRef; thisModule: int32; n: PNode;
opsLog: seq[LogEntry]; replayActions: seq[PNode] = @[])</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/ast2nif.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">AST to NIF bridge.</p>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="astdef.html">astdef</a>, <a class="reference external" href="idents.html">idents</a>, <a class="reference external" href="msgs.html">msgs</a>, <a class="reference external" href="options.html">options</a>, <a class="reference external" href="lineinfos.html">lineinfos</a>, <a class="reference external" href="pathutils.html">pathutils</a>, <a class="reference external" href="typekeys.html">typekeys</a>, <a class="reference external" href="ic/enum2nif.html">ic/enum2nif</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="DecodeContext">
<dt><pre><a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a> <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L851" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L851" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="LoadFlag">
<dt><pre><a href="ast2nif.html#LoadFlag"><span class="Identifier">LoadFlag</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">LoadFullAst</span><span class="Other">,</span> <span class="Identifier">AlwaysLoadInterface</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L871" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L871" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="ModuleSuffix">
<dt><pre><a href="ast2nif.html#ModuleSuffix"><span class="Identifier">ModuleSuffix</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">string</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1561" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1561" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="ParsedSymName">
<dt><pre><a href="ast2nif.html#ParsedSymName"><span class="Identifier">ParsedSymName</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">name</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
<span class="Identifier">module</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
<span class="Identifier">count</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L194" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L194" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="PrecompiledModule">
<dt><pre><a href="ast2nif.html#PrecompiledModule"><span class="Identifier">PrecompiledModule</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">topLevel</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Identifier">deps</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="ast2nif.html#ModuleSuffix"><span class="Identifier">ModuleSuffix</span></a><span class="Other">]</span>
<span class="Identifier">logOps</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="astdef.html#LogEntry"><span class="Identifier">LogEntry</span></a><span class="Other">]</span>
<span class="Identifier">module</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1562" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1562" 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="createDecodeContext-procs-all">
<div id="createDecodeContext,ConfigRef,IdentCache">
<dt><pre><span class="Keyword">proc</span> <a href="#createDecodeContext%2CConfigRef%2CIdentCache"><span class="Identifier">createDecodeContext</span></a><span class="Other">(</span><span class="Identifier">config</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">;</span> <span class="Identifier">cache</span><span class="Other">:</span> <a href="idents.html#IdentCache"><span class="Identifier">IdentCache</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</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>
Supposed to be a global variable
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L859" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L859" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="firstSon-procs-all">
<div id="firstSon,Cursor">
<dt><pre><span class="Keyword">proc</span> <a href="#firstSon%2CCursor"><span class="Identifier">firstSon</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <span class="Identifier">Cursor</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Cursor</span> {.<span class="Identifier">inline</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/ast2nif.nim#L817" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L817" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="isStub-procs-all">
<div id="isStub,PSym">
<dt><pre><span class="Keyword">proc</span> <a href="#isStub%2CPSym"><span class="Identifier">isStub</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</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/ast2nif.nim#L1032" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1032" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="isStub,PType">
<dt><pre><span class="Keyword">proc</span> <a href="#isStub%2CPType"><span class="Identifier">isStub</span></a><span class="Other">(</span><span class="Identifier">t</span><span class="Other">:</span> <a href="astdef.html#PType"><span class="Identifier">PType</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span class="Identifier">inline</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/ast2nif.nim#L1031" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1031" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadNifModule-procs-all">
<div id="loadNifModule,DecodeContext,FileIndex,TStrTable,TStrTable,set[LoadFlag]">
<dt><pre><span class="Keyword">proc</span> <a href="#loadNifModule%2CDecodeContext%2CFileIndex%2CTStrTable%2CTStrTable%2Cset%5BLoadFlag%5D"><span class="Identifier">loadNifModule</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a><span class="Other">;</span> <span class="Identifier">f</span><span class="Other">:</span> <a href="lineinfos.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">;</span>
<span class="Identifier">interf</span><span class="Other">,</span> <span class="Identifier">interfHidden</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="astdef.html#TStrTable"><span class="Identifier">TStrTable</span></a><span class="Other">;</span>
<span class="Identifier">flags</span><span class="Other">:</span> <span class="Identifier">set</span><span class="Other">[</span><a href="ast2nif.html#LoadFlag"><span class="Identifier">LoadFlag</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Other">{</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <a href="ast2nif.html#PrecompiledModule"><span class="Identifier">PrecompiledModule</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">ValueError</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="Identifier">Exception</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">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">ReadDirEffect</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>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1671" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1671" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="loadNifModule,DecodeContext,ModuleSuffix,TStrTable,TStrTable,set[LoadFlag]">
<dt><pre><span class="Keyword">proc</span> <a href="#loadNifModule%2CDecodeContext%2CModuleSuffix%2CTStrTable%2CTStrTable%2Cset%5BLoadFlag%5D"><span class="Identifier">loadNifModule</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a><span class="Other">;</span> <span class="Identifier">suffix</span><span class="Other">:</span> <a href="ast2nif.html#ModuleSuffix"><span class="Identifier">ModuleSuffix</span></a><span class="Other">;</span>
<span class="Identifier">interf</span><span class="Other">,</span> <span class="Identifier">interfHidden</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="astdef.html#TStrTable"><span class="Identifier">TStrTable</span></a><span class="Other">;</span>
<span class="Identifier">flags</span><span class="Other">:</span> <span class="Identifier">set</span><span class="Other">[</span><a href="ast2nif.html#LoadFlag"><span class="Identifier">LoadFlag</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Other">{</span><span class="Other">}</span><span class="Other">)</span><span class="Other">:</span> <a href="ast2nif.html#PrecompiledModule"><span class="Identifier">PrecompiledModule</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">OSError</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">Exception</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">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="Identifier">RootEffect</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>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1650" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1650" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadSym-procs-all">
<div id="loadSym,DecodeContext,PSym">
<dt><pre><span class="Keyword">proc</span> <a href="#loadSym%2CDecodeContext%2CPSym"><span class="Identifier">loadSym</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</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">ValueError</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="Identifier">IOError</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">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</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/ast2nif.nim#L1190" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1190" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="loadType-procs-all">
<div id="loadType,DecodeContext,PType">
<dt><pre><span class="Keyword">proc</span> <a href="#loadType%2CDecodeContext%2CPType"><span class="Identifier">loadType</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a><span class="Other">;</span> <span class="Identifier">t</span><span class="Other">:</span> <a href="astdef.html#PType"><span class="Identifier">PType</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">ValueError</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="Identifier">IOError</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">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</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/ast2nif.nim#L1103" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1103" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="parseSymName-procs-all">
<div id="parseSymName,string">
<dt><pre><span class="Keyword">proc</span> <a href="#parseSymName%2Cstring"><span class="Identifier">parseSymName</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 class="Other">:</span> <a href="ast2nif.html#ParsedSymName"><span class="Identifier">ParsedSymName</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>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L199" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L199" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="resolveHookSym-procs-all">
<div id="resolveHookSym,DecodeContext,">
<dt><pre><span class="Keyword">proc</span> <a href="#resolveHookSym%2CDecodeContext%2C"><span class="Identifier">resolveHookSym</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a><span class="Other">;</span> <span class="Identifier">symId</span><span class="Other">:</span> <span class="Identifier">nifstreams</span><span class="Other">.</span><span class="Identifier">SymId</span><span class="Other">)</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</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">OSError</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="Other">,</span>
<span class="Identifier">tags</span><span class="Other">:</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>
Resolves a hook SymId to PSym. Hook symbols are often private (generated =destroy, =wasMoved, etc.)
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1501" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1501" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="toClassSymId-procs-all">
<div id="toClassSymId,ConfigRef,ItemId">
<dt><pre><span class="Keyword">proc</span> <a href="#toClassSymId%2CConfigRef%2CItemId"><span class="Identifier">toClassSymId</span></a><span class="Other">(</span><span class="Identifier">config</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">;</span> <span class="Identifier">typeId</span><span class="Other">:</span> <a href="astdef.html#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">nifstreams</span><span class="Other">.</span><span class="Identifier">SymId</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Converts a type ItemId to its SymId for the class index.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L67" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L67" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="toConverterIndexEntry-procs-all">
<div id="toConverterIndexEntry,ConfigRef,PSym">
<dt><pre><span class="Keyword">proc</span> <a href="#toConverterIndexEntry%2CConfigRef%2CPSym"><span class="Identifier">toConverterIndexEntry</span></a><span class="Other">(</span><span class="Identifier">config</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">;</span> <span class="Identifier">converterSym</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Other">(</span>
<span class="Identifier">nifstreams</span><span class="Other">.</span><span class="Identifier">SymId</span><span class="Other">,</span> <span class="Identifier">nifstreams</span><span class="Other">.</span><span class="Identifier">SymId</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Converts a converter symbol to an index entry (destType, converterSym). Returns the destination type's SymId and the converter's SymId.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L44" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L44" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="toHookIndexEntry-procs-all">
<div id="toHookIndexEntry,ConfigRef,ItemId,PSym">
<dt><pre><span class="Keyword">proc</span> <a href="#toHookIndexEntry%2CConfigRef%2CItemId%2CPSym"><span class="Identifier">toHookIndexEntry</span></a><span class="Other">(</span><span class="Identifier">config</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">;</span> <span class="Identifier">typeId</span><span class="Other">:</span> <a href="astdef.html#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">;</span> <span class="Identifier">hookSym</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">HookIndexEntry</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Converts a type ItemId and hook symbol to a HookIndexEntry for the NIF index.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L33" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L33" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="toMethodIndexEntry-procs-all">
<div id="toMethodIndexEntry,ConfigRef,PSym,string">
<dt><pre><span class="Keyword">proc</span> <a href="#toMethodIndexEntry%2CConfigRef%2CPSym%2Cstring"><span class="Identifier">toMethodIndexEntry</span></a><span class="Other">(</span><span class="Identifier">config</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">;</span> <span class="Identifier">methodSym</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">;</span> <span class="Identifier">signature</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">MethodIndexEntry</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
Converts a method symbol to a MethodIndexEntry.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L59" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L59" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="toNifFilename-procs-all">
<div id="toNifFilename,ConfigRef,FileIndex">
<dt><pre><span class="Keyword">proc</span> <a href="#toNifFilename%2CConfigRef%2CFileIndex"><span class="Identifier">toNifFilename</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="Identifier">f</span><span class="Other">:</span> <a href="lineinfos.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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">ReadEnvEffect</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>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1467" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1467" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="toNifIndexFilename-procs-all">
<div id="toNifIndexFilename,ConfigRef,FileIndex">
<dt><pre><span class="Keyword">proc</span> <a href="#toNifIndexFilename%2CConfigRef%2CFileIndex"><span class="Identifier">toNifIndexFilename</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="Identifier">f</span><span class="Other">:</span> <a href="lineinfos.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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">ReadEnvEffect</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>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1471" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1471" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="tryResolveCompilerProc-procs-all">
<div id="tryResolveCompilerProc,DecodeContext,string,FileIndex">
<dt><pre><span class="Keyword">proc</span> <a href="#tryResolveCompilerProc%2CDecodeContext%2Cstring%2CFileIndex"><span class="Identifier">tryResolveCompilerProc</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="ast2nif.html#DecodeContext"><span class="Identifier">DecodeContext</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">;</span>
<span class="Identifier">moduleFileIdx</span><span class="Other">:</span> <a href="lineinfos.html#FileIndex"><span class="Identifier">FileIndex</span></a><span class="Other">)</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</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">ValueError</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">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>
Tries to resolve a compiler proc from a module by checking the NIF index. Returns nil if the symbol doesn't exist.
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L1507" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L1507" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="writeNifModule-procs-all">
<div id="writeNifModule,ConfigRef,int32,PNode,seq[LogEntry],seq[PNode]">
<dt><pre><span class="Keyword">proc</span> <a href="#writeNifModule%2CConfigRef%2Cint32%2CPNode%2Cseq%5BLogEntry%5D%2Cseq%5BPNode%5D"><span class="Identifier">writeNifModule</span></a><span class="Other">(</span><span class="Identifier">config</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a><span class="Other">;</span> <span class="Identifier">thisModule</span><span class="Other">:</span> <span class="Identifier">int32</span><span class="Other">;</span> <span class="Identifier">n</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a><span class="Other">;</span>
<span class="Identifier">opsLog</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="astdef.html#LogEntry"><span class="Identifier">LogEntry</span></a><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">replayActions</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="astdef.html#PNode"><span class="Identifier">PNode</span></a><span class="Other">]</span> <span class="Other">=</span> <span class="Operator">@</span><span class="Other">[</span><span class="Other">]</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">ValueError</span><span class="Other">,</span> <span class="Identifier">OSError</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="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">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">ReadDirEffect</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>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/ast2nif.nim#L733" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/ast2nif.nim#L733" 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: 2026-01-14 15:37:31 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>