1 2021-12-02 Iain Buclaw <ibuclaw@gdcproject.org>
4 * d-frontend.h (gc_disable): Declare.
5 * d-lang.cc (d_init_options): Disable the D runtime garbage collector
8 2021-12-02 Iain Buclaw <ibuclaw@gdcproject.org>
10 * Make-lang.in (D_FRONTEND_OBJS): Prefix object files from the root
12 (d/root-%.o): New recipe.
14 2021-12-01 Iain Buclaw <ibuclaw@gdcproject.org>
16 * d-spec.cc (lang_specific_driver): Set SKIPOPT on -static-libstdc++
17 and -static-libphobos only when target supports LD_STATIC_DYNAMIC.
18 Remove generate_option to re-add -static-libstdc++.
20 2021-12-01 Iain Buclaw <ibuclaw@gdcproject.org>
22 * gdc.texi (Runtime Options): Document -fcheckaction=, -fextern-std=,
23 -fpreview=, -frevert=.
24 (Code Generation): Document -fdump-c++-spec=, -fdump-c++-spec-verbose,
26 (Warnings): Update list of supported -ftransitions=.
28 2021-11-30 Iain Buclaw <ibuclaw@gdcproject.org>
30 * dmd/MERGE: Merge upstream dmd b8384668f.
31 * Make-lang.in (d-warn): Use strict warnings.
32 (DMD_WARN_CXXFLAGS): Remove.
33 (DMD_COMPILE): Remove.
34 (CHECKING_DFLAGS): Define.
35 (WARN_DFLAGS): Define.
37 (DCOMPILE.base): Define.
39 (DPOSTCOMPILE): Define.
42 (D_FRONTEND_OBJS): Add new dmd front-end objects.
43 (D_GENERATED_SRCS): Remove.
44 (D_GENERATED_OBJS): Remove.
45 (D_ALL_OBJS): Remove D_GENERATED_OBJS.
46 (d21$(exeext)): Build using DLLINKER and -static-libphobos.
47 (d.tags): Remove dmd/*.c and dmd/root/*.c.
48 (d.mostlyclean): Remove D_GENERATED_SRCS, d/idgen$(build_exeext),
49 d/impcnvgen$(build_exeext).
50 (D_INCLUDES): Include $(srcdir)/d/dmd/res.
51 (CFLAGS-d/id.o): Remove.
52 (CFLAGS-d/impcnvtab.o): Remove.
53 (d/%.o): Build using DCOMPILE and DPOSTCOMPILE. Update dependencies
54 from d/dmd/%.c to d/dmd/%.d.
55 (d/idgen$(build_exeext)): Remove.
56 (d/impcnvgen$(build_exeext)): Remove.
59 (d/impcnvtab.c): Remove.
60 (d/%.dmdgen.o): Remove.
62 (d/idgen.dmdgen.o): Remove.
63 (d/impcnvgen.dmdgen.o): Remove.
64 * config-lang.in (boot_language): New variable.
65 * d-attribs.cc: Include dmd/expression.h.
66 * d-builtins.cc: Include d-frontend.h.
67 (build_frontend_type): Update for new front-end interface.
68 (d_eval_constant_expression): Likewise.
69 (d_build_builtins_module): Likewise.
70 (maybe_set_builtin_1): Likewise.
71 (d_build_d_type_nodes): Likewise.
72 * d-codegen.cc (d_decl_context): Likewise.
73 (declaration_reference_p): Likewise.
74 (declaration_type): Likewise.
75 (parameter_reference_p): Likewise.
76 (parameter_type): Likewise.
77 (get_array_length): Likewise.
78 (build_delegate_cst): Likewise.
79 (build_typeof_null_value): Likewise.
80 (identity_compare_p): Likewise.
81 (lower_struct_comparison): Likewise.
82 (build_filename_from_loc): Likewise.
83 (build_assert_call): Remove LIBCALL_SWITCH_ERROR.
84 (build_bounds_index_condition): Call LIBCALL_ARRAYBOUNDS_INDEXP on
86 (build_bounds_slice_condition): Call LIBCALL_ARRAYBOUNDS_SLICEP on
88 (array_bounds_check): Update for new front-end interface.
89 (checkaction_trap_p): Handle CHECKACTION_context.
90 (get_function_type): Update for new front-end interface.
91 (d_build_call): Likewise.
92 * d-compiler.cc: Remove include of dmd/scope.h.
93 (Compiler::genCmain): Remove.
94 (Compiler::paintAsType): Update for new front-end interface.
95 (Compiler::onParseModule): Likewise.
96 * d-convert.cc (convert_expr): Remove call to LIBCALL_ARRAYCAST.
97 (convert_for_rvalue): Update for new front-end interface.
98 (convert_for_assignment): Likewise.
99 (convert_for_condition): Likewise.
100 (d_array_convert): Likewise.
101 * d-diagnostic.cc (error): Remove.
102 (errorSupplemental): Remove.
104 (warningSupplemental): Remove.
105 (deprecation): Remove.
106 (deprecationSupplemental): Remove.
109 * d-frontend.cc (global): Remove.
110 (Global::_init): Remove.
111 (Global::startGagging): Remove.
112 (Global::endGagging): Remove.
113 (Global::increaseErrorCount): Remove.
115 (Loc::toChars): Remove.
116 (Loc::equals): Remove.
117 (isBuiltin): Update for new front-end interface.
118 (eval_builtin): Likewise.
119 (getTypeInfoType): Likewise.
120 (inlineCopy): Remove.
121 * d-incpath.cc: Include d-frontend.h.
122 (add_globalpaths): Call d_gc_malloc to allocate Strings.
123 (add_filepaths): Likewise.
124 * d-lang.cc: Include dmd/id.h, dmd/root/file.h, d-frontend.h. Remove
125 include of dmd/mars.h, id.h.
126 (entrypoint_module): Remove.
127 (entrypoint_root_module): Remove.
128 (deps_write_string): Update for new front-end interface.
129 (deps_write): Likewise.
130 (d_init_options): Call rt_init. Remove setting global params that are
131 default initialized by the front-end.
132 (d_handle_option): Handle OPT_fcheckaction_, OPT_fdump_c___spec_,
133 OPT_fdump_c___spec_verbose, OPT_fextern_std_, OPT_fpreview,
134 OPT_revert, OPT_fsave_mixins_, and OPT_ftransition.
135 (d_post_options): Propagate dip1021 and dip1000 preview flags to
136 dip25, and flag_diagnostics_show_caret to printErrorContext.
137 (d_add_entrypoint_module): Remove.
138 (d_parse_file): Update for new front-end interface.
139 (d_type_promotes_to): Likewise.
140 (d_types_compatible_p): Likewise.
141 * d-longdouble.cc (CTFloat::zero): Remove.
142 (CTFloat::one): Remove.
143 (CTFloat::minusone): Remove.
144 (CTFloat::half): Remove.
145 * d-system.h (POSIX): Remove.
160 (UINT32_MAX): Remove.
161 (UINT64_MAX): Remove.
162 * d-target.cc: Include calls.h.
164 (define_float_constants): Remove initialization of snan.
165 (Target::_init): Update for new front-end interface.
166 (Target::isVectorTypeSupported): Likewise.
167 (Target::isVectorOpSupported): Remove cases for unordered operators.
168 (TargetCPP::typeMangle): Update for new front-end interface.
169 (TargetCPP::parameterType): Likewise.
170 (Target::systemLinkage): Likewise.
171 (Target::isReturnOnStack): Likewise.
172 (Target::isCalleeDestroyingArgs): Define.
173 (Target::preferPassByRef): Define.
174 * d-tree.h (d_add_entrypoint_module): Remove.
175 * decl.cc (gcc_attribute_p): Update for new front-end interface.
176 (apply_pragma_crt): Define.
177 (DeclVisitor::visit(PragmaDeclaration *)): Handle pragmas
178 crt_constructor and crt_destructor.
179 (DeclVisitor::visit(TemplateDeclaration *)): Update for new front-end
181 (DeclVisitor::visit): Likewise.
182 (DeclVisitor::finish_vtable): Likewise.
183 (get_symbol_decl): Error if template has more than one nesting
184 context. Update for new front-end interface.
185 (make_thunk): Update for new front-end interface.
186 (get_vtable_decl): Likewise.
187 * expr.cc (ExprVisitor::visit): Likewise.
188 (build_return_dtor): Likewise.
189 * imports.cc (ImportVisitor::visit): Likewise.
190 * intrinsics.cc: Include dmd/expression.h. Remove include of
192 (maybe_set_intrinsic): Update for new front-end interface.
193 * intrinsics.def (INTRINSIC_ROL): Update intrinsic signature.
194 (INTRINSIC_ROR): Likewise.
195 (INTRINSIC_ROR_TIARG): Likewise.
196 (INTRINSIC_TOPREC): Likewise.
197 (INTRINSIC_TOPRECL): Likewise.
198 (INTRINSIC_TAN): Update intrinsic module and signature.
199 (INTRINSIC_ISNAN): Likewise.
200 (INTRINSIC_ISFINITE): Likewise.
201 (INTRINSIC_COPYSIGN): Define intrinsic.
202 (INTRINSIC_COPYSIGNI): Define intrinsic.
203 (INTRINSIC_EXP): Update intrinsic module.
204 (INTRINSIC_EXPM1): Likewise.
205 (INTRINSIC_EXP2): Likewise.
206 (INTRINSIC_LOG): Likewise.
207 (INTRINSIC_LOG2): Likewise.
208 (INTRINSIC_LOG10): Likewise.
209 (INTRINSIC_POW): Likewise.
210 (INTRINSIC_ROUND): Likewise.
211 (INTRINSIC_FLOORF): Likewise.
212 (INTRINSIC_FLOOR): Likewise.
213 (INTRINSIC_FLOORL): Likewise.
214 (INTRINSIC_CEILF): Likewise.
215 (INTRINSIC_CEIL): Likewise.
216 (INTRINSIC_CEILL): Likewise.
217 (INTRINSIC_TRUNC): Likewise.
218 (INTRINSIC_FMIN): Likewise.
219 (INTRINSIC_FMAX): Likewise.
220 (INTRINSIC_FMA): Likewise.
221 (INTRINSIC_VA_ARG): Update intrinsic signature.
222 (INTRINSIC_VASTART): Likewise.
223 * lang.opt (fcheck=): Add alternate aliases for contract switches.
224 (fcheckaction=): New option.
225 (check_action): New Enum and EnumValue entries.
226 (fdump-c++-spec-verbose): New option.
227 (fdump-c++-spec=): New option.
228 (fextern-std=): New option.
229 (extern_stdcpp): New Enum and EnumValue entries
230 (fpreview=): New options.
231 (frevert=): New options.
232 (fsave-mixins): New option.
233 (ftransition=): Update options.
234 * modules.cc (get_internal_fn): Replace Prot with Visibility.
235 (build_internal_fn): Likewise.
236 (build_dso_cdtor_fn): Likewise.
237 (build_module_tree): Remove check for __entrypoint module.
238 * runtime.def (P5): Define.
239 (ARRAYBOUNDS_SLICEP): Define.
240 (ARRAYBOUNDS_INDEXP): Define.
244 (SWITCH_STRING): Remove.
245 (SWITCH_USTRING): Remove.
246 (SWITCH_DSTRING): Remove.
247 (SWITCH_ERROR): Remove.
248 * toir.cc (IRVisitor::visit): Update for new front-end interface.
249 (IRVisitor::check_previous_goto): Remove checks for case and default
251 (IRVisitor::visit(SwitchStatement *)): Remove handling of string
253 * typeinfo.cc: Include d-frontend.h.
254 (get_typeinfo_kind): Update for new front-end interface.
255 (make_frontend_typeinfo): Likewise.
256 (TypeInfoVisitor::visit): Likewise.
257 (builtin_typeinfo_p): Likewise.
258 (get_typeinfo_decl): Likewise.
259 (build_typeinfo): Likewise.
260 * types.cc (valist_array_p): Likewise.
261 (make_array_type): Likewise.
262 (merge_aggregate_types): Likewise.
263 (TypeVisitor::visit(TypeBasic *)): Likewise.
264 (TypeVisitor::visit(TypeFunction *)): Likewise.
265 (TypeVisitor::visit(TypeStruct *)): Update comment.
267 * d-frontend.h: New file.
269 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
272 * Make-lang.in: Use ETAGS variable in TAGS target.
274 2021-11-28 Martin Liska <mliska@suse.cz>
276 * d-attribs.cc (parse_optimize_options): Fix thinko.
278 2021-11-26 Martin Liska <mliska@suse.cz>
280 * d-attribs.cc (parse_optimize_options): Check index before
281 accessing cl_options.
283 2021-11-18 Iain Buclaw <ibuclaw@gdcproject.org>
285 * decl.cc (d_finish_decl): Use HOST_WIDE_INT for type size
288 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
291 * Make-lang.in: Allow dvi-formatted documentation
294 2021-10-08 Martin Liska <mliska@suse.cz>
296 * d-lang.cc (d_post_options): Use new macro
299 2021-10-05 Iain Sandoe <iain@sandoe.co.uk>
301 * d-spec.cc (lang_specific_driver): Push the -static-libstdc++
302 option back onto the command line for targets without support
303 for -Bstatic/dynamic.
305 2021-10-04 Iain Buclaw <ibuclaw@gdcproject.org>
308 * d-spec.cc (lang_specific_driver): Link libstdc++ statically if
309 -static-libstdc++ was given on command-line.
311 2021-10-04 Iain Buclaw <ibuclaw@gdcproject.org>
313 * d-attribs.cc (d_handle_optimize_attribute): Save target node before
314 calling parse_optimize_options in case it changes.
316 2021-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
319 * d-builtins.cc (d_eval_constant_expression): Don't include
320 terminating null pointer in string expression conversion.
322 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
324 * d-codegen.cc: Include dmd/module.h.
325 (build_filename_from_loc): New function.
326 (d_assert_call): Rename to...
327 (build_assert_call): ...this.
328 (build_array_bounds_call): Call arrayboundsp variant of the array
329 bounds failure callback.
330 (build_bounds_condition): Rename to...
331 (build_bounds_index_condition): ...this. Update signature.
332 (build_bounds_slice_condition): New function.
333 (checkaction_trap_p): New function.
334 (d_assert_call): Call assertp variant of assert failure callback.
335 * d-tree.h (class IndexExp): Declare.
336 (class SliceExp): Declare.
337 (build_bounds_condition): Remove.
338 (build_assert_call): Declare.
339 (build_bounds_index_condition): Declare.
340 (build_bounds_slice_condition): Declare.
341 (checkaction_trap_p): Declare.
342 (d_assert_call): Remove.
343 * expr.cc (ExprVisitor::visit(IndexExp *)): Call
344 build_bounds_index_condition.
345 (ExprVisitor::visit(SliceExp *)): Call build_bounds_slice_condition.
346 (ExprVisitor::visit(AssertExp *)): Update setting of libcall.
347 * runtime.cc (enum d_libcall_type): Add LCT_IMMUTABLE_CHARPTR.
348 (get_libcall_type): Handle LCT_IMMUTABLE_CHARPTR.
349 * runtime.def (ASSERT): Rename to...
350 (ASSERTP): ...this. Update signature.
351 (UNITTEST): Rename to...
352 (UNITTESTP): ...this. Update signature.
353 (ARRAY_BOUNDS): Rename to...
354 (ARRAYBOUNDSP): ...this. Updates signature.
355 * toir.cc (IRVisitor::visit(SwitchErrorStatement *)): Update call.
357 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
359 * typeinfo.cc (class TypeInfoVisitor::layout_base): Update comment.
361 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
363 * typeinfo.cc (TypeInfoVisitor::visit(TypeInfoClassDeclaration *)):
364 Use int to store type flags.
365 (TypeInfoVisitor::visit(TypeInfoStructDeclaration *)): Likewise.
367 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
369 * types.cc (TypeVisitor::visit(TypeEnum*)): Get wchar_t type from
372 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
374 * d-convert.cc (convert_for_rvalue): Convert switch statement into if
377 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
379 * d-builtins.cc (d_init_versions): Use POINTER_SIZE for testing
380 whether to predefine D_LP64.
382 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
385 * d-codegen.cc (build_frame_type): Set TYPE_CXX_ODR_P.
387 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
390 * d-lang.cc (d_input_charset_callback): New function.
391 (d_init): Call new function
392 diagnostic_initialize_input_context().
394 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
396 * expr.cc (binary_op): Remove dead code.
398 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
400 * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoClassDeclaration *)):
401 Always layout initializer for the m_RTInfo field.
403 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
405 * expr.cc (ExprVisitor::visit (AssertExp *)): Don't generate
408 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
410 * expr.cc (ExprVisitor::visit (AssignExp *)): Clarify comment
411 for generating static array assignment with literal.
413 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
415 * decl.cc (enum_initializer_decl): Only handle named enums.
417 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
419 * decl.cc (make_thunk): Set COMDAT and visibility of thunks only if
422 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
424 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't use sinit
425 for declaration directly.
426 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
427 (aggregate_initializer_decl): Likewise. Set sinit after creating.
429 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
431 * d-builtins.cc (build_frontend_type): Use Identifier::idPool to
432 generate anonymous field name.
434 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
436 * types.cc (layout_aggregate_type): Call hasMonitor.
437 * typeinfo.cc (TypeInfoVisitor::layout_base): Likewise.
438 (layout_cpp_typeinfo): Likewise. Don't emit vtable unless
441 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
443 * d-lang.cc (deps_add_target): Insert null terminator in buffer.
444 (deps_write): Likewise.
445 (d_parse_file): Likewise.
447 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
449 * d-builtins.cc (build_frontend_type): Restore builtin_converted_decls
450 length on conversion failure.
452 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
454 * d-codegen.cc (d_nested_class): Rename to ...
455 (get_outer_function): ... this. Handle all aggregate declarations.
456 (d_nested_struct): Remove.
457 (find_this_tree): Use get_outer_function.
458 (get_framedecl): Likewise.
460 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
463 * typeinfo.cc (make_frontend_typeinfo): Generate Object class if it
465 (check_typeinfo_type): Don't warn if there's no location.
467 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
470 * expr.cc (ExprVisitor::visit (CallExp *)): Use object expression as
471 result for C++ constructor calls.
473 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
476 * d-convert.cc (convert_for_rvalue): New function.
477 * d-tree.h (convert_for_rvalue): Declare.
478 * expr.cc (ExprVisitor::visit (CastExp *)): Use convert_for_rvalue.
479 (build_return_dtor): Likewise.
481 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
484 * d-lang.cc (d_parse_file): Remove generated D header files on error.
486 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
489 * d-diagnostic.cc (escape_d_format): Don't escape quoted format
492 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
495 * expr.cc (binary_op): Use build2 instead of fold_build2.
497 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
500 * dmd/MERGE: Merge upstream dmd 27e388b4c.
501 * d-codegen.cc (build_array_index): Handle void arrays same as byte.
502 * d-convert.cc (convert_expr): Handle converting to zero-sized arrays.
504 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
507 * dmd/MERGE: Merge upstream dmd f8c1ca928.
509 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
512 * d-builtins.cc (d_builtin_function_ext_scope): New function.
513 * d-lang.cc (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): Define.
514 * d-tree.h (d_builtin_function_ext_scope): Declare.
516 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
519 * dmd/MERGE: Merge upstream dmd 1d8386a63.
521 2021-07-03 Iain Buclaw <ibuclaw@gdcproject.org>
524 * toir.cc (IRVisitor::visit (ReturnStatement *)): Detect returns that
525 use a temporary, and replace with return value.
527 2021-07-02 Iain Buclaw <ibuclaw@gdcproject.org>
530 * d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
531 assignment expressions.
533 2021-06-11 Iain Buclaw <ibuclaw@gdcproject.org>
536 * dmd/MERGE: Merge upstream dmd 7a3808254.
538 2021-06-10 Iain Buclaw <ibuclaw@gdcproject.org>
541 * d-frontend.cc (getTypeInfoType): Move TypeInfo checks to
542 check_typeinfo_type and call new function.
543 * d-tree.h (check_typeinfo_type): Declare.
544 * typeinfo.cc: Include dmd/scope.h.
545 (create_frontend_tinfo_types): Generate front-end types even if Object
547 (build_typeinfo): Move TypeInfo checks to check_typeinfo_type and call
549 (check_typeinfo_type): New function.
551 2021-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
554 * dmd/MERGE: Merge upstream dmd 4a4e46a6f.
556 2021-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
559 * dmd/MERGE: Merge upstream dmd f3fdeb578.
561 2021-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
564 * d-codegen.cc (build_assign): Construct initializations inside
566 (compound_expr): Remove intermediate expressions that have no
568 (return_expr): Construct returns inside TARGET_EXPR_INITIAL.
569 * expr.cc (ExprVisitor::visit (CallExp *)): Remove useless assignment
572 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
574 * d-incpath.cc (prefixed_path): Use filename_ncmp instead of strncmp.
576 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
578 * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function
581 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
583 * dmd/dinterpret.c (evaluateIfBuiltin): Revert last change.
584 * dmd/dmangle.c: Likewise.
585 * dmd/hdrgen.c: Likewise.
586 * dmd/identifier.c (Identifier::toHChars2): Likewise.
588 2021-05-10 Iain Buclaw <ibuclaw@gdcproject.org>
590 * dmd/MERGE: Merge upstream dmd b7d146c4c.
592 2021-05-10 Martin Liska <mliska@suse.cz>
594 * d-builtins.cc (do_build_builtin_fn): Use startswith
595 function instead of strncmp.
596 * dmd/dinterpret.c (evaluateIfBuiltin): Likewise.
597 * dmd/dmangle.c: Likewise.
598 * dmd/hdrgen.c: Likewise.
599 * dmd/identifier.c (Identifier::toHChars2): Likewise.
601 2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org>
604 * d-diagnostic.cc (expand_d_format): Handle escaped backticks.
605 (escape_d_format): New funtion.
606 (verror): Call escape_d_format on prefixing strings.
607 (vdeprecation): Likewise.
609 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
612 * d-target.def (d_templates_always_comdat): New hook.
613 * d-tree.h (mark_needed): Remove prototype.
614 * decl.cc: Include d-target.h.
615 (mark_needed): Rename to...
616 (d_mark_needed): ...this. Make static.
617 (set_linkage_for_decl): Put variables in comdat if
618 d_templates_always_comdat.
620 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
622 * d-target.cc (d_handle_target_object_format): New function.
623 (d_language_target_info): Add d_handle_target_object_format as handler
624 for objectFormat key.
625 (Target::getTargetInfo): Continue if handler returned NULL_TREE.
627 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
629 * d-target.cc (Target::_init): Call new targetdm hook to register OS
630 specific target info keys.
631 * d-target.def (d_register_os_target_info): New hook.
633 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
635 * d-builtins.cc (d_add_builtin_version): Remove all setting of
636 target-specific global.params.
637 * typeinfo.cc (create_typeinfo): Don't add argType fields to
640 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
643 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't set
644 DECL_INSTANTIATED on static initializer declarations.
645 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
646 (DeclVisitor::visit (EnumDeclaration *)): Likewise.
647 (d_finish_decl): Move call to set_linkage_for_decl to...
648 (declare_extern_var): ...here.
650 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
652 * d-target.cc (Target::_init): Call new targetdm hook to register CPU
653 specific target info keys.
654 * d-target.def (d_register_cpu_target_info): New hook.
656 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
658 * d-target.cc (Target::systemLinkage): Return LINKwindows if
659 d_has_stdcall_convention applies to LINKsystem.
660 * d-target.def (d_has_stdcall_convention): New hook.
661 * types.cc (TypeVisitor::visit (TypeFunction *)): Insert "stdcall"
662 function attribute if d_has_stdcall_convention applies to LINKwindows.
664 2021-04-10 Iain Buclaw <ibuclaw@gdcproject.org>
666 * dmd/MERGE: Merge upstream dmd 0450061c8.
668 2021-04-08 Iain Buclaw <ibuclaw@gdcproject.org>
670 * d-attribs.cc: Include fold-const.h and opts.h.
671 (attr_noreturn_exclusions): Add alloc_size.
672 (attr_const_pure_exclusions): Likewise.
673 (attr_inline_exclusions): Add target_clones.
674 (attr_noinline_exclusions): Rename forceinline to always_inline.
675 (attr_target_exclusions): New array.
676 (attr_target_clones_exclusions): New array.
677 (attr_alloc_exclusions): New array.
678 (attr_cold_hot_exclusions): New array.
679 (d_langhook_common_attribute_table): Add new D attribute handlers.
680 (build_attributes): Update to look for gcc.attributes. Issue warning
681 if not given a struct literal. Handle void initialized arguments.
682 (handle_always_inline_attribute): Remove function.
683 (d_handle_noinline_attribute): Don't extract TYPE_LANG_FRONTEND.
684 (d_handle_forceinline_attribute): Rename to...
685 (d_handle_always_inline_attribute): ...this. Remove special handling.
686 (d_handle_flatten_attribute): Don't extract TYPE_LANG_FRONTEND.
687 (d_handle_target_attribute): Likewise. Warn about empty arguments.
688 (d_handle_target_clones_attribute): New function.
689 (optimize_args): New static variable.
690 (parse_optimize_options): New function.
691 (d_handle_optimize_attribute): New function.
692 (d_handle_noclone_attribute): Don't extract TYPE_LANG_FRONTEND.
693 (d_handle_alias_attribute): Remove function.
694 (d_handle_noicf_attribute): New function.
695 (d_handle_noipa_attribute): New function.
696 (d_handle_section_attribute): Call the handle_generic_attribute target
697 hook after performing target independent processing.
698 (d_handle_symver_attribute): New function.
699 (d_handle_noplt_attribute): New function.
700 (positional_argument): New function.
701 (d_handle_alloc_size_attribute): New function.
702 (d_handle_cold_attribute): New function.
703 (d_handle_restrict_attribute): New function.
704 (d_handle_used_attribute): New function.
705 * decl.cc (gcc_attribute_p): Update to look for gcc.attributes.
706 (get_symbol_decl): Update decl source location of old prototypes to
707 the new declaration being merged.
708 * types.cc (layout_aggregate_members): Apply user defined attributes
711 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
714 * dmd/MERGE: Merge upstream dmd d16195406.
716 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
718 * d-codegen.cc (build_frame_type): Use Array::find to get index of
721 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
723 * d-diagnostic.cc (vwarning): Increment gaggedWarnings if warning
724 message was suppressed.
725 (vdeprecation): Likewise for deprecation messages.
727 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
729 * dmd/MERGE: Merge upstream dmd 5cc71ff83.
731 2021-04-05 Iain Buclaw <ibuclaw@gdcproject.org>
734 * d-lang.cc (d_init): Disable flag_weak_templates if no support for
735 weak or one-only symbols.
736 * d-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
737 (DECL_INSTANTIATED): New macro.
738 (d_comdat_linkage): Remove declaration.
739 (d_linkonce_linkage): Remove declaration.
740 (set_linkage_for_decl): New declaration.
741 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Replace call to
742 d_linkonce_linkage with setting DECL_INSTANTIATED.
743 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
744 (DeclVisitor::visit (EnumDeclaration *)): Likewise.
745 (DeclVisitor::visit (InterfaceDeclaration *)): Remove call to
747 (get_symbol_decl): Call set_linkage_for_decl instead of
749 (d_finish_decl): Call set_linkage_for_decl.
750 (d_comdat_linkage): Made function static. Only set DECL_COMDAT for
751 DECL_INSTANTIATED decls.
752 (d_linkonce_linkage): Remove function.
753 (d_weak_linkage): New function.
754 (set_linkage_for_decl): New function.
755 * gdc.texi (Runtime Options): Rename -fno-weak to -fno-weak-templates,
756 update documentation of option.
757 * lang.opt (fweak): Rename option to ...
758 (fweak-templates): ... this. Update help string.
759 * modules.cc (get_internal_fn): Add Prot parameter. Set generated
761 (build_internal_fn): Update call to get_internal_fn.
762 (build_dso_cdtor_fn): Likewise.
763 (register_moduleinfo): Call d_finish_decl on dso_slot_node and
764 dso_initialized_node.
765 * typeinfo.cc (TypeInfoVisitor::internal_reference): Call
766 set_linkage_for_decl instead of d_comdat_linkage.
767 (TypeInfoDeclVisitor::visit (TypeInfoDeclaration *)): Remove calls to
768 d_linkonce_linkage and d_comdat_linkage.
769 (get_cpp_typeinfo_decl): Likewise.
771 2021-04-03 Iain Buclaw <ibuclaw@gdcproject.org>
773 * dmd/MERGE: Merge upstream dmd 3b808e838.
774 * Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
775 * d-codegen.cc (build_struct_literal): Handle special enums.
776 * d-convert.cc (convert_expr): Handle noreturn type.
777 (convert_for_condition): Likewise.
778 * d-target.cc (Target::_init): Set type for wchar_t.
779 (TargetCPP::derivedClassOffset): New method.
780 (Target::libraryObjectMonitors): New method.
781 * decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
783 * toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
785 * types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
786 (TypeVisitor::visit (TypeEnum *)): Handle special enums.
788 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
790 * d-builtins.cc (d_init_versions): Predefine D_PIE if flag_pie is set.
792 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
794 * d-lang.cc (d_enum_underlying_base_type): New function.
795 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Set as
796 d_enum_underlying_base_type.
798 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
800 * Make-lang.in (DMDGEN_COMPILE): Remove.
801 (d/%.dmdgen.o): Use COMPILER_FOR_BUILD and BUILD_COMPILERFLAGS to
802 build all D generator programs.
803 (D_SYSTEM_H): New macro.
804 (d/idgen.dmdgen.o): Add dependencies to build.
805 (d/impcnvgen.dmdgen.o): Likewise.
806 * d-system.h: Include bconfig.h if GENERATOR_FILE is defined.
808 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
810 * config-lang.in (gtfiles): Remove modules.cc.
811 * modules.cc (struct module_info): Remove GTY marker.
812 (static_ctor_list): Remove variable.
813 (static_dtor_list): Remove variable.
814 (register_moduleinfo): Directly set DECL_STATIC_CONSTRUCTOR on
815 dso_ctor, and DECL_STATIC_DESTRUCTOR on dso_dtor.
816 (d_finish_compilation): Remove static ctor/dtor handling.
818 2021-03-06 Iain Buclaw <ibuclaw@gdcproject.org>
820 * d-lang.cc (d_init_options_struct): Don't set default
823 2021-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
826 * dmd/MERGE: Merge upstream dmd a3c9bf422.
828 2021-02-13 Iain Buclaw <ibuclaw@gdcproject.org>
830 * dmd/MERGE: Merge upstream dmd 7132b3537.
831 * Make-lang.in (D_FRONTEND_OBJS): Add d/dsymbolsem.o, d/semantic2.o,
832 d/semantic3.o, and d/templateparamsem.o.
833 * d-compiler.cc (Compiler::genCmain): Update calls to semantic
834 entrypoint functions.
835 * d-lang.cc (d_parse_file): Likewise.
836 * typeinfo.cc (make_frontend_typeinfo): Likewise.
838 2021-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
840 * d-tree.h (DEF_D_INTRINSIC): Don't insert INTRINSIC_ into the
842 * intrinsics.cc (DEF_D_INTRINSIC): Don't insert INTRISIC_ and
843 BUILT_IN_ into the intrinsic and built-in code names.
844 * intrinsics.def: Explicitly use full intrinsic and built-in
845 codes in all definitions.
847 2021-02-04 Iain Buclaw <ibuclaw@gdcproject.org>
849 * dmd/MERGE: Merge upstream dmd 46133f761.
850 * d-builtins.cc (d_build_builtins_module): Set builtins as BUILTINgcc.
851 (maybe_set_builtin_1): Likewise.
852 * d-frontend.cc (eval_builtin): Adjust condition for early return.
853 * intrinsics.cc (maybe_set_intrinsic): Set intrinsics as BUILTINgcc.
854 (maybe_expand_intrinsic): Add case for INTRINSIC_BSWAP16.
855 * intrinsics.def (INTRINSIC_BT): Update signature.
856 (INTRINSIC_BT64): Likewise.
857 (INTRINSIC_BSWAP16): New intrinsic.
858 (INTRINSIC_VLOAD8): Update module.
859 (INTRINSIC_VLOAD16): Likewise.
860 (INTRINSIC_VLOAD32): Likewise.
861 (INTRINSIC_VLOAD64): Likewise.
862 (INTRINSIC_VSTORE8): Likewise.
863 (INTRINSIC_VSTORE16): Likewise.
864 (INTRINSIC_VSTORE32): Likewise.
865 (INTRINSIC_VSTORE64): Likewise.
866 (INTRINSIC_ADDS): Update signature.
867 (INTRINSIC_ADDSL): Likewise.
868 (INTRINSIC_ADDU): Likewise.
869 (INTRINSIC_ADDUL): Likewise.
870 (INTRINSIC_SUBS): Likewise.
871 (INTRINSIC_SUBSL): Likewise.
872 (INTRINSIC_SUBU): Likewise.
873 (INTRINSIC_SUBUL): Likewise.
874 (INTRINSIC_MULS): Likewise.
875 (INTRINSIC_MULSL): Likewise.
876 (INTRINSIC_MULU): Likewise.
877 (INTRINSIC_MULUI): Likewise.
878 (INTRINSIC_MULUL): Likewise.
879 (INTRINSIC_NEGS): Likewise.
880 (INTRINSIC_NEGSL): Likewise.
882 2021-02-02 Iain Buclaw <ibuclaw@gdcproject.org>
885 * dmd/MERGE: Merge upstream dmd 5e2a81d9c.
887 2021-01-30 Iain Buclaw <ibuclaw@gdcproject.org>
889 * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
890 layout m_arg1 and m_arg2 fields.
892 2021-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
894 * dmd/MERGE: Merge upstream dmd 609c3ce2d.
895 * d-compiler.cc (Compiler::loadModule): Rename to ...
896 (Compiler::onParseModule): ... this.
897 (Compiler::onImport): New function.
898 * d-lang.cc (d_parse_file): Remove call to Compiler::loadModule.
900 2021-01-21 Iain Buclaw <ibuclaw@gdcproject.org>
902 * dmd/MERGE: Merge upstream dmd 3a7ebef73.
904 2021-01-11 Iain Buclaw <ibuclaw@gdcproject.org>
906 * dmd/MERGE: Merge upstream dmd 2d3d13748.
907 * d-lang.cc (d_handle_option): Remove OPT_ftransition_checkimports and
908 OPT_ftransition_import.
909 * gdc.texi (Warnings): Remove documentation for -ftransition=import
910 and -ftransition=checkimports.
911 * lang.opt (ftransition=checkimports): Remove.
912 (ftransition=import): Remove.
914 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
916 * dmd/MERGE: Merge upstream dmd cb1106ad5.
918 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
920 * dmd/MERGE: Merge upstream dmd 9bba772fa.
922 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
924 * dmd/MERGE: Merge upstream dmd e598f69c0.
926 2021-01-07 Iain Buclaw <ibuclaw@gdcproject.org>
928 * dmd/MERGE: Merge upstream dmd 9038e64c5.
929 * d-builtins.cc (build_frontend_type): Update call to
932 2021-01-05 Iain Buclaw <ibuclaw@gdcproject.org>
934 * dmd/MERGE: Merge upstream dmd a5c86f5b9.
935 * d-builtins.cc (d_eval_constant_expression): Handle ADDR_EXPR trees
936 created by build_string_literal.
937 * d-frontend.cc (retStyle): Remove function.
938 * d-target.cc (d_language_target_info): New variable.
939 (d_target_info_table): Likewise.
940 (Target::_init): Initialize d_target_info_table.
941 (Target::isReturnOnStack): New function.
942 (d_add_target_info_handlers): Likewise.
943 (d_handle_target_cpp_std): Likewise.
944 (d_handle_target_cpp_runtime_library): Likewise.
945 (Target::getTargetInfo): Likewise.
946 * d-target.h (struct d_target_info_spec): New type.
947 (d_add_target_info_handlers): Declare.
949 2021-01-01 Jakub Jelinek <jakub@redhat.com>
951 * gdc.texi: Bump @copyrights-d year.
953 2021-01-01 Jakub Jelinek <jakub@redhat.com>
955 * ChangeLog-2020: Rotate ChangeLog. New file.
958 Copyright (C) 2021 Free Software Foundation, Inc.
960 Copying and distribution of this file, with or without modification,
961 are permitted in any medium without royalty provided the copyright
962 notice and this notice are preserved.