mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-01 13:09:14 +00:00
346 lines
28 KiB
HTML
346 lines
28 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>itemids</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">
|
|
<input type="checkbox" id="nav-toggle" hidden>
|
|
<label for="nav-toggle" id="nav-burger">☰</label>
|
|
<label for="nav-toggle" id="nav-overlay"></label>
|
|
<div class="container">
|
|
<h1 class="title">itemids</h1>
|
|
<div class="row">
|
|
<div class="three columns">
|
|
<div class="theme-select-wrapper">
|
|
<label for="theme-select">Theme: </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>
|
|
<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="#ItemId" title="ItemId = object">ItemId</a></li>
|
|
|
|
</ul>
|
|
</details>
|
|
</li>
|
|
<li>
|
|
<details open>
|
|
<summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
|
|
<ul class="simple simple-toc-section">
|
|
<li><a class="reference" href="#PackageModuleId" title="PackageModuleId = -3'i32">PackageModuleId</a></li>
|
|
|
|
</ul>
|
|
</details>
|
|
</li>
|
|
<li>
|
|
<details open>
|
|
<summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
|
|
<ul class="simple simple-toc-section">
|
|
<ul class="simple nested-toc-section">$
|
|
<li><a class="reference" href="#%24%2CItemId" title="`$`(x: ItemId): string">`$`(x: ItemId): string</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">==
|
|
<li><a class="reference" href="#%3D%3D%2CItemId%2CItemId" title="`==`(a, b: ItemId): bool">`==`(a, b: ItemId): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">backendItemId
|
|
<li><a class="reference" href="#backendItemId%2Cint32%2Cint32" title="backendItemId(module, item: int32): ItemId">backendItemId(module, item: int32): ItemId</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">derivedFieldId
|
|
<li><a class="reference" href="#derivedFieldId%2CItemId" title="derivedFieldId(source: ItemId): ItemId">derivedFieldId(source: ItemId): ItemId</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">hash
|
|
<li><a class="reference" href="#hash%2CItemId" title="hash(x: ItemId): Hash">hash(x: ItemId): Hash</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">isBackendMinted
|
|
<li><a class="reference" href="#isBackendMinted%2CItemId" title="isBackendMinted(x: ItemId): bool">isBackendMinted(x: ItemId): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">item
|
|
<li><a class="reference" href="#item%2CItemId" title="item(x: ItemId): int32">item(x: ItemId): int32</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">itemId
|
|
<li><a class="reference" href="#itemId%2Cint32%2Cint32" title="itemId(module, item: int32): ItemId">itemId(module, item: int32): ItemId</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">matchesDerivedFieldId
|
|
<li><a class="reference" href="#matchesDerivedFieldId%2CItemId%2CItemId" title="matchesDerivedFieldId(field, source: ItemId): bool">matchesDerivedFieldId(field, source: ItemId): bool</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">module
|
|
<li><a class="reference" href="#module%2CItemId" title="module(x: ItemId): int32">module(x: ItemId): int32</a></li>
|
|
|
|
</ul>
|
|
<ul class="simple nested-toc-section">toId
|
|
<li><a class="reference" href="#toId%2CItemId" title="toId(a: ItemId): int">toId(a: ItemId): int</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/itemids.nim#L1" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
<div id="tocRoot"></div>
|
|
|
|
<p class="module-desc"><p><tt class="docutils literal"><span class="pre"><span class="Identifier">ItemId</span></span></tt> is the identity of a symbol or type: a <tt class="docutils literal"><span class="pre"><span class="Punctuation">(</span><span class="Identifier">module</span><span class="Punctuation">,</span> <span class="Identifier">item</span><span class="Punctuation">)</span></span></tt> pair.</p>
|
|
<p>The fields are private on purpose: the module half reserves bit 30 as the "backend minted" marker, so all construction and inspection has to go through this module's API and the marker bit can never leak into module indexing or arithmetic.</p>
|
|
<p>Three id spaces coexist per module:</p>
|
|
<ul class="simple"><li>Semantic-phase and NIF-loader ids: <tt class="docutils literal"><span class="pre"><span class="Identifier">itemId</span><span class="Punctuation">(</span><span class="Identifier">module</span><span class="Punctuation">,</span> <span class="Identifier">item</span><span class="Punctuation">)</span></span></tt> with <tt class="docutils literal"><span class="pre"><span class="Identifier">item</span> <span class="Operator">></span> <span class="DecNumber">0</span></span></tt>.</li>
|
|
<li>Backend-minted ids (IC codegen, <tt class="docutils literal"><span class="pre"><span class="Identifier">nim</span> <span class="Identifier">nifc</span></span></tt>: transf labels and temps, lifted hooks): <tt class="docutils literal"><span class="pre"><span class="Identifier">backendItemId</span></span></tt> sets <tt class="docutils literal"><span class="pre"><span class="Identifier">BackendModuleBit</span></span></tt>, so these can never compare equal to a loader id even though both counters mint the same small <tt class="docutils literal"><span class="pre"><span class="Identifier">item</span></span></tt> range in one process. They never cross a process boundary and must never be written to a NIF file.</li>
|
|
<li>Derived env/tuple-field ids (<tt class="docutils literal"><span class="pre"><span class="Identifier">lowerings</span><span class="Operator">.</span><span class="Identifier">addField</span></span></tt>): the source local's id with <tt class="docutils literal"><span class="pre"><span class="Identifier">item</span></span></tt> negated. <tt class="docutils literal"><span class="pre"><span class="Identifier">derivedFieldId</span></span></tt> preserves the backend marker, keeping the derivation collision-free for both id spaces above.</li>
|
|
</ul>
|
|
</p>
|
|
<div class="section" id="7">
|
|
<h1><a class="toc-backref" href="#7">Types</a></h1>
|
|
<dl class="item">
|
|
<div id="ItemId">
|
|
<dt><pre><a href="#ItemId"><span class="Identifier">ItemId</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/itemids.nim#L41" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L41" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</dl>
|
|
</div>
|
|
<div class="section" id="10">
|
|
<h1><a class="toc-backref" href="#10">Consts</a></h1>
|
|
<dl class="item">
|
|
<div id="PackageModuleId">
|
|
<dt><pre><a href="#PackageModuleId"><span class="Identifier">PackageModuleId</span></a> <span class="Other">=</span> <span class="DecNumber">-3'i32</span></pre></dt>
|
|
<dd>
|
|
|
|
|
|
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/itemids.nim#L38" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L38" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</dl>
|
|
</div>
|
|
<div class="section" id="12">
|
|
<h1><a class="toc-backref" href="#12">Procs</a></h1>
|
|
<dl class="item">
|
|
<div id="$-procs-all">
|
|
<div id="$,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#%24%2CItemId"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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="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/itemids.nim#L86" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L86" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="==-procs-all">
|
|
<div id="==,ItemId,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#%3D%3D%2CItemId%2CItemId"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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/itemids.nim#L77" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L77" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="backendItemId-procs-all">
|
|
<div id="backendItemId,int32,int32">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#backendItemId%2Cint32%2Cint32"><span class="Identifier">backendItemId</span></a><span class="Other">(</span><span class="Identifier">module</span><span class="Other">,</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">int32</span><span class="Other">)</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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>
|
|
|
|
An id minted during IC codegen; distinct from every <tt class="docutils literal"><span class="pre"><span class="Identifier">itemId</span></span></tt> of the same module so that the loader's stub counter and the backend's counter cannot collide in id-keyed tables.
|
|
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/itemids.nim#L49" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L49" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="derivedFieldId-procs-all">
|
|
<div id="derivedFieldId,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#derivedFieldId%2CItemId"><span class="Identifier">derivedFieldId</span></a><span class="Other">(</span><span class="Identifier">source</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">)</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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>
|
|
|
|
The id of the env/tuple field that <tt class="docutils literal"><span class="pre"><span class="Identifier">lowerings</span><span class="Operator">.</span><span class="Identifier">addField</span></span></tt> derives for a captured local: <tt class="docutils literal"><span class="pre"><span class="Identifier">item</span></span></tt> negated, module bits (including the backend marker) preserved.
|
|
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/itemids.nim#L65" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L65" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="hash-procs-all">
|
|
<div id="hash,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#hash%2CItemId"><span class="Identifier">hash</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Hash</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/itemids.nim#L81" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L81" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="isBackendMinted-procs-all">
|
|
<div id="isBackendMinted,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#isBackendMinted%2CItemId"><span class="Identifier">isBackendMinted</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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/itemids.nim#L62" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L62" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="item-procs-all">
|
|
<div id="item,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#item%2CItemId"><span class="Identifier">item</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int32</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/itemids.nim#L60" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L60" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="itemId-procs-all">
|
|
<div id="itemId,int32,int32">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#itemId%2Cint32%2Cint32"><span class="Identifier">itemId</span></a><span class="Other">(</span><span class="Identifier">module</span><span class="Other">,</span> <span class="Identifier">item</span><span class="Other">:</span> <span class="Identifier">int32</span><span class="Other">)</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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/itemids.nim#L45" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L45" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="matchesDerivedFieldId-procs-all">
|
|
<div id="matchesDerivedFieldId,ItemId,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#matchesDerivedFieldId%2CItemId%2CItemId"><span class="Identifier">matchesDerivedFieldId</span></a><span class="Other">(</span><span class="Identifier">field</span><span class="Other">,</span> <span class="Identifier">source</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</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>
|
|
|
|
Does <tt class="docutils literal"><span class="pre"><span class="Identifier">field</span></span></tt> carry the id <tt class="docutils literal"><span class="pre"><span class="Identifier">derivedFieldId</span></span></tt> would derive for <tt class="docutils literal"><span class="pre"><span class="Identifier">source</span></span></tt>? <tt class="docutils literal"><span class="pre"><span class="Identifier">source</span></span></tt> may itself already be the derived field id.
|
|
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/itemids.nim#L71" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L71" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="module-procs-all">
|
|
<div id="module,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#module%2CItemId"><span class="Identifier">module</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int32</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/itemids.nim#L56" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L56" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</dd>
|
|
</div>
|
|
|
|
</div>
|
|
<div id="toId-procs-all">
|
|
<div id="toId,ItemId">
|
|
<dt><pre><span class="Keyword">proc</span> <a href="#toId%2CItemId"><span class="Identifier">toId</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">:</span> <a href="#ItemId"><span class="Identifier">ItemId</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</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>
|
|
|
|
Packs an ItemId into a single int. Uses the raw module bits so the backend marker keeps the two id spaces disjoint (bit 30 shifts to bit 54; like the module/item split itself this needs a 64-bit int).
|
|
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/itemids.nim#L94" class="link-seesrc" target="_blank">Source</a>
|
|
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/itemids.nim#L94" class="link-seesrc" target="_blank" >Edit</a>
|
|
|
|
</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-07-24 12:19:54 UTC</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
|
|
|
|
</body>
|
|
</html>
|