summary refs log tree commit diff stats
path: root/compiler/semfold.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix codegen problem with strict C++ compilers (#10639)LemonBoy2019-02-131-1/+1
| | | | | | Since tyCString is convertible to a tyPointer we must be extra careful to emit a cast to (void*) in order to appease clang++. Reported by masnagam on the Nim forum.
* revive #10228 (fix #9880) (#10610)Timothee Cour2019-02-131-2/+2
| | | | | | * Make index out of bounds more useful by including the 'bounds'. * fixes #9880 index out of bounds (remaining cases); revives #10228 * change err msg to: `index 3 not in 0 .. 1`
* helpers2 now has a real nameAraq2019-02-071-1/+1
|
* Implement {.booldefine.} (#10533)Oscar Nihlgård2019-02-031-1/+11
|
* Fix internal error when casting to invalid enum valueNeelesh Chandola2018-12-151-1/+3
|
* Merge pull request #9881 from timotheecour/pr_ref_9880Andreas Rumpf2018-12-111-3/+5
|\ | | | | refs #9880 show index and bound in lots of `index out of bounds` errors
| * refs #9880 show index and bound in lots of `index out of bounds` errorsTimothee Cour2018-12-091-3/+5
| |
* | fixes #9868Araq2018-12-111-0/+8
|/
* NaN fixes for clang backend (#9652)Arne Döring2018-11-081-6/+1
|
* language cleanup: the .unchecked pragma is deadAraq2018-11-061-9/+8
|
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-8/+9
| | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux
* [WIP] Early evaluation of mIs (#8723)LemonBoy2018-10-141-40/+3
| | | | | | | | | | * Early evaluation of mIs The `evalIs` implementation was just a broken copy of `isOpImpl` so let's just avoid it alltogether: `mIs` nodes are either resolved during the semantic phase or bust. * Remove dead code and tidy it up
* implement sizeof and alignof operator (manually squashed #5664) (#9356)Timothee Cour2018-10-141-12/+0
|
* string to string conversion keeps the dest type (#9323)LemonBoy2018-10-121-1/+1
| | | Fixes #9322
* Constant folding should not drop distinct typesLemonBoy2018-09-271-4/+1
| | | | Fixes #9079
* Narrowing casts are applied after every op if needed (#8918)LemonBoy2018-09-081-28/+47
| | | | | | | This way we make sure not to end up with weird values every now and then. Fixes #7300 Fixes #8909
* system.compileDate and compileTime are in UTC; fixes #7305; docgen supports ↵Andreas Rumpf2018-09-031-18/+3
| | | | SOURCE_DATE_EPOCH, fixes #3113
* Constant folding for integer casts (#8095)LemonBoy2018-08-311-7/+25
|
* Fix abs & unary sub in semfold (#8724)Oscar Nihlgård2018-08-221-2/+6
|
* Don't consider tyAnd/tyNot/tyOr/tyAnything as generic (#8700)LemonBoy2018-08-221-17/+29
| | | | | | | | | | | | | | | * Don't consider tyAnd/tyNot/tyOr/tyAnything as generic `containsGenericType` was too shallow and didn't check all the branches. The resulting half-processed nodes are often simplified by the constant folding pass but when that's not possible we get a nasty error during codegen. Fixes #8693 * Move the blame onto the semFold pass Slightly better evaluation of `is` forms.
* fixes #6255, add `system.ashr` arithmetic right shift (#8547)andri lim2018-08-071-0/+8
|
* Add sizeof for arrays of integral types (#8445)cooldome2018-07-301-1/+1
|
* More concept fixesLemonBoy2018-06-241-1/+1
| | | | Fixes #7705, #7703, #7702
* Fix constant folding for shl/notLemonBoy2018-06-191-2/+9
| | | | | Since the source and destination types are the same the result should be trimmed to fit.
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-1/+1
|
* platform.nim doesn't use globals anymore; prepare msgs.nim for not using globalsAndreas Rumpf2018-05-181-31/+31
|
* options.nim: no global variables anymoreAndreas Rumpf2018-05-131-4/+4
|
* semfold compiles againAndreas Rumpf2018-05-101-246/+248
|
* big refactoring: mores stuff compilesAndreas Rumpf2018-05-101-13/+7
|
* Don't hide overflow/underflow/divbyzero in semfold (#7732)Oscar Nihlgård2018-05-021-26/+70
| | | | | * firstOrd/lastOrd bugfix * Don't hide overflow/underflow/divbyzero in semfold
* https://reproducible-builds.org/ support via SOURCE_DATE_EPOCH (#7644) (#7661)tersec2018-04-201-2/+17
|
* introduce nkTupleConstr AST node for unary tuple construction; breaking changeAndreas Rumpf2018-04-131-3/+3
|
* fixes #3985Araq2018-02-101-1/+6
|
* Fixes codegen bug with literal negative zero, fixes #7079 (#7158)GULPF2018-01-311-0/+1
| | | | | | * Fixes #7079 * Fix handling of neg zero during constant folding
* fixes #6989Andreas Rumpf2018-01-271-1/+6
|
* preparations for language extensions: 'sink' and 'lent' typesAndreas Rumpf2018-01-071-1/+1
|
* first steps in adding template/macro calls to stack tracesAraq2017-12-211-0/+3
|
* fixes the second example of #6757Andreas Rumpf2017-11-171-7/+7
|
* Merge branch 'devel' into araqAndreas Rumpf2017-10-021-2/+4
|\
| * first implementation of the 'func' keywordAndreas Rumpf2017-09-231-2/+2
| |
| * NimScript: added buildOS and buildCPU constantsAndreas Rumpf2017-09-221-0/+2
| |
* | no interval arithmetic anymore to construct implicit range types; breaking ↵Andreas Rumpf2017-07-131-130/+0
|/ | | | change
* fix #1082Zahary Karadjov2017-06-201-2/+4
|
* introduce a pre-processing pass for the concept bodiesZahary Karadjov2017-06-201-2/+5
| | | | | | | fixes #4982 fixes #3805 close #3414
* removed compiler internal list implementation (#5371)Arne Döring2017-02-221-1/+1
|
* fixes #5399Araq2017-02-161-1/+1
|
* make more tests greenAraq2017-02-161-1/+4
|
* fixes #5216Araq2017-01-271-5/+5
|
* fixes #3434Andreas Rumpf2017-01-191-1/+1
|
* Merge branch 'devel' into sighashesAraq2016-12-191-1/+1
|\
n class='oid'>17b90929 ^
80411d01 ^
b2e4056d ^
39017bac ^
1cfcb62f ^








39017bac ^

0c1791a9 ^
0c1791a9 ^
b24eb476 ^
0c1791a9 ^
39017bac ^
5d67fac7 ^

1cfcb62f ^

5d67fac7 ^


1cfcb62f ^


39017bac ^


5d67fac7 ^
c157066c ^
5d67fac7 ^





5b22547b ^
e76a27f3 ^

5d67fac7 ^

e76a27f3 ^

5d67fac7 ^

e76a27f3 ^



5d67fac7 ^




8d72e565 ^
1cfcb62f ^



acc4792d ^
1cfcb62f ^
acc4792d ^
1cfcb62f ^




1b76245c ^
1cfcb62f ^
1b76245c ^
1cfcb62f ^



5d67fac7 ^
1cfcb62f ^

5d67fac7 ^


b24eb476 ^
5d67fac7 ^



82177734 ^
5d67fac7 ^
39017bac ^

5d67fac7 ^
b24eb476 ^
5d67fac7 ^



fb49fd2d ^
b24eb476 ^
5d67fac7 ^



39017bac ^
5d67fac7 ^



e76a27f3 ^




ce1e4d3e ^
e76a27f3 ^








a9b225f7 ^
e76a27f3 ^





a9b225f7 ^
e76a27f3 ^






e76a27f3 ^
6b59e986 ^
e76a27f3 ^




5d67fac7 ^
b24eb476 ^
5d67fac7 ^
ce1e4d3e ^
e76a27f3 ^
5d67fac7 ^




e76a27f3 ^
b24eb476 ^
e76a27f3 ^
a9b225f7 ^
5d67fac7 ^
7f193a0e ^
5d67fac7 ^
b24eb476 ^
5d67fac7 ^
e76a27f3 ^
a9b225f7 ^
5d67fac7 ^
691b529e ^
5d67fac7 ^



e76a27f3 ^
af023b32 ^

6b59e986 ^
e76a27f3 ^


5d67fac7 ^

b24eb476 ^
5d67fac7 ^








b24eb476 ^
5d67fac7 ^
a9b225f7 ^
5d67fac7 ^
7f193a0e ^
39017bac ^
b24eb476 ^
82177734 ^
5d67fac7 ^
a9b225f7 ^
5d67fac7 ^
7f193a0e ^
5d67fac7 ^






b24eb476 ^


5d67fac7 ^
b24eb476 ^
5d67fac7 ^




691b529e ^
5d67fac7 ^



b24eb476 ^


5d67fac7 ^





b24eb476 ^
5d67fac7 ^




7f193a0e ^
39017bac ^
5d67fac7 ^
39017bac ^

5d67fac7 ^
1ead3562 ^
5d67fac7 ^

1ead3562 ^
5d67fac7 ^
1ead3562 ^
5d67fac7 ^


39017bac ^
5ed9bb13 ^
1ead3562 ^
39017bac ^

1ead3562 ^

39017bac ^
5ed9bb13 ^
39017bac ^

5ed9bb13 ^
1ead3562 ^

39017bac ^
1ead3562 ^
39017bac ^

5ed9bb13 ^
fb49fd2d ^

1ead3562 ^
fb49fd2d ^






fb49fd2d ^
1ead3562 ^
fb49fd2d ^







7f193a0e ^
82177734 ^
1ead3562 ^
82177734 ^

1ead3562 ^
82177734 ^



1ead3562 ^
82177734 ^





76b59897 ^
1ead3562 ^
b0bf5321 ^
76b59897 ^




b0bf5321 ^
76b59897 ^






1ead3562 ^
b0bf5321 ^
76b59897 ^

b0bf5321 ^
76b59897 ^








7f193a0e ^
1ead3562 ^
7f193a0e ^

1ead3562 ^

7f193a0e ^
1ead3562 ^

7f193a0e ^

fca48e92 ^


1ead3562 ^
fca48e92 ^



1ead3562 ^
fca48e92 ^
1ead3562 ^
fca48e92 ^
7ac8feef ^
fca48e92 ^
691b529e ^

1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^
1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^




1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^
1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^




1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^
1ead3562 ^
691b529e ^

1ead3562 ^
691b529e ^


81c87f08 ^
81c87f08 ^

fb9bcd34 ^


81c87f08 ^
3670fb87 ^
b24eb476 ^
9f95c745 ^
3670fb87 ^
b24eb476 ^
9f95c745 ^
81c87f08 ^

601ff75b ^

1ead3562 ^
601ff75b ^


1ead3562 ^
601ff75b ^

1ead3562 ^
601ff75b ^
1ead3562 ^
601ff75b ^

1ead3562 ^
601ff75b ^
1ead3562 ^
601ff75b ^

1ead3562 ^
601ff75b ^


7874586e ^
80411d01 ^














9dcbec39 ^
80411d01 ^

0fb8f78c ^













94fed202 ^
94fed202 ^
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631