RISC-V: Fix rtl checking enabled failure with -msave-restore.
[official-gcc.git] / gcc / d / ChangeLog-2016
blobdbd757338033c1952d7a5de914cb97059cd41a9e
1 2016-12-28  Iain Buclaw  <ibuclaw@gdcproject.org>
3         * expr.cc (ExprVisitor::visit(VarExp)): Remove type forced conversion.
5 2016-12-28  Iain Buclaw  <ibuclaw@gdcproject.org>
7         * d-lang.cc (d_handle_option): Handle -ftransition=safe.
8         * lang.opt (ftransition=safe): Add compiler option.
10 2016-12-28  Iain Buclaw  <ibuclaw@gdcproject.org>
12         * d-lang.cc (d_init_options): Initialize hdrStripPlainFunctions.
13         (d_post_options): Add post option handling of flag.
15 2016-12-27  Iain Buclaw  <ibuclaw@gdcproject.org>
17         * d-codegen.cc (layout_aggregate_type): Adjust layout of D interfaces.
18         Only add a __vptr field if no base interfaces, don't add __monitor.
20 2016-12-27  Iain Buclaw  <ibuclaw@gdcproject.org>
22         * d-lang.cc (d_parse_file): Run runDeferredSemantic2 after semantic2.
24 2016-12-26  Iain Buclaw  <ibuclaw@gdcproject.org>
26         * expr.cc (ExprVisitor::visit(ArrayLiteralExp)): Use getElement to
27         index elements array.
28         (ExprVisitor::visit(VectorExp)): Likewise.
30 2016-12-25  Iain Buclaw  <ibuclaw@gdcproject.org>
32         * Make-lang.in (D_DMD_OBJS): Add d/objc.o
33         * types.cc (TypeVisitor::visit(TypeFunction)): Handle ObjC linkage.
35 2016-12-25  Iain Buclaw  <ibuclaw@gdcproject.org>
37         * d-decls.cc (mangle_decl): New function.
38         (make_internal_name): Update.
39         (get_symbol_decl): Update.
41 2016-12-24  Iain Buclaw  <ibuclaw@gdcproject.org>
43         * expr.cc (ExprVisitor::needs_dtor): New function.
44         (ExprVisitor::lvalue_p): New function.
45         (ExprVisitor::visit(AssignExp)): Check both for postblit and dtors
46         when generating array assignments.
48 2016-12-24  Iain Buclaw  <ibuclaw@gdcproject.org>
50         * d-codegen.cc (convert_expr): Allow upcasting C++ classes.
51         (build_class_instance): Generate initial values of vtable interfaces
52         before class fields.
53         (layout_aggregate_type): Layout vtable interfaces before class fields.
54         * d-decls.cc (get_symbol_decl): Build DECL_ARGUMENTS for functions
55         that have no body.
57 2016-12-22  Iain Buclaw  <ibuclaw@gdcproject.org>
59         * d-target.cc (Target::cppExceptions): New variable.
60         (Target::init): Initialize it.
61         (Target::prefixName): New function.
63 2016-12-19  Iain Buclaw  <ibuclaw@gdcproject.org>
65         * d-objfile.cc (ClassDeclaration::toObjFile): Use layout_classinfo to
66         generate TypeInfo for classes.
67         (InterfaceDeclaration::toObjFile): Likewise.
68         * d-todt.cc (build_vptr_monitor): Remove function.
69         * typeinfo.cc (TypeInfoVisitor::set_field): New function.
70         (TypeInfoVisitor::layout_interfaces): New function.
71         (TypeInfoVisitor::layout_interface_vtables): New function.
72         (TypeInfoVisitor::visit(TypeInfoClassDeclaration)): Implement.
73         (layout_classinfo): New function.
75 2016-12-18  Iain Buclaw  <ibuclaw@gdcproject.org>
77         * typeinfo.cc (TypeInfoVisitor): Use build_typeinfo instead of
78         get_typeinfo_decl.
79         * d-objfile.cc (ClassDeclaration::toObjFile): Use build_constructor to
80         build the vtable, instead of using dt_cons.
82 2016-12-18  Iain Buclaw  <ibuclaw@gdcproject.org>
84         * d-decls.cc (layout_moduleinfo_fields): Use finish_aggregate_type
85         instead of layout_type.
86         (layout_classinfo_interfaces): Likewise.
88 2016-12-17  Iain Buclaw  <ibuclaw@gdcproject.org>
90         * d-builtins.cc (build_dtype): Use static create method for allocating
91         frontend types.
92         * d-codegen.cc (declaration_type): Likewise.
93         (type_passed_as): Likewise.
94         (get_libcall): Likewise.
95         * d-lang.cc (d_parse_file): Likewise.
96         * d-objfile.cc (build_simple_function_decl): Likewise.
97         (build_emutls_function): Likewise.
98         * d-todt.cc (StructDeclaration::toDt): Likewise.
99         * typeinfo.cc (TypeInfoVisitor::visit(TypeInfoInterfaceDeclaration)):
100         Likewise.
102 2016-12-17  Johannes Pfau  <johannespfau@gmail.com>
104         * d-decls.cc (copy_struct): Also copy and update TYPE_METHODS.
105         * d-spec.c (lang_specific_driver): Do not link in math, thread and
106         time libraries. Use a spec file instead to do this.
107         (lang_specific_pre_link): Load libgphobos.spec to set up the link
108         dependencies for libgphobos.
110 2016-12-13  Iain Buclaw  <ibuclaw@gdcproject.org>
112         * d-builtins.cc (build_dtype): Cache all allocated frontend types.
113         (builtin_sym): Update constructor.
114         (builtin_converted_decls): Rename to builtin_converted_syms.
115         (d_build_builtins_module): Check if decl set before assigning parent.
117 2016-12-13  Iain Buclaw  <ibuclaw@gdcproject.org>
119         * d-builtins.cc (build_dtype): Set type modifiers on frontend type.
121 2016-12-12  Iain Buclaw  <ibuclaw@gdcproject.org>
123         * d-builtins.cc (build_dtype): Don't set default parameter storage
124         class as const.
126 2016-12-12  Iain Buclaw  <ibuclaw@gdcproject.org>
128         * d-decls.cc (add_moduleinfo_field): New function.
129         (layout_moduleinfo_fields): New function.
130         (get_moduleinfo_decl): Use record type for moduleinfo decl.
131         * d-objfile.cc (build_moduleinfo_symbol): Delay calling
132         get_moduleinfo_decl until after ModuleInfo type is validated.
133         (d_finish_symbol): Remove check for unknown_type_node.
135 2016-12-11  Iain Buclaw  <ibuclaw@gdcproject.org>
137         * d-decls.cc (copy_struct): New function.
138         (layout_classinfo_interfaces): New function.
139         (get_classinfo_decl): Use record type for classinfo decl.
140         * d-codegen.cc (create_field_decl): New function.
141         Use it instead of build_decl when creating a new FIELD_DECL.
143 2016-12-11  Iain Buclaw  <ibuclaw@gdcproject.org>
145         * d-builtins.cc (build_dtype): Don't build generic function types.
146         (d_build_builtins_module): Remove check.
148 2016-12-10  Iain Buclaw  <ibuclaw@gdcproject.org>
150         * d-codegen.cc (build_vindex_ref): Move saving of object to callers.
151         * expr.cc (ExprVisitor::visit(CallExp)): Save object reference before
152         passing to build_vindex_ref.
153         (ExprVisitor::visit(DelegateExp)): Likewise.
155 2016-12-07  Iain Buclaw  <ibuclaw@gdcproject.org>
157         * d-spec.c (lang_specific_driver): Remove error handling.
158         * d-lang.cc (d_parse_file): Don't error twice.
160 2016-12-06  Iain Buclaw  <ibuclaw@gdcproject.org>
162         * d-spec.c (lang_specific_driver): Remove 'added' variable.
164 2016-12-04  Iain Buclaw  <ibuclaw@gdcproject.org>
166         * d-decls.cc (get_symbol_decl): Use needsCodegen to determine whether
167         template instance is extern or not.
169 2016-12-02  Iain Buclaw  <ibuclaw@gdcproject.org>
171         * d-glue.cc (escapePath): Move to dfrontend.
172         (readFile): Likewise.
173         (writeFile): Likewise.
174         (ensurePathToNameExists): Likewise.
176 2016-12-01  Iain Buclaw  <ibuclaw@gdcproject.org>
178         * d-target.cc: Include memmodel.h.
179         * d-attrib.c (d_handle_section_attribute): No longer set
180         user_defined_section_attribute.
182 2016-11-25  Iain Buclaw  <ibuclaw@gdcproject.org>
184         * types.cc (TypeVisitor::visit(Type)): Update.
186 2016-11-24  Iain Buclaw  <ibuclaw@gdcproject.org>
188         * d-codegen.cc (build_struct_literal): Stop after first field
189         assignment in union constructor.
190         (build_class_instance): Skip void initialized fields.
191         * expr.cc (ExprVisitor::visit(StructLiteralExp)): Likewise.
193 2016-11-22  Iain Buclaw  <ibuclaw@gdcproject.org>
195         * d-decls.cc (get_symbol_decl): Don't set alignment if
196         STRUCTALIGN_DEFAULT.
198 2016-11-21  Iain Buclaw  <ibuclaw@gdcproject.org>
200         * d-todt.cc (ClassDeclaration::toDt): Update.
201         (ClassDeclaration::toDt2): Remove function.
202         (TypeSArray::toDtElem): Remove function.
203         (dt_chainon): Remove function.
204         (dt_zeropad): Remove function.
205         (dt_container): Remove function.
206         (dt_container2): Rename to dt_container.  All callers updated.
207         * d-objfile.cc (VarDeclaration::toObjFile): Update.
209 2016-11-20  Iain Buclaw  <ibuclaw@gdcproject.org>
211         * d-lang.cc (copy_lang_decl): Rename to d_dup_lang_specific_decl.
212         (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
213         * d-decls.cc (make_alias_for_thunk): Call dup_lang_specific_decl.
214         (make_thunk): Likewise.
216 2016-11-19  Iain Buclaw  <ibuclaw@gdcproject.org>
218         * d-codegen.h (FuncFrameInfo): Remove type.  All users updated to
219         interface with new frame macro accessors.
220         (build_frame_type): Mark as static.
221         (get_frameinfo): Update to return a tree type.
222         * d-lang.cc (LANG_HOOKS_TREE_SIZE): Redefine.
223         (LANG_HOOKS_PRINT_XNODE): Redefine.
224         (d_tree_size): New function.
225         (d_print_xnode): New function.
226         (d_tree_node_structure): New function.
227         * d-tree.def (FUNCFRAME_INFO): New tree_code.
228         * d-tree.h (tree_frame_info): New type.
229         (FRAMEINFO_CREATES_FRAME): New macro accessor.
230         (FRAMEINFO_STATIC_CHAIN): New macro accessor.
231         (FRAMEINFO_IS_CLOSURE): New macro accessor.
232         (FRAMEINFO_TYPE): New macro accessor.
233         (lang_decl): Replace frame_info field with a tree type.
234         (d_tree_node_structure_enum): New type.
235         (lang_tree_node): Update GTY tags.
237 2016-11-19  Iain Buclaw  <ibuclaw@gdcproject.org>
239         * d-decls.cc (setup_symbol_storage): Remove function.
240         (Dsymbol::toSymbol): Remove function and all overrides.  All callers
241         updated to call ...
242         (get_symbol_decl): ... New function.
244 2016-11-06  Iain Buclaw  <ibuclaw@gdcproject.org>
246         * d-lang.cc (output_modules): Remove variable.
247         (output_module): Remove variable.
248         (d_gcc_get_output_module): Remove function.  All callers updated to
249         use Module::rootModule.
250         * d-objfile.cc (FuncDeclaration::toObjFile): Mark all functions being
251         constructed here as TREE_STATIC.
252         (output_module_p): Remove function.  All callers updated to call
253         Module::isRoot.
255 2016-11-05  Iain Buclaw  <ibuclaw@gdcproject.org>
257         * d-decls.cc (get_template_storage_info): Remove function.
258         (setup_symbol_storage): Use Dsymbol::isInstantiated instead.
260 2016-11-05  Iain Buclaw  <ibuclaw@gdcproject.org>
262         * d-codegen.cc (build_struct_literal): Handle anonymous fields.
263         (build_class_instance): New functions.
264         (find_aggregate_field): Update signature.  All callers updated.
265         * d-todt.cc (dt_chainon): Mark as static.
266         (dt_zeropad): Likewise.
267         (dt_container): Likewise.
268         (ClassReferenceExp::toInstanceDt): Remove function.
269         (ClassReferenceExp::toDt2): Remove function.
271 2016-11-01  Iain Buclaw  <ibuclaw@gdcproject.org>
273         * d-tree.h (lang_decl): Remove readonly field.
274         (DECL_LANG_READONLY): Remove macro.  All callers updated.
276 2016-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
278         * d-decls.cc (ClassReferenceExp::toSymbol): Use class record type for
279         static symbol.
280         * d-lang.cc (global_context): New static variable.
281         (global_declarations): New static variable.
282         (d_nametype): Pass built-in types to debug_hooks::type_decl.
283         (d_add_global_declaration): Remove function, update all callers.
284         (get_global_context): New function.
285         (d_pushdecl): Push decls to global, or bindings list here.
286         (StructDeclaration::toObjFile): Send type decl to d_pushdecl.
287         (ClassDeclaration::toObjFile): Likewise.
288         (InterfaceDeclaration::toObjFile): Likewise.
289         (EnumDeclaration::toObjFile): Likewise.
290         (FuncDeclaration::toObjFile): Send finished decl to d_pushdecl.
291         (d_finish_symbol): Likewise.
292         (emit_modref_hooks): Likewise.
293         (d_comdat_linkage): Don't set DECL_COMDAT on non-public decls.
294         (setup_symbol_storage): Don't set DECL_ABSTRACT_P on templates.
295         (d_finish_compilation): Remove check for type decls.
296         (build_type_decl): Don't add to global decl list, just call
297         rest_of_decl_compilation.
298         * expr.cc (ExprVisitor::visit(ArrayLiteralExp)): Send finished decl to
299         d_pushdecl.
300         * toir.cc (IRVisitor::visit(SwitchStatement)): Likewise.
301         (IRVisitor::end_scope): Mark bind expr as having side effects.
302         * typeinfo.cc (TypeInfoVisitor::visit(TypeInfoTupleDeclaration)): Send
303         finished decl to d_pushdecl.
305 2016-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
307         * d-codegen.cc (layout_aggregate_type): Continue searching based on
308         aggregate members, not just fields.
309         * types.cc (TypeVisitor::visit(TypeEnum)): Use void for opaque enums.
310         (TypeVisitor::visit(TypeStruct)): Don't give opaque structs a size.
312 2016-10-27  Iain Buclaw  <ibuclaw@gdcproject.org>
314         * expr.cc (ExprVisitor::visit(AssignExp)): Don't set TREE_ADDRESSABLE.
315         * d-codegen.cc (build_assign): Handle setting up INIT_EXPR from a
316         value returning via NRVO here instead.
318 2016-10-26  Iain Buclaw  <ibuclaw@gdcproject.org>
320         * d-codegen.cc (d_build_call): Only convert CALL_EXPRs into a
321         TARGET_EXPR if return type is TREE_ADDRESSABLE.
322         (build_assign): Use TARGET_EXPR accessors.
323         (compound_expr): Likewise.
325 2016-10-15  Iain Buclaw  <ibuclaw@gdcproject.org>
327         * d-codegen.h (d_types_same): Return early if types are identical.
329 2016-10-09  Iain Buclaw  <ibuclaw@gdcproject.org>
331         * d-decls.cc (FuncDeclaration::toThunkSymbol): Rename to make_thunk.
332         All callers updated.
333         (finish_thunk): Update signature.
335 2016-10-09  Iain Buclaw  <ibuclaw@gdcproject.org>
337         * d-objfile.h (Thunk): Remove type, move offset field to ...
338         * d-tree.h (lang_decl): ... here.  Replace Thunk field with a tree.
339         (THUNK_LANG_OFFSET): New macro accessor.
340         * d-lang.cc (copy_lang_decl): New function.
341         * d-decls.cc (FuncDeclaration::toThunkSymbol): Use new thunk macros.
343 2016-10-09  Iain Buclaw  <ibuclaw@gdcproject.org>
345         * d-decls.cc (finish_thunk): Add assert that current_function_decl is
346         never set when function is called.
347         (DeferredThunk): Remove type.
348         (deferred_thunks): Remove variable.
349         (write_deferred_thunks): Remove function.  All callers updated.
350         (use_thunk): Remove function.
351         (FuncDeclaration::toThunkSymbol): Call finish_thunk when done.
353 2016-10-08  Iain Buclaw  <ibuclaw@gdcproject.org>
355         * d-objfile.cc (deferred_thunks): Move to d-decls.cc.
356         (write_deferred_thunks): Likewise.
357         (use_thunk): Likewise.  Mark as static.
358         (thunk_labelno): Likewise.
359         (make_alias_for_thunk): Likewise.
360         (finish_thunk): Likewise.
362 2016-10-08  Iain Buclaw  <ibuclaw@gdcproject.org>
364         * d-decls.cc (setup_symbol_storage): Remove unused parameters.
366 2016-10-07  Iain Buclaw  <ibuclaw@gdcproject.org>
368         * d-decls.cc (ClassReferenceExp::toSymbol): Rename to
369         build_new_class_expr.  All callers updated.
370         (StructLiteralExp::toSymbol): Remove function.  Inline into caller ...
371         * expr.cc (ExprVisitor::visit(AddrExpr)): ... here.
373 2016-10-07  Iain Buclaw  <ibuclaw@gdcproject.org>
375         * d-decls.cc (TypeInfoDeclaration::toSymbol): Rename to
376         get_typeinfo_decl.  All callers updated.
377         (TypeInfoDeclVisitor): New visitor helper for get_typeinfo_decl.
378         * d-codegen.cc (get_decl_tree): Add check for building typeinfo decls.
380 2016-10-05  Iain Buclaw  <ibuclaw@gdcproject.org>
382         * d-decls.cc (AggregateDeclaration::toInitializer): Rename to
383         aggregate_initializer.  All callers updated.
384         (EnumDeclaration::toInitializer): Rename to enum_initializer.
385         (Module::toSymbol): Rename to get_moduleinfo_decl.
386         (ClassDeclaration::toSymbol): Rename to get_classinfo_decl.
387         (InterfaceDeclaration::toSymbol): Merge into get_classinfo_decl.
389 2016-10-03  Iain Buclaw  <ibuclaw@gdcproject.org>
391         * d-decls.cc (FuncDeclaration::toSymbol): Remove saving of current
392         module decl before calling semantic.
393         (StructLiteralExp::toSymbol): Don't handle sinit.
394         (ClassReferenceExp::toSymbol): Likewise.
395         (AggregateDeclaration::toInitializer): Likewise.
396         (EnumDeclaration::toInitializer): Likewise.
397         * d-glue.cc (toInitializer): Remove function.
398         * d-objfile.cc (FuncDeclaration::toObjFile): Remove saving of current
399         module decl before calling semantic.
400         * expr.cc (ExprVisitor::visit(CallExpr)): Replace accesses of sinit
401         field with useStaticInit.
402         (ExprVisitor::visit(StructLiteralExp)): Likewise.
404 2016-10-03  Iain Buclaw  <ibuclaw@gdcproject.org>
406         * d-decls.cc (ClassDeclaration::toVtblSymbol): Rename to
407         get_vtable_decl.  All callers updated.
409 2016-10-03  Iain Buclaw  <ibuclaw@gdcproject.org>
411         * d-objfile.cc (setup_symbol_storage): Move function to ...
412         * d-decls.cc (setup_symbol_storage): ... here.  Mark as static.
413         (get_template_storage_info): Likewise.
415 2016-10-03  Iain Buclaw  <ibuclaw@gdcproject.org>
417         * d-codegen.cc (call_by_alias_p): Check whether caller and callee are
418         nested in the same parent function.
419         * expr.cc (ExprVisitor::visit(CallExp)): Set TREE_PUBLIC directly
420         instead of calling setup_symbol_storage.
422 2016-10-03  Iain Buclaw  <ibuclaw@gdcproject.org>
424         * d-objfile.cc (VarDeclaration::toObjFile): Always generate
425         DECL_INITIAL for all kinds of var decls.
426         * d-codegen.cc (build_address): Use the DECL_INITIAL directly if
427         taking the address of a CONST_DECL.
429 2016-10-02  Iain Buclaw  <ibuclaw@gdcproject.org>
431         * d-tree.h (DECL_LANG_TREE): Remove macro.  All callers updated.
433 2016-10-02  Iain Buclaw  <ibuclaw@gdcproject.org>
435         * d-objfile.h (Symbol): Remove struct.  Update all functions to return
436         a tree instead.  Remove all new allocations of Symbol.
437         * d-tree.h (DECL_LANG_READONLY): Update accessor.
438         (DECL_LANG_INITIAL): Likewise.
439         (DECL_LANG_TREE): Likewise.
440         (SET_DECL_LANG_FRAME_FIELD): Likewise.
441         (DECL_LANG_FRAME_FIELD): Likewise.
442         (SET_DECL_LANG_NRVO): Likewise.
443         (DECL_LANG_NRVO): Likewise.
444         (DECL_LANG_THUNKS): Likewise.
445         (DECL_LANG_FRAMEINFO): Likewise.
447 2016-10-01  Iain Buclaw  <ibuclaw@gdcproject.org>
449         * d-objfile.h (Symbol): Remove symbol identifier field.
450         * d-tree.h (DECL_LANG_IDENTIFIER): Remove macro.  Update callers to
451         instead use DECL_ASSEMBLER_NAME.
452         (DECL_LANG_PRETTY_NAME): Remove macro.
454 2016-09-26  Johannes Pfau  <johannespfau@gmail.com>
456         * d-objfile.cc (d_finish_function): Handle template mixins (issue 231).
458 2016-09-25  Iain Buclaw  <ibuclaw@gdcproject.org>
460         * d-decls.cc (Dsymbol::toSymbolX): Remove function, update all callers
461         to use ...
462         (make_internal_name): ... New function.
463         * d-objfile.h (Symbol): Replace char* fields with tree.
464         * d-tree.h (lang_identifier): Add pretty_ident field.
465         (IDENTIFIER_PRETTY_NAME): New macro accessor.
466         (DECL_LANG_PRETTY_NAME): Update to use IDENTIFIER_PRETTY_NAME.
468 2016-09-19  Iain Buclaw  <ibuclaw@gdcproject.org>
470         * d-objfile.h (Symbol): Move declaration-specific fields to ...
471         * d-tree.h (lang_decl): ... here.
472         (DECL_LANG_READONLY): Update to reference lang_decl field.
473         (DECL_LANG_INITIAL): Likewise.
474         (DECL_LANG_FRAME_FIELD): Likewise.
475         (DECL_LANG_NRVO): Likewise.
476         (DECL_LANG_THUNKS): Likewise.
477         (DECL_LANG_FRAMEINFO): Likewise.
478         (SET_DECL_LANG_FRAME_FIELD): New setter macro, update all callers.
479         (SET_DECL_LANG_NRVO): Likewise.
481 2016-09-19  Iain Buclaw  <ibuclaw@gdcproject.org>
483         * d-builtins.cc (d_build_builtins_module): Set DECL_LANG_SPECIFIC
484         before using any DECL_LANG accessor macros.
485         (maybe_set_builtin_1): Likewise.
486         * d-codegen.cc (maybe_set_intrinsic): Likewise.
487         (layout_aggregate_members): Likewise.
488         d-decls.cc (VarDeclaration::toSymbol): Likewise.
489         (FuncDeclaration::toThunkSymbol): Likewise.
490         (ClassDeclaration::toSymbol): Likewise.
491         (InterfaceDeclaration::toSymbol): Likewise.
492         (Module::toSymbol): Likewise.
493         (StructLiteralExp::toSymbol): Likewise.
494         (ClassReferenceExp::toSymbol): Likewise.
495         (ClassDeclaration::toVtblSymbol): Likewise.
496         (AggregateDeclaration::toInitializer): Likewise.
497         (EnumDeclaration::toInitializer): Likewise.
499 2016-09-19  Iain Buclaw  <ibuclaw@gdcproject.org>
501         * d-tree.h (DECL_LANG_IDENTIFIER): New macro accessor, use instead of
502         direct field accesses.
503         (DECL_LANG_PRETTY_NAME): Likewise.
504         (DECL_LANG_READONLY): Likewise.
505         (DECL_LANG_INITIAL): Likewise.
506         (DECL_LANG_TREE): Likewise.
507         (DECL_LANG_FRAME_FIELD): Likewise.
508         (DECL_LANG_NRVO): Likewise.
509         (DECL_LANG_THUNKS): Likewise.
510         (DECL_LANG_FRAMEINFO): Likewise.
512 2016-09-18  Iain Buclaw  <ibuclaw@gdcproject.org>
514         * imports.cc (ImportVisitor::visit(ScopeDsymbol)): New visit method.
516 2016-09-17  Iain Buclaw  <ibuclaw@gdcproject.org>
518         * d-todt.cc (ArrayInitializer::toDt): Update to use build_expr.
519         * d-codegen.cc (d_array_value): Don't override default const and
520         static bits for array constructors.
522 2016-09-16  Iain Buclaw  <ibuclaw@gdcproject.org>
524         * d-codegen.cc (lower_struct_comparison): Don't compare vectors in the
525         same way as integers.
527 2016-09-11  Iain Buclaw  <ibuclaw@gdcproject.org>
529         * d-todt.cc (Type::toDt): Remove function, inline into callers.
530         (TypeVector::toDt): Likewise.
531         (TypeSArray::toDt): Likewise.
532         (TypeStruct::toDt): Likewise.
534 2016-09-11  Iain Buclaw  <ibuclaw@gdcproject.org>
536         * d-decls.cc (FuncDeclaration::toSymbol): Save current module decl
537         before calling function semantic.
538         * d-objfile.cc (FuncDeclaration::toObjFile): Likewise.
540 2016-09-11  Iain Buclaw  <ibuclaw@gdcproject.org>
542         * types.cc: Document and reformat file.
544 2016-09-10  Johannes Pfau  <johannespfau@gmail.com>
546         * d-objfile.cc (setup_symbol_storage): Setup TREE_PUBLIC before
547         calling decl_default_tls_model.
548         * d-typeinfo.cc (TypeInfoVisitor::find_field): Move method...
549         * d-codegen.cc (find_aggregate_field): here.
550         * d-objfile.cc (build_simple_function): Extract some code into new
551         function.
552         (build_simple_function_decl): Extracted from build_simple_function.
553         * d-objfile.cc (build_moduleinfo): Split into emit_moduleinfo_hooks
554         and emit_modref_hooks.
555         (build_dso_registry_var): New function.
556         (emit_dso_registry_cdtor): Likewise.
557         (emit_dso_registry_helpers): Likewise.
558         (emit_dso_registry_hooks): Likewise.
559         (emit_moduleinfo_hooks): Only emit hooks if required druntime functions
560         are available.
561         * d-objfile.cc (Module::genmoduleinfo): Rename to
562         build_moduleinfo_symbol.
563         (emit_moduleinfo_hooks): rename to Module::genmoduleinfo.
564         (Module::genmoduleinfo): only call build_moduleinfo_symbol when
565         emitting module info registry code.
566         * d-spec.c (lang_specific_driver): Add -shared-libphobos option,
567         default to static libphobos.
568         * d-lang.opt: Likewise.
569         * d-spec.c: Rename libgphobos2 to libgphobos.
571 2016-07-11  Iain Buclaw  <ibuclaw@gdcproject.org>
573         * d-codegen.cc (get_frameinfo): Use hasNestedFrameRefs to determine
574         whether a frame should be created.
576 2016-07-02  Iain Buclaw  <ibuclaw@gdcproject.org>
578         * d-objfile.cc (FuncDeclaration::toObjFile): Always convert the
579         DECL_RESULT of NRVO-capable functions into reference decls.
581 2016-06-21  Iain Buclaw  <ibuclaw@gdcproject.org>
583         * d-attribs.c (handle_nonnull_attribute): Accept the nonnull
584         attribute in type-generic builtins.
585         * d-codegen.cc (d_build_call): Check AGGREGATE_TYPE_P before testing
586         for aggregate_value_p.
588 2016-06-20  Johannes Pfau  <johannespfau@gmail.com>
590         * d-lang.cc (d_handle_option): Add new -ftransition=dip25 and
591         -fmax-error-messages switches.
592         * lang.opt: Likewise.
594 2016-06-19  Iain Buclaw  <ibuclaw@gdcproject.org>
596         * d-codegen.cc (get_decl_tree): Remove assert for RESULT_DECL.
597         (convert_for_argument): Handle lazy arguments early.
598         (argument_reference_p): Handle types marked TREE_ADDRESSABLE.
599         (lvalue_p): Add case for TARGET_EXPR.
600         (d_mark_addressable): Likewise.
601         (build_assign): Likewise.
602         (compound_expr): Likewise.
603         (build_target_expr): New function.
604         (d_build_call): Always set CALL_EXPR_RETURN_SLOT_OPT for all calls
605         that return an aggregate in memory.
606         * d-decls.cc (VarDeclaration::toSymbol): Handle reference parameters.
607         * d-lang.cc (d_gimplify_expr): Handle taking address of constructor.
608         * d-objfile.cc (FuncDeclaration::toObjFile): Handle reference return.
609         * expr.cc (ExprVisitor::visit(AssignExp)): Mark LHS as addressable if
610         RHS assignment is a returned aggregate.
611         * types.cc (TypeVisitor::visit(TypeStruct)): Mark the RECORD_TYPE of
612         non-trivial structs as TREE_ADDRESSABLE.
613         (TypeVisitor::visit(TypeClass)): Mark all classes as TREE_ADDRESSABLE.
614         (TypeVisitor::visit(TypeFunction)): Don't set TREE_ADDRESSABLE.
615         (TypeVisitor::visit(TypeDelegate)): Likewise.
617 2016-06-19  Iain Buclaw  <ibuclaw@gdcproject.org>
619         * d-codegen.cc (lvalue_p): Add more cases to look for.
620         (build_address): Mark expression as addressable after stabilizing.
621         (d_mark_addressable): Remove special cases.
622         (d_mark_used): Add cases for other kinds of DECLs.
623         (build_struct_comparison): Stabilize before saving.
624         (modify_expr): Remove overload.  Updated all callers.
625         (build_vinit): Remove function.  Updated all callers to use ...
626         (build_assign): ... New function.
627         (lvalue_p): Remove tests in default case.
628         * expr.cc (build_expr_dtor): Rewrite assignments to elide a temporary.
630 2016-06-16  Iain Buclaw  <ibuclaw@gdcproject.org>
632         * d-codegen.cc (make_temp): Rename to d_save_expr.
633         (maybe_make_temp): Remove function.
634         Updated all callers to use d_save_expr().
635         (vcompound_expr): Remove function.
636         Updated all callers to use compound_expr().
637         (maybe_compound_expr): Likewise.
638         (maybe_vcompound_expr): Likewise.
639         (vmodify_expr): Remove function.
640         Updated all callers to use modify_expr().
641         (lvalue_p): New function.
643 2016-06-15  Iain Buclaw  <ibuclaw@gdcproject.org>
645         * d-codegen.cc (add_stmt): Don't add statements without side effects.
646         Push each COMPOUND_EXPR as a separate statement.
647         (build_local_temp): Use input_location.
648         (create_temporary_var): Likewise.
649         (d_has_side_effects): Remove function.
650         Updated all callers to use TREE_SIDE_EFFECTS.
651         (stabilize_expr): New function.
652         Updated all routines that check for COMPOUND_EXPR to use it.
653         * expr.cc (ExprVisitor::visit(EqualExp)): Use maybe_make_temp to save
654         expressions.  Use build_boolop for constructed conditions.
655         (ExprVisitor::visit(CatAssignExp)): Stabilize RHS before assignment.
656         (ExprVisitor::visit(NewExp)): Don't always create SAVE_EXPR.
657         (ExprVisitor::visit(AssocArrayLiteralExp)): Likewise.
658         (ExprVisitor::visit(ArrayLiteralExp)): Evaluate elements before
659         appending to constructor fields.
660         (ExprVisitor::visit(StructLiteralExp)): Likewise.
662 2016-06-12  Iain Buclaw  <ibuclaw@gdcproject.org>
664         * d-convert.cc (d_build_truthvalue_op): Fold truthvalue operation.
665         (d_truthvalue_conversion): Use zero constant of expression type.
667 2016-06-09  Iain Buclaw  <ibuclaw@gdcproject.org>
669         * d-codegen.cc (build_address): Handle ERROR_MARK and COMPOUND_EXPR.
670         (build_nop): Likewise.
671         (indirect_ref): Likewise.
672         (build_deref): Likewise.
673         (d_build_call): Only create temporaries if more than one argument has
674         side effects.
675         * expr.cc (get_compound_value): Remove function.
676         (build_expr_dtor): Wrap cleanups in a TRY_FINALLY_EXPR only if the
677         expression has side effects.
679 2016-06-08  Iain Buclaw  <ibuclaw@gdcproject.org>
681         * Make-lang.in (D_GLUE_OBJS): Remove d-typinf.o, add typeinfo.o.
682         * d-codegen.cc (build_typeinfo): Move to ...
683         * typeinfo.cc: ... here.  New file.
684         * d-objfile.cc (TypeInfoDeclaration::toObjFile): Use layout_typeinfo.
685         * d-todt.cc (verify_structsize): Remove function.
686         (TypeInfoDeclaration::toDt): Remove function and overrides.
687         * d-typinf.cc: Remove file.  Contents moved to typeinfo.cc.
688         * expr.cc (ExprVisitor::visit(DeleteExp)): Use build_typeinfo.
689         (ExprVisitor::visit(NewExp)): Likewise.
691 2016-06-08  Iain Buclaw  <ibuclaw@gdcproject.org>
693         * dfrontend: Update to D front-end version 2.068.
694         * d-codegen.cc (insert_type_modifiers): Don't build TYPE_QUAL_VOLATILE
695         types.  Set TYPE_SHARED instead.
696         (insert_aggregate_field): Propagate TYPE_SHARED to TREE_ADDRESSABLE.
697         (array_bounds_check): Use BOUNDSCHECK interface.
698         * d-lang.cc (d_init_options): Likewise.
699         (d_init): Likewise.
700         (d_handle_option): Likewise.
701         (d_post_options): Likewise.
702         * d-decls.cc (VarDeclaration::toSymbol): Propagate TYPE_SHARED_to
703         TREE_ADDRESSABLE.
704         * d-objfile.cc (ClassDeclaration::toObjFile): Make overload shadowing
705         an error.  Remove call to _d_hidden_func.
706         (TypeInfoDeclaration::toObjFile): Updated template emission rules.
707         (FuncDeclaration::toObjFile): Likewise.
708         * d-port.cc (Port::readwordLE): New function.
709         (Port::readwordBE): New function.
710         (Port::readlongLE): New function.
711         (Port::readlongBE): New function.
712         * d-todt.cc (dt_container2): Handle error_mark_node.
713         (dt_container): Likewise.
714         (TypeInfoStructDeclaration::toDt): Updated template emission rules.
715         * d-typinf.cc (genTypeInfo): Likewise.
716         (getTypeInfo): Remove function.
717         (getTypeInfoType): New function.
718         (isSpeculativeType): New function.
719         * d-tree.h (TYPE_SHARED): New macro.
720         * expr.cc (ExprVisitor::visit(CondExp)): Don't generate dtors in
721         condition expression.
722         (ExprVisitor::visit(AssignExp)): Update for frontend changes.
723         (ExprVisitor::visit(DeleteExp)): Likewise.
724         (ExprVisitor::visit(CallExp)): Likewise.
725         (ExprVisitor::visit(DelegateExp)): Likewise.
726         (ExprVisitor::visit(TypeidExp)): New function.
727         * lang.opt (bounds_check_set_manually): Remove variable.
728         (ftransition=complex): New option.
729         * runtime.def (HIDDEN_FUNC): Remove runtime function.
731 2016-06-07  Iain Buclaw  <ibuclaw@gdcproject.org>
733         * d-codegen.cc (build_alignment_field): New function.
734         (build_struct_literal): Update signature, updated all callers.
735         Add anonymous fields to fill alignment holes in constructor.
736         (fill_alignment_field): Remove function.
737         (fill_alignment_holes): Remove function.
738         (finish_aggregate_type): Don't add anonymous fields.
740 2016-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>
742         * d-codegen.cc (d_build_call): Separate parameter to pass from it's
743         construction expression.
744         * expr.cc (build_dtor_list): New function.
745         (get_compound_value): New function.
746         (build_expr_dtor): Update to use helper functions.
747         (build_return_dtor): New function.
748         * toir.cc (IRVisitor::visit(ReturnStatement)): Use it.
750 2016-06-04  Iain Buclaw  <ibuclaw@gdcproject.org>
752         * d-codegen.cc (build_deref): Handle ERROR_MARK nodes early.
753         (build_array_index): Likewise.
755 2016-05-29  Johannes Pfau  <johannespfau@gmail.com>
757         * toir.cc (IRVisitor::visit(SwitchStatement)): Set correct type for the
758         string table for switch(string) statements.
760 2016-05-24  Iain Buclaw  <ibuclaw@gdcproject.org>
762         * d-codegen.cc (convert_expr): Return empty constructor for null to
763         associative array conversions.
764         * expr.cc (ExprVisitor::visit(NullExp)): Likewise.
766 2016-05-21  Iain Buclaw  <ibuclaw@gdcproject.org>
768         * d-codegen.cc (build_struct_literal): Don't set TREE_STATIC.
769         (build_boolop): Remove side effects from aggregate types only.
770         * expr.cc (ExprVisitor::visit(ArrayLiteralExp)): Don't check
771         initializer_constant_valid_p until after constructor is built.
772         (ExprVisitor::visit(StructLiteralExp)): Likewise.
774 2016-05-16  Iain Buclaw  <ibuclaw@gdcproject.org>
776         * expr.cc (ExprVisitor::visit(AssignExp)): Build the rhs constructor
777         before the lhs declaration.
778         (ExprVisitor::visit(DeclarationExp)): Compile the declaration and
779         initializer before pushing it to vars_in_scope.
780         (build_expr_dtor): Compound all dtors in reverse.
782 2016-05-16  Johannes Pfau  <johannespfau@gmail.com>
784         * expr.cc (ExprVisitor::visit(IdentityExp*)): Remove side-effects
785         before comparing two floating point types.
786         * d-codegen.cc (build_struct_comparison): Remove side-effects
787         before comparing two values.
788         (build_boolop): Likewise.
790 2016-05-15  Iain Buclaw  <ibuclaw@gdcproject.org>
792         * d-todt.cc (Expression::toDt): Remove function and all overrides.
793         Update all callers to use build_expr.
794         * expr.cc (ExprVisitor::visit(SymOffExp)): Move check for non-constant
795         expressions in static initializer data to ...
796         (build_expr): ... here.
797         * toir.cc (IRVisitor::visit(SwitchStatement)): Build array of indexes
798         directly using build_artificial_decl.
800 2016-05-15  Iain Buclaw  <ibuclaw@gdcproject.org>
802         * expr.cc (ExprVisitor::visit(IdentityExp*)): Remove side-effects
803         before comparing two dynamic arrays.
805 2016-05-14  Iain Buclaw  <ibuclaw@gdcproject.org>
807         * d-codegen.cc (get_decl_tree): First check if cfun is set.
808         * d-todt.cc (StructLiteralExp::toDt): Update call to build_expr.
809         (SymOffExp::toDt): Likewise.
810         (VarExp::toDt): Likewise.
811         (FuncExp::toDt): Likewise.
812         (VectorExp::toDt): Likewise.
813         * expr.cc (ExprVisitor::visit(SymbolExp)): Remove function.
814         (ExprVisitor::visit(SymOffExp)): New function.
815         (ExprVisitor::visit(VarExp)): New function.
816         (ExprVisitor::visit(StructLiteralExp)): Don't return static
817         initializer symbol if constant literal requested.
819 2016-05-13  Iain Buclaw  <ibuclaw@gdcproject.org>
821         * d-codegen.cc (build_struct_literal): Maybe set TREE_CONSTANT or
822         TREE_STATIC on the returned constructor.
823         Allow building struct literals with initializer list out of order.
824         Add check and error when initializer overlaps previous field.
825         Don't explicitly set empty initializers for anonymous aggregates or
826         artificial fields.
828 2016-05-12  Iain Buclaw  <ibuclaw@gdcproject.org>
830         * d-codegen.cc (build_array_from_val): New function.
831         * expr.cc (ExprVisitor::visit(StructLiteralExp)): Use it.
833 2016-05-11  Iain Buclaw  <ibuclaw@gdcproject.org>
835         * d-codegen.cc (convert_expr): Use build_nop to cast between two
836         static arrays of the same size.
837         * d-todt.cc (IntegerExp::toDt): Update call to build_expr.
838         (RealExp::toDt): Likewise.
839         (ComplexExp::toDt): Likewise.
840         (StringExp::toDt): Likewise.
841         (NullExp::toDt): Use build_expr to generate initializer.
842         (ArrayLiteralExp::toDt): Likewise.
843         (CastExp::toDt): Likewise.
844         (ClassReferenceExp::toDt): Likewise.
845         (ClassReferenceExp::toDtI): Remove function.
846         * expr.cc (ExprVisitor::visit(CastExp)): Forward constp to the next
847         leaf expression in the tree.
848         (ExprVisitor::visit(AddrExp)): Likewise.
849         (ExprVisitor::visit(FuncExp)): Likewise.
850         (ExprVisitor::visit(ArrayLiteralExp)): Likewise.
851         (ExprVisitor::visit(StructLiteralExp)): Likewise.
852         (ExprVisitor::visit(VectorExp)): Likewise.
853         (ExprVisitor::visit(ClassReferenceExp)): Adjust reference for constp.
855 2016-05-09  Iain Buclaw  <ibuclaw@gdcproject.org>
857         * d-objfile.cc (get_unique_name): Remove function.
858         (build_artificial_decl): New function.
859         (d_finish_symbol): Use build_artificial_decl.
860         (build_moduleinfo): Likewise.
861         * d-decls.cc (StructLiteralExp::toSymbol): Likewise.
862         (ClassReferenceExp::toSymbol): Likewise.
864 2016-05-07  Iain Buclaw  <ibuclaw@gdcproject.org>
866         * expr.cc (ExprVisitor::visit(BinExp)): New function.
867         (ExprVisitor::visit(XorExp)): Remove function.
868         (ExprVisitor::visit(OrExp)): Likewise.
869         (ExprVisitor::visit(AndExp)): Likewise.
870         (ExprVisitor::visit(UshrExp)): Likewise.
871         (ExprVisitor::visit(ShrExp)): Likewise.
872         (ExprVisitor::visit(ShlExp)): Likewise.
873         (ExprVisitor::visit(ModExp)): Likewise.
874         (ExprVisitor::visit(DivExp)): Likewise.
875         (ExprVisitor::visit(MulExp)): Likewise.
876         (ExprVisitor::visit(MinExp)): Likewise.
877         (ExprVisitor::visit(AddExp)): Likewise.
878         (ExprVisitor::visit(BinAssignExp)): New function.
879         (ExprVisitor::visit(XorAssignExp)): Remove function.
880         (ExprVisitor::visit(OrAssignExp)): Likewise.
881         (ExprVisitor::visit(AndAssignExp)): Likewise.
882         (ExprVisitor::visit(ShrAssignExp)): Likewise.
883         (ExprVisitor::visit(ShlAssignExp)): Likewise.
884         (ExprVisitor::visit(ModAssignExp)): Likewise.
885         (ExprVisitor::visit(DivAssignExp)): Likewise.
886         (ExprVisitor::visit(MulAssignExp)): Likewise.
887         (ExprVisitor::visit(PowAssignExp)): Likewise.
888         (ExprVisitor::visit(MinAssignExp)): Likewise.
889         (ExprVisitor::visit(AddAssignExp)): Likewise.
891 2016-05-06  Iain Buclaw  <ibuclaw@gdcproject.org>
893         * expr.cc (ExprVisitor::ExprVisitor): Update signature.
894         (ExprVisitor::visit(AddrExp)): Handle constant expressions.
895         (ExprVisitor::visit(FuncExp)): Likewise.
896         (ExprVisitor::visit(ComplexExp)): Likewise.
897         (ExprVisitor::visit(StringExp)): Likewise.
898         (ExprVisitor::visit(ArrayLiteralExp)): Likewise.
899         (ExprVisitor::visit(StructLiteralExp)): Likewise.
900         (ExprVisitor::visit(NullExp)): Likewise.
901         (ExprVisitor::visit(ClassReferenceExp)): Likewise.
902         (build_expr): Update signature.
904 2016-05-05  Iain Buclaw  <ibuclaw@gdcproject.org>
906         * Make-lang.in (D_GLUE_OBJS): Add d/expr.o.
907         Remove d/d-elem.o
908         * d-codegen.cc (size_mult_expr): New function.
909         * d-tree.h (build_expr): New function, update all callers to toElem.
910         (build_expr_dtor): New function, update all callers to toElemDtor.
911         * expr.cc: New file.
912         * d-elem.cc: Remove file.
914 2016-05-03  Iain Buclaw  <ibuclaw@gdcproject.org>
916         * d-target.cc (Target::init): Target::realpad value should be size
917         minus precision.
919 2016-04-29  Iain Buclaw  <ibuclaw@gdcproject.org>
921         * d-codegen.cc (finish_aggregate_type): Use SET_TYPE_ALIGN.
922         * types.cc (TypeVisitor::visit(TypeStruct)): Likewise.
923         * d-decls.cc (ClassDeclaration::toVtblSymbol): Use SET_DECL_ALIGN.
924         * d-objfile.cc (d_finish_symbol): Likewise.
925         * d-target.cc (Target::fieldalign): Likewise.
927 2016-04-29  Iain Buclaw  <ibuclaw@gdcproject.org>
929         * d-todt.cc (TypeSArray::toDtElem): Remove special handling for
930         arrays of vectors.
932 2016-04-23  Iain Buclaw  <ibuclaw@gdcproject.org>
934         * d-builtins.cc (build_dtype): Make function static.
935         * d-lang.cc (d_init_exceptions): Remove function.
936         * d-codegen.h: Move visitor declarations to ...
937         * d-tree.h: ... here.
938         (lang_decl): Remove `d_` prefix from fields.
939         (lang_type): Likewise.
940         * d-lang.cc (build_d_type_lang_specific): Rename to build_lang_type.
941         (build_d_decl_lang_specific): Rename to build_lang_decl.
942         * imports.cc: Update includes.
944 2016-03-29  Johannes Pfau  <johannespfau@gmail.com>
946         * d-objfile.cc (d_comdat_linkage): Rewrite template duplicate
947         handling to generate only one backend tree for all duplicates.
948         (FuncDeclaration::toObjFile): Likewise.
949         (VarDeclaration::toObjFile): Likewise.
950         * d-decls.cc (FuncDeclaration::toSymbol): Likewise.
951         (VarDeclaration::toSymbol): Likewise.
952         * d-objfile.cc (get_template_storage_info): Extract function from
953         setup_symbol_storage.
954         (setup_symbol_storage): Likewise.
955         * d-tree.h (lang_identifier): Add field for Dsymbol.
956         (IDENTIFIER_LANG_SPECIFIC): New macro.
957         (IDENTIFIER_DSYMBOL): Likewise.
959 2016-03-29  Iain Buclaw  <ibuclaw@gdcproject.org>
961         * d-codegen.cc (fill_alignment_field): Call layout_decl on field.
962         (finish_aggregate_type): Add assertion that TYPE_MODE is equal.
964 2016-03-29  Iain Buclaw  <ibuclaw@gdcproject.org>
966         * d-codegen.cc (convert_expr): Replace call build_integer_cst with
967         size_int.
968         (convert_for_assignment): Likewise.
969         (build_struct_comparison): Likewise.
970         (d_assert_call): Likewise.
971         * d-elem.cc (IdentityExp::toElem): Likewise.
972         (AssignExp::toElem): Likewise.
973         (IndexExp::toElem): Likewise.
974         (SymbolExp::toElem): Likewise.
975         (NewExp::toElem): Likewise.
976         (ArrayLiteralExp::toElem): Likewise.
977         (AssocArrayLiteralExp::toElem): Likewise.
979 2016-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
981         * d-tree.h (CLASS_TYPE_P): New macro.
982         * d-codegen.cc (build_struct_literal): Check RECORD_OR_UNION_TYPE_P
983         before testing ANON_AGGR_TYPE_P.
984         (fill_alignment_field): New function.
985         (fill_alignment_holes): New function.
986         (finish_aggregate_type): Call fill_alignment_holes before computing
987         backend type mode.
989 2016-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
991         * d-tree.h (D_METHOD_CALL_EXPR): Removed `D_' prefix from macro,
992         updated all callers.
993         (D_TYPE_IMAGINARY_FLOAT): Likewise.
994         (D_LABEL_VARIABLE_CASE): Likewise.
995         * d-codegen.cc (build_delegate_cst): Always return valid constructor.
996         (get_object_method): Remove function.
997         (build_vindex_ref): New function.
998         * d-elem.cc (FuncExp::toElem): Use the real function pointer type when
999         converting to delegate.
1000         (CallExp::toElem): Handle setting up virtual functions directly.
1001         (DelegateExp::toElem): Likewise.
1002         (DotVarExp::toElem): Remove handling of virtual functions.
1004 2016-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
1006         * d-codegen.h (lang_dtype): Remove function.
1007         (lang_ddecl): Remove function.
1008         * d-tree.h (TYPE_LANG_FRONTEND): New macro, replace all uses of
1009         lang_dtype function.
1010         (DECL_LANG_FRONTEND): New macro.
1011         * d-attribs.c: Update includes.
1012         * d-builtins.cc: Likewise.
1013         * d-codegen.cc: Likewise.
1014         * d-incpath.cc: Likewise.
1015         * d-lang.cc: Likewise.
1016         * d-objfile.cc: Likewise.
1018 2016-03-27  Iain Buclaw  <ibuclaw@gdcproject.org>
1020         * d-codegen.h (function_type_p): Remove function.
1021         * d-codegen.cc (d_build_call): Use FUNC_OR_METHOD_P macro.
1022         (build_bounds_condition): Update signature.
1023         (d_assert_call): Likewise.
1024         (insert_aggregate_field): Likewise.
1025         * d-objfile.cc (get_linemap): Likewise.
1026         * d-lang.h: Remove file, updated all includes.  Moved forward
1027         declarations of types and functions to ...
1028         * d-tree.h: ... here.
1030 2016-03-20  Iain Buclaw  <ibuclaw@gdcproject.org>
1032         * d-codegen.cc (d_checked_index): Remove function.
1033         (d_bounds_condition): Remove function.
1034         (build_bounds_condition): New function.
1035         * d-elem.cc (IndexExp::toElem): Use build_bounds_condition.
1036         (SliceExp::toElem): Likewise.
1037         (EqualExp::toElem): Convert expressions to dynamic arrays when
1038         inlining comparison.  Don't pass zero length arrays to memcmp.
1040 2016-03-19  Iain Buclaw  <ibuclaw@gdcproject.org>
1042         * d-codegen.cc (d_array_convert): New function overload.
1043         * d-elem.cc (CatExp::toElem): Call new runtime function _d_arraycatnTX
1044         when flattening multiple concatenations.
1045         (NewExp::toElem): Update call construction for new signatures of
1046         runtime functions _d_newarraymTX and _d_newarraymiTX.
1047         * runtime.def (NEWARRAYMTX): Update signature.
1048         (NEWARRAYMITX): Likewise,
1049         (ARRAYCATNT): Remove runtime function.
1050         (ARRAYCATNTX): New runtime function.
1052 2016-03-07  Iain Buclaw  <ibuclaw@gdcproject.org>
1054         * imports.cc (ImportVisitor::visit(Declaration)): Don't assume toSymbol
1055         method will cache it's result.
1057 2016-03-06  Iain Buclaw  <ibuclaw@gdcproject.org>
1059         * dfrontend: Update root library to 2.068.
1060         * Make-lang.in (D_DMD_OBJS): Add newdelete.o
1061         * d-target.cc (Target::classinfosize): New variable, replaces all uses
1062         of global CLASSINFO_SIZE.
1063         (Target::init): Initialize it.
1064         * d-decls.cc (ClassInfoDeclaration::toSymbol): Remove function.
1066 2016-03-05  Iain Buclaw  <ibuclaw@gdcproject.org>
1068         * dfrontend: Update to D front-end version 2.067.
1069         * Make-lang.in (D_DMD_OBJS): Add new frontend sources.
1070         * d-builtins.cc (d_build_builtins_module): Update signature.
1071         (maybe_set_builtin): Rename to d_maybe_set_builtin, update signature.
1072         (d_gcc_magic_module): Remove function.
1073         * d-codegen.cc (expand_volatile_load): New function.
1074         (expand_volatile_store): New function.
1075         (expand_intrinsic): Handle volatileLoad and volatileStore intrinsics.
1076         * d-decls.cc (Module::toModuleAssert): Remove function.
1077         (Module::toModuleUnittest): Remove function.
1078         (Module::toModuleArray): Remove function.
1079         (TypeAArray::aaGetSymbol): Remove function.
1080         * d-elem.cc (AssignExp::toElem): Call _d_arrayassign_{l,r} when
1081         generating dynamic array assignment.
1082         (IndexExp::toElem): Call _aaGetY when indexing an associative array.
1083         (SliceExp::toElem): Use known CTFE result to check whether bounds
1084         checks are necessary.
1085         (DeleteExp::toElem): Call _d_delstruct when deleting a struct pointer.
1086         (Expression::toElemDtor): Don't run cleanup of temporary if it's
1087         constructor thrown an exception.
1088         (NewExp::toElem): Handle special construction of new() arguments.
1089         * d-glue.cc (Loc::Loc): Update signature.
1090         (error): Likewise.
1091         (toInitializer): New function.
1092         * d-lang.cc (d_handle_option): Replace deprecated handlers.
1093         (d_post_options): Set flag_max_errors.
1094         (d_parse_file): Process any modules marked as builtin.
1095         * d-objfile.cc (ClassDeclaration::toObjFile): Don't write out ctors
1096         in the vtable marked @disable.
1097         * d-target.cc (Target::loadModule): New function.
1098         (Target::checkVectorType): New function.
1099         * d-specs.c (lang_specific_driver): Handle -v option.
1100         * lang-specs.h: Pass -v option to to frontend.
1102 2016-03-04  Iain Buclaw  <ibuclaw@gdcproject.org>
1104         * imports.cc: New file.
1105         * d-decls.cc (Dsymbol::toImport): Remove function, update all callers
1106         to use build_import_decl.
1108 2016-03-03  Iain Buclaw  <ibuclaw@gdcproject.org>
1110         * d-objfile.cc (gcc_attribute_p): New function.
1111         (output_declaration_p): Inline into FuncDeclaration::ObjFile.
1112         (unnest_function): Likewise.
1113         (FuncDeclaration::toObjFile): Remove named parameter, update all
1114         callers to ignore it.
1115         (d_comdat_group): Use DECL_ASSEMBLER_NAME for the comdat group.
1116         (d_comdat_linkage): Catch duplicate instantiations of templates, put
1117         them in the same comdat group.
1118         (setup_symbol_storage): Mark templates not to be written as abstract.
1119         (d_finish_function): Don't send DECL_ABSTRACT_P functions to backend.
1120         (d_finish_compilation): Mark all symbols as needed.
1122         * d-objfile.cc: Remove redundant bool parameter from all lowering
1123         routines for symbols, update all callers.
1125 2016-02-22  Eugene Wissner <belka@caraus.de>
1127         * d-lang.cc (d_init): Remove short_double parameter from
1128         build_common_tree_nodes.
1130 2016-02-20  Iain Buclaw  <ibuclaw@gdcproject.org>
1132         * intrinsics.def: Split signature macros into three groups.
1133         Attributes, types, and helper generators.
1134         * d-elem.cc (needsPostblit): Change signature to return boolean,
1135         updated all callers.
1136         (AssignExp::toElem): Don't assign destination to a temporary in
1137         arraycopy call.
1138         * toir.cc (IRVisior::visit(ThrowStatement)): Use NOP_EXPR cast to
1139         convert thrown exception to Object.
1140         (IRVisitor::visit(TryCatchStatement)): Use NOP_EXPR cast to convert
1141         caught Object to thrown exception.
1142         * d-codegen.cc (void_okay_p): Lazily build the convert to type.
1143         * d-lang.cc (parse_int): Remove function.
1144         (d_handle_option): Use integral_argument to parse numbers.
1146         * d-codegen.cc (lower_struct_comparison): Built custom type if
1147         lang_hooks.types.type_for_mode returns nothing.
1148         * d-lang.cc (d_type_for_mode): Always support cent/ucent modes.
1149         (d_type_for_size): Add support for cent/ucent precision types.
1150         (d_signed_or_unsigned_type): Always support cent/ucent precisions.
1152         * d-codegen.cc (d_build_call): Remove type promotion handling for
1153         variadic arguments.
1154         (expand_intrinsic_vaarg): Likewise.
1155         * d-lang.cc (d_type_promotes_to): Likewise.
1157         * d-elem.cc (AddrExp::toElem): Take address of the static const symbol
1158         for the struct literal,  not the const constructor.
1159         (CallExp::toElem): Don't pass generated static struct literal symbol
1160         as the object parameter for DotVar call expressions.
1162         * d-codegen.cc (type_va_array): New function.
1163         (declaration_type_kind): Remove function.
1164         (declaration_reference_p): New function, update all callers of
1165         declaration_type_kind.
1166         (argument_type_kind): Remove function.
1167         (argument_reference_p): New function, update all callers of
1168         argument_type_kind.
1169         (build_address): Remove special handling of static array va_list.
1170         * d-codegen.h (type_kind): Remove enum.
1172 2016-02-18  Iain Buclaw  <ibuclaw@gdcproject.org>
1174         * d-codegen.cc (build_condition): New function.  Update all callers
1175         that generate a COND_EXPR that returns a value to use it.
1176         (build_vcondition): New function.  Update all callers that generate a
1177         void COND_EXPR to use it.
1178         * toir.cc (IRVisitor::visit(DoStatement)): Build a COND_EXPR instead
1179         of an EXIT_EXPR to break from the loop.
1180         (IRVisitor::visit(ForStatement)): Likewise.
1182 2016-02-14  Iain Buclaw  <ibuclaw@gdcproject.org>
1184         * d-elem.cc: Remove redundant IRState parameter from all lowering
1185         routines for expressions, update all callers.
1187 2016-02-07  Iain Buclaw  <ibuclaw@gdcproject.org>
1189         * d-codegen.cc (build_array_set): Use POSTINCREMENT_EXPR to adjust
1190         array pointer.
1191         (identity_compare_p): New function.
1192         (build_struct_memcmp): Refactor into ...
1193         (lower_struct_comparison): ... New function.
1194         (build_struct_comparison): New function.
1195         (build_array_struct_comparison): New function.
1196         * d-elem.cc (IdentityExp::toElem): Use build_struct_comparison for
1197         RECORD_TYPE values.
1198         (EqualExp::toElem): Likewise.
1199         Use memcmp for array of structs that pass test for identity_compare_p,
1200         or fallback to build_array_struct_comparison.
1201         (NewExp::toElem): Remove setting of StructLiteralExp::fillHoles.
1202         (StructLiteralExp::toElem): Ignore StructLiteralExp::fillHoles, unless
1203         building a union literal.
1205 2016-02-03  Iain Buclaw  <ibuclaw@gdcproject.org>
1207         * d-elem.cc (AssignExp::toElem): Pass parameters for arraycopy and
1208         arrayassign in the correct order.
1210 2016-01-31  Iain Buclaw  <ibuclaw@gdcproject.org>
1212         * longdouble.h (longdouble): Use one contiguous array for the
1213         real_value data payload.
1215 2016-01-23  Iain Buclaw  <ibuclaw@gdcproject.org>
1217         * toir.cc (IRVisitor::visit (ExtAsmStatement): Do validation of input
1218         and output constraints, marking operands as addressable if requested.
1220 2016-01-10  Iain Buclaw  <ibuclaw@gdcproject.org>
1222         * d-codegen.cc (empty_aggregate_p): New function.
1223         (d_build_call): Don't pass empty aggregates by value.
1224         (build_struct_memcmp): Don't compare empty aggregates by value.
1225         * d-elem.cc (IdentityExp::toElem): Likewise.
1226         (EqualExp::toElem): Likewise.
1227         * (StructLiteralExp::toElem): Don't create temporaries or initialize
1228         holes for empty aggregates.
1229         * d-lang.cc (empty_modify_p): New function.
1230         (d_gimplify_expr): Remove assignments that involve empty aggregates.
1232 2016-01-09  Iain Buclaw  <ibuclaw@gdcproject.org>
1234         * d-builtins.cc (d_builtin_type): Define DEF_FUNCTION_TYPE_9,
1235         DEF_FUNCTION_TYPE_10, and DEF_FUNCTION_TYPE_11.
1236         (d_init_builtins): Likewise.
1237         * d-longdouble.cc (machineMode): Remove function.
1238         (longdouble::init): Don't use initialize real format by reference.
1239         (longdouble::operator+): Use real_arithmetic instead of
1240         REAL_ARITHMETIC.
1241         (longdouble::operator-): Likewise.
1242         (longdouble::operator*): Likewise.
1243         (longdouble::operator/): Likewise.
1244         (longdouble::operator%): Likewise.
1245         * d-port.cc (Port::isSignallingNan): Use REAL_VALUE_ISSIGNALING_NAN.
1246         (Port::fequal): Use real_identical instead of REAL_VALUES_IDENTICAL.
1247         * d-target.cc: Include stor-layout.h header.
1248         * lang.opt: Remove documentation for switches defined elsewhere.
1250 2016-01-09  Iain Buclaw  <ibuclaw@gdcproject.org>
1252         * d-codegen.cc (get_libcall): Use set_call_expr_flags to apply runtime
1253         function attributes.
1254         * d-codegen.h (LibCallFlag): Remove type.
1255         * runtime.def: Replace LibCallFlag with ECF everywhere.
1258 Copyright (C) 2016 Free Software Foundation, Inc.
1260 Copying and distribution of this file, with or without modification,
1261 are permitted in any medium without royalty provided the copyright
1262 notice and this notice are preserved.