summary refs log tree commit diff stats
path: root/lib/core
Commit message (Collapse)AuthorAgeFilesLines
* fixes #14511 [backport:1.4] (#18732)Dankr4d2021-08-251-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | * fixes #14511 [backport:1.4] Signed-off-by: Dankr4d <dude569@freenet.de> * Replaced fix with code from alaviss, for better readability, with small changes. Signed-off-by: Dankr4d <dude569@freenet.de> * - Specified output in test. Signed-off-by: Dankr4d <dude569@freenet.de> * Replaced case in nnkRecCase with a simpler version, which just adds the last son. Signed-off-by: Dankr4d <dude569@freenet.de> * Update tests/macros/t14511.nim * Update tests/macros/t14511.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* replace wrt with proper word (#18724)flywind2021-08-221-2/+4
| | | | | * what does wrt mean? * clarify
* fixes #18543 (#18601)Andreas Rumpf2021-07-271-176/+98
| | | | | * fixes #18543 * make tests green again
* sync with the same template from locks module (#18414)Antonis Geralis2021-07-101-1/+1
|
* strformat.fmt now supports non-literal const strings (#18274)Timothee Cour2021-06-181-1/+2
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* alternative to #18185 (#18206)flywind2021-06-071-1/+4
|
* macros.treeRepr + friends: collapse SymChoice (#18072)Timothee Cour2021-06-051-22/+41
| | | | | | | * macros.treeRepr + friends: collapse SymChoice * make repr+friends work with invalid symchoice nodes * address comment
* document macros.unpackVarargs (#18106)Timothee Cour2021-05-311-0/+15
| | | | | | | * deprecate macros.unpackVarargs * un-deprecate unpackVarargs and add docs+runnableExamples * update examples + tests with varargs[typed]
* Revert "fix #14873 properly by skipping `abi` field in importc type ↵Andreas Rumpf2021-05-151-0/+5
| | | | | (#17944)" (#17992) This reverts commit 98c29c01eb91a0c6ce7da09380a272eebe6bca6f.
* fix #14873 properly by skipping `abi` field in importc type (#17944)Timothee Cour2021-05-071-5/+0
| | | | | | | * fix #14873 properly by skipping `abi` field in importc type * add test * fix test for windows
* getCustomPragmaVal priority/override fixes (#17725)Clyybber2021-04-211-38/+40
| | | | | | | | | * Adhere left-to-right rule for custom pragma priority * Improve error message for no custom pragmas * custom pragmas on var/let sym take priority over its type ones * Workaround & bug
* [std/locks]close #7998(complete condition variables) (#17711)flywind2021-04-191-2/+7
| | | | | | * close #7998 * workaround genode * Update lib/system/syslocks.nim
* [std/locks]remove workaround for withLock (#17772)flywind2021-04-191-4/+3
| | | | | | | | | | Ref #6113 and #6049 The workaround for generics instantiation is unnecessary. It seems to be fixed by another PR I guess. The test still works. So the changes should be harmless. https://github.com/nim-lang/Nim/blob/devel/tests/stdlib/tlocks.nim I also add some inline pragmas.
* [std/rlocks]add inline pragma (#17773)flywind2021-04-191-3/+3
| | | so that it can be used as the base of new locks module with destructors.
* replace defer with try ... finally (#17753)flywind2021-04-171-5/+5
|
* cString => cSourceString; tyCString => tyCstring so that error msgs show ↵Timothee Cour2021-04-171-4/+4
| | | | cstring, not cString (#17744)
* Fix getCustomPragmaVal for some multi arg pragmas (#17723)Clyybber2021-04-151-41/+45
| | | | | * Fix getCustomPragmaVal for some multi arg pragmas * Bootstrap fix
* getCustomPragma is split up in more usable chunks (#11526)Arne Döring2021-04-141-93/+165
| | | | | | | | | | | | | | | | | * getCustomPragma is split up in more usable chunks * changelog entry * fix for style checks * shitty typedesc special casing * Add since annotation and remove typedesc comments * Fix typo * Revert since annotation because it breaks bootstrapping * Export getCustomPragmaNode conditionally * Reduce code duplication * Update since * Update lib/core/macros.nim * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* macrocache.nim: removed trailing whitespaceAraq2021-04-111-23/+23
|
* Fix rst typo (#17671)konsumlamm2021-04-081-1/+1
|
* ref #14873 (#17644)flywind2021-04-061-0/+5
| | | | | | | * ref #14873 * comment * Update lib/core/locks.nim
* Improve the typeinfo module (#17625)konsumlamm2021-04-051-122/+129
| | | Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* new `genAst` as replacement for `quote do` (#17426)Timothee Cour2021-04-021-1/+4
| | | | | | | | | | | | | | * new `macros.genAst`: fixes all issues with `quote do` * add changelog entry * add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669 * add test for #9607 * add kNoExposeLocalInjects option * add test case for nested application of genAst * genAst: automatically call newLit when needed * allow skipping `{}`: genAst: foo * add test that shows this fixes #11986 * add examples showing mixin; add examples showing passing types, macros, templates * move to std/genasts * improve docs
* added nkError to the AST (#17567)Andreas Rumpf2021-03-291-1/+2
| | | | | | | | | | | | | * added nkError to the AST * Update lib/core/macros.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * Update compiler/ast.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-1/+1
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* remove {.compileTime.} for procs with NimNode: redundant because of ↵Timothee Cour2021-03-231-99/+94
| | | | tfTriggersCompileTime (#17463)
* fix #17454 (#17461)Timothee Cour2021-03-231-11/+9
|
* Add documentation to the `macrocache` module (#17431)Danil Yarantsev2021-03-211-15/+176
| | | | | | | | | | | | | | | | | | | | | * Add docs to macrocache * use hint * Use incl in the incl example * add macrocache to lib * consistency * Update doc/lib.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * apply suggestions * clarify the warning Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Fix macros.quote custom op symbol interpolation. (#17256)quantimnot2021-03-051-2/+6
| | | | | | | | | | Provides a workaround/fix for #7589. https://github.com/nim-lang/Nim/issues/7589 Updated docs and tutorial to reflect change. Updated runnableExamples to include an example. Co-authored-by: name <name@example.com>
* Replace double backticks with single backticks - Part 2 out of ~6 (#17206)Danil Yarantsev2021-02-281-79/+79
|
* Change stdlib imports to use std prefix in most examples (#17202)Danil Yarantsev2021-02-281-2/+2
|
* use single backtick (#17100)flywind2021-02-181-24/+24
|
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-113/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* use typeof instead type (#16962)flywind2021-02-081-3/+3
|
* fix floats slice (#16853)flywind2021-01-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * see whether it breaks * fix * fix * minor * fix * add enum * use Ordinal types * fix tests * fix * another style * fix remainning cases
* refactor cmpNimIdentifier (#16611)flywind2021-01-132-9/+3
| | | | | | | | | * refactor cmpNimIdentifier * Apply suggestions from code review Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* macros.quote: document hard to use `op`; add more useful examples (#16489)Timothee Cour2021-01-061-23/+71
| | | | | | | | | | | | | | | | | * macros.quote: document hard to use `op`; add more useful examples * add back doc comment removed in a60305fbf3897cd90680e693dd4c0db2334d85d4 * address comment * fixup * clarify quoting rules * Update lib/core/macros.nim Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
* refactor cmpIgnoreStyle and cmpIgnoreCase (#16399)flywind2020-12-312-36/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * support strutils * more * better * Call len once per string/cstring * Change var to let * Compare ternary on first char * More appropriate param name * fix * better * one test * impl * more efficient * minor Co-authored-by: Clyybber <darkmine956@gmail.com>
* fix cmpIgnoreStyle bug (#16392)flywind2020-12-181-0/+1
|
* Fixes #16219, `hasArgOfName` ignoring argument sets. (#16233)Aditya Siram2020-12-031-4/+4
| | | | | | | | | | | | | | | * Fixes #16219, `hasArgOfName` ignoring argument sets. * Fix test and simplify ident traversal. * Moved test into a block and removed some boilerplate. * Fix some argument formatting. * use ..< * Change the preceding line too Co-authored-by: Clyybber <darkmine956@gmail.com>
* typeinfo minor improvement (#16083)flywind2020-11-231-111/+52
| | | | | | | | | * typeinfo minor improvement * minor * Update lib/core/typeinfo.nim * rename typeinfo
* alternative way to fix #16022 (#16064) [backport:1.4]flywind2020-11-201-2/+2
| | | | | | * alternative way to fix #16022 * add testcase for #16022 [backport:1.4]
* fix #15934 and #15620 (#15938) [backport:1.4]Andreas Rumpf2020-11-151-1/+4
|\ | | | | | | * make workaround for #15934 and #15620 * add testcase for #9754
| * nilflywind2020-11-131-0/+2
| |
| * make workaround for #15934 and #15620flywind2020-11-121-1/+2
| |
* | Correct all eggs (#15906)Miran2020-11-101-2/+2
|/ | | | * "eg" is a misspelled "egg", "e.g." is "exempli gratia" * Also, "ie" is "i.e.".
* ARC now capable of custom extra alignment. Ref, closure and seq support. ↵cooldome2020-10-281-2/+2
| | | | (#15697)
* fix rlock compilation failure (#15584)shirleyquirk2020-10-151-1/+1
| | | | | | | | | | | * change SysLockType_Reentrant fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h * syslocktype_reentrant now a var * remove nodecl to remove empty system_syslocks.c * let is better than var. in reality SysLockType = enum, maybe that would be a better fix
* fixes #9754 [backport] (#15342)Andreas Rumpf2020-09-161-4/+1
|
* allow old styled RTTI for arc/orc (#15331)Andreas Rumpf2020-09-161-54/+113
|
/commit/doc/destructors.rst?h=devel&id=d37c4e44d3243acd91ffd91515e8a1807c979bad'>d37c4e44d ^
83ae70cb5 ^




d37c4e44d ^




83ae70cb5 ^
d37c4e44d ^




83ae70cb5 ^

da64c8762 ^




d37c4e44d ^

83ae70cb5 ^


d37c4e44d ^


0cae8ef2c ^
d37c4e44d ^











83ae70cb5 ^
d37c4e44d ^











a0eca7518 ^


86c9b7833 ^




511b6d244 ^
86c9b7833 ^

a0eca7518 ^






a0eca7518 ^


d37c4e44d ^



d37c4e44d ^

83ae70cb5 ^
d37c4e44d ^
83ae70cb5 ^
d37c4e44d ^
1854d2978 ^

d37c4e44d ^








da64c8762 ^


c9c8fa99c ^

d37c4e44d ^


da64c8762 ^




d37c4e44d ^

da64c8762 ^






d37c4e44d ^



da4aa2e1f ^
d37c4e44d ^

da64c8762 ^


d37c4e44d ^


da64c8762 ^
da4aa2e1f ^
da64c8762 ^
d37c4e44d ^

da64c8762 ^









83ae70cb5 ^
d37c4e44d ^

da64c8762 ^


83ae70cb5 ^
da64c8762 ^
c5358b0d4 ^

da64c8762 ^
d37c4e44d ^
da64c8762 ^
d37c4e44d ^

83ae70cb5 ^
da64c8762 ^
d37c4e44d ^
83ae70cb5 ^

ccb11a63f ^

83ae70cb5 ^


ccb11a63f ^


d37c4e44d ^
83ae70cb5 ^

d37c4e44d ^

da64c8762 ^
d37c4e44d ^
da64c8762 ^













d37c4e44d ^
d37c4e44d ^


da64c8762 ^
































d37c4e44d ^




83ae70cb5 ^
d37c4e44d ^
83ae70cb5 ^
d37c4e44d ^

83ae70cb5 ^
d37c4e44d ^

83ae70cb5 ^
d37c4e44d ^
83ae70cb5 ^
d37c4e44d ^










da64c8762 ^
fb641483f ^
d37c4e44d ^





da64c8762 ^
d37c4e44d ^









06dfd3161 ^


83ae70cb5 ^
06dfd3161 ^
83ae70cb5 ^
06dfd3161 ^












83ae70cb5 ^
06dfd3161 ^









83ae70cb5 ^
06dfd3161 ^
83ae70cb5 ^


06dfd3161 ^

d37c4e44d ^
c5358b0d4 ^







3aab6a409 ^
c5358b0d4 ^














d37c4e44d ^


83ae70cb5 ^



d37c4e44d ^
83ae70cb5 ^

d37c4e44d ^
0cae8ef2c ^
d37c4e44d ^






















83ae70cb5 ^
d37c4e44d ^




83ae70cb5 ^





d37c4e44d ^












06dfd3161 ^
d37c4e44d ^

06dfd3161 ^
d37c4e44d ^


06dfd3161 ^
d37c4e44d ^












0efd96956 ^










83ae70cb5 ^


0efd96956 ^




83ae70cb5 ^



0efd96956 ^

511b6d244 ^


0efd96956 ^

511b6d244 ^
0efd96956 ^


83ae70cb5 ^


0efd96956 ^
83ae70cb5 ^
0efd96956 ^

a04c9d1f6 ^
0efd96956 ^
83ae70cb5 ^


0efd96956 ^
83ae70cb5 ^


0efd96956 ^
a04c9d1f6 ^
0efd96956 ^

83ae70cb5 ^








0efd96956 ^

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
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703