bugfixes; field discriminant checks; linearScanEnd, unroll, shallow pragmas
This commit is contained in:
parent
8d734244b1
commit
5b789f2da8
11 changed files with 2341 additions and 242 deletions
0
tests/accept/compile/tfib.nim
Normal file → Executable file
0
tests/accept/compile/tfib.nim
Normal file → Executable file
24
tests/accept/compile/tlinearscanend.nim
Executable file
24
tests/accept/compile/tlinearscanend.nim
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
import strutils
|
||||
|
||||
var x = 343
|
||||
|
||||
case stdin.readline.parseInt
|
||||
of 0:
|
||||
echo "most common case"
|
||||
of 1:
|
||||
{.linearScanEnd.}
|
||||
echo "second most common case"
|
||||
of 2: echo "unlikely: use branch table"
|
||||
else:
|
||||
echo "unlikely too: use branch table"
|
||||
|
||||
|
||||
case x
|
||||
of 23: echo "23"
|
||||
of 343: echo "343"
|
||||
of 21: echo "21"
|
||||
else:
|
||||
{.linearScanEnd.}
|
||||
echo "default"
|
||||
|
||||
0
tests/accept/compile/tmacro1.nim
Normal file → Executable file
0
tests/accept/compile/tmacro1.nim
Normal file → Executable file
0
tests/accept/compile/tsortdev.nim
Normal file → Executable file
0
tests/accept/compile/tsortdev.nim
Normal file → Executable file
6
tests/accept/compile/ttypeconverter1.nim
Normal file
6
tests/accept/compile/ttypeconverter1.nim
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
converter p(i: int): bool = return i != 0
|
||||
|
||||
if 0:
|
||||
echo "foo"
|
||||
|
||||
0
tests/accept/run/tmacro2.nim
Normal file → Executable file
0
tests/accept/run/tmacro2.nim
Normal file → Executable file
0
tests/accept/run/tmacro3.nim
Normal file → Executable file
0
tests/accept/run/tmacro3.nim
Normal file → Executable file
0
tests/accept/run/tmacros1.nim
Normal file → Executable file
0
tests/accept/run/tmacros1.nim
Normal file → Executable file
1769
tests/accept/run/tpegs.nim
Executable file
1769
tests/accept/run/tpegs.nim
Executable file
File diff suppressed because it is too large
Load diff
0
tests/accept/run/tsort.nim
Normal file → Executable file
0
tests/accept/run/tsort.nim
Normal file → Executable file
0
tests/accept/run/ttoseq.nim
Normal file → Executable file
0
tests/accept/run/ttoseq.nim
Normal file → Executable file
Loading…
Reference in a new issue