summary refs log tree commit diff stats
path: root/tests/casestmt/tlinearscanend.nim
blob: 9a984e039c80bd269b480d09dcbc58c65838d539 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"
48 +0200 progress on deepCopy' href='/ahoang/Nim/commit/todo.txt?h=devel&id=9673e4f2df941bfeeb3e1fe8e66d89fddea1145b'>9673e4f2d ^
2de99653d ^





e8b4217c3 ^

fab8cee13 ^
fab8cee13 ^
bd705a517 ^
fab8cee13 ^
54935e2e7 ^
a64d4dc35 ^


e65c296bc ^

62ccf1352 ^
a64d4dc35 ^
5a21892da ^
3d7abb958 ^
0d19de18c ^
a23d418d7 ^
e353737e3 ^

d4bca58b7 ^
1a3b730bf ^

2958adc47 ^

c55f5b34e ^
5506e8491 ^
5f64d7a35 ^
d01ff8994 ^
9280473eb ^

d01ff8994 ^
d01ff8994 ^




258aabba6 ^
258aabba6 ^



258aabba6 ^
258aabba6 ^
258aabba6 ^







8b5aa221a ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91


              
                                     
                                         


           
 
                                                    

                                                    
                                                    
                                                             

                                                                                
                                        
                                      
                                 

                                                                           
 
 


           
                              
                                        



                                                                    





                                                           

                                                                       
                                                    
                    
                                     
 
 


    

                                      
                                                    
                                                                         
                                                                             
 
 
             

             
                                

                                                                             

                                                                      
                                                
                          
                                   
                                                             

                                                                        
 




                        
                                                           



  
           
                                 







                                                                        
                                       
version 0.10.4
==============

- make 'nil' work for 'add' and 'len'
- add '..^' and '..<' operators to system

version 1.0
===========

- macro support for '='; bind '=' to a memory region
- remove   echo $foo  gotcha
- add "all threads are blocked" detection to 'spawn'
- figure out why C++ bootstrapping is so much slower
- nimsuggest: auto-completion needs to work in 'class' macros
- The bitwise 'not' operator will be renamed to 'bnot' to
  prevent 'not 4 == 5' from compiling. -> requires 'mixin' annotation for procs!
- iterators always require a return type
- make nimble part of the distribution
- split docgen into separate tool
- special rule for ``[]=``, items, pairs
- BUG: echo with template `$`*(info: TLineInfo): expr = toFileLineCol(info)


Concurrency
-----------

- test 'deepCopy' for closures
- implement 'foo[1..4] = spawn(f[4..7])'

Low priority:
- support for exception propagation? (hard to implement)
- the copying of the 'ref Promise' into the thead local storage only
  happens to work due to the write barrier's implementation


Misc
----

- make '--implicitStatic:on' the default; then we can also clean up the
  'static[T]' mess in the compiler!
- make tuple unpacking work in a non-var/let context
- built-in 'getImpl'
- prevent 'alloc(TypeWithGCedMemory)'


Bugs
====

- VM: Pegs do not work at compile-time
- VM: ptr/ref T cannot work in general
- scopes are still broken for generic instantiation!
- blocks can "export" an identifier but the CCG generates {} for them ...
- ConcreteTypes in a 'case' means we don't check for duplicated case branches


version 0.9.x
=============

- pragmas need 'bindSym' support
- allow simple read accesses to global variables --> difficult to ensure that
  no data races happen
- pragmas need re-work: 'push' is dangerous, 'hasPragma' does not work
  reliably with user-defined pragmas
- memory manager: add a measure of fragmentation
- implement 'bits' pragmas
- we need a magic thisModule symbol
- optimize 'genericReset'; 'newException' leads to code bloat
- The 'do' notation might be trimmed so that its only purpose is to pass
  multiple multi line constructs to a macro.


version 0.9.X
=============

- macros as type pragmas
- document NimMain and check whether it works for threading

GC
==

- hybrid GC
- use big blocks in the allocator
- provide tool/API to track leaks/object counts
- resizing of strings/sequences could take into account the memory that
  is allocated


CGEN
====
- codegen should use "NIM_CAST" macro and respect aliasing rules for GCC
- ``restrict`` pragma + backend support