tfarjump.nim 288 B

123456789101112131415
  1. # Test a VM relative jump with an offset larger then 32767 instructions.
  2. import macros
  3. static:
  4. var a = 0
  5. macro foo(): untyped =
  6. let s = newStmtList()
  7. for i in 1..6554:
  8. s.add nnkCommand.newTree(ident("inc"), ident("a"))
  9. quote do:
  10. if true:
  11. `s`
  12. foo()