forked from iains/gcc-cxx-coroutines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog.coroutines
3017 lines (2258 loc) · 94.9 KB
/
ChangeLog.coroutines
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
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2020-01-16 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/coro.h: Use <cstdlib> instead of a local
declaration for abort ().
2020-01-14 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (build_co_await): Check that a handle type
returned by await_suspend is an instance of the coroutines
handle template.
2020-01-14 Iain Sandoe <iain@sandoe.co.uk>
libiberty/
* testsuite/demangle-expected: Add testcase for the co_await
operator mangling.
2020-01-13 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (morph_fn_to_coro): Use new and delete to
manage the suspend_points map.
2020-01-13 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (find_coro_traits_template_class): Delete forward
referenced.
(find_coro_handle_type): Likewise.
(coro_traits_templ, coro_handle_templ): New.
(find_coro_traits_template_decl): New.
(instantiate_coro_traits): Revised from
find_coro_traits_template_class.
(find_coro_handle_template_decl): New.
(instantiate_coro_handle_for_promise_type): Revised from
find_coro_handle_type.
(coro_promise_type_found_p): Look up the required coroutine
traits and handle templates, fail if they are not found.
2020-01-13 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* call.c (build_new_function_call): Remove extraneous test.
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (finish_co_return_stmt): We should mark the
trees as TREE_NO_WARNING unconditionally (the actual check has
to be done separately).
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (get_or_insert_coroutine_info): Use a cleared
allocator.
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc: Adjust struct use to C++ style.
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc: Mark static trees with GTY.
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* constexpr.c (potential_constant_expression_1): Update comment.
* coroutines.cc: Update comments and use of extended format print
options.
* decl.c (emit_coro_helper): Add a comment.
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (captures_temporary): Restore checks for and
skipping of, this pointers in ctors and dtors.
2020-01-10 Iain Sandoe <iain@sandoe.co.uk>
libstdc++-v3/
* include/std/coroutine: Adjust whitespace. Add a definition
for the spaceship operator on coroutine handles.
2020-01-09 Iain Sandoe <iain@sandoe.co.uk>
libstdc++-v3/
* include/std/coroutine: Correct pathname in the edit header.
2020-01-09 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* function.h: Fix trailing whitespace.
2020-01-09 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (coro_validate_builtin_call): Remove the name
of the currently unused argument.
2020-01-08 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (build_actor_fn): Handle use of overloaded
operator delete.
(morph_fn_to_coro): Handle use of overloaded operator new.
gcc/testsuite/
* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Rename...
* g++.dg/coroutines/torture/alloc-00-gro-on-alloc-fail.C: ... to this.
* g++.dg/coroutines/torture/alloc-01-overload-newdel.C: New test.
2020-01-06 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r279893.
2020-01-02 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (find_std_experimental): Remove unneeded code.
libstdc++-v3/
* include/Makefile.am: Move coroutine header source from
experimental to std.
* include/Makefile.in: Regenerated.
* include/experimental/coroutine: Move from here..
* include/std/coroutine: ... to here.
2020-01-01 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-builtins.def: Update copyright year.
* coroutine-passes.cc: Likewise.
gcc/cp/
* coroutines.cc: Likewise.
gcc/testsuite/
* g++.dg/coroutines/coroutines.exp: Likewise.
libstdc++-v3/
* include/experimental/coroutine: Likewise.
2019-12-31 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-await-syntax-01-outside-fn.C: Use coro
namespace;
* g++.dg/coroutines/co-await-syntax-02-outside-fn.C: Likewise.
* g++.dg/coroutines/co-await-syntax-04-ctor-dtor.C: Likewise.
* g++.dg/coroutines/co-await-syntax-05-constexpr.C: Likewise.
* g++.dg/coroutines/co-await-syntax-06-main.C: Likewise.
* g++.dg/coroutines/co-await-syntax-07-varargs.C: Likewise.
* g++.dg/coroutines/coro.h: Check for the coroutines header in
the top level before trying the experimental case.
2019-12-30 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r279761.
2019-12-29 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* call.c (build_new_function_call): Validate coroutine builtins
arguments.
* coroutines.cc (coro_validate_builtin_call): New.
* cp-tree.h (coro_validate_builtin_call): New.
2019-12-29 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* builtin-types.def (BT_CONST_SIZE): New.
(BT_FN_PTR_PTR_SIZE_BOOL): Update this...
(BT_FN_PTR_PTR_CONST_SIZE_BOOL): ... to this.
* coroutine-builtins.def (BUILT_IN_CORO_PROMISE): Use revised
builtin signature.
2019-12-27 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (execute_early_expand_coro_ifns):
Remove unneeded control flow and reindent.
2019-12-27 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (lower_coro_builtin): Re-indent.
(make_pass_coroutine_lower_builtins): Spelling corrections.
2019-12-24 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (captures_temporary): Remove unused var.
2019-12-24 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (execute_early_expand_coro_ifns): Use
a worklist to contain and process the IFN_CO_ACTORs.
2019-12-23 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/co-ret-03-different GRO-type.C:
Rename to...
* g++.dg/coroutines/torture/co-ret-03-different-GRO-type.C:
... this.
2019-12-23 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r279715.
2019-12-22 Iain Sandoe <iain@sandoe.co.uk>
* g++.dg/coroutines/torture/func-params-0.C: Rename to...
* g++.dg/coroutines/torture/func-params-00.C: ... this.
* g++.dg/coroutines/torture/func-params-1.C: Rename to...
* g++.dg/coroutines/torture/func-params-01.C: ... this.
* g++.dg/coroutines/torture/func-params-2.C: Rename to...
* g++.dg/coroutines/torture/func-params-02.C: ... this.
* g++.dg/coroutines/torture/func-params-3.C: Rename to...
* g++.dg/coroutines/torture/func-params-03.C: ... this.
* g++.dg/coroutines/torture/func-params-4.C: Rename to...
* g++.dg/coroutines/torture/func-params-04.C: ... this.
* g++.dg/coroutines/torture/func-params-5.C: Rename to...
* g++.dg/coroutines/torture/func-params-05.C: ... this.
* g++.dg/coroutines/torture/func-params-6.C: Rename to...
* g++.dg/coroutines/torture/func-params-06.C: ... this.
2019-12-22 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/co-yield-0-triv.C: Rename to...
* g++.dg/coroutines/torture/co-yield-00-triv.C: ... this.
* g++.dg/coroutines/torture/co-yield-1-multi.C: Rename to...
* g++.dg/coroutines/torture/co-yield-01-multi.C: ... this.
* g++.dg/coroutines/torture/co-yield-2-loop.C: Rename to...
* g++.dg/coroutines/torture/co-yield-02-loop.C: ... this.
* g++.dg/coroutines/torture/co-yield-3-tmpl.C: Rename to...
* g++.dg/coroutines/torture/co-yield-03-tmpl.C: ... this.
* g++.dg/coroutines/torture/co-yield-strings.C: Rename to...
* g++.dg/coroutines/torture/co-yield-04-complex-local-state.C:
... this..
2019-12-21 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Rename to...
* g++.dg/coroutines/torture/co-ret-00-void-return-is-ready.C:
... this.
* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Rename to...
* g++.dg/coroutines/torture/co-ret-01-void-return-is-suspend.C:
... this.
* g++.dg/coroutines/torture/co-ret-3.C: Rename to...
* g++.dg/coroutines/torture/co-ret-03-different: ... this.
* g++.dg/coroutines/torture/co-ret-4.C: Rename to...
* g++.dg/coroutines/torture/co-ret-04-GRO-nontriv.C: ... this.
* g++.dg/coroutines/torture/co-ret-5.C: Rename to...
* g++.dg/coroutines/torture/co-ret-05-return-value.C: ... this.
* g++.dg/coroutines/torture/co-ret-6.C: Rename to...
* g++.dg/coroutines/torture/co-ret-06-template-promise-val-1.C:
... this.
* g++.dg/coroutines/torture/co-ret-7.C: Rename to...
* g++.dg/coroutines/torture/co-ret-07-void-cast-expr.C: ... this.
* g++.dg/coroutines/torture/co-ret-8.C: Rename to...
* g++.dg/coroutines/torture/co-ret-08-template-cast-ret.C: ... this.
* g++.dg/coroutines/torture/co-ret-9.C: Rename to...
* g++.dg/coroutines/torture/co-ret-09-bool-await-susp.C: ... this.
* g++.dg/coroutines/torture/co-ret-10.C: Rename to...
* g++.dg/coroutines/torture/co-ret-10-expression-evaluates-once.C:
... this
* g++.dg/coroutines/torture/co-ret-11.C: Rename to...
* g++.dg/coroutines/torture/co-ret-11-co-ret-co-await.C: ... this.
* g++.dg/coroutines/torture/co-ret-12.C: Rename to...
* g++.dg/coroutines/torture/co-ret-12-co-ret-fun-co-await.C:
... this.
2019-12-21 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/co-await-0-triv.C: Rename to...
* g++.dg/coroutines/torture/co-await-00-trivial.C: ... this.
* g++.dg/coroutines/torture/co-await-1-value.C: Rename to...
* g++.dg/coroutines/torture/co-await-01-with-value.C: ... this.
* g++.dg/coroutines/torture/co-await-2-xform.C: Rename to...
* g++.dg/coroutines/torture/co-await-02-xform.C: ... this..
* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Rename to...
* g++.dg/coroutines/torture/co-await-03-rhs-op.C: ... this..
* g++.dg/coroutines/torture/co-await-4-control-flow.C: Rename to...
* g++.dg/coroutines/torture/co-await-04-control-flow.C: ... this.
* g++.dg/coroutines/torture/co-await-5-loop.C: Rename to...
* g++.dg/coroutines/torture/co-await-05-loop.C: ... this.
* g++.dg/coroutines/torture/co-await-6-ovl.C: Rename to...
* g++.dg/coroutines/torture/co-await-06-ovl.C: ... this.
* g++.dg/coroutines/torture/co-await-7-tmpl.C: Rename to...
* g++.dg/coroutines/torture/co-await-07-tmpl.C: ... this..
* g++.dg/coroutines/torture/co-await-8-cascade.C: Rename to...
* g++.dg/coroutines/torture/co-await-08-cascade.C: ... this.
* g++.dg/coroutines/torture/co-await-9-pair.C: Rename to...
* g++.dg/coroutines/torture/co-await-09-pair.C: ... this.
2019-12-20 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (morph_fn_to_coro): Check for LAZY move ctors
and assigns.
2019-12-20 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (captures_temporary): Consider CTORs and
DTORs.
2019-12-19 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (captures_temporary): Account for capture of
co_await expression results by reference in call argument
lists.
(maybe_promote_captured_temps): Likewise.
2019-12-18 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (morph_fn_to_coro): Delete allocated vec
if we are not going to use it.
2019-12-17 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/ChangeLog:
* coroutines.cc (build_co_await): Set the co_await expression
type to that of the await_resume call.
gcc/testsuite/
* g++.dg/coroutines/coro1-ret-int-yield-int.h: Add an awaitable
that returns a reference.
* g++.dg/coroutines/torture/call-03-temp-ref-co-aw.C: New test.
* g++.dg/coroutines/torture/co-await-12-operator-2.C: Make the
syntax more regular.
* g++.dg/coroutines/torture/co-await-13-return-ref.C: New test.
* g++.dg/coroutines/torture/co-yield-08-more-refs.C: New test.
* g++.dg/coroutines/torture/co-yield-09-more-templ-refs.C: New test.
2019-12-16 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r279408.
2019-12-15 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc: Check for blank lines before functions.
Check comment wrapping.
* decl.c (emit_coro_helper): Adjust a comment.
2019-12-15 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (create_anon_label_with_ctx): Mark created
label as used.
(create_named_label_with_ctx): Likewise.
2019-12-15 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/C
* g++.dg/coroutines/torture/func-params-6.C: New test.
2019-12-14 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (register_local_var_uses): Adjust frame entry
name for lambda capture proxies.
2019-12-14 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (struct __local_vars_frame_data): Add fields to
collect lambda captures.
(register_local_var_uses): Register lambda captures separately.
(morph_fn_to_coro): For each lambda capture, create a local proxy
and initialise the frame copy from this.
gcc/testsuite/
* g++.dg/coroutines/torture/class-04-lambda-1.C: Avoid dangling ref
to a parameter.
* g++.dg/coroutines/torture/class-05-lambda-capture-copy-local.C: New.
* g++.dg/coroutines/torture/class-06-lambda-capture-ref.C: New test.
* g++.dg/coroutines/torture/lambda-05-capture-copy-local.C: New test.
* g++.dg/coroutines/torture/lambda-06-multi-capture.C: New test.
* g++.dg/coroutines/torture/lambda-07-multi-yield.C: New test.
* g++.dg/coroutines/torture/lambda-08-co-ret-parm-ref.C: New test.
2019-12-13 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
PR c++/92933
* coroutines.cc (register_local_var_uses): Handle unnamed
compiler-generated local variables.
gcc/testsuite/
* g++.dg/coroutines/torture/pr92933.C: New test.
2019-12-13 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-await-syntax-08-lambda-auto.C: Use
correct dg options for syntax check.
* g++.dg/coroutines/co-return-syntax-09-lambda-auto.C: Likewise.
* g++.dg/coroutines/co-yield-syntax-09-lambda-auto.C: Likewise.
2019-12-12 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/class-04-lambda-1.C: New test.
* g++.dg/coroutines/torture/lambda-00-co-ret.C: New test.
* g++.dg/coroutines/torture/lambda-01-co-ret-parm.C: New test.
* g++.dg/coroutines/torture/lambda-02-co-yield-values.C: New test.
* g++.dg/coroutines/torture/lambda-03-auto-parm-1.C: New test.
* g++.dg/coroutines/torture/lambda-04-templ-parm.C: New test.
2019-12-12 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (coro_function_valid_p): Return false if we
find inconsistent return information.
* decl.c (finish_function): If the morph fails, assume that
we have nothing interesting in the function body.
2019-12-11 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-await-syntax-08-lambda-auto.C: New test.
* g++.dg/coroutines/co-return-syntax-09-lambda-auto.C: New test.
* g++.dg/coroutines/co-yield-syntax-09-lambda-auto.C: New test.
2019-12-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/class-00-co-ret.C: New test.
* g++.dg/coroutines/torture/class-01-co-ret-parm.C: New test.
* g++.dg/coroutines/torture/class-02-templ-parm.C: New test.
* g++.dg/coroutines/torture/class-03-operator-templ-parm.C: New test.
2019-12-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* constexpr.c (potential_constant_expression_1): Add
CO_RETURN_EXPR to the list of coroutine exclusions.
2019-12-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/coro1-ret-int-yield-int.h: Use long
format for long data.
2019-12-10 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-return-syntax-01-outside-fn.C: New test.
* g++.dg/coroutines/co-return-syntax-02-outside-fn.C: New test.
* g++.dg/coroutines/coro-auto-fn.C: Rename to...
* g++.dg/coroutines/co-return-syntax-03-auto.C: ... this.
* g++.dg/coroutines/coro-context-ctor-dtor.C: Rename to...
* g++.dg/coroutines/co-return-syntax-04-ctor-dtor.C: ... this.
* g++.dg/coroutines/coro-constexpr-fn.C: Rename to...
* g++.dg/coroutines/co-return-syntax-05-constexpr-fn.C: ... this.
* g++.dg/coroutines/coro-context-main.C: Rename to...
* g++.dg/coroutines/co-return-syntax-06-main.C: ... this.
* g++.dg/coroutines/coro-context-vararg.C: Rename to...
* g++.dg/coroutines/co-return-syntax-07-vararg.C: ... this.
* g++.dg/coroutines/coro-bad-return.C: Rename to...
* g++.dg/coroutines/co-return-syntax-08-bad-return.C: ... this..
2019-12-09 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r279104.
2019-12-08 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/torture/co-await-12-operator-2.C: New test.
* g++.dg/coroutines/torture/co-await-6-ovl.C: Make the operator
result participate in the output.
2019-12-08 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (execute_early_expand_coro_ifns): Early
exit on first non-label.
2019-12-08 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (find_coro_traits_template_class): Use pre-
built namespace.
(find_coro_handle_type): Likewise.
(coro_promise_type_found_p): Initialise namespace and void
coro handle trees.
2019-12-08 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/ChangeLog:
* coroutines.cc (find_coro_traits_template_decl): Rename forward
declaration to...
(find_coro_traits_template_class): ... this.
(find_std_experimental): Quote std::experimental.
2019-12-08 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/coro.h: Just formatting change.
* g++.dg/coroutines/coro1-ret-int-yield-int.h: Add return_void.
* g++.dg/coroutines/torture/co-await-7-tmpl.C: Add missing cast.
* g++.dg/coroutines/torture/co-ret-5.C: Use boiler-plate header.
* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
2019-12-07 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (finish_co_await_expr): Check the function args
for dependent types as well as the return.
(finish_co_yield_expr): Likewise.
(finish_co_return_stmt): Likewise.
gcc/testsuite/
* g++.dg/coroutines/torture/co-await-10-template-fn-arg.C: New test.
* g++.dg/coroutines/torture/co-await-11-forwarding.C: New test.
* g++.dg/coroutines/torture/co-ret-13-template-2.C: New test.
* g++.dg/coroutines/torture/co-ret-14-template-3.C: New test.
* g++.dg/coroutines/torture/co-yield-07-template-fn-param.C: New test.
2019-12-07 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (find_std_experimental): Check for NULL
tree return.
(find_coro_traits_template_decl): Renamed to...
(find_coro_traits_template_class): ...this; revise to use a
TYPE_ARGUMENT_PACK for the second param to the traits lookup.
Pass the function in instead of assuming we should find it in
current_function_decl.
(find_coro_handle_type): Show errors or warnings.
(find_promise_type): Rename variables. Show errors and warnings.
(coro_promise_type_found_p): Revise comments and variable names.
2019-12-07 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/coro1-ret-int-yield-int.h: Extract
awaitable, await_transform and promise CTOR from tests.
* g++.dg/coroutines/torture/co-await-8-cascade.C: Use
common header.
* g++.dg/coroutines/torture/func-params-0.C: Likewise.
2019-12-06 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/ChangeLog:
* g++.dg/coroutines/co-yield-syntax-0.C: Rename to...
* g++.dg/coroutines/co-yield-syntax-00-needs-expr.C: ...this
* g++.dg/coroutines/co-yield-syntax-1.C: Rename to...
* g++.dg/coroutines/co-yield-syntax-01-outside-fn.C: ...this
* g++.dg/coroutines/co-yield-syntax-2.C: Rename to...
* g++.dg/coroutines/co-yield-syntax-02-outside-fn.C: ...this.
* g++.dg/coroutines/co-yield-syntax-03-auto.C: New test.
* g++.dg/coroutines/co-yield-syntax-04-ctor-dtor.C: New test.
* g++.dg/coroutines/co-yield-syntax-05-constexpr.C: New test.
* g++.dg/coroutines/co-yield-syntax-06-main.C: New test.
* g++.dg/coroutines/co-yield-syntax-07-varargs.C: New test.
* g++.dg/coroutines/co-yield-syntax-3.C: Rename to...
* g++.dg/coroutines/co-yield-syntax-08-needs-expr.C: ...this.
2019-12-06 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-await-syntax-0.C: Rename to...
* g++.dg/coroutines/co-await-syntax-00-needs-expr.C: ... this.
* g++.dg/coroutines/co-await-syntax-01-outside-fn.C: New test.
* g++.dg/coroutines/co-await-syntax-02-outside-fn.C: New test.
* g++.dg/coroutines/coro-await-context-auto-fn.C: Rename to...
* g++.dg/coroutines/co-await-syntax-03-auto.C: ... this.
* g++.dg/coroutines/co-await-syntax-04-ctor-dtor.C: New test.
* g++.dg/coroutines/co-await-syntax-05-constexpr.C: New test.
* g++.dg/coroutines/co-await-syntax-06-main.C: New test.
* g++.dg/coroutines/co-await-syntax-07-varargs.C: New test.
2019-12-06 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-yield-syntax-3.C: Tidy testcase.
* g++.dg/coroutines/torture/co-await-0-triv.C: Likewise.
* g++.dg/coroutines/torture/co-await-1-value.C: Likewise.
* g++.dg/coroutines/torture/co-await-2-xform.C: Likewise.
* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Likewise.
* g++.dg/coroutines/torture/co-await-4-control-flow.C: Likewise.
* g++.dg/coroutines/torture/co-await-5-loop.C: Likewise.
* g++.dg/coroutines/torture/co-await-6-ovl.C: Likewise.
* g++.dg/coroutines/torture/co-await-7-tmpl.C: Likewise.
* g++.dg/coroutines/torture/co-await-8-cascade.C: Likewise.
* g++.dg/coroutines/torture/co-await-9-pair.C: Likewise.
* g++.dg/coroutines/torture/co-ret-10.C: Likewise.
* g++.dg/coroutines/torture/co-ret-11.C: Likewise.
* g++.dg/coroutines/torture/co-ret-12.C: Likewise.
* g++.dg/coroutines/torture/co-ret-3.C: Likewise.
* g++.dg/coroutines/torture/co-ret-4.C: Likewise.
* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
* g++.dg/coroutines/torture/co-ret-6.C: Likewise.
* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
* g++.dg/coroutines/torture/co-ret-8.C: Likewise.
* g++.dg/coroutines/torture/co-ret-9.C: Likewise.
* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
* g++.dg/coroutines/torture/co-yield-0-triv.C: Likewise.
* g++.dg/coroutines/torture/co-yield-1-multi.C: Likewise.
* g++.dg/coroutines/torture/co-yield-2-loop.C: Likewise.
* g++.dg/coroutines/torture/co-yield-3-tmpl.C: Likewise.
* g++.dg/coroutines/torture/co-yield-strings.C: Likewise.
* g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
* g++.dg/coroutines/torture/func-params-0.C: Likewise.
* g++.dg/coroutines/torture/func-params-1.C: Likewise.
* g++.dg/coroutines/torture/func-params-2.C: Likewise.
* g++.dg/coroutines/torture/func-params-3.C: Likewise.
* g++.dg/coroutines/torture/func-params-4.C: Likewise.
* g++.dg/coroutines/torture/func-params-5.C: Likewise.
* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Likewise.
* g++.dg/coroutines/torture/local-var-0.C: Likewise.
* g++.dg/coroutines/torture/local-var-1.C: Likewise.
* g++.dg/coroutines/torture/local-var-2.C: Likewise.
* g++.dg/coroutines/torture/local-var-3.C: Likewise.
* g++.dg/coroutines/torture/local-var-4.C: Likewise.
* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
2019-12-05 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (co_await_expander): Handle CALL_EXPR.
gcc/testsuite/
* g++.dg/coroutines/coro1-ret-int-yield-int.h: New helper include.
* g++.dg/coroutines/torture/call-00-co-aw-arg.C: New test.
* g++.dg/coroutines/torture/call-01-multiple-co-aw.C: New test.
* g++.dg/coroutines/torture/call-02-temp-co-aw.C: New test.
* g++.dg/coroutines/torture/co-ret-11.C: New test.
* g++.dg/coroutines/torture/co-ret-12.C: New test.
* g++.dg/coroutines/torture/co-yield-05-co-aw.C: New test.
* g++.dg/coroutines/torture/co-yield-06-fun-parm.C: New test.
2019-12-05 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (create_named_label_with_ctx): Adjust
comment. Don't mark our local labels as used.
(transform_await_expr): Update comments.
(build_actor_fn): Likewise.
(morph_fn_to_coro): Tidy asserts, and make them checking
variety. Remove development code.
2019-12-04 Iain Sandoe <iain@sandoe.co.uk>
libiberty/
* cp-demangle.c (cplus_demangle_operators): Add the co_await
operator.
2019-12-03 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (gate): Check for coroutine components in
addition to the coroutine enable flag before executing the IFN
lowering pass.
* function.h (struct function): Allocate a bit to indicate that
the function is a coroutine component.
gcc/cp/
* decl.c (emit_coro_helper): Set coroutine component bit when
needed.
(finish_function): Likewise.
2019-12-02 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r278894.
2019-12-01 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (lower_coro_builtin): Amend comments.
(execute_early_expand_coro_ifns): Expand CO_FRAME.
(execute_finalize_frame): Remove.
(class pass_coroutine_finalize_frame): Remove.
(make_pass_coroutine_finalize_frame): Remove.
* passes.def: Remove finalize frame pass.
* tree-pass.h (make_pass_coroutine_finalize_frame): Remove.
2019-11-30 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (lookup_promise_member): Remove.
(coro_init_identifiers): New.
(coro_promise_type_found_p): Initialize the coroutines state
and identifiers lazily.
(lookup_promise_method): New.
(build_co_await): Use pre-built identifiers for coroutine,
promise and awaiter names.
(finish_co_await_expr): Likewise.
(finish_co_yield_expr): Likewise.
(finish_co_return_stmt): Likewise.
(co_await_expander): Likewise.
(build_actor_fn): Likewise.
(build_init_or_final_await): Likewise.
(morph_fn_to_coro): Likewise.
* cp-tree.h (enum cp_tree_index): Remove coroutine identifiers.
* decl.c (initialize_predefined_identifiers): Likewise.
2019-11-29 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (lower_coro_builtin): Use nodes and APIs
consistent with other places in the middle end.
2019-11-29 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc (lower_coro_builtin): Use ptr_type_node
throughout instead of building nodes each time.
2019-11-27 Iain Sandoe <iain@sandoe.co.uk>
libstdc++-v3/
* include/experimental/coroutine: Update document group
information.
2019-11-27 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/co-yield-syntax-3.C: Move common code to
coro.h.
* g++.dg/coroutines/coro-bad-return.C: Likewise.
* g++.dg/coroutines/coro-context-vararg.C: Likewise.
* g++.dg/coroutines/coro-missing-gro.C: Likewise.
* g++.dg/coroutines/coro-missing-promise-yield.C: Likewise.
* g++.dg/coroutines/coro-missing-ret-value.C: Likewise.
* g++.dg/coroutines/coro-missing-ret-void.C: Likewise.
* g++.dg/coroutines/coro-missing-ueh-1.C: Likewise.
* g++.dg/coroutines/coro-missing-ueh-2.C: Likewise.
* g++.dg/coroutines/coro-missing-ueh-3.C: Likewise.
* g++.dg/coroutines/coro-missing-ueh.h: Likewise.
* g++.dg/coroutines/torture/co-await-0-triv.C: Likewise.
* g++.dg/coroutines/torture/co-await-1-value.C: Likewise.
* g++.dg/coroutines/torture/co-await-2-xform.C: Likewise.
* g++.dg/coroutines/torture/co-await-3-rhs-op.C: Likewise.
* g++.dg/coroutines/torture/co-await-4-control-flow.C: Likewise.
* g++.dg/coroutines/torture/co-await-5-loop.C: Likewise.
* g++.dg/coroutines/torture/co-await-6-ovl.C: Likewise.
* g++.dg/coroutines/torture/co-await-7-tmpl.C: Likewise.
* g++.dg/coroutines/torture/co-await-8-cascade.C: Likewise.
* g++.dg/coroutines/torture/co-await-9-pair.C: Likewise.
* g++.dg/coroutines/torture/co-ret-10.C: Likewise.
* g++.dg/coroutines/torture/co-ret-3.C: Likewise.
* g++.dg/coroutines/torture/co-ret-4.C: Likewise.
* g++.dg/coroutines/torture/co-ret-5.C: Likewise.
* g++.dg/coroutines/torture/co-ret-6.C: Likewise.
* g++.dg/coroutines/torture/co-ret-7.C: Likewise.
* g++.dg/coroutines/torture/co-ret-8.C: Likewise.
* g++.dg/coroutines/torture/co-ret-9.C: Likewise.
* g++.dg/coroutines/torture/co-ret-void-is-ready.C: Likewise.
* g++.dg/coroutines/torture/co-ret-void-is-suspend.C: Likewise.
* g++.dg/coroutines/torture/co-yield-0-triv.C: Likewise.
* g++.dg/coroutines/torture/co-yield-1-multi.C: Likewise.
* g++.dg/coroutines/torture/co-yield-2-loop.C: Likewise.
* g++.dg/coroutines/torture/co-yield-3-tmpl.C: Likewise.
* g++.dg/coroutines/torture/co-yield-strings.C: Likewise.
* g++.dg/coroutines/torture/exceptions-test-0.C: Likewise.
* g++.dg/coroutines/torture/func-params-0.C: Likewise.
* g++.dg/coroutines/torture/func-params-1.C: Likewise.
* g++.dg/coroutines/torture/func-params-2.C: Likewise.
* g++.dg/coroutines/torture/func-params-3.C: Likewise.
* g++.dg/coroutines/torture/func-params-4.C: Likewise.
* g++.dg/coroutines/torture/func-params-5.C: Likewise.
* g++.dg/coroutines/torture/gro_on_alloc_fail_0.C: Likewise.
* g++.dg/coroutines/torture/local-var-0.C: Likewise.
* g++.dg/coroutines/torture/local-var-1.C: Likewise.
* g++.dg/coroutines/torture/local-var-2.C: Likewise.
* g++.dg/coroutines/torture/local-var-3.C: Likewise.
* g++.dg/coroutines/torture/local-var-4.C: Likewise.
* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Likewise.
* g++.dg/coroutines/coro.h: Collect common code here.
2019-11-26 Iain Sandoe <iain@sandoe.co.uk>
libstdc++-v3/
* include/experimental/coroutine: Use GNU convention for
naming. Use implementation-reserved identifiers.
2019-11-25 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r278677.
2019-11-24 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (find_coro_traits_template_decl): Use global
identifier.
(find_coro_handle_type): Likewise.
(find_promise_type): Likewise.
* cp-tree.h (enum cp_tree_index): Add indices for the coroutine
global identifiers.
(coro_traits_identifier): New.
(coro_handle_identifier): New.
(coro_promise_type_identifier): New.
* decl.c (initialize_predefined_identifiers): Initialize global
identifiers for coroutines.
2019-11-23 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc: Updated to en_US spellings. Corrected more
punctuation in error messages.
2019-11-23 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* config-lang.in (gtfiles): Add coroutines.cc.
* coroutines.cc (struct coroutine_info_hasher): New.
(coroutine_info_hasher::hash): New.
(coroutine_info_hasher::equal): New.
(get_or_insert_coroutine_info): New.
(get_coroutine_info): New.
(struct coroutine_info): Revise to use in a hash_table.
(coro_promise_type_found_p): Amend to use GTY coroutine_info.
(get_coroutine_promise_type): Likewise.
(get_coroutine_handle_type): Likewise.
(get_coroutine_self_handle_proxy): Likewise.
(get_coroutine_promise_proxy): Likewise.
2019-11-20 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc(struct coroutine_info): Make C++ style, comment
fields.
(coro_promise_type_found_p): Adjust info type name.
(get_coroutine_promise_type): Likewise.
(get_coroutine_handle_type): Likewise.
(get_coroutine_self_handle_proxy): Likewise.
(get_coroutine_promise_proxy): Likewise.
(coro_common_keyword_context_valid_p): Adjust error message line
wrapping.
(coro_function_valid_p): Fix comment line wrap.
(enum suspend_point_kind): New.
(build_co_await): Use suspend_point_kind enum. Amend comments,
remove TYPE_CANONICAL() lookup.
(finish_co_await_expr): Remove extra checks on expression, use
Use suspend_point_kind enum.
(finish_co_yield_expr): Likewise.
(co_await_expander): Likewise.
(build_init_or_final_await): Likewise.
gcc/testsuite/
* g++.dg/coroutines/co-await-syntax-0.C: New test.
* g++.dg/coroutines/co-yield-syntax-0.C: New test.
2019-11-19 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/ChangeLog:
* cp-tree.def (CO_RETRN_EXPR): Rename this to ...
(CO_RETURN_EXPR): ... this.
* coroutines.cc (finish_co_return_stmt): Rename CO_RETRN_EXPR.
(coro_maybe_expand_co_return): Likewise.
* cp-objcp-common.c (cp_common_init_ts): Likewise.
* pt.c (tsubst_expr): Likewise.
* tree.c (cp_walk_subtrees): Likewise.
2019-11-19 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc: Revise includes.
(debug_tree): Remove debug code.
(lookup_promise_member): Fix whitespace.
(find_coro_traits_template_decl): Adjust comments, fix error
message punctuation.
(get_coroutine_promise_type): Adjust style.
(get_coroutine_handle_type): Likewise.
(get_coroutine_self_handle_proxy): Likewise.
(get_coroutine_promise_proxy): Likewise.
(coro_common_keyword_context_valid_p): Add references to the
standards sections.
to the comments.
(coro_function_valid_p): Fix error message punctuation.
(build_co_await): Fix comments, fix case of a variable name.
(finish_co_await_expr): Fix comments.
(finish_co_yield_expr): Assert correct parser output.
(check_co_return_expr): Delete.
(finish_co_return_stmt): Remove unused code, correct some comments.
(register_await_info): Remove debug code.
(get_await_suspend_return_type): Likewise.
(captures_temporary): Likewise.
(register_local_var_uses): Likewise.
gcc/testsuite/
* g++.dg/coroutines/coro-bad-return.C: Update the error message.
2019-11-19 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (coro_maybe_expand_co_return): Ensure that an
expression is void type before inserting it. Update comments
to include the standard section refs.
gcc/testsuite/
* g++.dg/coroutines/torture/co-ret-10.C: New test.
* g++.dg/coroutines/torture/co-ret-7.C: Check that the void
expression is called exactly once.
2019-11-19 Iain Sandoe <iain@sandoe.co.uk>
gcc/testsuite/
* g++.dg/coroutines/coro.h: Remove references to
__builtin_coro_is_suspended.
2019-11-18 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc (captures_temporary): Correct condition on the
early return from this callback.
2019-11-18 Iain Sandoe <iain@sandoe.co.uk>
Merge trunk r278390.
2019-11-17 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-builtins.def: Update comments.
* coroutine-passes.cc: Likewise.
* internal-fn.c: Likewise.
gcc/c-family/
* c-common.h: Likewise.
gcc/cp/
* coroutines.cc: Likewise.
* tree.c: Likewise.
libstdc++-v3/
* include/experimental/coroutine: Likewise.
2019-11-17 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.cc: Delete unused code.
2019-11-16 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* constexpr.c (potential_constant_expression_1): Amend comments.
* parser.c (cp_parser_unary_expression): Likewise.
(cp_parser_jump_statement): Likewise.
2019-11-16 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-builtins.def: Tidy whitespace.
(BUILT_IN_CORO_IS_SUSPENDED): Delete.
(BUILT_IN_CORO_NOOP): Delete.
* coroutine-passes.cc (lower_coro_builtin): Remove lowering for
__builtin_coro_suspended.
gcc/testsuite/
* g++.dg/coroutines/coro-builtins.C: Remove checks for
__builtin_coro_suspended, __builtin_coro_noop.
* g++.dg/coroutines/torture/check-suspended.C: Remove.
* g++.dg/coroutines/torture/mid-suspend-destruction-0.C: Only
test suspended state if __builtin_coro_suspended is available.
libstdc++-v3/
* include/experimental/coroutine: Remove references to
__builtin_coro_suspended.
2019-11-16 Iain Sandoe <iain@sandoe.co.uk>
gcc/c-family/
* c.opt: Remove coroutines-ts alias for the command line
flag. Do not enable coroutines for Objective-C++.
2019-11-16 Iain Sandoe <iain@sandoe.co.uk>
gcc/cp/
* coroutines.cc: Lots of whitespace fixes.
gcc/
* coroutine-passes.cc: Likewise.
2019-11-15 Iain Sandoe <iain@sandoe.co.uk>
gcc/
* coroutine-passes.c: Rename to...
* coroutine-passes.cc: ... this.