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
This commit is contained in:
parent
bf184bcdd9
commit
cf6dd57efe
18 changed files with 474 additions and 770 deletions
|
|
@ -221,6 +221,8 @@ type
|
|||
nkBreakState, # special break statement for easier code generation
|
||||
nkFuncDef, # a func
|
||||
nkTupleConstr # a tuple constructor
|
||||
nkModuleRef # for .rod file support: A (moduleId, itemId) pair
|
||||
nkReplayAction # for .rod file support: A replay action
|
||||
|
||||
TNodeKinds* = set[TNodeKind]
|
||||
|
||||
|
|
@ -1139,6 +1141,9 @@ proc add*(father, son: Indexable) =
|
|||
if isNil(father.sons): father.sons = @[]
|
||||
father.sons.add(son)
|
||||
|
||||
proc addAllowNil*(father, son: Indexable) {.inline.} =
|
||||
father.sons.add(son)
|
||||
|
||||
template `[]`*(n: Indexable, i: int): Indexable = n.sons[i]
|
||||
template `[]=`*(n: Indexable, i: int; x: Indexable) = n.sons[i] = x
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue