diff options
Diffstat (limited to 'tests/vm/tfarjump.nim')
-rw-r--r-- | tests/vm/tfarjump.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/vm/tfarjump.nim b/tests/vm/tfarjump.nim new file mode 100644 index 000000000..f5798b8d2 --- /dev/null +++ b/tests/vm/tfarjump.nim @@ -0,0 +1,14 @@ +# Test a VM relative jump with an offset larger then 32767 instructions. + +import macros + +static: + var a = 0 + macro foo(): untyped = + let s = newStmtList() + for i in 1..6554: + s.add nnkCommand.newTree(ident("inc"), ident("a")) + quote do: + if true: + `s` + foo() |