Skip to content

Commit cf6dd57

Browse files
authored
IC: next steps (#16632)
* removed dead code * beginnings of a rodfile reader * IC: record global VM state changes and pragma state changes * IC: replay pragmas and VM state changes * implemented rod load file simuation for easier, extensive testing * critical bugfix * IC: stress test logic; should also help with recursive module dependencies; WIP * IC: loading from .rod files begins to work reliably * removed ugly hacks * yet another silly mistake
1 parent bf184bc commit cf6dd57

18 files changed

+475
-771
lines changed

compiler/ast.nim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ type
221221
nkBreakState, # special break statement for easier code generation
222222
nkFuncDef, # a func
223223
nkTupleConstr # a tuple constructor
224+
nkModuleRef # for .rod file support: A (moduleId, itemId) pair
225+
nkReplayAction # for .rod file support: A replay action
224226

225227
TNodeKinds* = set[TNodeKind]
226228

@@ -1139,6 +1141,9 @@ proc add*(father, son: Indexable) =
11391141
if isNil(father.sons): father.sons = @[]
11401142
father.sons.add(son)
11411143

1144+
proc addAllowNil*(father, son: Indexable) {.inline.} =
1145+
father.sons.add(son)
1146+
11421147
template `[]`*(n: Indexable, i: int): Indexable = n.sons[i]
11431148
template `[]=`*(n: Indexable, i: int; x: Indexable) = n.sons[i] = x
11441149

0 commit comments

Comments
 (0)