Files
Nim/compiler/vmdef.html
github-actions[bot] ef3d9e7b38 Deploy to GitHub pages
2025-12-28 15:55:52 +00:00

986 lines
77 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>vmdef</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">vmdef</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="#PCtx" title="PCtx = ref TCtx">PCtx</a></li>
<li><a class="reference" href="#PEvalContext" title="PEvalContext = PCtx">PEvalContext</a></li>
<li><a class="reference" href="#PProc" title="PProc = ref object
blocks*: seq[TBlock]
sym*: PSym
regInfo*: seq[tuple[inUse: bool, kind: TSlotKind]]">PProc</a></li>
<li><a class="reference" href="#Profiler" title="Profiler = object
tEnter*: float
tos*: PStackFrame">Profiler</a></li>
<li><a class="reference" href="#PStackFrame" title="PStackFrame = ref TStackFrame">PStackFrame</a></li>
<li><a class="reference" href="#TBlock" title="TBlock = object
label*: PSym
fixups*: seq[TPosition]">TBlock</a></li>
<li><a class="reference" href="#TCtx" title="TCtx = object of TPassContext
code*: seq[TInstr]
debug*: seq[TLineInfo]
globals*: PNode
constants*: PNode
contstantTab*: TNodeTable
types*: seq[PType]
currentExceptionA*, currentExceptionB*: PNode
exceptionInstr*: int
prc*: PProc
module*: PSym
callsite*: PNode
mode*: TEvalMode
features*: TSandboxFlags
traceActive*: bool
loopIterations*, callDepth*: int
comesFromHeuristic*: TLineInfo
callbacks*: seq[VmCallback]
callbackIndex*: Table[string, int]
errorFlag*: string
cache*: IdentCache
config*: ConfigRef
graph*: ModuleGraph
oldErrorCount*: int
profiler*: Profiler
templInstCounter*: ref int
vmstateDiff*: seq[(PSym, PNode)]
procToCodePos*: Table[int, VmProcInfo]
cannotEval*: bool
locals*: IntSet">TCtx</a></li>
<li><a class="reference" href="#TDest" title="TDest = range[-1 .. 65535'u64.int]">TDest</a></li>
<li><a class="reference" href="#TEvalMode" title="TEvalMode = enum
emRepl, ## evaluate because in REPL mode
emConst, ## evaluate for 'const' according to spec
emOptimize, ## evaluate for optimization purposes (same as
## emConst?)
emStaticExpr, ## evaluate for enforced compile time eval
## ('static' context)
emStaticStmt ## 'static' as an expression">TEvalMode</a></li>
<li><a class="reference" href="#TFullReg" title="TFullReg = object
case kind*: TRegisterKind
of rkNone:
nil
of rkInt:
intVal*: BiggestInt
of rkFloat:
floatVal*: BiggestFloat
of rkNode:
node*: PNode
of rkRegisterAddr:
regAddr*: ptr TFullReg
of rkNodeAddr:
nodeAddr*: ptr PNode">TFullReg</a></li>
<li><a class="reference" href="#TInstr" title="TInstr = distinct TInstrType">TInstr</a></li>
<li><a class="reference" href="#TInstrType" title="TInstrType = uint64">TInstrType</a></li>
<li><a class="reference" href="#TOpcode" title="TOpcode = enum
opcEof, opcRet, opcYldYoid, opcYldVal, opcAsgnInt, opcAsgnFloat, opcAsgnRef,
opcAsgnComplex, opcCastIntToFloat32, opcCastIntToFloat64, opcCastFloatToInt32,
opcCastFloatToInt64, opcCastPtrToInt, opcCastIntToPtr, opcFastAsgnComplex,
opcNodeToReg, opcLdArr, opcLdArrAddr, opcWrArr, opcLdObj, opcLdObjAddr,
opcWrObj, opcAddrReg, opcAddrNode, opcLdDeref, opcWrDeref, opcWrStrIdx,
opcLdStrIdx, opcLdStrIdxAddr, opcSlice, opcAddInt, opcAddImmInt, opcSubInt,
opcSubImmInt, opcLenSeq, opcLenStr, opcLenCstring, opcIncl, opcInclRange,
opcExcl, opcCard, opcMulInt, opcDivInt, opcModInt, opcAddFloat, opcSubFloat,
opcMulFloat, opcDivFloat, opcShrInt, opcShlInt, opcAshrInt, opcBitandInt,
opcBitorInt, opcBitxorInt, opcAddu, opcSubu, opcMulu, opcDivu, opcModu,
opcEqInt, opcLeInt, opcLtInt, opcEqFloat, opcLeFloat, opcLtFloat, opcLeu,
opcLtu, opcEqRef, opcEqNimNode, opcSameNodeType, opcXor, opcNot,
opcUnaryMinusInt, opcUnaryMinusFloat, opcBitnotInt, opcEqStr, opcEqCString,
opcLeStr, opcLtStr, opcEqSet, opcLeSet, opcLtSet, opcMulSet, opcPlusSet,
opcMinusSet, opcXorSet, opcConcatStr, opcContainsSet, opcRepr, opcSetLenStr,
opcSetLenSeq, opcIsNil, opcOf, opcIs, opcParseFloat, opcConv, opcCast,
opcQuit, opcInvalidField, opcNarrowS, opcNarrowU, opcNarrowR, opcSignExtend,
opcAddStrCh, opcAddStrStr, opcAddSeqElem, opcRangeChck, opcNAdd,
opcNAddMultiple, opcNKind, opcNSymKind, opcNIntVal, opcNFloatVal, opcNSymbol,
opcNIdent, opcNGetType, opcNStrVal, opcNSigHash, opcNGetSize, opcNSetIntVal,
opcNSetFloatVal, opcNSetSymbol, opcNSetIdent, opcNSetStrVal, opcNNewNimNode,
opcNCopyNimNode, opcNCopyNimTree, opcNDel, opcGenSym, opcNccValue, opcNccInc,
opcNcsAdd, opcNcsIncl, opcNcsLen, opcNcsAt, opcNctPut, opcNctLen, opcNctGet,
opcNctHasNext, opcNctNext, opcNodeId, opcSlurp, opcGorge, opcParseExprToAst,
opcParseStmtToAst, opcQueryErrorFlag, opcNError, opcNWarning, opcNHint,
opcNGetLineInfo, opcNCopyLineInfo, opcNSetLineInfoLine, opcNSetLineInfoColumn,
opcNSetLineInfoFile, opcEqIdent, opcStrToIdent, opcGetImpl, opcGetImplTransf,
opcEcho, opcIndCall, opcIndCallAsgn, opcRaise, opcNChild, opcNSetChild,
opcCallSite, opcNewStr, opcTJmp, opcFJmp, opcJmp, opcJmpBack, opcBranch,
opcTry, opcExcept, opcFinally, opcFinallyEnd, opcNew, opcNewSeq, opcLdNull,
opcLdNullReg, opcLdConst, opcAsgnConst, opcLdGlobal, opcLdGlobalAddr,
opcLdGlobalDerefFFI, opcLdGlobalAddrDerefFFI, opcLdImmInt, opcNBindSym,
opcNDynBindSym, opcSetType, opcTypeTrait, opcSymOwner, opcSymIsInstantiationOf">TOpcode</a></li>
<li><a class="reference" href="#TPosition" title="TPosition = distinct int">TPosition</a></li>
<li><a class="reference" href="#TRegister" title="TRegister = range[0 .. 65535'u64.int]">TRegister</a></li>
<li><a class="reference" href="#TRegisterKind" title="TRegisterKind = enum
rkNone, rkNode, rkInt, rkFloat, rkRegisterAddr, rkNodeAddr">TRegisterKind</a></li>
<li><a class="reference" href="#TSandboxFlag" title="TSandboxFlag = enum
allowCast, ## allow unsafe language feature: 'cast'
allowInfiniteLoops, ## allow endless loops
allowInfiniteRecursion ## allow infinite recursion">TSandboxFlag</a></li>
<li><a class="reference" href="#TSandboxFlags" title="TSandboxFlags = set[TSandboxFlag]">TSandboxFlags</a></li>
<li><a class="reference" href="#TSlotKind" title="TSlotKind = enum
slotEmpty, slotFixedVar, slotFixedLet, slotTempUnknown, slotTempInt,
slotTempFloat, slotTempStr, slotTempComplex, slotTempPerm">TSlotKind</a></li>
<li><a class="reference" href="#TStackFrame" title="TStackFrame {.acyclic.} = object
prc*: PSym
slots*: seq[TFullReg]
next*: PStackFrame
comesFrom*: int
safePoints*: seq[int]">TStackFrame</a></li>
<li><a class="reference" href="#VmArgs" title="VmArgs = object
ra*, rb*, rc*: Natural = 0
slots*: ptr UncheckedArray[TFullReg]
currentException*: PNode
currentLineInfo*: TLineInfo">VmArgs</a></li>
<li><a class="reference" href="#VmCallback" title="VmCallback = proc (args: VmArgs) {.closure.}">VmCallback</a></li>
<li><a class="reference" href="#VmProcInfo" title="VmProcInfo = object
pc*: int32
usedRegisters*: int32">VmProcInfo</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="#byteExcess" title="byteExcess = 128">byteExcess</a></li>
<li><a class="reference" href="#firstABxInstr" title="firstABxInstr = opcTJmp">firstABxInstr</a></li>
<li><a class="reference" href="#largeInstrs" title="largeInstrs = {opcConv, opcCast, opcNewSeq, opcOf}">largeInstrs</a></li>
<li><a class="reference" href="#nimNodeFlag" title="nimNodeFlag = 16">nimNodeFlag</a></li>
<li><a class="reference" href="#NoVmProcInfo" title="NoVmProcInfo = (pc: 0, usedRegisters: -1)">NoVmProcInfo</a></li>
<li><a class="reference" href="#regAMask" title="regAMask = 65535'u64">regAMask</a></li>
<li><a class="reference" href="#regAShift" title="regAShift = 8'u64">regAShift</a></li>
<li><a class="reference" href="#regBMask" title="regBMask = 65535'u64">regBMask</a></li>
<li><a class="reference" href="#regBShift" title="regBShift = 24'u64">regBShift</a></li>
<li><a class="reference" href="#regBxMask" title="regBxMask = 16777215'u64">regBxMask</a></li>
<li><a class="reference" href="#regBxMax" title="regBxMax = 8388607">regBxMax</a></li>
<li><a class="reference" href="#regBxMin" title="regBxMin = -8388607">regBxMin</a></li>
<li><a class="reference" href="#regBxShift" title="regBxShift = 24'u64">regBxShift</a></li>
<li><a class="reference" href="#regCMask" title="regCMask = 65535'u64">regCMask</a></li>
<li><a class="reference" href="#regCShift" title="regCShift = 40'u64">regCShift</a></li>
<li><a class="reference" href="#regOMask" title="regOMask = 255'u64">regOMask</a></li>
<li><a class="reference" href="#regOShift" title="regOShift = 0'u">regOShift</a></li>
<li><a class="reference" href="#relativeJumps" title="relativeJumps = {opcTJmp, opcFJmp, opcJmp, opcJmpBack}">relativeJumps</a></li>
<li><a class="reference" href="#slotSomeTemp" title="slotSomeTemp = slotTempUnknown">slotSomeTemp</a></li>
<li><a class="reference" href="#wordExcess" title="wordExcess = 8388608">wordExcess</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">newCtx
<li><a class="reference" href="#newCtx%2CPSym%2CIdentCache%2CModuleGraph%2CIdGenerator" title="newCtx(module: PSym; cache: IdentCache; g: ModuleGraph; idgen: IdGenerator): PCtx">newCtx(module: PSym; cache: IdentCache; g: ModuleGraph; idgen: IdGenerator): PCtx</a></li>
</ul>
<ul class="simple nested-toc-section">refresh
<li><a class="reference" href="#refresh%2CPCtx%2CPSym%2CIdGenerator" title="refresh(c: PCtx; module: PSym; idgen: IdGenerator)">refresh(c: PCtx; module: PSym; idgen: IdGenerator)</a></li>
</ul>
<ul class="simple nested-toc-section">registerCallback
<li><a class="reference" href="#registerCallback%2CPCtx%2Cstring%2CVmCallback" title="registerCallback(c: PCtx; name: string; callback: VmCallback): int">registerCallback(c: PCtx; name: string; callback: VmCallback): int</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">jmpDiff
<li><a class="reference" href="#jmpDiff.t%2CTInstr" title="jmpDiff(x: TInstr): int">jmpDiff(x: TInstr): int</a></li>
</ul>
<ul class="simple nested-toc-section">opcode
<li><a class="reference" href="#opcode.t%2CTInstr" title="opcode(x: TInstr): TOpcode">opcode(x: TInstr): TOpcode</a></li>
</ul>
<ul class="simple nested-toc-section">regA
<li><a class="reference" href="#regA.t%2CTInstr" title="regA(x: TInstr): TRegister">regA(x: TInstr): TRegister</a></li>
</ul>
<ul class="simple nested-toc-section">regB
<li><a class="reference" href="#regB.t%2CTInstr" title="regB(x: TInstr): TRegister">regB(x: TInstr): TRegister</a></li>
</ul>
<ul class="simple nested-toc-section">regBx
<li><a class="reference" href="#regBx.t%2CTInstr" title="regBx(x: TInstr): int">regBx(x: TInstr): int</a></li>
</ul>
<ul class="simple nested-toc-section">regC
<li><a class="reference" href="#regC.t%2CTInstr" title="regC(x: TInstr): TRegister">regC(x: TInstr): TRegister</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/vmdef.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
<div id="tocRoot"></div>
<p class="module-desc">This module contains the type definitions for the new evaluation engine. An instruction is 1-3 int32s in memory, it is a register based VM.</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="idents.html">idents</a>, <a class="reference external" href="options.html">options</a>, <a class="reference external" href="modulegraphs.html">modulegraphs</a>, <a class="reference external" href="lineinfos.html">lineinfos</a>
</dl>
</div>
<div class="section" id="7">
<h1><a class="toc-backref" href="#7">Types</a></h1>
<dl class="item">
<div id="PCtx">
<dt><pre><a href="vmdef.html#PCtx"><span class="Identifier">PCtx</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <a href="vmdef.html#TCtx"><span class="Identifier">TCtx</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L245" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L245" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="PEvalContext">
<dt><pre><a href="vmdef.html#PEvalContext"><span class="Identifier">PEvalContext</span></a> <span class="Other">=</span> <a href="vmdef.html#PCtx"><span class="Identifier">PCtx</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L299" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L299" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="PProc">
<dt><pre><a href="vmdef.html#PProc"><span class="Identifier">PProc</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <span class="Keyword">object</span>
<span class="Identifier">blocks</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="vmdef.html#TBlock"><span class="Identifier">TBlock</span></a><span class="Other">]</span>
<span class="Identifier">sym</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a>
<span class="Identifier">regInfo</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">inUse</span><span class="Other">:</span> <span class="Identifier">bool</span><span class="Other">,</span> <span class="Identifier">kind</span><span class="Other">:</span> <a href="vmdef.html#TSlotKind"><span class="Identifier">TSlotKind</span></a><span class="Other">]</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L233" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L233" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="Profiler">
<dt><pre><a href="vmdef.html#Profiler"><span class="Identifier">Profiler</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">tEnter</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">float</span>
<span class="Identifier">tos</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#PStackFrame"><span class="Identifier">PStackFrame</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L293" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L293" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="PStackFrame">
<dt><pre><a href="vmdef.html#PStackFrame"><span class="Identifier">PStackFrame</span></a> <span class="Other">=</span> <span class="Keyword">ref</span> <a href="vmdef.html#TStackFrame"><span class="Identifier">TStackFrame</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L283" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L283" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TBlock">
<dt><pre><a href="vmdef.html#TBlock"><span class="Identifier">TBlock</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">label</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a>
<span class="Identifier">fixups</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="vmdef.html#TPosition"><span class="Identifier">TPosition</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L188" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L188" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TCtx">
<dt><pre><a href="vmdef.html#TCtx"><span class="Identifier">TCtx</span></a> <span class="Other">=</span> <span class="Keyword">object</span> <span class="Keyword">of</span> <a href="modulegraphs.html#TPassContext"><span class="Identifier">TPassContext</span></a>
<span class="Identifier">code</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">]</span>
<span class="Identifier">debug</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="lineinfos.html#TLineInfo"><span class="Identifier">TLineInfo</span></a><span class="Other">]</span>
<span class="Identifier">globals</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Identifier">constants</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Identifier">contstantTab</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#TNodeTable"><span class="Identifier">TNodeTable</span></a>
<span class="Identifier">types</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="astdef.html#PType"><span class="Identifier">PType</span></a><span class="Other">]</span>
<span class="Identifier">currentExceptionA</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">currentExceptionB</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Identifier">exceptionInstr</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">prc</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#PProc"><span class="Identifier">PProc</span></a>
<span class="Identifier">module</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a>
<span class="Identifier">callsite</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Identifier">mode</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#TEvalMode"><span class="Identifier">TEvalMode</span></a>
<span class="Identifier">features</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#TSandboxFlags"><span class="Identifier">TSandboxFlags</span></a>
<span class="Identifier">traceActive</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
<span class="Identifier">loopIterations</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">callDepth</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">comesFromHeuristic</span><span class="Operator">*</span><span class="Other">:</span> <a href="lineinfos.html#TLineInfo"><span class="Identifier">TLineInfo</span></a>
<span class="Identifier">callbacks</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="vmdef.html#VmCallback"><span class="Identifier">VmCallback</span></a><span class="Other">]</span>
<span class="Identifier">callbackIndex</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">,</span> <span class="Identifier">int</span><span class="Other">]</span>
<span class="Identifier">errorFlag</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span>
<span class="Identifier">cache</span><span class="Operator">*</span><span class="Other">:</span> <a href="idents.html#IdentCache"><span class="Identifier">IdentCache</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">oldErrorCount</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">profiler</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#Profiler"><span class="Identifier">Profiler</span></a>
<span class="Identifier">templInstCounter</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">ref</span> <span class="Identifier">int</span>
<span class="Identifier">vmstateDiff</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Other">(</span><a href="astdef.html#PSym"><span class="Identifier">PSym</span></a><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="Identifier">procToCodePos</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Table</span><span class="Other">[</span><span class="Identifier">int</span><span class="Other">,</span> <a href="vmdef.html#VmProcInfo"><span class="Identifier">VmProcInfo</span></a><span class="Other">]</span>
<span class="Identifier">cannotEval</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
<span class="Identifier">locals</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">IntSet</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L251" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L251" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TDest">
<dt><pre><a href="vmdef.html#TDest"><span class="Identifier">TDest</span></a> <span class="Other">=</span> <span class="Identifier">range</span><span class="Other">[</span><span class="DecNumber">-1</span> <span class="Operator">..</span> <span class="DecNumber">65535'u64</span><span class="Other">.</span><span class="Identifier">int</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L49" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L49" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TEvalMode">
<dt><pre><a href="vmdef.html#TEvalMode"><span class="Identifier">TEvalMode</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">emRepl</span><span class="Other">,</span> <span class="Comment">## evaluate because in REPL mode</span>
<span class="Identifier">emConst</span><span class="Other">,</span> <span class="Comment">## evaluate for 'const' according to spec</span>
<span class="Identifier">emOptimize</span><span class="Other">,</span> <span class="Comment">## evaluate for optimization purposes (same as</span>
<span class="Comment">## emConst?)</span>
<span class="Identifier">emStaticExpr</span><span class="Other">,</span> <span class="Comment">## evaluate for enforced compile time eval</span>
<span class="Comment">## ('static' context)</span>
<span class="Identifier">emStaticStmt</span> <span class="Comment">## 'static' as an expression</span></pre></dt>
<dd>
reason for evaluation
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L192" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L192" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TFullReg">
<dt><pre><a href="vmdef.html#TFullReg"><span class="Identifier">TFullReg</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Keyword">case</span> <span class="Identifier">kind</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#TRegisterKind"><span class="Identifier">TRegisterKind</span></a>
<span class="Keyword">of</span> <span class="Identifier">rkNone</span><span class="Other">:</span>
<span class="Keyword">nil</span>
<span class="Keyword">of</span> <span class="Identifier">rkInt</span><span class="Other">:</span>
<span class="Identifier">intVal</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">BiggestInt</span>
<span class="Keyword">of</span> <span class="Identifier">rkFloat</span><span class="Other">:</span>
<span class="Identifier">floatVal</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">BiggestFloat</span>
<span class="Keyword">of</span> <span class="Identifier">rkNode</span><span class="Other">:</span>
<span class="Identifier">node</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Keyword">of</span> <span class="Identifier">rkRegisterAddr</span><span class="Other">:</span>
<span class="Identifier">regAddr</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="vmdef.html#TFullReg"><span class="Identifier">TFullReg</span></a>
<span class="Keyword">of</span> <span class="Identifier">rkNodeAddr</span><span class="Other">:</span>
<span class="Identifier">nodeAddr</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">ptr</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L223" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L223" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TInstr">
<dt><pre><a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <a href="vmdef.html#TInstrType"><span class="Identifier">TInstrType</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L50" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L50" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TInstrType">
<dt><pre><a href="vmdef.html#TInstrType"><span class="Identifier">TInstrType</span></a> <span class="Other">=</span> <span class="Identifier">uint64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L17" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L17" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TOpcode">
<dt><pre><a href="vmdef.html#TOpcode"><span class="Identifier">TOpcode</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">opcEof</span><span class="Other">,</span> <span class="Identifier">opcRet</span><span class="Other">,</span> <span class="Identifier">opcYldYoid</span><span class="Other">,</span> <span class="Identifier">opcYldVal</span><span class="Other">,</span> <span class="Identifier">opcAsgnInt</span><span class="Other">,</span> <span class="Identifier">opcAsgnFloat</span><span class="Other">,</span> <span class="Identifier">opcAsgnRef</span><span class="Other">,</span>
<span class="Identifier">opcAsgnComplex</span><span class="Other">,</span> <span class="Identifier">opcCastIntToFloat32</span><span class="Other">,</span> <span class="Identifier">opcCastIntToFloat64</span><span class="Other">,</span> <span class="Identifier">opcCastFloatToInt32</span><span class="Other">,</span>
<span class="Identifier">opcCastFloatToInt64</span><span class="Other">,</span> <span class="Identifier">opcCastPtrToInt</span><span class="Other">,</span> <span class="Identifier">opcCastIntToPtr</span><span class="Other">,</span> <span class="Identifier">opcFastAsgnComplex</span><span class="Other">,</span>
<span class="Identifier">opcNodeToReg</span><span class="Other">,</span> <span class="Identifier">opcLdArr</span><span class="Other">,</span> <span class="Identifier">opcLdArrAddr</span><span class="Other">,</span> <span class="Identifier">opcWrArr</span><span class="Other">,</span> <span class="Identifier">opcLdObj</span><span class="Other">,</span> <span class="Identifier">opcLdObjAddr</span><span class="Other">,</span>
<span class="Identifier">opcWrObj</span><span class="Other">,</span> <span class="Identifier">opcAddrReg</span><span class="Other">,</span> <span class="Identifier">opcAddrNode</span><span class="Other">,</span> <span class="Identifier">opcLdDeref</span><span class="Other">,</span> <span class="Identifier">opcWrDeref</span><span class="Other">,</span> <span class="Identifier">opcWrStrIdx</span><span class="Other">,</span>
<span class="Identifier">opcLdStrIdx</span><span class="Other">,</span> <span class="Identifier">opcLdStrIdxAddr</span><span class="Other">,</span> <span class="Identifier">opcSlice</span><span class="Other">,</span> <span class="Identifier">opcAddInt</span><span class="Other">,</span> <span class="Identifier">opcAddImmInt</span><span class="Other">,</span> <span class="Identifier">opcSubInt</span><span class="Other">,</span>
<span class="Identifier">opcSubImmInt</span><span class="Other">,</span> <span class="Identifier">opcLenSeq</span><span class="Other">,</span> <span class="Identifier">opcLenStr</span><span class="Other">,</span> <span class="Identifier">opcLenCstring</span><span class="Other">,</span> <span class="Identifier">opcIncl</span><span class="Other">,</span> <span class="Identifier">opcInclRange</span><span class="Other">,</span>
<span class="Identifier">opcExcl</span><span class="Other">,</span> <span class="Identifier">opcCard</span><span class="Other">,</span> <span class="Identifier">opcMulInt</span><span class="Other">,</span> <span class="Identifier">opcDivInt</span><span class="Other">,</span> <span class="Identifier">opcModInt</span><span class="Other">,</span> <span class="Identifier">opcAddFloat</span><span class="Other">,</span> <span class="Identifier">opcSubFloat</span><span class="Other">,</span>
<span class="Identifier">opcMulFloat</span><span class="Other">,</span> <span class="Identifier">opcDivFloat</span><span class="Other">,</span> <span class="Identifier">opcShrInt</span><span class="Other">,</span> <span class="Identifier">opcShlInt</span><span class="Other">,</span> <span class="Identifier">opcAshrInt</span><span class="Other">,</span> <span class="Identifier">opcBitandInt</span><span class="Other">,</span>
<span class="Identifier">opcBitorInt</span><span class="Other">,</span> <span class="Identifier">opcBitxorInt</span><span class="Other">,</span> <span class="Identifier">opcAddu</span><span class="Other">,</span> <span class="Identifier">opcSubu</span><span class="Other">,</span> <span class="Identifier">opcMulu</span><span class="Other">,</span> <span class="Identifier">opcDivu</span><span class="Other">,</span> <span class="Identifier">opcModu</span><span class="Other">,</span>
<span class="Identifier">opcEqInt</span><span class="Other">,</span> <span class="Identifier">opcLeInt</span><span class="Other">,</span> <span class="Identifier">opcLtInt</span><span class="Other">,</span> <span class="Identifier">opcEqFloat</span><span class="Other">,</span> <span class="Identifier">opcLeFloat</span><span class="Other">,</span> <span class="Identifier">opcLtFloat</span><span class="Other">,</span> <span class="Identifier">opcLeu</span><span class="Other">,</span>
<span class="Identifier">opcLtu</span><span class="Other">,</span> <span class="Identifier">opcEqRef</span><span class="Other">,</span> <span class="Identifier">opcEqNimNode</span><span class="Other">,</span> <span class="Identifier">opcSameNodeType</span><span class="Other">,</span> <span class="Identifier">opcXor</span><span class="Other">,</span> <span class="Identifier">opcNot</span><span class="Other">,</span>
<span class="Identifier">opcUnaryMinusInt</span><span class="Other">,</span> <span class="Identifier">opcUnaryMinusFloat</span><span class="Other">,</span> <span class="Identifier">opcBitnotInt</span><span class="Other">,</span> <span class="Identifier">opcEqStr</span><span class="Other">,</span> <span class="Identifier">opcEqCString</span><span class="Other">,</span>
<span class="Identifier">opcLeStr</span><span class="Other">,</span> <span class="Identifier">opcLtStr</span><span class="Other">,</span> <span class="Identifier">opcEqSet</span><span class="Other">,</span> <span class="Identifier">opcLeSet</span><span class="Other">,</span> <span class="Identifier">opcLtSet</span><span class="Other">,</span> <span class="Identifier">opcMulSet</span><span class="Other">,</span> <span class="Identifier">opcPlusSet</span><span class="Other">,</span>
<span class="Identifier">opcMinusSet</span><span class="Other">,</span> <span class="Identifier">opcXorSet</span><span class="Other">,</span> <span class="Identifier">opcConcatStr</span><span class="Other">,</span> <span class="Identifier">opcContainsSet</span><span class="Other">,</span> <span class="Identifier">opcRepr</span><span class="Other">,</span> <span class="Identifier">opcSetLenStr</span><span class="Other">,</span>
<span class="Identifier">opcSetLenSeq</span><span class="Other">,</span> <span class="Identifier">opcIsNil</span><span class="Other">,</span> <span class="Identifier">opcOf</span><span class="Other">,</span> <span class="Identifier">opcIs</span><span class="Other">,</span> <span class="Identifier">opcParseFloat</span><span class="Other">,</span> <span class="Identifier">opcConv</span><span class="Other">,</span> <span class="Identifier">opcCast</span><span class="Other">,</span>
<span class="Identifier">opcQuit</span><span class="Other">,</span> <span class="Identifier">opcInvalidField</span><span class="Other">,</span> <span class="Identifier">opcNarrowS</span><span class="Other">,</span> <span class="Identifier">opcNarrowU</span><span class="Other">,</span> <span class="Identifier">opcNarrowR</span><span class="Other">,</span> <span class="Identifier">opcSignExtend</span><span class="Other">,</span>
<span class="Identifier">opcAddStrCh</span><span class="Other">,</span> <span class="Identifier">opcAddStrStr</span><span class="Other">,</span> <span class="Identifier">opcAddSeqElem</span><span class="Other">,</span> <span class="Identifier">opcRangeChck</span><span class="Other">,</span> <span class="Identifier">opcNAdd</span><span class="Other">,</span>
<span class="Identifier">opcNAddMultiple</span><span class="Other">,</span> <span class="Identifier">opcNKind</span><span class="Other">,</span> <span class="Identifier">opcNSymKind</span><span class="Other">,</span> <span class="Identifier">opcNIntVal</span><span class="Other">,</span> <span class="Identifier">opcNFloatVal</span><span class="Other">,</span> <span class="Identifier">opcNSymbol</span><span class="Other">,</span>
<span class="Identifier">opcNIdent</span><span class="Other">,</span> <span class="Identifier">opcNGetType</span><span class="Other">,</span> <span class="Identifier">opcNStrVal</span><span class="Other">,</span> <span class="Identifier">opcNSigHash</span><span class="Other">,</span> <span class="Identifier">opcNGetSize</span><span class="Other">,</span> <span class="Identifier">opcNSetIntVal</span><span class="Other">,</span>
<span class="Identifier">opcNSetFloatVal</span><span class="Other">,</span> <span class="Identifier">opcNSetSymbol</span><span class="Other">,</span> <span class="Identifier">opcNSetIdent</span><span class="Other">,</span> <span class="Identifier">opcNSetStrVal</span><span class="Other">,</span> <span class="Identifier">opcNNewNimNode</span><span class="Other">,</span>
<span class="Identifier">opcNCopyNimNode</span><span class="Other">,</span> <span class="Identifier">opcNCopyNimTree</span><span class="Other">,</span> <span class="Identifier">opcNDel</span><span class="Other">,</span> <span class="Identifier">opcGenSym</span><span class="Other">,</span> <span class="Identifier">opcNccValue</span><span class="Other">,</span> <span class="Identifier">opcNccInc</span><span class="Other">,</span>
<span class="Identifier">opcNcsAdd</span><span class="Other">,</span> <span class="Identifier">opcNcsIncl</span><span class="Other">,</span> <span class="Identifier">opcNcsLen</span><span class="Other">,</span> <span class="Identifier">opcNcsAt</span><span class="Other">,</span> <span class="Identifier">opcNctPut</span><span class="Other">,</span> <span class="Identifier">opcNctLen</span><span class="Other">,</span> <span class="Identifier">opcNctGet</span><span class="Other">,</span>
<span class="Identifier">opcNctHasNext</span><span class="Other">,</span> <span class="Identifier">opcNctNext</span><span class="Other">,</span> <span class="Identifier">opcNodeId</span><span class="Other">,</span> <span class="Identifier">opcSlurp</span><span class="Other">,</span> <span class="Identifier">opcGorge</span><span class="Other">,</span> <span class="Identifier">opcParseExprToAst</span><span class="Other">,</span>
<span class="Identifier">opcParseStmtToAst</span><span class="Other">,</span> <span class="Identifier">opcQueryErrorFlag</span><span class="Other">,</span> <span class="Identifier">opcNError</span><span class="Other">,</span> <span class="Identifier">opcNWarning</span><span class="Other">,</span> <span class="Identifier">opcNHint</span><span class="Other">,</span>
<span class="Identifier">opcNGetLineInfo</span><span class="Other">,</span> <span class="Identifier">opcNCopyLineInfo</span><span class="Other">,</span> <span class="Identifier">opcNSetLineInfoLine</span><span class="Other">,</span> <span class="Identifier">opcNSetLineInfoColumn</span><span class="Other">,</span>
<span class="Identifier">opcNSetLineInfoFile</span><span class="Other">,</span> <span class="Identifier">opcEqIdent</span><span class="Other">,</span> <span class="Identifier">opcStrToIdent</span><span class="Other">,</span> <span class="Identifier">opcGetImpl</span><span class="Other">,</span> <span class="Identifier">opcGetImplTransf</span><span class="Other">,</span>
<span class="Identifier">opcEcho</span><span class="Other">,</span> <span class="Identifier">opcIndCall</span><span class="Other">,</span> <span class="Identifier">opcIndCallAsgn</span><span class="Other">,</span> <span class="Identifier">opcRaise</span><span class="Other">,</span> <span class="Identifier">opcNChild</span><span class="Other">,</span> <span class="Identifier">opcNSetChild</span><span class="Other">,</span>
<span class="Identifier">opcCallSite</span><span class="Other">,</span> <span class="Identifier">opcNewStr</span><span class="Other">,</span> <span class="Identifier">opcTJmp</span><span class="Other">,</span> <span class="Identifier">opcFJmp</span><span class="Other">,</span> <span class="Identifier">opcJmp</span><span class="Other">,</span> <span class="Identifier">opcJmpBack</span><span class="Other">,</span> <span class="Identifier">opcBranch</span><span class="Other">,</span>
<span class="Identifier">opcTry</span><span class="Other">,</span> <span class="Identifier">opcExcept</span><span class="Other">,</span> <span class="Identifier">opcFinally</span><span class="Other">,</span> <span class="Identifier">opcFinallyEnd</span><span class="Other">,</span> <span class="Identifier">opcNew</span><span class="Other">,</span> <span class="Identifier">opcNewSeq</span><span class="Other">,</span> <span class="Identifier">opcLdNull</span><span class="Other">,</span>
<span class="Identifier">opcLdNullReg</span><span class="Other">,</span> <span class="Identifier">opcLdConst</span><span class="Other">,</span> <span class="Identifier">opcAsgnConst</span><span class="Other">,</span> <span class="Identifier">opcLdGlobal</span><span class="Other">,</span> <span class="Identifier">opcLdGlobalAddr</span><span class="Other">,</span>
<span class="Identifier">opcLdGlobalDerefFFI</span><span class="Other">,</span> <span class="Identifier">opcLdGlobalAddrDerefFFI</span><span class="Other">,</span> <span class="Identifier">opcLdImmInt</span><span class="Other">,</span> <span class="Identifier">opcNBindSym</span><span class="Other">,</span>
<span class="Identifier">opcNDynBindSym</span><span class="Other">,</span> <span class="Identifier">opcSetType</span><span class="Other">,</span> <span class="Identifier">opcTypeTrait</span><span class="Other">,</span> <span class="Identifier">opcSymOwner</span><span class="Other">,</span> <span class="Identifier">opcSymIsInstantiationOf</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L52" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L52" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TPosition">
<dt><pre><a href="vmdef.html#TPosition"><span class="Identifier">TPosition</span></a> <span class="Other">=</span> <span class="Keyword">distinct</span> <span class="Identifier">int</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L297" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L297" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TRegister">
<dt><pre><a href="vmdef.html#TRegister"><span class="Identifier">TRegister</span></a> <span class="Other">=</span> <span class="Identifier">range</span><span class="Other">[</span><span class="DecNumber">0</span> <span class="Operator">..</span> <span class="DecNumber">65535'u64</span><span class="Other">.</span><span class="Identifier">int</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L48" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L48" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TRegisterKind">
<dt><pre><a href="vmdef.html#TRegisterKind"><span class="Identifier">TRegisterKind</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">rkNone</span><span class="Other">,</span> <span class="Identifier">rkNode</span><span class="Other">,</span> <span class="Identifier">rkInt</span><span class="Other">,</span> <span class="Identifier">rkFloat</span><span class="Other">,</span> <span class="Identifier">rkRegisterAddr</span><span class="Other">,</span> <span class="Identifier">rkNodeAddr</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L221" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L221" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TSandboxFlag">
<dt><pre><a href="vmdef.html#TSandboxFlag"><span class="Identifier">TSandboxFlag</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">allowCast</span><span class="Other">,</span> <span class="Comment">## allow unsafe language feature: 'cast'</span>
<span class="Identifier">allowInfiniteLoops</span><span class="Other">,</span> <span class="Comment">## allow endless loops</span>
<span class="Identifier">allowInfiniteRecursion</span> <span class="Comment">## allow infinite recursion</span></pre></dt>
<dd>
what the evaluation engine should allow
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L201" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L201" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TSandboxFlags">
<dt><pre><a href="vmdef.html#TSandboxFlags"><span class="Identifier">TSandboxFlags</span></a> <span class="Other">=</span> <span class="Identifier">set</span><span class="Other">[</span><a href="vmdef.html#TSandboxFlag"><span class="Identifier">TSandboxFlag</span></a><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L205" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L205" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TSlotKind">
<dt><pre><a href="vmdef.html#TSlotKind"><span class="Identifier">TSlotKind</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
<span class="Identifier">slotEmpty</span><span class="Other">,</span> <span class="Identifier">slotFixedVar</span><span class="Other">,</span> <span class="Identifier">slotFixedLet</span><span class="Other">,</span> <span class="Identifier">slotTempUnknown</span><span class="Other">,</span> <span class="Identifier">slotTempInt</span><span class="Other">,</span>
<span class="Identifier">slotTempFloat</span><span class="Other">,</span> <span class="Identifier">slotTempStr</span><span class="Other">,</span> <span class="Identifier">slotTempComplex</span><span class="Other">,</span> <span class="Identifier">slotTempPerm</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L207" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L207" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="TStackFrame">
<dt><pre><a href="vmdef.html#TStackFrame"><span class="Identifier">TStackFrame</span></a> {.<span class="Identifier">acyclic</span>.} <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">prc</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a>
<span class="Identifier">slots</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><a href="vmdef.html#TFullReg"><span class="Identifier">TFullReg</span></a><span class="Other">]</span>
<span class="Identifier">next</span><span class="Operator">*</span><span class="Other">:</span> <a href="vmdef.html#PStackFrame"><span class="Identifier">PStackFrame</span></a>
<span class="Identifier">comesFrom</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
<span class="Identifier">safePoints</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">int</span><span class="Other">]</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L284" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L284" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="VmArgs">
<dt><pre><a href="vmdef.html#VmArgs"><span class="Identifier">VmArgs</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">ra</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">rb</span><span class="Operator">*</span><span class="Other">,</span> <span class="Identifier">rc</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">Natural</span> <span class="Other">=</span> <span class="DecNumber">0</span>
<span class="Identifier">slots</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">ptr</span> <span class="Identifier">UncheckedArray</span><span class="Other">[</span><a href="vmdef.html#TFullReg"><span class="Identifier">TFullReg</span></a><span class="Other">]</span>
<span class="Identifier">currentException</span><span class="Operator">*</span><span class="Other">:</span> <a href="astdef.html#PNode"><span class="Identifier">PNode</span></a>
<span class="Identifier">currentLineInfo</span><span class="Operator">*</span><span class="Other">:</span> <a href="lineinfos.html#TLineInfo"><span class="Identifier">TLineInfo</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L238" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L238" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="VmCallback">
<dt><pre><a href="vmdef.html#VmCallback"><span class="Identifier">VmCallback</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">args</span><span class="Other">:</span> <a href="vmdef.html#VmArgs"><span class="Identifier">VmArgs</span></a><span class="Other">)</span> {.<span class="Identifier">closure</span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L243" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L243" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="VmProcInfo">
<dt><pre><a href="vmdef.html#VmProcInfo"><span class="Identifier">VmProcInfo</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
<span class="Identifier">pc</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int32</span>
<span class="Identifier">usedRegisters</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int32</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L247" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L247" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</dl>
</div>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<div id="byteExcess">
<dt><pre><a href="vmdef.html#byteExcess"><span class="Identifier">byteExcess</span></a> <span class="Other">=</span> <span class="DecNumber">128</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L26" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L26" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="firstABxInstr">
<dt><pre><a href="vmdef.html#firstABxInstr"><span class="Identifier">firstABxInstr</span></a> <span class="Other">=</span> <span class="DecNumber">opcTJmp</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L334" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L334" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="largeInstrs">
<dt><pre><a href="vmdef.html#largeInstrs"><span class="Identifier">largeInstrs</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">opcConv</span><span class="Other">,</span> <span class="DecNumber">opcCast</span><span class="Other">,</span> <span class="DecNumber">opcNewSeq</span><span class="Other">,</span> <span class="DecNumber">opcOf</span><span class="Other">}</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L335" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L335" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="nimNodeFlag">
<dt><pre><a href="vmdef.html#nimNodeFlag"><span class="Identifier">nimNodeFlag</span></a> <span class="Other">=</span> <span class="DecNumber">16</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L342" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L342" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="NoVmProcInfo">
<dt><pre><a href="vmdef.html#NoVmProcInfo"><span class="Identifier">NoVmProcInfo</span></a> <span class="Other">=</span> <span class="Other">(</span><span class="Identifier">pc</span><span class="Other">:</span> <span class="DecNumber">0</span><span class="Other">,</span> <span class="Identifier">usedRegisters</span><span class="Other">:</span> <span class="DecNumber">-1</span><span class="Other">)</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L302" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L302" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regAMask">
<dt><pre><a href="vmdef.html#regAMask"><span class="Identifier">regAMask</span></a> <span class="Other">=</span> <span class="DecNumber">65535'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L38" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L38" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regAShift">
<dt><pre><a href="vmdef.html#regAShift"><span class="Identifier">regAShift</span></a> <span class="Other">=</span> <span class="DecNumber">8'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L32" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L32" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regBMask">
<dt><pre><a href="vmdef.html#regBMask"><span class="Identifier">regBMask</span></a> <span class="Other">=</span> <span class="DecNumber">65535'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L39" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L39" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regBShift">
<dt><pre><a href="vmdef.html#regBShift"><span class="Identifier">regBShift</span></a> <span class="Other">=</span> <span class="DecNumber">24'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L33" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L33" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regBxMask">
<dt><pre><a href="vmdef.html#regBxMask"><span class="Identifier">regBxMask</span></a> <span class="Other">=</span> <span class="DecNumber">16777215'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L41" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L41" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regBxMax">
<dt><pre><a href="vmdef.html#regBxMax"><span class="Identifier">regBxMax</span></a> <span class="Other">=</span> <span class="DecNumber">8388607</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L45" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L45" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regBxMin">
<dt><pre><a href="vmdef.html#regBxMin"><span class="Identifier">regBxMin</span></a> <span class="Other">=</span> <span class="DecNumber">-8388607</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L44" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L44" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regBxShift">
<dt><pre><a href="vmdef.html#regBxShift"><span class="Identifier">regBxShift</span></a> <span class="Other">=</span> <span class="DecNumber">24'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L35" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L35" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regCMask">
<dt><pre><a href="vmdef.html#regCMask"><span class="Identifier">regCMask</span></a> <span class="Other">=</span> <span class="DecNumber">65535'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L40" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L40" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regCShift">
<dt><pre><a href="vmdef.html#regCShift"><span class="Identifier">regCShift</span></a> <span class="Other">=</span> <span class="DecNumber">40'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L34" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L34" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regOMask">
<dt><pre><a href="vmdef.html#regOMask"><span class="Identifier">regOMask</span></a> <span class="Other">=</span> <span class="DecNumber">255'u64</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L37" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L37" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="regOShift">
<dt><pre><a href="vmdef.html#regOShift"><span class="Identifier">regOShift</span></a> <span class="Other">=</span> <span class="DecNumber">0'u</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L31" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L31" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="relativeJumps">
<dt><pre><a href="vmdef.html#relativeJumps"><span class="Identifier">relativeJumps</span></a> <span class="Other">=</span> <span class="Other">{</span><span class="DecNumber">opcTJmp</span><span class="Other">,</span> <span class="DecNumber">opcFJmp</span><span class="Other">,</span> <span class="DecNumber">opcJmp</span><span class="Other">,</span> <span class="DecNumber">opcJmpBack</span><span class="Other">}</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L339" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L339" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="slotSomeTemp">
<dt><pre><a href="vmdef.html#slotSomeTemp"><span class="Identifier">slotSomeTemp</span></a> <span class="Other">=</span> <span class="DecNumber">slotTempUnknown</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L338" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L338" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
<div id="wordExcess">
<dt><pre><a href="vmdef.html#wordExcess"><span class="Identifier">wordExcess</span></a> <span class="Other">=</span> <span class="DecNumber">8388608</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L43" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L43" 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="newCtx-procs-all">
<div id="newCtx,PSym,IdentCache,ModuleGraph,IdGenerator">
<dt><pre><span class="Keyword">proc</span> <a href="#newCtx%2CPSym%2CIdentCache%2CModuleGraph%2CIdGenerator"><span class="Identifier">newCtx</span></a><span class="Other">(</span><span class="Identifier">module</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</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="Identifier">g</span><span class="Other">:</span> <a href="modulegraphs.html#ModuleGraph"><span class="Identifier">ModuleGraph</span></a><span class="Other">;</span> <span class="Identifier">idgen</span><span class="Other">:</span> <a href="ast.html#IdGenerator"><span class="Identifier">IdGenerator</span></a><span class="Other">)</span><span class="Other">:</span> <a href="vmdef.html#PCtx"><span class="Identifier">PCtx</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/vmdef.nim#L304" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L304" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="refresh-procs-all">
<div id="refresh,PCtx,PSym,IdGenerator">
<dt><pre><span class="Keyword">proc</span> <a href="#refresh%2CPCtx%2CPSym%2CIdGenerator"><span class="Identifier">refresh</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <a href="vmdef.html#PCtx"><span class="Identifier">PCtx</span></a><span class="Other">;</span> <span class="Identifier">module</span><span class="Other">:</span> <a href="astdef.html#PSym"><span class="Identifier">PSym</span></a><span class="Other">;</span> <span class="Identifier">idgen</span><span class="Other">:</span> <a href="ast.html#IdGenerator"><span class="Identifier">IdGenerator</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
<span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L313" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L313" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="registerCallback-procs-all">
<div id="registerCallback,PCtx,string,VmCallback">
<dt><pre><span class="Keyword">proc</span> <a href="#registerCallback%2CPCtx%2Cstring%2CVmCallback"><span class="Identifier">registerCallback</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <a href="vmdef.html#PCtx"><span class="Identifier">PCtx</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">callback</span><span class="Other">:</span> <a href="vmdef.html#VmCallback"><span class="Identifier">VmCallback</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.
<span class="Identifier">discardable</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/vmdef.nim#L328" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L328" 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="jmpDiff-templates-all">
<div id="jmpDiff.t,TInstr">
<dt><pre><span class="Keyword">template</span> <a href="#jmpDiff.t%2CTInstr"><span class="Identifier">jmpDiff</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L350" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L350" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="opcode-templates-all">
<div id="opcode.t,TInstr">
<dt><pre><span class="Keyword">template</span> <a href="#opcode.t%2CTInstr"><span class="Identifier">opcode</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">)</span><span class="Other">:</span> <a href="vmdef.html#TOpcode"><span class="Identifier">TOpcode</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L344" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L344" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="regA-templates-all">
<div id="regA.t,TInstr">
<dt><pre><span class="Keyword">template</span> <a href="#regA.t%2CTInstr"><span class="Identifier">regA</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">)</span><span class="Other">:</span> <a href="vmdef.html#TRegister"><span class="Identifier">TRegister</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L345" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L345" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="regB-templates-all">
<div id="regB.t,TInstr">
<dt><pre><span class="Keyword">template</span> <a href="#regB.t%2CTInstr"><span class="Identifier">regB</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">)</span><span class="Other">:</span> <a href="vmdef.html#TRegister"><span class="Identifier">TRegister</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L346" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L346" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="regBx-templates-all">
<div id="regBx.t,TInstr">
<dt><pre><span class="Keyword">template</span> <a href="#regBx.t%2CTInstr"><span class="Identifier">regBx</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L348" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L348" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
</dd>
</div>
</div>
<div id="regC-templates-all">
<div id="regC.t,TInstr">
<dt><pre><span class="Keyword">template</span> <a href="#regC.t%2CTInstr"><span class="Identifier">regC</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="vmdef.html#TInstr"><span class="Identifier">TInstr</span></a><span class="Other">)</span><span class="Other">:</span> <a href="vmdef.html#TRegister"><span class="Identifier">TRegister</span></a></pre></dt>
<dd>
<a href="https://github.com/nim-lang/Nim/tree/devel/compiler/vmdef.nim#L347" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
<a href="https://github.com/nim-lang/Nim/edit/devel/compiler/vmdef.nim#L347" 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-12-28 15:55:44 UTC</small>
</div>
</div>
</div>
<script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
</body>
</html>