1 2021-11-30 Iain Buclaw <ibuclaw@gdcproject.org>
3 * dmd/MERGE: Merge upstream dmd b8384668f.
4 * Make-lang.in (d-warn): Use strict warnings.
5 (DMD_WARN_CXXFLAGS): Remove.
7 (CHECKING_DFLAGS): Define.
10 (DCOMPILE.base): Define.
12 (DPOSTCOMPILE): Define.
15 (D_FRONTEND_OBJS): Add new dmd front-end objects.
16 (D_GENERATED_SRCS): Remove.
17 (D_GENERATED_OBJS): Remove.
18 (D_ALL_OBJS): Remove D_GENERATED_OBJS.
19 (d21$(exeext)): Build using DLLINKER and -static-libphobos.
20 (d.tags): Remove dmd/*.c and dmd/root/*.c.
21 (d.mostlyclean): Remove D_GENERATED_SRCS, d/idgen$(build_exeext),
22 d/impcnvgen$(build_exeext).
23 (D_INCLUDES): Include $(srcdir)/d/dmd/res.
24 (CFLAGS-d/id.o): Remove.
25 (CFLAGS-d/impcnvtab.o): Remove.
26 (d/%.o): Build using DCOMPILE and DPOSTCOMPILE. Update dependencies
27 from d/dmd/%.c to d/dmd/%.d.
28 (d/idgen$(build_exeext)): Remove.
29 (d/impcnvgen$(build_exeext)): Remove.
32 (d/impcnvtab.c): Remove.
33 (d/%.dmdgen.o): Remove.
35 (d/idgen.dmdgen.o): Remove.
36 (d/impcnvgen.dmdgen.o): Remove.
37 * config-lang.in (boot_language): New variable.
38 * d-attribs.cc: Include dmd/expression.h.
39 * d-builtins.cc: Include d-frontend.h.
40 (build_frontend_type): Update for new front-end interface.
41 (d_eval_constant_expression): Likewise.
42 (d_build_builtins_module): Likewise.
43 (maybe_set_builtin_1): Likewise.
44 (d_build_d_type_nodes): Likewise.
45 * d-codegen.cc (d_decl_context): Likewise.
46 (declaration_reference_p): Likewise.
47 (declaration_type): Likewise.
48 (parameter_reference_p): Likewise.
49 (parameter_type): Likewise.
50 (get_array_length): Likewise.
51 (build_delegate_cst): Likewise.
52 (build_typeof_null_value): Likewise.
53 (identity_compare_p): Likewise.
54 (lower_struct_comparison): Likewise.
55 (build_filename_from_loc): Likewise.
56 (build_assert_call): Remove LIBCALL_SWITCH_ERROR.
57 (build_bounds_index_condition): Call LIBCALL_ARRAYBOUNDS_INDEXP on
59 (build_bounds_slice_condition): Call LIBCALL_ARRAYBOUNDS_SLICEP on
61 (array_bounds_check): Update for new front-end interface.
62 (checkaction_trap_p): Handle CHECKACTION_context.
63 (get_function_type): Update for new front-end interface.
64 (d_build_call): Likewise.
65 * d-compiler.cc: Remove include of dmd/scope.h.
66 (Compiler::genCmain): Remove.
67 (Compiler::paintAsType): Update for new front-end interface.
68 (Compiler::onParseModule): Likewise.
69 * d-convert.cc (convert_expr): Remove call to LIBCALL_ARRAYCAST.
70 (convert_for_rvalue): Update for new front-end interface.
71 (convert_for_assignment): Likewise.
72 (convert_for_condition): Likewise.
73 (d_array_convert): Likewise.
74 * d-diagnostic.cc (error): Remove.
75 (errorSupplemental): Remove.
77 (warningSupplemental): Remove.
78 (deprecation): Remove.
79 (deprecationSupplemental): Remove.
82 * d-frontend.cc (global): Remove.
83 (Global::_init): Remove.
84 (Global::startGagging): Remove.
85 (Global::endGagging): Remove.
86 (Global::increaseErrorCount): Remove.
88 (Loc::toChars): Remove.
89 (Loc::equals): Remove.
90 (isBuiltin): Update for new front-end interface.
91 (eval_builtin): Likewise.
92 (getTypeInfoType): Likewise.
94 * d-incpath.cc: Include d-frontend.h.
95 (add_globalpaths): Call d_gc_malloc to allocate Strings.
96 (add_filepaths): Likewise.
97 * d-lang.cc: Include dmd/id.h, dmd/root/file.h, d-frontend.h. Remove
98 include of dmd/mars.h, id.h.
99 (entrypoint_module): Remove.
100 (entrypoint_root_module): Remove.
101 (deps_write_string): Update for new front-end interface.
102 (deps_write): Likewise.
103 (d_init_options): Call rt_init. Remove setting global params that are
104 default initialized by the front-end.
105 (d_handle_option): Handle OPT_fcheckaction_, OPT_fdump_c___spec_,
106 OPT_fdump_c___spec_verbose, OPT_fextern_std_, OPT_fpreview,
107 OPT_revert, OPT_fsave_mixins_, and OPT_ftransition.
108 (d_post_options): Propagate dip1021 and dip1000 preview flags to
109 dip25, and flag_diagnostics_show_caret to printErrorContext.
110 (d_add_entrypoint_module): Remove.
111 (d_parse_file): Update for new front-end interface.
112 (d_type_promotes_to): Likewise.
113 (d_types_compatible_p): Likewise.
114 * d-longdouble.cc (CTFloat::zero): Remove.
115 (CTFloat::one): Remove.
116 (CTFloat::minusone): Remove.
117 (CTFloat::half): Remove.
118 * d-system.h (POSIX): Remove.
133 (UINT32_MAX): Remove.
134 (UINT64_MAX): Remove.
135 * d-target.cc: Include calls.h.
137 (define_float_constants): Remove initialization of snan.
138 (Target::_init): Update for new front-end interface.
139 (Target::isVectorTypeSupported): Likewise.
140 (Target::isVectorOpSupported): Remove cases for unordered operators.
141 (TargetCPP::typeMangle): Update for new front-end interface.
142 (TargetCPP::parameterType): Likewise.
143 (Target::systemLinkage): Likewise.
144 (Target::isReturnOnStack): Likewise.
145 (Target::isCalleeDestroyingArgs): Define.
146 (Target::preferPassByRef): Define.
147 * d-tree.h (d_add_entrypoint_module): Remove.
148 * decl.cc (gcc_attribute_p): Update for new front-end interface.
149 (apply_pragma_crt): Define.
150 (DeclVisitor::visit(PragmaDeclaration *)): Handle pragmas
151 crt_constructor and crt_destructor.
152 (DeclVisitor::visit(TemplateDeclaration *)): Update for new front-end
154 (DeclVisitor::visit): Likewise.
155 (DeclVisitor::finish_vtable): Likewise.
156 (get_symbol_decl): Error if template has more than one nesting
157 context. Update for new front-end interface.
158 (make_thunk): Update for new front-end interface.
159 (get_vtable_decl): Likewise.
160 * expr.cc (ExprVisitor::visit): Likewise.
161 (build_return_dtor): Likewise.
162 * imports.cc (ImportVisitor::visit): Likewise.
163 * intrinsics.cc: Include dmd/expression.h. Remove include of
165 (maybe_set_intrinsic): Update for new front-end interface.
166 * intrinsics.def (INTRINSIC_ROL): Update intrinsic signature.
167 (INTRINSIC_ROR): Likewise.
168 (INTRINSIC_ROR_TIARG): Likewise.
169 (INTRINSIC_TOPREC): Likewise.
170 (INTRINSIC_TOPRECL): Likewise.
171 (INTRINSIC_TAN): Update intrinsic module and signature.
172 (INTRINSIC_ISNAN): Likewise.
173 (INTRINSIC_ISFINITE): Likewise.
174 (INTRINSIC_COPYSIGN): Define intrinsic.
175 (INTRINSIC_COPYSIGNI): Define intrinsic.
176 (INTRINSIC_EXP): Update intrinsic module.
177 (INTRINSIC_EXPM1): Likewise.
178 (INTRINSIC_EXP2): Likewise.
179 (INTRINSIC_LOG): Likewise.
180 (INTRINSIC_LOG2): Likewise.
181 (INTRINSIC_LOG10): Likewise.
182 (INTRINSIC_POW): Likewise.
183 (INTRINSIC_ROUND): Likewise.
184 (INTRINSIC_FLOORF): Likewise.
185 (INTRINSIC_FLOOR): Likewise.
186 (INTRINSIC_FLOORL): Likewise.
187 (INTRINSIC_CEILF): Likewise.
188 (INTRINSIC_CEIL): Likewise.
189 (INTRINSIC_CEILL): Likewise.
190 (INTRINSIC_TRUNC): Likewise.
191 (INTRINSIC_FMIN): Likewise.
192 (INTRINSIC_FMAX): Likewise.
193 (INTRINSIC_FMA): Likewise.
194 (INTRINSIC_VA_ARG): Update intrinsic signature.
195 (INTRINSIC_VASTART): Likewise.
196 * lang.opt (fcheck=): Add alternate aliases for contract switches.
197 (fcheckaction=): New option.
198 (check_action): New Enum and EnumValue entries.
199 (fdump-c++-spec-verbose): New option.
200 (fdump-c++-spec=): New option.
201 (fextern-std=): New option.
202 (extern_stdcpp): New Enum and EnumValue entries
203 (fpreview=): New options.
204 (frevert=): New options.
205 (fsave-mixins): New option.
206 (ftransition=): Update options.
207 * modules.cc (get_internal_fn): Replace Prot with Visibility.
208 (build_internal_fn): Likewise.
209 (build_dso_cdtor_fn): Likewise.
210 (build_module_tree): Remove check for __entrypoint module.
211 * runtime.def (P5): Define.
212 (ARRAYBOUNDS_SLICEP): Define.
213 (ARRAYBOUNDS_INDEXP): Define.
217 (SWITCH_STRING): Remove.
218 (SWITCH_USTRING): Remove.
219 (SWITCH_DSTRING): Remove.
220 (SWITCH_ERROR): Remove.
221 * toir.cc (IRVisitor::visit): Update for new front-end interface.
222 (IRVisitor::check_previous_goto): Remove checks for case and default
224 (IRVisitor::visit(SwitchStatement *)): Remove handling of string
226 * typeinfo.cc: Include d-frontend.h.
227 (get_typeinfo_kind): Update for new front-end interface.
228 (make_frontend_typeinfo): Likewise.
229 (TypeInfoVisitor::visit): Likewise.
230 (builtin_typeinfo_p): Likewise.
231 (get_typeinfo_decl): Likewise.
232 (build_typeinfo): Likewise.
233 * types.cc (valist_array_p): Likewise.
234 (make_array_type): Likewise.
235 (merge_aggregate_types): Likewise.
236 (TypeVisitor::visit(TypeBasic *)): Likewise.
237 (TypeVisitor::visit(TypeFunction *)): Likewise.
238 (TypeVisitor::visit(TypeStruct *)): Update comment.
240 * d-frontend.h: New file.
242 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
245 * Make-lang.in: Use ETAGS variable in TAGS target.
247 2021-11-28 Martin Liska <mliska@suse.cz>
249 * d-attribs.cc (parse_optimize_options): Fix thinko.
251 2021-11-26 Martin Liska <mliska@suse.cz>
253 * d-attribs.cc (parse_optimize_options): Check index before
254 accessing cl_options.
256 2021-11-18 Iain Buclaw <ibuclaw@gdcproject.org>
258 * decl.cc (d_finish_decl): Use HOST_WIDE_INT for type size
261 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
264 * Make-lang.in: Allow dvi-formatted documentation
267 2021-10-08 Martin Liska <mliska@suse.cz>
269 * d-lang.cc (d_post_options): Use new macro
272 2021-10-05 Iain Sandoe <iain@sandoe.co.uk>
274 * d-spec.cc (lang_specific_driver): Push the -static-libstdc++
275 option back onto the command line for targets without support
276 for -Bstatic/dynamic.
278 2021-10-04 Iain Buclaw <ibuclaw@gdcproject.org>
281 * d-spec.cc (lang_specific_driver): Link libstdc++ statically if
282 -static-libstdc++ was given on command-line.
284 2021-10-04 Iain Buclaw <ibuclaw@gdcproject.org>
286 * d-attribs.cc (d_handle_optimize_attribute): Save target node before
287 calling parse_optimize_options in case it changes.
289 2021-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
292 * d-builtins.cc (d_eval_constant_expression): Don't include
293 terminating null pointer in string expression conversion.
295 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
297 * d-codegen.cc: Include dmd/module.h.
298 (build_filename_from_loc): New function.
299 (d_assert_call): Rename to...
300 (build_assert_call): ...this.
301 (build_array_bounds_call): Call arrayboundsp variant of the array
302 bounds failure callback.
303 (build_bounds_condition): Rename to...
304 (build_bounds_index_condition): ...this. Update signature.
305 (build_bounds_slice_condition): New function.
306 (checkaction_trap_p): New function.
307 (d_assert_call): Call assertp variant of assert failure callback.
308 * d-tree.h (class IndexExp): Declare.
309 (class SliceExp): Declare.
310 (build_bounds_condition): Remove.
311 (build_assert_call): Declare.
312 (build_bounds_index_condition): Declare.
313 (build_bounds_slice_condition): Declare.
314 (checkaction_trap_p): Declare.
315 (d_assert_call): Remove.
316 * expr.cc (ExprVisitor::visit(IndexExp *)): Call
317 build_bounds_index_condition.
318 (ExprVisitor::visit(SliceExp *)): Call build_bounds_slice_condition.
319 (ExprVisitor::visit(AssertExp *)): Update setting of libcall.
320 * runtime.cc (enum d_libcall_type): Add LCT_IMMUTABLE_CHARPTR.
321 (get_libcall_type): Handle LCT_IMMUTABLE_CHARPTR.
322 * runtime.def (ASSERT): Rename to...
323 (ASSERTP): ...this. Update signature.
324 (UNITTEST): Rename to...
325 (UNITTESTP): ...this. Update signature.
326 (ARRAY_BOUNDS): Rename to...
327 (ARRAYBOUNDSP): ...this. Updates signature.
328 * toir.cc (IRVisitor::visit(SwitchErrorStatement *)): Update call.
330 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
332 * typeinfo.cc (class TypeInfoVisitor::layout_base): Update comment.
334 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
336 * typeinfo.cc (TypeInfoVisitor::visit(TypeInfoClassDeclaration *)):
337 Use int to store type flags.
338 (TypeInfoVisitor::visit(TypeInfoStructDeclaration *)): Likewise.
340 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
342 * types.cc (TypeVisitor::visit(TypeEnum*)): Get wchar_t type from
345 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
347 * d-convert.cc (convert_for_rvalue): Convert switch statement into if
350 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
352 * d-builtins.cc (d_init_versions): Use POINTER_SIZE for testing
353 whether to predefine D_LP64.
355 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
358 * d-codegen.cc (build_frame_type): Set TYPE_CXX_ODR_P.
360 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
363 * d-lang.cc (d_input_charset_callback): New function.
364 (d_init): Call new function
365 diagnostic_initialize_input_context().
367 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
369 * expr.cc (binary_op): Remove dead code.
371 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
373 * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoClassDeclaration *)):
374 Always layout initializer for the m_RTInfo field.
376 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
378 * expr.cc (ExprVisitor::visit (AssertExp *)): Don't generate
381 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
383 * expr.cc (ExprVisitor::visit (AssignExp *)): Clarify comment
384 for generating static array assignment with literal.
386 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
388 * decl.cc (enum_initializer_decl): Only handle named enums.
390 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
392 * decl.cc (make_thunk): Set COMDAT and visibility of thunks only if
395 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
397 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't use sinit
398 for declaration directly.
399 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
400 (aggregate_initializer_decl): Likewise. Set sinit after creating.
402 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
404 * d-builtins.cc (build_frontend_type): Use Identifier::idPool to
405 generate anonymous field name.
407 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
409 * types.cc (layout_aggregate_type): Call hasMonitor.
410 * typeinfo.cc (TypeInfoVisitor::layout_base): Likewise.
411 (layout_cpp_typeinfo): Likewise. Don't emit vtable unless
414 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
416 * d-lang.cc (deps_add_target): Insert null terminator in buffer.
417 (deps_write): Likewise.
418 (d_parse_file): Likewise.
420 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
422 * d-builtins.cc (build_frontend_type): Restore builtin_converted_decls
423 length on conversion failure.
425 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
427 * d-codegen.cc (d_nested_class): Rename to ...
428 (get_outer_function): ... this. Handle all aggregate declarations.
429 (d_nested_struct): Remove.
430 (find_this_tree): Use get_outer_function.
431 (get_framedecl): Likewise.
433 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
436 * typeinfo.cc (make_frontend_typeinfo): Generate Object class if it
438 (check_typeinfo_type): Don't warn if there's no location.
440 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
443 * expr.cc (ExprVisitor::visit (CallExp *)): Use object expression as
444 result for C++ constructor calls.
446 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
449 * d-convert.cc (convert_for_rvalue): New function.
450 * d-tree.h (convert_for_rvalue): Declare.
451 * expr.cc (ExprVisitor::visit (CastExp *)): Use convert_for_rvalue.
452 (build_return_dtor): Likewise.
454 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
457 * d-lang.cc (d_parse_file): Remove generated D header files on error.
459 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
462 * d-diagnostic.cc (escape_d_format): Don't escape quoted format
465 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
468 * expr.cc (binary_op): Use build2 instead of fold_build2.
470 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
473 * dmd/MERGE: Merge upstream dmd 27e388b4c.
474 * d-codegen.cc (build_array_index): Handle void arrays same as byte.
475 * d-convert.cc (convert_expr): Handle converting to zero-sized arrays.
477 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
480 * dmd/MERGE: Merge upstream dmd f8c1ca928.
482 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
485 * d-builtins.cc (d_builtin_function_ext_scope): New function.
486 * d-lang.cc (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): Define.
487 * d-tree.h (d_builtin_function_ext_scope): Declare.
489 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
492 * dmd/MERGE: Merge upstream dmd 1d8386a63.
494 2021-07-03 Iain Buclaw <ibuclaw@gdcproject.org>
497 * toir.cc (IRVisitor::visit (ReturnStatement *)): Detect returns that
498 use a temporary, and replace with return value.
500 2021-07-02 Iain Buclaw <ibuclaw@gdcproject.org>
503 * d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
504 assignment expressions.
506 2021-06-11 Iain Buclaw <ibuclaw@gdcproject.org>
509 * dmd/MERGE: Merge upstream dmd 7a3808254.
511 2021-06-10 Iain Buclaw <ibuclaw@gdcproject.org>
514 * d-frontend.cc (getTypeInfoType): Move TypeInfo checks to
515 check_typeinfo_type and call new function.
516 * d-tree.h (check_typeinfo_type): Declare.
517 * typeinfo.cc: Include dmd/scope.h.
518 (create_frontend_tinfo_types): Generate front-end types even if Object
520 (build_typeinfo): Move TypeInfo checks to check_typeinfo_type and call
522 (check_typeinfo_type): New function.
524 2021-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
527 * dmd/MERGE: Merge upstream dmd 4a4e46a6f.
529 2021-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
532 * dmd/MERGE: Merge upstream dmd f3fdeb578.
534 2021-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
537 * d-codegen.cc (build_assign): Construct initializations inside
539 (compound_expr): Remove intermediate expressions that have no
541 (return_expr): Construct returns inside TARGET_EXPR_INITIAL.
542 * expr.cc (ExprVisitor::visit (CallExp *)): Remove useless assignment
545 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
547 * d-incpath.cc (prefixed_path): Use filename_ncmp instead of strncmp.
549 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
551 * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function
554 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
556 * dmd/dinterpret.c (evaluateIfBuiltin): Revert last change.
557 * dmd/dmangle.c: Likewise.
558 * dmd/hdrgen.c: Likewise.
559 * dmd/identifier.c (Identifier::toHChars2): Likewise.
561 2021-05-10 Iain Buclaw <ibuclaw@gdcproject.org>
563 * dmd/MERGE: Merge upstream dmd b7d146c4c.
565 2021-05-10 Martin Liska <mliska@suse.cz>
567 * d-builtins.cc (do_build_builtin_fn): Use startswith
568 function instead of strncmp.
569 * dmd/dinterpret.c (evaluateIfBuiltin): Likewise.
570 * dmd/dmangle.c: Likewise.
571 * dmd/hdrgen.c: Likewise.
572 * dmd/identifier.c (Identifier::toHChars2): Likewise.
574 2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org>
577 * d-diagnostic.cc (expand_d_format): Handle escaped backticks.
578 (escape_d_format): New funtion.
579 (verror): Call escape_d_format on prefixing strings.
580 (vdeprecation): Likewise.
582 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
585 * d-target.def (d_templates_always_comdat): New hook.
586 * d-tree.h (mark_needed): Remove prototype.
587 * decl.cc: Include d-target.h.
588 (mark_needed): Rename to...
589 (d_mark_needed): ...this. Make static.
590 (set_linkage_for_decl): Put variables in comdat if
591 d_templates_always_comdat.
593 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
595 * d-target.cc (d_handle_target_object_format): New function.
596 (d_language_target_info): Add d_handle_target_object_format as handler
597 for objectFormat key.
598 (Target::getTargetInfo): Continue if handler returned NULL_TREE.
600 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
602 * d-target.cc (Target::_init): Call new targetdm hook to register OS
603 specific target info keys.
604 * d-target.def (d_register_os_target_info): New hook.
606 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
608 * d-builtins.cc (d_add_builtin_version): Remove all setting of
609 target-specific global.params.
610 * typeinfo.cc (create_typeinfo): Don't add argType fields to
613 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
616 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't set
617 DECL_INSTANTIATED on static initializer declarations.
618 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
619 (DeclVisitor::visit (EnumDeclaration *)): Likewise.
620 (d_finish_decl): Move call to set_linkage_for_decl to...
621 (declare_extern_var): ...here.
623 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
625 * d-target.cc (Target::_init): Call new targetdm hook to register CPU
626 specific target info keys.
627 * d-target.def (d_register_cpu_target_info): New hook.
629 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
631 * d-target.cc (Target::systemLinkage): Return LINKwindows if
632 d_has_stdcall_convention applies to LINKsystem.
633 * d-target.def (d_has_stdcall_convention): New hook.
634 * types.cc (TypeVisitor::visit (TypeFunction *)): Insert "stdcall"
635 function attribute if d_has_stdcall_convention applies to LINKwindows.
637 2021-04-10 Iain Buclaw <ibuclaw@gdcproject.org>
639 * dmd/MERGE: Merge upstream dmd 0450061c8.
641 2021-04-08 Iain Buclaw <ibuclaw@gdcproject.org>
643 * d-attribs.cc: Include fold-const.h and opts.h.
644 (attr_noreturn_exclusions): Add alloc_size.
645 (attr_const_pure_exclusions): Likewise.
646 (attr_inline_exclusions): Add target_clones.
647 (attr_noinline_exclusions): Rename forceinline to always_inline.
648 (attr_target_exclusions): New array.
649 (attr_target_clones_exclusions): New array.
650 (attr_alloc_exclusions): New array.
651 (attr_cold_hot_exclusions): New array.
652 (d_langhook_common_attribute_table): Add new D attribute handlers.
653 (build_attributes): Update to look for gcc.attributes. Issue warning
654 if not given a struct literal. Handle void initialized arguments.
655 (handle_always_inline_attribute): Remove function.
656 (d_handle_noinline_attribute): Don't extract TYPE_LANG_FRONTEND.
657 (d_handle_forceinline_attribute): Rename to...
658 (d_handle_always_inline_attribute): ...this. Remove special handling.
659 (d_handle_flatten_attribute): Don't extract TYPE_LANG_FRONTEND.
660 (d_handle_target_attribute): Likewise. Warn about empty arguments.
661 (d_handle_target_clones_attribute): New function.
662 (optimize_args): New static variable.
663 (parse_optimize_options): New function.
664 (d_handle_optimize_attribute): New function.
665 (d_handle_noclone_attribute): Don't extract TYPE_LANG_FRONTEND.
666 (d_handle_alias_attribute): Remove function.
667 (d_handle_noicf_attribute): New function.
668 (d_handle_noipa_attribute): New function.
669 (d_handle_section_attribute): Call the handle_generic_attribute target
670 hook after performing target independent processing.
671 (d_handle_symver_attribute): New function.
672 (d_handle_noplt_attribute): New function.
673 (positional_argument): New function.
674 (d_handle_alloc_size_attribute): New function.
675 (d_handle_cold_attribute): New function.
676 (d_handle_restrict_attribute): New function.
677 (d_handle_used_attribute): New function.
678 * decl.cc (gcc_attribute_p): Update to look for gcc.attributes.
679 (get_symbol_decl): Update decl source location of old prototypes to
680 the new declaration being merged.
681 * types.cc (layout_aggregate_members): Apply user defined attributes
684 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
687 * dmd/MERGE: Merge upstream dmd d16195406.
689 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
691 * d-codegen.cc (build_frame_type): Use Array::find to get index of
694 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
696 * d-diagnostic.cc (vwarning): Increment gaggedWarnings if warning
697 message was suppressed.
698 (vdeprecation): Likewise for deprecation messages.
700 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
702 * dmd/MERGE: Merge upstream dmd 5cc71ff83.
704 2021-04-05 Iain Buclaw <ibuclaw@gdcproject.org>
707 * d-lang.cc (d_init): Disable flag_weak_templates if no support for
708 weak or one-only symbols.
709 * d-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
710 (DECL_INSTANTIATED): New macro.
711 (d_comdat_linkage): Remove declaration.
712 (d_linkonce_linkage): Remove declaration.
713 (set_linkage_for_decl): New declaration.
714 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Replace call to
715 d_linkonce_linkage with setting DECL_INSTANTIATED.
716 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
717 (DeclVisitor::visit (EnumDeclaration *)): Likewise.
718 (DeclVisitor::visit (InterfaceDeclaration *)): Remove call to
720 (get_symbol_decl): Call set_linkage_for_decl instead of
722 (d_finish_decl): Call set_linkage_for_decl.
723 (d_comdat_linkage): Made function static. Only set DECL_COMDAT for
724 DECL_INSTANTIATED decls.
725 (d_linkonce_linkage): Remove function.
726 (d_weak_linkage): New function.
727 (set_linkage_for_decl): New function.
728 * gdc.texi (Runtime Options): Rename -fno-weak to -fno-weak-templates,
729 update documentation of option.
730 * lang.opt (fweak): Rename option to ...
731 (fweak-templates): ... this. Update help string.
732 * modules.cc (get_internal_fn): Add Prot parameter. Set generated
734 (build_internal_fn): Update call to get_internal_fn.
735 (build_dso_cdtor_fn): Likewise.
736 (register_moduleinfo): Call d_finish_decl on dso_slot_node and
737 dso_initialized_node.
738 * typeinfo.cc (TypeInfoVisitor::internal_reference): Call
739 set_linkage_for_decl instead of d_comdat_linkage.
740 (TypeInfoDeclVisitor::visit (TypeInfoDeclaration *)): Remove calls to
741 d_linkonce_linkage and d_comdat_linkage.
742 (get_cpp_typeinfo_decl): Likewise.
744 2021-04-03 Iain Buclaw <ibuclaw@gdcproject.org>
746 * dmd/MERGE: Merge upstream dmd 3b808e838.
747 * Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
748 * d-codegen.cc (build_struct_literal): Handle special enums.
749 * d-convert.cc (convert_expr): Handle noreturn type.
750 (convert_for_condition): Likewise.
751 * d-target.cc (Target::_init): Set type for wchar_t.
752 (TargetCPP::derivedClassOffset): New method.
753 (Target::libraryObjectMonitors): New method.
754 * decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
756 * toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
758 * types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
759 (TypeVisitor::visit (TypeEnum *)): Handle special enums.
761 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
763 * d-builtins.cc (d_init_versions): Predefine D_PIE if flag_pie is set.
765 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
767 * d-lang.cc (d_enum_underlying_base_type): New function.
768 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Set as
769 d_enum_underlying_base_type.
771 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
773 * Make-lang.in (DMDGEN_COMPILE): Remove.
774 (d/%.dmdgen.o): Use COMPILER_FOR_BUILD and BUILD_COMPILERFLAGS to
775 build all D generator programs.
776 (D_SYSTEM_H): New macro.
777 (d/idgen.dmdgen.o): Add dependencies to build.
778 (d/impcnvgen.dmdgen.o): Likewise.
779 * d-system.h: Include bconfig.h if GENERATOR_FILE is defined.
781 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
783 * config-lang.in (gtfiles): Remove modules.cc.
784 * modules.cc (struct module_info): Remove GTY marker.
785 (static_ctor_list): Remove variable.
786 (static_dtor_list): Remove variable.
787 (register_moduleinfo): Directly set DECL_STATIC_CONSTRUCTOR on
788 dso_ctor, and DECL_STATIC_DESTRUCTOR on dso_dtor.
789 (d_finish_compilation): Remove static ctor/dtor handling.
791 2021-03-06 Iain Buclaw <ibuclaw@gdcproject.org>
793 * d-lang.cc (d_init_options_struct): Don't set default
796 2021-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
799 * dmd/MERGE: Merge upstream dmd a3c9bf422.
801 2021-02-13 Iain Buclaw <ibuclaw@gdcproject.org>
803 * dmd/MERGE: Merge upstream dmd 7132b3537.
804 * Make-lang.in (D_FRONTEND_OBJS): Add d/dsymbolsem.o, d/semantic2.o,
805 d/semantic3.o, and d/templateparamsem.o.
806 * d-compiler.cc (Compiler::genCmain): Update calls to semantic
807 entrypoint functions.
808 * d-lang.cc (d_parse_file): Likewise.
809 * typeinfo.cc (make_frontend_typeinfo): Likewise.
811 2021-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
813 * d-tree.h (DEF_D_INTRINSIC): Don't insert INTRINSIC_ into the
815 * intrinsics.cc (DEF_D_INTRINSIC): Don't insert INTRISIC_ and
816 BUILT_IN_ into the intrinsic and built-in code names.
817 * intrinsics.def: Explicitly use full intrinsic and built-in
818 codes in all definitions.
820 2021-02-04 Iain Buclaw <ibuclaw@gdcproject.org>
822 * dmd/MERGE: Merge upstream dmd 46133f761.
823 * d-builtins.cc (d_build_builtins_module): Set builtins as BUILTINgcc.
824 (maybe_set_builtin_1): Likewise.
825 * d-frontend.cc (eval_builtin): Adjust condition for early return.
826 * intrinsics.cc (maybe_set_intrinsic): Set intrinsics as BUILTINgcc.
827 (maybe_expand_intrinsic): Add case for INTRINSIC_BSWAP16.
828 * intrinsics.def (INTRINSIC_BT): Update signature.
829 (INTRINSIC_BT64): Likewise.
830 (INTRINSIC_BSWAP16): New intrinsic.
831 (INTRINSIC_VLOAD8): Update module.
832 (INTRINSIC_VLOAD16): Likewise.
833 (INTRINSIC_VLOAD32): Likewise.
834 (INTRINSIC_VLOAD64): Likewise.
835 (INTRINSIC_VSTORE8): Likewise.
836 (INTRINSIC_VSTORE16): Likewise.
837 (INTRINSIC_VSTORE32): Likewise.
838 (INTRINSIC_VSTORE64): Likewise.
839 (INTRINSIC_ADDS): Update signature.
840 (INTRINSIC_ADDSL): Likewise.
841 (INTRINSIC_ADDU): Likewise.
842 (INTRINSIC_ADDUL): Likewise.
843 (INTRINSIC_SUBS): Likewise.
844 (INTRINSIC_SUBSL): Likewise.
845 (INTRINSIC_SUBU): Likewise.
846 (INTRINSIC_SUBUL): Likewise.
847 (INTRINSIC_MULS): Likewise.
848 (INTRINSIC_MULSL): Likewise.
849 (INTRINSIC_MULU): Likewise.
850 (INTRINSIC_MULUI): Likewise.
851 (INTRINSIC_MULUL): Likewise.
852 (INTRINSIC_NEGS): Likewise.
853 (INTRINSIC_NEGSL): Likewise.
855 2021-02-02 Iain Buclaw <ibuclaw@gdcproject.org>
858 * dmd/MERGE: Merge upstream dmd 5e2a81d9c.
860 2021-01-30 Iain Buclaw <ibuclaw@gdcproject.org>
862 * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
863 layout m_arg1 and m_arg2 fields.
865 2021-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
867 * dmd/MERGE: Merge upstream dmd 609c3ce2d.
868 * d-compiler.cc (Compiler::loadModule): Rename to ...
869 (Compiler::onParseModule): ... this.
870 (Compiler::onImport): New function.
871 * d-lang.cc (d_parse_file): Remove call to Compiler::loadModule.
873 2021-01-21 Iain Buclaw <ibuclaw@gdcproject.org>
875 * dmd/MERGE: Merge upstream dmd 3a7ebef73.
877 2021-01-11 Iain Buclaw <ibuclaw@gdcproject.org>
879 * dmd/MERGE: Merge upstream dmd 2d3d13748.
880 * d-lang.cc (d_handle_option): Remove OPT_ftransition_checkimports and
881 OPT_ftransition_import.
882 * gdc.texi (Warnings): Remove documentation for -ftransition=import
883 and -ftransition=checkimports.
884 * lang.opt (ftransition=checkimports): Remove.
885 (ftransition=import): Remove.
887 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
889 * dmd/MERGE: Merge upstream dmd cb1106ad5.
891 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
893 * dmd/MERGE: Merge upstream dmd 9bba772fa.
895 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
897 * dmd/MERGE: Merge upstream dmd e598f69c0.
899 2021-01-07 Iain Buclaw <ibuclaw@gdcproject.org>
901 * dmd/MERGE: Merge upstream dmd 9038e64c5.
902 * d-builtins.cc (build_frontend_type): Update call to
905 2021-01-05 Iain Buclaw <ibuclaw@gdcproject.org>
907 * dmd/MERGE: Merge upstream dmd a5c86f5b9.
908 * d-builtins.cc (d_eval_constant_expression): Handle ADDR_EXPR trees
909 created by build_string_literal.
910 * d-frontend.cc (retStyle): Remove function.
911 * d-target.cc (d_language_target_info): New variable.
912 (d_target_info_table): Likewise.
913 (Target::_init): Initialize d_target_info_table.
914 (Target::isReturnOnStack): New function.
915 (d_add_target_info_handlers): Likewise.
916 (d_handle_target_cpp_std): Likewise.
917 (d_handle_target_cpp_runtime_library): Likewise.
918 (Target::getTargetInfo): Likewise.
919 * d-target.h (struct d_target_info_spec): New type.
920 (d_add_target_info_handlers): Declare.
922 2021-01-01 Jakub Jelinek <jakub@redhat.com>
924 * gdc.texi: Bump @copyrights-d year.
926 2021-01-01 Jakub Jelinek <jakub@redhat.com>
928 * ChangeLog-2020: Rotate ChangeLog. New file.
931 Copyright (C) 2021 Free Software Foundation, Inc.
933 Copying and distribution of this file, with or without modification,
934 are permitted in any medium without royalty provided the copyright
935 notice and this notice are preserved.