1 2023-11-21 Iain Buclaw <ibuclaw@gdcproject.org>
3 * dmd/MERGE: Merge upstream dmd ff57fec515.
4 * dmd/VERSION: Bump version to v2.106.0-rc.1.
5 * expr.cc (ExprVisitor::visit (CatAssignExp *)): Update for new
7 (ExprVisitor::visit (NewExp *)): Likewise.
8 * runtime.def (NEWARRAYMTX): Remove.
9 (NEWARRAYMITX): Remove.
11 2023-11-21 Iain Buclaw <ibuclaw@gdcproject.org>
13 * dmd/MERGE: Merge upstream dmd 65a3da148c.
15 2023-11-02 Iain Buclaw <ibuclaw@gdcproject.org>
17 * dmd/MERGE: Merge upstream dmd 643b1261bb.
18 * d-attribs.cc (build_attributes): Update for new front-end interface.
19 * d-lang.cc (d_post_options): Likewise.
20 * decl.cc (layout_class_initializer): Likewise.
22 2023-10-31 Iain Buclaw <ibuclaw@gdcproject.org>
24 * expr.cc (ExprVisitor::visit (NewExp *)): Remove unused assignments.
26 2023-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
29 * d-codegen.cc (d_build_call): Update call to convert_for_argument.
30 * d-convert.cc (is_valist_parameter_type): New function.
31 (check_valist_conversion): New function.
32 (convert_for_assignment): Update signature. Add check whether
33 assigning va_list is permissible.
34 (convert_for_argument): Likewise.
35 * d-tree.h (convert_for_assignment): Update signature.
36 (convert_for_argument): Likewise.
37 * expr.cc (ExprVisitor::visit (AssignExp *)): Update call to
38 convert_for_assignment.
40 2023-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
42 * dmd/MERGE: Merge upstream dmd e48bc0987d.
43 * expr.cc (ExprVisitor::visit (NewExp *)): Update for new front-end
45 * runtime.def (NEWARRAYT): Remove.
48 2023-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
51 * d-builtins.cc (d_build_d_type_nodes): Initialize d_bool_false_node,
53 * d-codegen.cc (build_array_struct_comparison): Use d_bool_false_node
54 instead of boolean_false_node.
55 * d-convert.cc (d_truthvalue_conversion): Use d_bool_false_node and
56 d_bool_true_node instead of boolean_false_node and boolean_true_node.
57 * d-tree.h (enum d_tree_index): Add DTI_BOOL_FALSE and DTI_BOOL_TRUE.
58 (d_bool_false_node): New macro.
59 (d_bool_true_node): New macro.
60 * modules.cc (build_dso_cdtor_fn): Use d_bool_false_node and
61 d_bool_true_node instead of boolean_false_node and boolean_true_node.
62 (register_moduleinfo): Use d_bool_type instead of boolean_type_node.
64 2023-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
66 * d-codegen.cc (call_side_effect_free_p): New function.
67 * d-tree.h (CALL_EXPR_WARN_IF_UNUSED): New macro.
68 (call_side_effect_free_p): New prototype.
69 * expr.cc (ExprVisitor::visit (CallExp *)): Set
70 CALL_EXPR_WARN_IF_UNUSED on matched call expressions.
71 (ExprVisitor::visit (NewExp *)): Don't dereference the result of an
73 * toir.cc (add_stmt): Emit warning when call expression added to
74 statement list without being used.
76 2023-10-22 Iain Buclaw <ibuclaw@gdcproject.org>
78 * dmd/MERGE: Merge upstream dmd f4be7f6f7b.
79 * Make-lang.in (D_FRONTEND_OBJS): Rename d/root-rootobject.o to
82 2023-10-17 Iain Buclaw <ibuclaw@gdcproject.org>
84 * d-tree.h (intrinsic_code): Update define for DEF_D_INTRINSIC.
85 (maybe_reject_intrinsic): New prototype.
86 * expr.cc (ExprVisitor::visit (SymOffExp *)): Call
87 maybe_reject_intrinsic.
88 * intrinsics.cc (intrinsic_decl): Add fallback field.
89 (intrinsic_decls): Update define for DEF_D_INTRINSIC.
90 (maybe_reject_intrinsic): New function.
91 * intrinsics.def (DEF_D_LIB_BUILTIN): Update.
92 (DEF_CTFE_BUILTIN): Update.
93 (INTRINSIC_BSF): Declare as library builtin.
94 (INTRINSIC_BSR): Likewise.
95 (INTRINSIC_BT): Likewise.
96 (INTRINSIC_BSF64): Likewise.
97 (INTRINSIC_BSR64): Likewise.
98 (INTRINSIC_BT64): Likewise.
99 (INTRINSIC_POPCNT32): Likewise.
100 (INTRINSIC_POPCNT64): Likewise.
101 (INTRINSIC_ROL): Likewise.
102 (INTRINSIC_ROL_TIARG): Likewise.
103 (INTRINSIC_ROR): Likewise.
104 (INTRINSIC_ROR_TIARG): Likewise.
105 (INTRINSIC_ADDS): Likewise.
106 (INTRINSIC_ADDSL): Likewise.
107 (INTRINSIC_ADDU): Likewise.
108 (INTRINSIC_ADDUL): Likewise.
109 (INTRINSIC_SUBS): Likewise.
110 (INTRINSIC_SUBSL): Likewise.
111 (INTRINSIC_SUBU): Likewise.
112 (INTRINSIC_SUBUL): Likewise.
113 (INTRINSIC_MULS): Likewise.
114 (INTRINSIC_MULSL): Likewise.
115 (INTRINSIC_MULU): Likewise.
116 (INTRINSIC_MULUI): Likewise.
117 (INTRINSIC_MULUL): Likewise.
118 (INTRINSIC_NEGS): Likewise.
119 (INTRINSIC_NEGSL): Likewise.
120 (INTRINSIC_TOPRECF): Likewise.
121 (INTRINSIC_TOPREC): Likewise.
122 (INTRINSIC_TOPRECL): Likewise.
124 2023-10-16 Iain Buclaw <ibuclaw@gdcproject.org>
126 * dmd/MERGE: Merge upstream dmd 4c18eed967.
127 * d-diagnostic.cc (verrorReport): Update for new front-end interface.
128 (verrorReportSupplemental): Likewise.
129 * d-lang.cc (d_init_options): Likewise.
130 (d_handle_option): Likewise.
131 (d_post_options): Likewise.
132 (d_parse_file): Likewise.
133 * decl.cc (get_symbol_decl): Likewise.
135 2023-10-15 Iain Buclaw <ibuclaw@gdcproject.org>
137 * dmd/MERGE: Merge upstream dmd f9efc98fd7.
138 * dmd/VERSION: Bump version to v2.105.2.
139 * d-builtins.cc (build_frontend_type): Update for new front-end
141 * d-diagnostic.cc (verrorReport): Don't emit tips when error gagging
143 * d-lang.cc (d_handle_option): Remove obsolete parameter.
144 (d_post_options): Likewise.
145 (d_read_ddoc_files): New function.
146 (d_generate_ddoc_file): New function.
147 (d_parse_file): Update for new front-end interface.
148 * expr.cc (ExprVisitor::visit (AssocArrayLiteralExp *)): Check for new
149 front-end lowering of static associative arrays.
151 2023-10-14 Iain Buclaw <ibuclaw@gdcproject.org>
154 * expr.cc (ExprVisitor::visit (StringExp *)): Include null terminator
155 in STRING_CST string.
156 * modules.cc (get_compiler_dso_type): Generate ModuleInfo** type for
159 2023-10-14 Iain Buclaw <ibuclaw@gdcproject.org>
161 * d-lang.cc (d_write_file): New function.
162 (d_parse_file): Reduce code duplication.
164 2023-10-03 David Malcolm <dmalcolm@redhat.com>
166 * d-diagnostic.cc (d_diagnostic_report_diagnostic): Use text_info
169 2023-09-23 Iain Buclaw <ibuclaw@gdcproject.org>
171 * dmd/MERGE: Merge upstream dmd 4574d1728d.
172 * dmd/VERSION: Bump version to v2.105.0.
173 * d-diagnostic.cc (verror): Remove.
174 (verrorSupplemental): Remove.
176 (vwarningSupplemental): Remove.
177 (vdeprecation): Remove.
178 (vdeprecationSupplemental): Remove.
181 (verrorReport): New function.
182 (verrorReportSupplemental): New function.
183 * d-lang.cc (d_parse_file): Update for new front-end interface.
184 * decl.cc (d_mangle_decl): Update for new front-end interface.
185 * intrinsics.cc (maybe_set_intrinsic): Update for new front-end
188 2023-08-20 Iain Buclaw <ibuclaw@gdcproject.org>
190 * dmd/MERGE: Merge upstream dmd 26f049fb26.
191 * dmd/VERSION: Bump version to v2.105.0-beta.1.
192 * d-codegen.cc (get_frameinfo): Check useGC in condition.
193 * d-lang.cc (d_handle_option): Set obsolete parameter when compiling
195 (d_post_options): Set useGC to false when compiling with
196 -fno-druntime. Propagate obsolete flag to compileEnv.
197 * expr.cc (ExprVisitor::visit (CatExp *)): Check useGC in condition.
199 2023-07-10 Iain Buclaw <ibuclaw@gdcproject.org>
201 * dmd/MERGE: Merge upstream dmd a88e1335f7.
202 * dmd/VERSION: Bump version to v2.104.1.
204 2023-07-10 Iain Buclaw <ibuclaw@gdcproject.org>
206 * dmd/MERGE: Merge upstream dmd 17ccd12af3.
207 * dmd/VERSION: Bump version to v2.104.0.
208 * Make-lang.in (D_FRONTEND_OBJS): Rename d/apply.o to
209 d/postordervisitor.o.
210 * d-codegen.cc (make_location_t): Update for new front-end interface.
211 (build_filename_from_loc): Likewise.
212 (build_assert_call): Likewise.
213 (build_array_bounds_call): Likewise.
214 (build_bounds_index_condition): Likewise.
215 (build_bounds_slice_condition): Likewise.
216 (build_frame_type): Likewise.
217 (get_frameinfo): Likewise.
218 * d-diagnostic.cc (d_diagnostic_report_diagnostic): Likewise.
219 * decl.cc (build_decl_tree): Likewise.
220 (start_function): Likewise.
221 * expr.cc (ExprVisitor::visit (NewExp *)): Replace code generation of
222 `new pointer' with front-end lowering.
223 * runtime.def (NEWITEMT): Remove.
225 * toir.cc (IRVisitor::visit (LabelStatement *)): Update for new
227 * typeinfo.cc (check_typeinfo_type): Likewise.
229 2023-07-09 Iain Buclaw <ibuclaw@gdcproject.org>
231 * dmd/MERGE: Merge upstream dmd 28a3b24c2e.
232 * dmd/VERSION: Bump version to v2.104.0-beta.1.
233 * d-codegen.cc (build_bounds_slice_condition): Update for new
235 * d-lang.cc (d_init_options): Likewise.
236 (d_handle_option): Likewise.
237 (d_post_options): Initialize global.compileEnv.
238 * expr.cc (ExprVisitor::visit (CatExp *)): Replace code generation
239 with new front-end lowering.
240 (ExprVisitor::visit (LoweredAssignExp *)): New method.
241 (ExprVisitor::visit (StructLiteralExp *)): Don't generate static
242 initializer symbols for structs defined in C sources.
243 * runtime.def (ARRAYCATT): Remove.
244 (ARRAYCATNTX): Remove.
246 2023-07-07 Iain Buclaw <ibuclaw@gdcproject.org>
249 * decl.cc (DeclVisitor::visit (VarDeclaration *)): Only emit scalar
251 (get_symbol_decl): Don't generate CONST_DECL for non-scalar manifest
253 * imports.cc (ImportVisitor::visit (VarDeclaration *)): New method.
255 2023-07-02 Iain Buclaw <ibuclaw@gdcproject.org>
258 * intrinsics.cc (expand_volatile_load): Set TREE_SIDE_EFFECTS on the
260 (expand_volatile_store): Likewise.
262 2023-07-01 Iain Buclaw <ibuclaw@gdcproject.org>
265 * decl.cc (get_symbol_decl): Set TREE_READONLY on certain kinds of
266 const and immutable variables.
267 * expr.cc (ExprVisitor::visit (ArrayLiteralExp *)): Set TREE_READONLY
268 on immutable dynamic array literals.
270 2023-07-01 Iain Buclaw <ibuclaw@gdcproject.org>
273 * d-builtins.cc (d_init_versions): Predefine D_ModuleInfo,
274 D_Exceptions, and D_TypeInfo only if feature is enabled.
275 * lang.opt: Add -fexceptions.
277 2023-06-28 Iain Buclaw <ibuclaw@gdcproject.org>
281 * types.cc (finish_aggregate_mode): New function.
282 (finish_incomplete_fields): Call finish_aggregate_mode.
283 (finish_aggregate_type): Replace call to compute_record_mode with
284 finish_aggregate_mode.
286 2023-06-28 Iain Buclaw <ibuclaw@gdcproject.org>
289 * types.cc (d_signed_or_unsigned_type): Handle being called with any
290 vector or non-integral type.
292 2023-06-26 Iain Buclaw <ibuclaw@gdcproject.org>
295 * d-convert.cc (convert_for_rvalue): Only apply the @safe boolean
296 conversion to boolean fields of a union.
297 (convert_for_condition): Call convert_for_rvalue in the default case.
299 2023-06-25 Iain Buclaw <ibuclaw@gdcproject.org>
301 * dmd/MERGE: Merge upstream dmd a45f4e9f43.
302 * dmd/VERSION: Bump version to v2.103.1.
304 2023-06-15 Marek Polacek <polacek@redhat.com>
306 * Make-lang.in: Remove NO_PIE_CFLAGS.
308 2023-06-05 Iain Buclaw <ibuclaw@gdcproject.org>
310 * gdc.texi (Warnings): Document -Wextra and -Wmismatched-special-enum.
311 * implement-d.texi (Special Enums): Add reference to warning option
312 -Wmismatched-special-enum.
313 * lang.opt: Add -Wextra and -Wmismatched-special-enum.
314 * types.cc (TypeVisitor::visit (TypeEnum *)): Warn when declared
315 special enum size mismatches its intrinsic type.
317 2023-05-18 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
319 * d-codegen.cc (underlying_complex_expr): Use _P defines from tree.h.
320 * d-convert.cc (convert): Ditto.
321 (convert_for_rvalue): Ditto.
323 2023-03-17 Iain Buclaw <ibuclaw@gdcproject.org>
325 * dmd/MERGE: Merge upstream dmd 5f7552bb28.
326 * dmd/VERSION: Bump version to v2.103.0-rc.1.
328 2023-03-16 Iain Buclaw <ibuclaw@gdcproject.org>
330 * dmd/MERGE: Merge upstream dmd 4ca4140e58.
331 * dmd/VERSION: Bump version to v2.103.0-beta.1.
332 * Make-lang.in (D_FRONTEND_OBJS): Add d/errorsink.o.
333 * d-ctfloat.cc (CTFloat::sprint): Update signature for new front-end
335 * d-frontend.cc (getTypeInfoType): Likewise.
336 * d-lang.cc (d_handle_option): Remove handling of -fpreview=dip25 and
338 (d_post_options): Remove enabling of sealed references language
339 feature when scoped pointers is enabled.
340 * d-tree.h (create_typeinfo): Update signature.
341 * decl.cc (DeclVisitor::finish_vtable): Update for new front-end
343 (DeclVisitor::visit (VarDeclaration *)): Likewise.
344 (DeclVisitor::visit (FuncDeclaration *)): Check skipCodegen to see if
345 front-end explicitly requested not to generate code.
346 * expr.cc (ExprVisitor::visit (NewExp *)): Update for new front-end
348 * lang.opt (fpreview=dip25): Remove.
349 (frevert=dip25): Remove.
350 * modules.cc (layout_moduleinfo_fields): Update for new front-end
352 (layout_moduleinfo): Likewise.
353 * runtime.def (NEWCLASS): Remove.
354 * toir.cc (IRVisitor::visit (IfStatement *)): Don't generate IR for if
355 statement list when condition is `__ctfe'.
356 * typeinfo.cc (create_typeinfo): Add generate parameter.
357 * types.cc (layout_aggregate_members): Update for new front-end
360 2023-03-16 Iain Buclaw <ibuclaw@gdcproject.org>
363 * d-codegen.cc (build_frame_type): Set frame field and type alignment.
365 2023-03-14 Iain Buclaw <ibuclaw@gdcproject.org>
368 * decl.cc (function_defined_in_root_p): Remove.
369 (get_symbol_decl): Set DECL_LAMBDA_FUNCTION_P on function literals.
370 (start_function): Unconditionally unset DECL_EXTERNAL
371 (set_linkage_for_decl): Give lambda functions one-only linkage.
373 2023-03-13 Iain Buclaw <ibuclaw@gdcproject.org>
375 * decl.cc (finish_thunk): Unset DECL_EXTERNAL on thunk.
376 (make_thunk): Set DECL_EXTERNAL on thunk, don't call build_decl_tree.
377 (finish_function): Call finish_thunk on forward referenced thunks.
379 2023-03-13 Iain Buclaw <ibuclaw@gdcproject.org>
381 * decl.cc (get_fndecl_result): New function.
382 (get_fndecl_arguments): New function.
383 (DeclVisitor::visit (FuncDeclaration *)): Adjust to call
384 get_fndecl_arguments.
385 (make_thunk): Adjust to call get_fndecl_arguments and
387 (start_function): Adjust to call get_fndecl_result.
389 2023-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
392 * implement-d.texi (Missing Features): Document that TypeInfo-based
393 va_arg is not implemented.
395 2023-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
398 * d-target.cc (Target::isVectorOpSupported): Allow identity ops.
399 * expr.cc (ExprVisitor::visit (IdentityExp *)): Handle vector identity
402 2023-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
405 * imports.cc (ImportVisitor::visit (EnumDeclaration *)): Call
406 make_import on TYPE_MAIN_VARIANT.
407 (ImportVisitor::visit (AggregateDeclaration *)): Likewise.
408 (ImportVisitor::visit (ClassDeclaration *)): Likewise.
410 2023-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
413 * d-codegen.cc (build_boolop): Evaluate vector comparison as
414 the truth_type_for vector type.
416 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
418 * implement-d.texi: Reorder index entries around @items.
420 2023-02-23 Arsen Arsenović <arsen@aarsen.me>
422 * gdc.texi: Reorder @opindex commands to precede @items they
425 2023-02-21 Iain Buclaw <ibuclaw@gdcproject.org>
427 * Make-lang.in (D_FRONTEND_OBJS): Add d/location.o.
428 * d-lang.cc (d_init_options): Update for new front-end interface.
429 (d_post_options): Call Loc::set after handling options.
430 * dmd/MERGE: Merge upstream dmd 09faa4eacd.
431 * dmd/VERSION: Bump version to v2.102.0-beta.1.
433 2023-02-21 Iain Buclaw <ibuclaw@gdcproject.org>
435 * d-codegen.cc (d_build_call): Remove front-end expansion of
436 side-effects in a call expression.
437 * d-gimplify.cc (d_gimplify_call_expr): Gimplify the callee before its
440 2023-02-21 Iain Buclaw <ibuclaw@gdcproject.org>
442 * decl.cc (DeclVisitor::visit (FuncDeclaration *)): Set
443 doing_semantic_analysis_p before calling functionSemantic3.
445 2023-01-02 Jakub Jelinek <jakub@redhat.com>
447 * gdc.texi: Bump @copyrights-d year.
450 Copyright (C) 2023 Free Software Foundation, Inc.
452 Copying and distribution of this file, with or without modification,
453 are permitted in any medium without royalty provided the copyright
454 notice and this notice are preserved.