summary refs log tree commit diff stats
path: root/compiler/semtypinst.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #11660 (#11677)Andreas Rumpf2019-07-071-1/+4
|
* fixes #7816 (#11261)Andreas Rumpf2019-05-151-0/+1
|
* Merge pull request #11201 from nim-lang/araq-fixes-11200Andreas Rumpf2019-05-081-1/+1
|\ | | | | fixes 11200
| * fixes #11200Araq2019-05-081-1/+1
| |
* | Replace countup(x, y-1) with x ..< yClyybber2019-05-071-7/+7
|/
* Fix 105, few fixes for 101 (#11148)genotrance2019-05-041-2/+4
|
* destructors: internal compiler refactoringAraq2019-04-181-13/+12
|
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-2/+2
| | | | | | | | | | | * mark user defined destructors with sfOverriden to simplify the logic * refactoring in preparation to merge liftings and generic instantiations for destructors * ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on * renamed 'patterns' switch to 'trmacros' as it was totally misleading before * destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking * test for invalid/too late destructor introductions * liftdestructors: make code robust for nimsuggest * --newruntime works for hello world again * newruntime: code generation for closures
* fixes #10884 (#10887)Andreas Rumpf2019-03-221-1/+1
|
* Size ptr tuple (#10846)Arne Döring2019-03-181-2/+1
| | | | | | * fixes #10117 * Add support for recursive tuples * detect in generics
* --newruntime: work in progressAndreas Rumpf2019-03-141-1/+1
|
* introduce tfHasOwned for fast must-move checkings; removed tfAcyclic as the ↵Andreas Rumpf2019-03-051-5/+1
| | | | GC has ignored this hint for quite some time now
* gc:destructors: progressAndreas Rumpf2019-02-281-0/+16
|
* first steps in implementing 'owned' pointers; undocumented, do not useAndreas Rumpf2019-02-231-1/+1
|
* Propagate tfGcSafe flag to generic instantiations (#10620)LemonBoy2019-02-131-3/+2
| | | Fixes a nasty endless loop in the generic instantiation phase.
* gc: destructors is beginning to work (#10483)Andreas Rumpf2019-01-291-13/+24
| | | | | | | | | | | | | | | | * kochdocs.nim: code cleanup * docgen: nicer indentation * parser.nim: code cleanup * fixes #10458 * make tests green again * make =destroy mixins * gc:destructors: produced C code is almost working * --gc:destructors simple program compiles (but leaks memory) * gc:destructors make examples compile in C++ mode * destructors: string implementation bugfixes * strs.nim: minor code cleanup * destructors: builtin seqs are beginning to work * remove debugging helpers
* Fix for issue #10342. better message for generic subclass instantiation (#10354)Ray Imber2019-01-221-1/+14
| | | * Fix for issue #10342. better message for generic subclass instantiation errors.
* Merge pull request #8748 from LemonBoy/when-in-objectsAndreas Rumpf2018-12-121-0/+40
|\ | | | | Pervasive replacement of nkRecWhen in generic types
| * Pervasive replacement of nkRecWhen in generic typesLemonBoy2018-10-191-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Long story short, even if the type contains no reference at all to its generic parameters we still have to walk its AST and evaluate any nkRecWhen nodes that semRecordNodeAux skipped due to the type being a generic one. We also must be careful to modify the type `n` node in place since it may be referenced by the caller as seen in the tillegaltyperecursion test. Moreover we also can't have the nkSym drift away from their original values in order not to break the JS nkObjConstr codegen.
* | IC: further progressAraq2018-12-011-1/+1
| |
* | language cleanup: the .unchecked pragma is deadAraq2018-11-061-5/+0
| |
* | Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | replace deprecated `safeAdd` with `add` (#9416)Miran2018-10-181-1/+1
| |
* | fixes #5479Araq2018-10-021-6/+11
| |
* | fixes #8883Araq2018-09-141-2/+5
|/
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-2/+2
|
* enable destructors without the --newruntime switchAndreas Rumpf2018-07-041-5/+1
|
* requested pull-request changesZahary Karadjov2018-06-161-2/+3
|
* fixes #7222; fixes #5595; fixes #3747Zahary Karadjov2018-06-161-12/+12
| | | | | | | | | | * late instantiation for the generic procs' default param values * automatic mixin behaviour in concepts Other fixes: * don't render the automatically inserted default params in calls * better rendering of tyFromExpr
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-9/+10
|
* platform.nim doesn't use globals anymore; prepare msgs.nim for not using globalsAndreas Rumpf2018-05-181-1/+1
|
* make tests green againAraq2018-05-141-2/+2
|
* guards.nim does compileAndreas Rumpf2018-05-111-22/+21
|
* .experimental can now be used to enable specific featuresAndreas Rumpf2018-04-241-2/+2
|
* Static[T] fixes (#7333)zah2018-03-241-0/+4
| | | | | | | | | | | * fix the usage of unresolved static[T] parameters in proc signatures * fix tsametype and tmacrogenerics * Allow creating composite type classes with concepts and using them in type signatures * Allow integers to be used in ident concatenations * Support using imported C++ generic types in proc signatures * fixes #7230 * closes #7379 * re-enable some metatype tests
* preparations for language extensions: 'sink' and 'lent' typesAndreas Rumpf2018-01-071-3/+3
|
* fixes #6489Araq2017-11-231-2/+2
|
* fixes #6682Araq2017-11-221-1/+2
|
* deprecated unary '<'Andreas Rumpf2017-10-291-8/+8
|
* destructors: supportsCopyMem finally works for recursive typesAraq2017-10-261-10/+26
|
* destructors: irresponsibly simple tcustomseq test worksAndreas Rumpf2017-10-171-1/+4
|
* destructors: preparations for upcoming changesAraq2017-10-171-5/+1
|
* minor refactorings for better destructorsAndreas Rumpf2017-10-141-5/+11
|
* first implementation of the 'func' keywordAndreas Rumpf2017-09-231-1/+1
|
* fix #2730; fix #4880Zahary Karadjov2017-06-201-1/+2
|
* Fix #5962Zahary Karadjov2017-06-201-13/+44
| | | | | | | | | | | | | | | During the instantiation of a generic type A, some other generic type B may be instantiated multiple times with different parameters. We can think about each instantiation as a function call that should temporary bind the parameter names to concrete types. The problem with the existing implementation in semtypinst was that it was performing this binding within a shared global table. In this sense, it was executing the code as a programming language featuring only global variables. In such a language, re-entrant functions cannot be defined properly and hence this was leading to problems with similar types. The solution is simple - just like we need to introduce stack frames to handle re-entrant functions, we introduce a stack of type bindings that are pushed and popped during the generic instantiations.
* fixes tproctypecache_falsepositive.nim test caseAraq2017-06-081-2/+3
|
* fix #5683Zahary Karadjov2017-04-141-0/+1
|
* fix #5643; fix #5644Zahary Karadjov2017-04-081-2/+6
|
* Restore the Nim's 0.14 proper handling of generic aliasesZahary Karadjov2017-04-081-25/+34
| | | | | | | | | | | A more efficient implementation is possible by restoring the old lifting ot tyGenericInvocation to tyGenericInst in liftTypeParam, but this fix will suffice for now. fixes #5087 fixes #5602 fixes #5641 fixes #5570
30container?h=main&id=b3cdcdd44f6b8db053e4814351fbf04fefb7d7cf'>^
88be3dbc ^
f608504a ^
bc643692 ^

afa42503 ^
f608504a ^
f608504a ^

1848b18f ^

916ae8f5 ^
795f5244 ^
900e6a0e ^
916ae8f5 ^
900e6a0e ^
795f5244 ^
900e6a0e ^

8389d168 ^
900e6a0e ^
91dc725f ^
795f5244 ^
900e6a0e ^

c6034af3 ^
900e6a0e ^

795f5244 ^
054e1b3c ^

af7a5722 ^
0db6341f ^
af7a5722 ^
0db6341f ^
af7a5722 ^
795f5244 ^
c157066c ^
0db6341f ^
af7a5722 ^
5c6840b8 ^
8389d168 ^
af7a5722 ^
a09697d0 ^
bb7142db ^
fe9f0715 ^
fb85b3b4 ^
af7a5722 ^
900e6a0e ^



0487a30e ^
900e6a0e ^
ac0e9db5 ^
18e626df ^
5f98a10c ^
18e626df ^

c6034af3 ^
ac0e9db5 ^
795f5244 ^
ac0e9db5 ^

50b48db0 ^
795f5244 ^
6cc46216 ^
cdd6fd09 ^
a09697d0 ^
827898fc ^
b954ac38 ^
cfb142b9 ^
916ae8f5 ^


a09697d0 ^


f3760b0f ^
795f5244 ^

a09697d0 ^






88be3dbc ^
6cc46216 ^
bc643692 ^


afa42503 ^
6cc46216 ^
57699011 ^
6cc46216 ^
551d155c ^
5f98a10c ^
551d155c ^
bc643692 ^


551d155c ^

5f98a10c ^
551d155c ^
051c4738 ^
5f98a10c ^
551d155c ^
bc643692 ^


551d155c ^

5f98a10c ^
551d155c ^
af7a5722 ^
5f98a10c ^
af7a5722 ^





fe9f0715 ^
af7a5722 ^
5c6840b8 ^









c6034af3 ^









1848b18f ^

a4559f72 ^
795f5244 ^
900e6a0e ^
a4559f72 ^
900e6a0e ^
795f5244 ^
18e626df ^

900e6a0e ^

91dc725f ^
795f5244 ^
9a14c914 ^

c6034af3 ^
900e6a0e ^

795f5244 ^
9a14c914 ^

fb5470bc ^
900e6a0e ^
fb5470bc ^
795f5244 ^
c157066c ^
900e6a0e ^


fb5470bc ^



29057ed9 ^
c6034af3 ^
a09697d0 ^
c6034af3 ^
795f5244 ^
bb7142db ^
fe9f0715 ^
fb85b3b4 ^
fb5470bc ^
900e6a0e ^







5f98a10c ^
551d155c ^

c6034af3 ^
900e6a0e ^
795f5244 ^
ac0e9db5 ^

50b48db0 ^
795f5244 ^
79f4349c ^
cdd6fd09 ^
cfb142b9 ^
827898fc ^
a4559f72 ^

b98d3876 ^
551d155c ^
5f98a10c ^
551d155c ^
bc643692 ^


551d155c ^

5f98a10c ^
551d155c ^
051c4738 ^
5f98a10c ^
551d155c ^
bc643692 ^


551d155c ^

5f98a10c ^
551d155c ^
fb5470bc ^
5f98a10c ^
bb7142db ^



fb5470bc ^
bb7142db ^


fb5470bc ^
bb7142db ^
fb5470bc ^
b98d3876 ^







dd2e01e4 ^
d65bc172 ^



b98d3876 ^
56109c6d ^









dd2e01e4 ^
56109c6d ^




dd2e01e4 ^
56109c6d ^

b98d3876 ^

72d5d018 ^
b98d3876 ^



1f7e3c05 ^
b98d3876 ^
e3cb4d09 ^
dd2e01e4 ^
f3760b0f ^
795f5244 ^

b98d3876 ^
795f5244 ^
b98d3876 ^
12f304a3 ^
71974f15 ^
e6f84542 ^

08cf048f ^
b98d3876 ^


e6f84542 ^
b98d3876 ^
e6f84542 ^
dd2e01e4 ^
c6034af3 ^
08cf048f ^
b98d3876 ^
e6f84542 ^
f3760b0f ^
c6520d96 ^

795f5244 ^
6152ef13 ^
795f5244 ^

b98d3876 ^
c6034af3 ^
b98d3876 ^
e6f84542 ^

b98d3876 ^

141c540b ^


5f98a10c ^
141c540b ^

1ccbf385 ^












5d1699c2 ^

1ccbf385 ^



b98d3876 ^

71974f15 ^
b98d3876 ^
71974f15 ^
b98d3876 ^
71974f15 ^


c6034af3 ^
71974f15 ^

c6034af3 ^
71974f15 ^
b98d3876 ^
71974f15 ^
6152ef13 ^
71974f15 ^
363be37f ^

6152ef13 ^

363be37f ^
6152ef13 ^


0c0bc3ae ^
6152ef13 ^
b98d3876 ^

363be37f ^
b98d3876 ^
363be37f ^
b98d3876 ^
363be37f ^
b98d3876 ^
5f98a10c ^

6152ef13 ^
5f98a10c ^

6152ef13 ^

bc643692 ^
6152ef13 ^
5967e82f ^
6152ef13 ^

5f98a10c ^
6152ef13 ^
7136ddd5 ^
6152ef13 ^




5f98a10c ^
6152ef13 ^
215365d4 ^
87f1cf60 ^
b2e4056d ^
87f1cf60 ^
6152ef13 ^

57d01f21 ^
76b59897 ^


6152ef13 ^
57d01f21 ^
76b59897 ^
6152ef13 ^

57d01f21 ^
76b59897 ^
6152ef13 ^

76b59897 ^
6152ef13 ^

57d01f21 ^
92e3f56e ^
c6034af3 ^
e3cb4d09 ^
4f32f024 ^
57d01f21 ^


5967e82f ^

57d01f21 ^
5967e82f ^
57d01f21 ^


6152ef13 ^


5f98a10c ^
6152ef13 ^



c6034af3 ^
6152ef13 ^
23fd54f1 ^





dd2e01e4 ^
d65bc172 ^



23fd54f1 ^
5a481085 ^
6152ef13 ^



363be37f ^
6152ef13 ^
436b2b2e ^
0c0bc3ae ^
c6034af3 ^
6152ef13 ^


57d01f21 ^















57d01f21 ^










02a55f71 ^

57bf0075 ^












02a55f71 ^


795f5244 ^
2142ccfc ^



02a55f71 ^







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
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663