summary refs log tree commit diff stats
path: root/compiler/dfa.nim
diff options
context:
space:
mode:
authorcooldome <cdome@bk.ru>2019-06-25 06:34:54 +0100
committerVarriount <Varriount@users.noreply.github.com>2019-06-24 22:34:54 -0700
commit0d50b0c8a766a80c357edfcdda563f239caaf9e6 (patch)
treec8027d5df2b4c7498a62676a5be220c4d932c698 /compiler/dfa.nim
parent91f0626dcb274b86b08737ecf682e08928345a95 (diff)
downloadNim-0d50b0c8a766a80c357edfcdda563f239caaf9e6.tar.gz
increase dfa instruction limit (#11579)
Diffstat (limited to 'compiler/dfa.nim')
-rw-r--r--compiler/dfa.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/dfa.nim b/compiler/dfa.nim
index db12a8c66..824fd8682 100644
--- a/compiler/dfa.nim
+++ b/compiler/dfa.nim
@@ -265,14 +265,14 @@ proc genLabel(c: Con): TPosition =
 
 proc jmpBack(c: var Con, n: PNode, p = TPosition(0)) =
   let dist = p.int - c.code.len
-  doAssert(-0x7fff < dist and dist < 0x7fff)
+  doAssert(low(int) div 2 + 1 < dist and dist < high(int) div 2)
   c.code.add Instr(n: n, kind: goto, dest: dist)
 
 proc patch(c: var Con, p: TPosition) =
   # patch with current index
   let p = p.int
   let diff = c.code.len - p
-  doAssert(-0x7fff < diff and diff < 0x7fff)
+  doAssert(low(int) div 2 + 1 < diff and diff < high(int) div 2)
   c.code[p].dest = diff
 
 proc popBlock(c: var Con; oldLen: int) =