Fixed iteration limit hit from execproc (#15723) [backport:1.2] [backport:1.4]
When calling procs from Nim in Nimscript you could hit the VM iteration limit even though the code is functioning properly. This resolves that by making the iteration limit reset eachtime you call a proc.
This commit is contained in:
parent
b2740f5c63
commit
a87617956f
1 changed files with 1 additions and 0 deletions
|
|
@ -2078,6 +2078,7 @@ proc execute(c: PCtx, start: int): PNode =
|
|||
result = rawExecute(c, start, tos).regToNode
|
||||
|
||||
proc execProc*(c: PCtx; sym: PSym; args: openArray[PNode]): PNode =
|
||||
c.loopIterations = c.config.maxLoopIterationsVM
|
||||
if sym.kind in routineKinds:
|
||||
if sym.typ.len-1 != args.len:
|
||||
localError(c.config, sym.info,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue