mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
* Increased regBx size from 16 to 24 bits to increase jump range in the VM from 32K to 8M instructions. Fixes #12727 * Increased VM TInst register field sizes to 16 bits to allow up to 65535 VM registers per proc * Added test case for >255 VM registers
15 lines
288 B
Nim
15 lines
288 B
Nim
# 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()
|