Files
Nim/compiler/cgendata.html
github-actions[bot] c7440eccf2 Deploy to GitHub pages
2025-09-27 04:02:34 +00:00

548 lines
41 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>cgendata</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">cgendata</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="#BModule" title="BModule = ref TCGen">BModule</a></li>
<li><a class="reference" href="#BModuleList" title="BModuleList = ref object of RootObj
mainModProcs*, mainModInit*, otherModsInit*, mainDatInit*: Builder
mapping*: Rope
modules*: seq[BModule]
modulesClosed*: seq[BModule]
forwardedProcs*: seq[PSym]
generatedHeader*: BModule
typeInfoMarker*: TypeCacheWithOwner
typeInfoMarkerV2*: TypeCacheWithOwner
config*: ConfigRef
graph*: ModuleGraph
strVersion*, seqVersion*: int
nimtv*: Builder
nimtvDeps*: seq[PType]
nimtvDeclared*: IntSet
mangledPrcs*: HashSet[string]">BModuleList</a></li>
<li><a class="reference" href="#BProc" title="BProc = ref TCProc">BProc</a></li>
<li><a class="reference" href="#CodegenFlag" title="CodegenFlag = enum
preventStackTrace, usesThreadVars, frameDeclared, isHeaderFile,
includesStringh, objHasKidsValid, useAliveDataFromDce">CodegenFlag</a></li>
<li><a class="reference" href="#TBlock" title="TBlock = object
id*: int
label*: Rope
sections*: TCProcSections
isLoop*: bool
nestedTryStmts*: int16
nestedExceptStmts*: int16
frameLen*: int16">TBlock</a></li>
<li><a class="reference" href="#TCFileSection" title="TCFileSection = enum
cfsHeaders, cfsFrameDefines, cfsForwardTypes, cfsTypes, cfsSeqTypes,
cfsTypeInfo, cfsProcHeaders, cfsStrData, cfsData, cfsVars, cfsProcs,
cfsInitProc, cfsDatInitProc, cfsTypeInit1, cfsTypeInit3, cfsDynLibInit">TCFileSection</a></li>
<li><a class="reference" href="#TCFileSections" title="TCFileSections = array[TCFileSection, Builder]">TCFileSections</a></li>
<li><a class="reference" href="#TCProcFlag" title="TCProcFlag = enum
beforeRetNeeded, threadVarAccessed, hasCurFramePointer, noSafePoints,
nimErrorFlagAccessed, nimErrorFlagDeclared, nimErrorFlagDisabled">TCProcFlag</a></li>
<li><a class="reference" href="#TCProcSection" title="TCProcSection = enum
cpsLocals, cpsInit, cpsStmts">TCProcSection</a></li>
<li><a class="reference" href="#TCProcSections" title="TCProcSections = array[TCProcSection, Builder]">TCProcSections</a></li>
<li><a class="reference" href="#TCTypeKind" title="TCTypeKind = enum
ctVoid, ctChar, ctBool, ctInt, ctInt8, ctInt16, ctInt32, ctInt64, ctFloat,
ctFloat32, ctFloat64, ctFloat128, ctUInt, ctUInt8, ctUInt16, ctUInt32,
ctUInt64, ctArray, ctPtrToArray, ctStruct, ctPtr, ctNimStr, ctNimSeq, ctProc,
ctCString">TCTypeKind</a></li>
<li><a class="reference" href="#TLabel" title="TLabel = Rope">TLabel</a></li>
<li><a class="reference" href="#TTypeSeq" title="TTypeSeq = seq[PType]">TTypeSeq</a></li>
<li><a class="reference" href="#TypeCache" title="TypeCache = Table[SigHash, Rope]">TypeCache</a></li>
<li><a class="reference" href="#TypeCacheWithOwner" title="TypeCacheWithOwner = Table[SigHash, tuple[str: Rope, owner: int32]]">TypeCacheWithOwner</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">includeHeader
<li><a class="reference" href="#includeHeader%2CBModule%2Cstring" title="includeHeader(this: BModule; header: string)">includeHeader(this: BModule; header: string)</a></li>
</ul>
<ul class="simple nested-toc-section">initBlock
<li><a class="reference" href="#initBlock" title="initBlock(): TBlock">initBlock(): TBlock</a></li>
</ul>
<ul class="simple nested-toc-section">newModuleList
<li><a class="reference" href="#newModuleList%2CModuleGraph" title="newModuleList(g: ModuleGraph): BModuleList">newModuleList(g: ModuleGraph): BModuleList</a></li>
</ul>
<ul class="simple nested-toc-section">newProc
<li><a class="reference" href="#newProc%2CPSym%2CBModule" title="newProc(prc: PSym; module: BModule): BProc">newProc(prc: PSym; module: BModule): BProc</a></li>
</ul>
<ul class="simple nested-toc-section">procSec
<li><a class="reference" href="#procSec%2CBProc%2CTCProcSection" title="procSec(p: BProc; s: TCProcSection): var Builder">procSec(p: BProc; s: TCProcSection): var Builder</a></li>
</ul>
<ul class="simple nested-toc-section">s
<li><a class="reference" href="#s%2CBProc%2CTCProcSection" title="s(p: BProc; s: TCProcSection): var Builder">s(p: BProc; s: TCProcSection): var Builder</a></li>
</ul>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#15" id="65">Iterators</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">cgenModules
<li><a class="reference" href="#cgenModules.i%2CBModuleList" title="cgenModules(g: BModuleList): BModule">cgenModules(g: BModuleList): BModule</a></li>
</ul>
</ul>
</details>
</li>
<li>
<details open>
<summary><a class="reference reference-toplevel" href="#18" id="68">Templates</a></summary>
<ul class="simple simple-toc-section">
<ul class="simple nested-toc-section">config
<li><a class="reference" href="#config.t%2CBModule" title="config(m: BModule): ConfigRef">config(m: BModule): ConfigRef</a></li>
<li><a class="reference" href="#config.t%2CBProc" title="config(p: BProc): ConfigRef">config(p: BProc): ConfigRef</a></li>
</ul>
<ul class="simple nested-toc-section">vccAndC
<li><a class="reference" href="#vccAndC.t%2CBProc" title="vccAndC(p: BProc): bool">vccAndC(p: BProc): 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/cgendata.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">This module contains the data structures for the C code generation phase.</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="ropes.html">ropes</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="modulegraphs.html">modulegraphs</a>, <a class="reference external" href="cbuilderbase.html">cbuilderbase</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="BModule">
<dt><pre><a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Identifier">TCGen</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L52" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L52" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="BModuleList">
<dt><pre><a href="cgendata.html#BModuleList"><span class="Identifier">BModuleList</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <span class="Identifier">RootObj</span>
<span class="Identifier">mainModProcs</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">mainModInit</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">otherModsInit</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">mainDatInit</span><span class="Operator">*</span><span class="Other">:</span> <a href="cbuilderbase.html#Builder"><span class="Identifier">Builder</span></a>
<span class="Identifier">mapping</span><span class="Operator">*</span><span class="Other">:</span> <a href="ropes.html#Rope"><span class="Identifier">Rope</span></a>
<span class="Identifier">modules</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a><span class="Other">]</span>
<span class="Identifier">modulesClosed</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a><span class="Other">]</span>
<span class="Identifier">forwardedProcs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="ast.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">]</span>
<span class="Identifier">generatedHeader</span><span class="Operator">*</span><span class="Other">:</span> <a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a>
<span class="Identifier">typeInfoMarker</span><span class="Operator">*</span><span class="Other">:</span> <a href="cgendata.html#TypeCacheWithOwner"><span class="Identifier">TypeCacheWithOwner</span></a>
<span class="Identifier">typeInfoMarkerV2</span><span class="Operator">*</span><span class="Other">:</span> <a href="cgendata.html#TypeCacheWithOwner"><span class="Identifier">TypeCacheWithOwner</span></a>
<span class="Identifier">config</span><span class="Operator">*</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a>
<span class="Identifier">graph</span><span class="Operator">*</span><span class="Other">:</span> <a href="modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a>
<span class="Identifier">strVersion</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">seqVersion</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">nimtv</span><span class="Operator">*</span><span class="Other">:</span> <a href="cbuilderbase.html#Builder"><span class="Identifier">Builder</span></a>
<span class="Identifier">nimtvDeps</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="ast.html#PType"><span class="Identifier">PType</span></a><span class="Other">]</span>
<span class="Identifier">nimtvDeclared</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">IntSet</span>
<span class="Identifier">mangledPrcs</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">HashSet</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L117" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L117" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="BProc">
<dt><pre><a href="cgendata.html#BProc"><span class="Identifier">BProc</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Identifier">TCProc</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L53" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L53" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="CodegenFlag">
<dt><pre><a href="cgendata.html#CodegenFlag"><span class="Identifier">CodegenFlag</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">preventStackTrace</span><span class="Other">,</span> <span class="Identifier">usesThreadVars</span><span class="Other">,</span> <span class="Identifier">frameDeclared</span><span class="Other">,</span> <span class="Identifier">isHeaderFile</span><span class="Other">,</span>
<span class="Identifier">includesStringh</span><span class="Other">,</span> <span class="Identifier">objHasKidsValid</span><span class="Other">,</span> <span class="Identifier">useAliveDataFromDce</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L106" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L106" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TBlock">
<dt><pre><a href="cgendata.html#TBlock"><span class="Identifier">TBlock</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">id</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">label</span><span class="Operator">*</span><span class="Other">:</span> <a href="ropes.html#Rope"><span class="Identifier">Rope</span></a>
<span class="Identifier">sections</span><span class="Operator">*</span><span class="Other">:</span> <a href="cgendata.html#TCProcSections"><span class="Identifier">TCProcSections</span></a>
<span class="Identifier">isLoop</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
<span class="Identifier">nestedTryStmts</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int16</span>
<span class="Identifier">nestedExceptStmts</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int16</span>
<span class="Identifier">frameLen</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int16</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L54" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L54" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCFileSection">
<dt><pre><a href="cgendata.html#TCFileSection"><span class="Identifier">TCFileSection</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">cfsHeaders</span><span class="Other">,</span> <span class="Identifier">cfsFrameDefines</span><span class="Other">,</span> <span class="Identifier">cfsForwardTypes</span><span class="Other">,</span> <span class="Identifier">cfsTypes</span><span class="Other">,</span> <span class="Identifier">cfsSeqTypes</span><span class="Other">,</span>
<span class="Identifier">cfsTypeInfo</span><span class="Other">,</span> <span class="Identifier">cfsProcHeaders</span><span class="Other">,</span> <span class="Identifier">cfsStrData</span><span class="Other">,</span> <span class="Identifier">cfsData</span><span class="Other">,</span> <span class="Identifier">cfsVars</span><span class="Other">,</span> <span class="Identifier">cfsProcs</span><span class="Other">,</span>
<span class="Identifier">cfsInitProc</span><span class="Other">,</span> <span class="Identifier">cfsDatInitProc</span><span class="Other">,</span> <span class="Identifier">cfsTypeInit1</span><span class="Other">,</span> <span class="Identifier">cfsTypeInit3</span><span class="Other">,</span> <span class="Identifier">cfsDynLibInit</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L20" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L20" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCFileSections">
<dt><pre><a href="cgendata.html#TCFileSections"><span class="Identifier">TCFileSections</span></a> <span class="Other">=</span> <span class="Identifier">array</span><span class="Other">[</span><span class="Identifier">TCFileSection</span><span class="Other">,</span> <a href="cbuilderbase.html#Builder"><span class="Identifier">Builder</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L46" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L46" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCProcFlag">
<dt><pre><a href="cgendata.html#TCProcFlag"><span class="Identifier">TCProcFlag</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">beforeRetNeeded</span><span class="Other">,</span> <span class="Identifier">threadVarAccessed</span><span class="Other">,</span> <span class="Identifier">hasCurFramePointer</span><span class="Other">,</span> <span class="Identifier">noSafePoints</span><span class="Other">,</span>
<span class="Identifier">nimErrorFlagAccessed</span><span class="Other">,</span> <span class="Identifier">nimErrorFlagDeclared</span><span class="Other">,</span> <span class="Identifier">nimErrorFlagDisabled</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L64" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L64" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCProcSection">
<dt><pre><a href="cgendata.html#TCProcSection"><span class="Identifier">TCProcSection</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">cpsLocals</span><span class="Other">,</span> <span class="Identifier">cpsInit</span><span class="Other">,</span> <span class="Identifier">cpsStmts</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L47" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L47" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCProcSections">
<dt><pre><a href="cgendata.html#TCProcSections"><span class="Identifier">TCProcSections</span></a> <span class="Other">=</span> <span class="Identifier">array</span><span class="Other">[</span><span class="Identifier">TCProcSection</span><span class="Other">,</span> <a href="cbuilderbase.html#Builder"><span class="Identifier">Builder</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L51" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L51" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCTypeKind">
<dt><pre><a href="cgendata.html#TCTypeKind"><span class="Identifier">TCTypeKind</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">ctVoid</span><span class="Other">,</span> <span class="Identifier">ctChar</span><span class="Other">,</span> <span class="Identifier">ctBool</span><span class="Other">,</span> <span class="Identifier">ctInt</span><span class="Other">,</span> <span class="Identifier">ctInt8</span><span class="Other">,</span> <span class="Identifier">ctInt16</span><span class="Other">,</span> <span class="Identifier">ctInt32</span><span class="Other">,</span> <span class="Identifier">ctInt64</span><span class="Other">,</span> <span class="Identifier">ctFloat</span><span class="Other">,</span>
<span class="Identifier">ctFloat32</span><span class="Other">,</span> <span class="Identifier">ctFloat64</span><span class="Other">,</span> <span class="Identifier">ctFloat128</span><span class="Other">,</span> <span class="Identifier">ctUInt</span><span class="Other">,</span> <span class="Identifier">ctUInt8</span><span class="Other">,</span> <span class="Identifier">ctUInt16</span><span class="Other">,</span> <span class="Identifier">ctUInt32</span><span class="Other">,</span>
<span class="Identifier">ctUInt64</span><span class="Other">,</span> <span class="Identifier">ctArray</span><span class="Other">,</span> <span class="Identifier">ctPtrToArray</span><span class="Other">,</span> <span class="Identifier">ctStruct</span><span class="Other">,</span> <span class="Identifier">ctPtr</span><span class="Other">,</span> <span class="Identifier">ctNimStr</span><span class="Other">,</span> <span class="Identifier">ctNimSeq</span><span class="Other">,</span> <span class="Identifier">ctProc</span><span class="Other">,</span>
<span class="Identifier">ctCString</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L39" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L39" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TLabel">
<dt><pre><a href="cgendata.html#TLabel"><span class="Identifier">TLabel</span></a> <span class="Other">=</span> <a href="ropes.html#Rope"><span class="Identifier">Rope</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L19" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L19" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TTypeSeq">
<dt><pre><a href="cgendata.html#TTypeSeq"><span class="Identifier">TTypeSeq</span></a> <span class="Other">=</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="ast.html#PType"><span class="Identifier">PType</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L102" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L102" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TypeCache">
<dt><pre><a href="cgendata.html#TypeCache"><span class="Identifier">TypeCache</span></a> <span class="Other">=</span> <span class="Identifier">Table</span><span class="Other">[</span><a href="modulegraphs.html#SigHash"><span class="Identifier">SigHash</span></a><span class="Other">,</span> <a href="ropes.html#Rope"><span class="Identifier">Rope</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L103" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L103" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TypeCacheWithOwner">
<dt><pre><a href="cgendata.html#TypeCacheWithOwner"><span class="Identifier">TypeCacheWithOwner</span></a> <span class="Other">=</span> <span class="Identifier">Table</span><span class="Other">[</span><a href="modulegraphs.html#SigHash"><span class="Identifier">SigHash</span></a><span class="Other">,</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">str</span><span class="Other">:</span> <a href="ropes.html#Rope"><span class="Identifier">Rope</span></a><span class="Other">,</span> <span class="Identifier">owner</span><span class="Other">:</span> <span class="Identifier">int32</span><span class="Other">]</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L104" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L104" 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="includeHeader-procs-all">
<div id="includeHeader,BModule,string">
<dt><pre><span class="Keyword">proc</span> <a href="#includeHeader%2CBModule%2Cstring"><span class="Identifier">includeHeader</span></a><span class="Other">(</span><span class="Identifier">this</span><span class="Other">:</span> <a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a><span class="Other">;</span> <span class="Identifier">header</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="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/cgendata.nim#L181" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L181" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="initBlock-procs-all">
<div id="initBlock">
<dt><pre><span class="Keyword">proc</span> <a href="#initBlock"><span class="Identifier">initBlock</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="cgendata.html#TBlock"><span class="Identifier">TBlock</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/cgendata.nim#L193" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L193" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newModuleList-procs-all">
<div id="newModuleList,ModuleGraph">
<dt><pre><span class="Keyword">proc</span> <a href="#newModuleList%2CModuleGraph"><span class="Identifier">newModuleList</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="Other">:</span> <a href="cgendata.html#BModuleList"><span class="Identifier">BModuleList</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/cgendata.nim#L211" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L211" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="newProc-procs-all">
<div id="newProc,PSym,BModule">
<dt><pre><span class="Keyword">proc</span> <a href="#newProc%2CPSym%2CBModule"><span class="Identifier">newProc</span></a><span class="Other">(</span><span class="Identifier">prc</span><span class="Other">:</span> <a href="ast.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">;</span> <span class="Identifier">module</span><span class="Other">:</span> <a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a><span class="Other">)</span><span class="Other">:</span> <a href="cgendata.html#BProc"><span class="Identifier">BProc</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/cgendata.nim#L198" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L198" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="procSec-procs-all">
<div id="procSec,BProc,TCProcSection">
<dt><pre><span class="Keyword">proc</span> <a href="#procSec%2CBProc%2CTCProcSection"><span class="Identifier">procSec</span></a><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <a href="cgendata.html#BProc"><span class="Identifier">BProc</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <a href="cgendata.html#TCProcSection"><span class="Identifier">TCProcSection</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="cbuilderbase.html#Builder"><span class="Identifier">Builder</span></a> {.<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/cgendata.nim#L189" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L189" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="s-procs-all">
<div id="s,BProc,TCProcSection">
<dt><pre><span class="Keyword">proc</span> <a href="#s%2CBProc%2CTCProcSection"><span class="Identifier">s</span></a><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <a href="cgendata.html#BProc"><span class="Identifier">BProc</span></a><span class="Other">;</span> <span class="Identifier">s</span><span class="Other">:</span> <a href="cgendata.html#TCProcSection"><span class="Identifier">TCProcSection</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="cbuilderbase.html#Builder"><span class="Identifier">Builder</span></a> {.<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/cgendata.nim#L185" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L185" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
<div class="section" id="15">
<h1><a class="toc-backref" href="#15">Iterators</a></h1>
<dl class="item">
<div id="cgenModules-iterators-all">
<div id="cgenModules.i,BModuleList">
<dt><pre><span class="Keyword">iterator</span> <a href="#cgenModules.i%2CBModuleList"><span class="Identifier">cgenModules</span></a><span class="Other">(</span><span class="Identifier">g</span><span class="Other">:</span> <a href="cgendata.html#BModuleList"><span class="Identifier">BModuleList</span></a><span class="Other">)</span><span class="Other">:</span> <a href="cgendata.html#BModule"><span class="Identifier">BModule</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/cgendata.nim#L215" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L215" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
</dl>
</div>
<div class="section" id="18">
<h1><a class="toc-backref" href="#18">Templates</a></h1>
<dl class="item">
<div id="config-templates-all">
<div id="config.t,BModule">
<dt><pre><span class="Keyword">template</span> <a href="#config.t%2CBModule"><span class="Identifier">config</span></a><span class="Other">(</span><span class="Identifier">m</span><span class="Other">:</span> <a href="cgendata.html#BModule"><span class="Identifier">BModule</span></a><span class="Other">)</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L177" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L177" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="config.t,BProc">
<dt><pre><span class="Keyword">template</span> <a href="#config.t%2CBProc"><span class="Identifier">config</span></a><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <a href="cgendata.html#BProc"><span class="Identifier">BProc</span></a><span class="Other">)</span><span class="Other">:</span> <a href="options.html#ConfigRef"><span class="Identifier">ConfigRef</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/cgendata.nim#L178" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L178" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="vccAndC-templates-all">
<div id="vccAndC.t,BProc">
<dt><pre><span class="Keyword">template</span> <a href="#vccAndC.t%2CBProc"><span class="Identifier">vccAndC</span></a><span class="Other">(</span><span class="Identifier">p</span><span class="Other">:</span> <a href="cgendata.html#BProc"><span class="Identifier">BProc</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/cgendata.nim#L179" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/cgendata.nim#L179" 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: 2025-09-27 04:02:29 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>