12016-12-28 Iain Buclaw <ibuclaw@gdcproject.org> 2 3 * expr.cc (ExprVisitor::visit(VarExp)): Remove type forced conversion. 4 52016-12-28 Iain Buclaw <ibuclaw@gdcproject.org> 6 7 * d-lang.cc (d_handle_option): Handle -ftransition=safe. 8 * lang.opt (ftransition=safe): Add compiler option. 9 102016-12-28 Iain Buclaw <ibuclaw@gdcproject.org> 11 12 * d-lang.cc (d_init_options): Initialize hdrStripPlainFunctions. 13 (d_post_options): Add post option handling of flag. 14 152016-12-27 Iain Buclaw <ibuclaw@gdcproject.org> 16 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. 19 202016-12-27 Iain Buclaw <ibuclaw@gdcproject.org> 21 22 * d-lang.cc (d_parse_file): Run runDeferredSemantic2 after semantic2. 23 242016-12-26 Iain Buclaw <ibuclaw@gdcproject.org> 25 26 * expr.cc (ExprVisitor::visit(ArrayLiteralExp)): Use getElement to 27 index elements array. 28 (ExprVisitor::visit(VectorExp)): Likewise. 29 302016-12-25 Iain Buclaw <ibuclaw@gdcproject.org> 31 32 * Make-lang.in (D_DMD_OBJS): Add d/objc.o 33 * types.cc (TypeVisitor::visit(TypeFunction)): Handle ObjC linkage. 34 352016-12-25 Iain Buclaw <ibuclaw@gdcproject.org> 36 37 * d-decls.cc (mangle_decl): New function. 38 (make_internal_name): Update. 39 (get_symbol_decl): Update. 40 412016-12-24 Iain Buclaw <ibuclaw@gdcproject.org> 42 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. 47 482016-12-24 Iain Buclaw <ibuclaw@gdcproject.org> 49 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. 56 572016-12-22 Iain Buclaw <ibuclaw@gdcproject.org> 58 59 * d-target.cc (Target::cppExceptions): New variable. 60 (Target::init): Initialize it. 61 (Target::prefixName): New function. 62 632016-12-19 Iain Buclaw <ibuclaw@gdcproject.org> 64 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. 74 752016-12-18 Iain Buclaw <ibuclaw@gdcproject.org> 76 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. 81 822016-12-18 Iain Buclaw <ibuclaw@gdcproject.org> 83 84 * d-decls.cc (layout_moduleinfo_fields): Use finish_aggregate_type 85 instead of layout_type. 86 (layout_classinfo_interfaces): Likewise. 87 882016-12-17 Iain Buclaw <ibuclaw@gdcproject.org> 89 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. 101 1022016-12-17 Johannes Pfau <johannespfau@gmail.com> 103 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. 109 1102016-12-13 Iain Buclaw <ibuclaw@gdcproject.org> 111 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. 116 1172016-12-13 Iain Buclaw <ibuclaw@gdcproject.org> 118 119 * d-builtins.cc (build_dtype): Set type modifiers on frontend type. 120 1212016-12-12 Iain Buclaw <ibuclaw@gdcproject.org> 122 123 * d-builtins.cc (build_dtype): Don't set default parameter storage 124 class as const. 125 1262016-12-12 Iain Buclaw <ibuclaw@gdcproject.org> 127 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. 134 1352016-12-11 Iain Buclaw <ibuclaw@gdcproject.org> 136 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. 142 1432016-12-11 Iain Buclaw <ibuclaw@gdcproject.org> 144 145 * d-builtins.cc (build_dtype): Don't build generic function types. 146 (d_build_builtins_module): Remove check. 147 1482016-12-10 Iain Buclaw <ibuclaw@gdcproject.org> 149 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. 154 1552016-12-07 Iain Buclaw <ibuclaw@gdcproject.org> 156 157 * d-spec.c (lang_specific_driver): Remove error handling. 158 * d-lang.cc (d_parse_file): Don't error twice. 159 1602016-12-06 Iain Buclaw <ibuclaw@gdcproject.org> 161 162 * d-spec.c (lang_specific_driver): Remove 'added' variable. 163 1642016-12-04 Iain Buclaw <ibuclaw@gdcproject.org> 165 166 * d-decls.cc (get_symbol_decl): Use needsCodegen to determine whether 167 template instance is extern or not. 168 1692016-12-02 Iain Buclaw <ibuclaw@gdcproject.org> 170 171 * d-glue.cc (escapePath): Move to dfrontend. 172 (readFile): Likewise. 173 (writeFile): Likewise. 174 (ensurePathToNameExists): Likewise. 175 1762016-12-01 Iain Buclaw <ibuclaw@gdcproject.org> 177 178 * d-target.cc: Include memmodel.h. 179 * d-attrib.c (d_handle_section_attribute): No longer set 180 user_defined_section_attribute. 181 1822016-11-25 Iain Buclaw <ibuclaw@gdcproject.org> 183 184 * types.cc (TypeVisitor::visit(Type)): Update. 185 1862016-11-24 Iain Buclaw <ibuclaw@gdcproject.org> 187 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. 192 1932016-11-22 Iain Buclaw <ibuclaw@gdcproject.org> 194 195 * d-decls.cc (get_symbol_decl): Don't set alignment if 196 STRUCTALIGN_DEFAULT. 197 1982016-11-21 Iain Buclaw <ibuclaw@gdcproject.org> 199 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. 208 2092016-11-20 Iain Buclaw <ibuclaw@gdcproject.org> 210 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. 215 2162016-11-19 Iain Buclaw <ibuclaw@gdcproject.org> 217 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. 236 2372016-11-19 Iain Buclaw <ibuclaw@gdcproject.org> 238 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. 243 2442016-11-06 Iain Buclaw <ibuclaw@gdcproject.org> 245 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. 254 2552016-11-05 Iain Buclaw <ibuclaw@gdcproject.org> 256 257 * d-decls.cc (get_template_storage_info): Remove function. 258 (setup_symbol_storage): Use Dsymbol::isInstantiated instead. 259 2602016-11-05 Iain Buclaw <ibuclaw@gdcproject.org> 261 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. 270 2712016-11-01 Iain Buclaw <ibuclaw@gdcproject.org> 272 273 * d-tree.h (lang_decl): Remove readonly field. 274 (DECL_LANG_READONLY): Remove macro. All callers updated. 275 2762016-10-29 Iain Buclaw <ibuclaw@gdcproject.org> 277 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. 304 3052016-10-29 Iain Buclaw <ibuclaw@gdcproject.org> 306 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. 311 3122016-10-27 Iain Buclaw <ibuclaw@gdcproject.org> 313 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. 317 3182016-10-26 Iain Buclaw <ibuclaw@gdcproject.org> 319 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. 324 3252016-10-15 Iain Buclaw <ibuclaw@gdcproject.org> 326 327 * d-codegen.h (d_types_same): Return early if types are identical. 328 3292016-10-09 Iain Buclaw <ibuclaw@gdcproject.org> 330 331 * d-decls.cc (FuncDeclaration::toThunkSymbol): Rename to make_thunk. 332 All callers updated. 333 (finish_thunk): Update signature. 334 3352016-10-09 Iain Buclaw <ibuclaw@gdcproject.org> 336 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. 342 3432016-10-09 Iain Buclaw <ibuclaw@gdcproject.org> 344 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. 352 3532016-10-08 Iain Buclaw <ibuclaw@gdcproject.org> 354 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. 361 3622016-10-08 Iain Buclaw <ibuclaw@gdcproject.org> 363 364 * d-decls.cc (setup_symbol_storage): Remove unused parameters. 365 3662016-10-07 Iain Buclaw <ibuclaw@gdcproject.org> 367 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. 372 3732016-10-07 Iain Buclaw <ibuclaw@gdcproject.org> 374 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. 379 3802016-10-05 Iain Buclaw <ibuclaw@gdcproject.org> 381 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. 388 3892016-10-03 Iain Buclaw <ibuclaw@gdcproject.org> 390 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. 403 4042016-10-03 Iain Buclaw <ibuclaw@gdcproject.org> 405 406 * d-decls.cc (ClassDeclaration::toVtblSymbol): Rename to 407 get_vtable_decl. All callers updated. 408 4092016-10-03 Iain Buclaw <ibuclaw@gdcproject.org> 410 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. 414 4152016-10-03 Iain Buclaw <ibuclaw@gdcproject.org> 416 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. 421 4222016-10-03 Iain Buclaw <ibuclaw@gdcproject.org> 423 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. 428 4292016-10-02 Iain Buclaw <ibuclaw@gdcproject.org> 430 431 * d-tree.h (DECL_LANG_TREE): Remove macro. All callers updated. 432 4332016-10-02 Iain Buclaw <ibuclaw@gdcproject.org> 434 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. 446 4472016-10-01 Iain Buclaw <ibuclaw@gdcproject.org> 448 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. 453 4542016-09-26 Johannes Pfau <johannespfau@gmail.com> 455 456 * d-objfile.cc (d_finish_function): Handle template mixins (issue 231). 457 4582016-09-25 Iain Buclaw <ibuclaw@gdcproject.org> 459 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. 467 4682016-09-19 Iain Buclaw <ibuclaw@gdcproject.org> 469 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. 480 4812016-09-19 Iain Buclaw <ibuclaw@gdcproject.org> 482 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. 498 4992016-09-19 Iain Buclaw <ibuclaw@gdcproject.org> 500 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. 511 5122016-09-18 Iain Buclaw <ibuclaw@gdcproject.org> 513 514 * imports.cc (ImportVisitor::visit(ScopeDsymbol)): New visit method. 515 5162016-09-17 Iain Buclaw <ibuclaw@gdcproject.org> 517 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. 521 5222016-09-16 Iain Buclaw <ibuclaw@gdcproject.org> 523 524 * d-codegen.cc (lower_struct_comparison): Don't compare vectors in the 525 same way as integers. 526 5272016-09-11 Iain Buclaw <ibuclaw@gdcproject.org> 528 529 * d-todt.cc (Type::toDt): Remove function, inline into callers. 530 (TypeVector::toDt): Likewise. 531 (TypeSArray::toDt): Likewise. 532 (TypeStruct::toDt): Likewise. 533 5342016-09-11 Iain Buclaw <ibuclaw@gdcproject.org> 535 536 * d-decls.cc (FuncDeclaration::toSymbol): Save current module decl 537 before calling function semantic. 538 * d-objfile.cc (FuncDeclaration::toObjFile): Likewise. 539 5402016-09-11 Iain Buclaw <ibuclaw@gdcproject.org> 541 542 * types.cc: Document and reformat file. 543 5442016-09-10 Johannes Pfau <johannespfau@gmail.com> 545 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. 570 5712016-07-11 Iain Buclaw <ibuclaw@gdcproject.org> 572 573 * d-codegen.cc (get_frameinfo): Use hasNestedFrameRefs to determine 574 whether a frame should be created. 575 5762016-07-02 Iain Buclaw <ibuclaw@gdcproject.org> 577 578 * d-objfile.cc (FuncDeclaration::toObjFile): Always convert the 579 DECL_RESULT of NRVO-capable functions into reference decls. 580 5812016-06-21 Iain Buclaw <ibuclaw@gdcproject.org> 582 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. 587 5882016-06-20 Johannes Pfau <johannespfau@gmail.com> 589 590 * d-lang.cc (d_handle_option): Add new -ftransition=dip25 and 591 -fmax-error-messages switches. 592 * lang.opt: Likewise. 593 5942016-06-19 Iain Buclaw <ibuclaw@gdcproject.org> 595 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. 616 6172016-06-19 Iain Buclaw <ibuclaw@gdcproject.org> 618 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. 629 6302016-06-16 Iain Buclaw <ibuclaw@gdcproject.org> 631 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. 642 6432016-06-15 Iain Buclaw <ibuclaw@gdcproject.org> 644 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. 661 6622016-06-12 Iain Buclaw <ibuclaw@gdcproject.org> 663 664 * d-convert.cc (d_build_truthvalue_op): Fold truthvalue operation. 665 (d_truthvalue_conversion): Use zero constant of expression type. 666 6672016-06-09 Iain Buclaw <ibuclaw@gdcproject.org> 668 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. 678 6792016-06-08 Iain Buclaw <ibuclaw@gdcproject.org> 680 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. 690 6912016-06-08 Iain Buclaw <ibuclaw@gdcproject.org> 692 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. 730 7312016-06-07 Iain Buclaw <ibuclaw@gdcproject.org> 732 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. 739 7402016-06-05 Iain Buclaw <ibuclaw@gdcproject.org> 741 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. 749 7502016-06-04 Iain Buclaw <ibuclaw@gdcproject.org> 751 752 * d-codegen.cc (build_deref): Handle ERROR_MARK nodes early. 753 (build_array_index): Likewise. 754 7552016-05-29 Johannes Pfau <johannespfau@gmail.com> 756 757 * toir.cc (IRVisitor::visit(SwitchStatement)): Set correct type for the 758 string table for switch(string) statements. 759 7602016-05-24 Iain Buclaw <ibuclaw@gdcproject.org> 761 762 * d-codegen.cc (convert_expr): Return empty constructor for null to 763 associative array conversions. 764 * expr.cc (ExprVisitor::visit(NullExp)): Likewise. 765 7662016-05-21 Iain Buclaw <ibuclaw@gdcproject.org> 767 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. 773 7742016-05-16 Iain Buclaw <ibuclaw@gdcproject.org> 775 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. 781 7822016-05-16 Johannes Pfau <johannespfau@gmail.com> 783 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. 789 7902016-05-15 Iain Buclaw <ibuclaw@gdcproject.org> 791 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. 799 8002016-05-15 Iain Buclaw <ibuclaw@gdcproject.org> 801 802 * expr.cc (ExprVisitor::visit(IdentityExp*)): Remove side-effects 803 before comparing two dynamic arrays. 804 8052016-05-14 Iain Buclaw <ibuclaw@gdcproject.org> 806 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. 818 8192016-05-13 Iain Buclaw <ibuclaw@gdcproject.org> 820 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. 827 8282016-05-12 Iain Buclaw <ibuclaw@gdcproject.org> 829 830 * d-codegen.cc (build_array_from_val): New function. 831 * expr.cc (ExprVisitor::visit(StructLiteralExp)): Use it. 832 8332016-05-11 Iain Buclaw <ibuclaw@gdcproject.org> 834 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. 854 8552016-05-09 Iain Buclaw <ibuclaw@gdcproject.org> 856 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. 863 8642016-05-07 Iain Buclaw <ibuclaw@gdcproject.org> 865 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. 890 8912016-05-06 Iain Buclaw <ibuclaw@gdcproject.org> 892 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. 903 9042016-05-05 Iain Buclaw <ibuclaw@gdcproject.org> 905 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. 913 9142016-05-03 Iain Buclaw <ibuclaw@gdcproject.org> 915 916 * d-target.cc (Target::init): Target::realpad value should be size 917 minus precision. 918 9192016-04-29 Iain Buclaw <ibuclaw@gdcproject.org> 920 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. 926 9272016-04-29 Iain Buclaw <ibuclaw@gdcproject.org> 928 929 * d-todt.cc (TypeSArray::toDtElem): Remove special handling for 930 arrays of vectors. 931 9322016-04-23 Iain Buclaw <ibuclaw@gdcproject.org> 933 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. 943 9442016-03-29 Johannes Pfau <johannespfau@gmail.com> 945 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. 958 9592016-03-29 Iain Buclaw <ibuclaw@gdcproject.org> 960 961 * d-codegen.cc (fill_alignment_field): Call layout_decl on field. 962 (finish_aggregate_type): Add assertion that TYPE_MODE is equal. 963 9642016-03-29 Iain Buclaw <ibuclaw@gdcproject.org> 965 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. 978 9792016-03-28 Iain Buclaw <ibuclaw@gdcproject.org> 980 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. 988 9892016-03-28 Iain Buclaw <ibuclaw@gdcproject.org> 990 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. 1003 10042016-03-28 Iain Buclaw <ibuclaw@gdcproject.org> 1005 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. 1017 10182016-03-27 Iain Buclaw <ibuclaw@gdcproject.org> 1019 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. 1029 10302016-03-20 Iain Buclaw <ibuclaw@gdcproject.org> 1031 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. 1039 10402016-03-19 Iain Buclaw <ibuclaw@gdcproject.org> 1041 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. 1051 10522016-03-07 Iain Buclaw <ibuclaw@gdcproject.org> 1053 1054 * imports.cc (ImportVisitor::visit(Declaration)): Don't assume toSymbol 1055 method will cache it's result. 1056 10572016-03-06 Iain Buclaw <ibuclaw@gdcproject.org> 1058 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. 1065 10662016-03-05 Iain Buclaw <ibuclaw@gdcproject.org> 1067 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. 1101 11022016-03-04 Iain Buclaw <ibuclaw@gdcproject.org> 1103 1104 * imports.cc: New file. 1105 * d-decls.cc (Dsymbol::toImport): Remove function, update all callers 1106 to use build_import_decl. 1107 11082016-03-03 Iain Buclaw <ibuclaw@gdcproject.org> 1109 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. 1121 1122 * d-objfile.cc: Remove redundant bool parameter from all lowering 1123 routines for symbols, update all callers. 1124 11252016-02-22 Eugene Wissner <belka@caraus.de> 1126 1127 * d-lang.cc (d_init): Remove short_double parameter from 1128 build_common_tree_nodes. 1129 11302016-02-20 Iain Buclaw <ibuclaw@gdcproject.org> 1131 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. 1145 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. 1151 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. 1156 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. 1161 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. 1171 11722016-02-18 Iain Buclaw <ibuclaw@gdcproject.org> 1173 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. 1181 11822016-02-14 Iain Buclaw <ibuclaw@gdcproject.org> 1183 1184 * d-elem.cc: Remove redundant IRState parameter from all lowering 1185 routines for expressions, update all callers. 1186 11872016-02-07 Iain Buclaw <ibuclaw@gdcproject.org> 1188 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. 1204 12052016-02-03 Iain Buclaw <ibuclaw@gdcproject.org> 1206 1207 * d-elem.cc (AssignExp::toElem): Pass parameters for arraycopy and 1208 arrayassign in the correct order. 1209 12102016-01-31 Iain Buclaw <ibuclaw@gdcproject.org> 1211 1212 * longdouble.h (longdouble): Use one contiguous array for the 1213 real_value data payload. 1214 12152016-01-23 Iain Buclaw <ibuclaw@gdcproject.org> 1216 1217 * toir.cc (IRVisitor::visit (ExtAsmStatement): Do validation of input 1218 and output constraints, marking operands as addressable if requested. 1219 12202016-01-10 Iain Buclaw <ibuclaw@gdcproject.org> 1221 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. 1231 12322016-01-09 Iain Buclaw <ibuclaw@gdcproject.org> 1233 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. 1249 12502016-01-09 Iain Buclaw <ibuclaw@gdcproject.org> 1251 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. 1256 1257 1258Copyright (C) 2016 Free Software Foundation, Inc. 1259 1260Copying and distribution of this file, with or without modification, 1261are permitted in any medium without royalty provided the copyright 1262notice and this notice are preserved. 1263