12015-10-07 Iain Buclaw <ibuclaw@gdcproject.org> 2 3 * d-decls.cc (StructLiteralExp::toSymbol): Use letter prefix for 4 anonymous name. Don't set TREE_READONLY. 5 (ClassReferenceExp::toSymbol): Likewise. 6 72015-10-06 Iain Buclaw <ibuclaw@gdcproject.org> 8 9 * d-codegen.cc (build_struct_literal): New function. 10 (layout_aggregate_members): Handle variables that are really tuples. 11 * d-elem.cc (StructLiteralExp::toElem): Handle slicing void arrays. 12 Use build_struct_literal to handle anonymous records. 13 * d-lang.h (d_unknown_type_node): Rename to unknown_type_node, update 14 in all files. 15 162015-10-03 Iain Buclaw <ibuclaw@gdcproject.org> 17 18 * d-codegen.cc (build_two_field_type): Use DECL_FIELD_CONTEXT to access 19 field context decl. 20 (build_frame_type): Likewise. 21 (lookup_anon_field): New function. 22 (component_ref): Use it. 23 (fixup_anonymous_offset): New function. 24 (layout_aggregate_members): New function. 25 (layout_aggregate_type): Move generation of fields into 26 layout_aggregate_members. 27 (insert_aggregate_field): Update signature, update all callers. 28 (finish_aggregate_type): Likewise. 29 * d-todt.cc (dt_container2): Use DECL_FIELD_CONTEXT to access field 30 context decl. 31 * types.cc (TypeVisitor::visit (TypeStruct)): Likewise. 32 (TypeVisitor::visit (TypeClass)): Likewise. 33 * d-tree.h (ANON_AGGR_TYPE_P): New type macro. 34 352015-08-25 Iain Buclaw <ibuclaw@gdcproject.org> 36 37 * d-builtins.cc (maybe_set_builtin_1): Remove va_list handling. 38 (d_init_builtins): Don't represent static array va_list as reference. 39 * d-codegen.cc (convert_for_argument): Handle va_list as a static array. 40 (declaration_type): Likewise. 41 (type_passed_as): Likewise. 42 (decl_reference_p): Renamed to declaration_type_kind, update to return 43 how type is represented internally, updated all callers. 44 (arg_reference_p): Renamed to argument_type_kind, update to return how 45 type is represented internally, updated all callers. 46 * d-codegen.h (type_kind): Declare. 47 482015-08-22 Iain Buclaw <ibuclaw@gdcproject.org> 49 50 * toir.cc (IRVisitor::visit (TryCatchStatement)): Always emit call to 51 LIBCALL_BEGIN_CATCH at the start of the catch. 52 * d-elem.cc (AssertExp::toElem): Stabilize reference to class object 53 before passing it to _d_invariant. 54 552015-08-20 Iain Buclaw <ibuclaw@gdcproject.org> 56 57 * toir.cc (IRVisitor::visit): Set input location in all visitors that 58 either throw an ICE or sorry message. 59 602015-08-19 Iain Buclaw <ibuclaw@gdcproject.org> 61 62 * Make-lang.in: Replace uses of $(target_alias) with 63 $(target_noncanonical). 64 652015-08-17 Iain Buclaw <ibuclaw@gdcproject.org> 66 67 * types.cc (TypeVisitor::visit (TypeEnum)): Set ENUM_IS_SCOPED on all 68 enumeral types. 69 * d-lang.cc (d_init_options_struct): Remove setting 70 flag_evaluation_order. 71 722015-08-10 Iain Buclaw <ibuclaw@gdcproject.org> 73 74 * d-elem.cc (HaltExp::toElem): Use __builtin_trap to halt execution, 75 rather than the library abort() call. 76 772015-08-07 Iain Buclaw <ibuclaw@gdcproject.org> 78 79 * d-codegen.cc (build_closure): Update signature, update all callers. 80 (build_vthis): Likewise. 81 (get_frame_for_symbol): Likewise. 82 (build_local_var): Likewise. 83 (get_decl_tree): Likewise. 84 (start_function): Likewise. 85 * d-irstate.h (IRState): Move func, mod, sthis, deferred, 86 statementList, and varsInScope fields to... 87 * d-tree.h (language_function): Here, updated all uses. 88 * d-irstate.h: Remove file. 89 (IRState): Remove all uses everywhere. 90 912015-08-07 Iain Buclaw <ibuclaw@gdcproject.org> 92 93 * Make-lang.in (D_GLUE_OBJS): Remove d-irstate.o. 94 * d-tree.h (d_label_use_entry): New structure. 95 (d_label_entry): New structure. 96 (binding_level): Add level_kind field. 97 (language_function): Add hash table field for labels. 98 (D_LABEL_VARIABLE_CASE): New macro. 99 * d-codegen.cc (pop_binding_label): New function. 100 (pop_label): New function. 101 (push_binding_level): Update signature. 102 (pop_binding_level): Update signature. Handle declared or used labels. 103 (build_array_set): Update for push/pop binding changes. 104 (check_goto): New function. 105 (check_previous_goto): New function. 106 (d_lookup_label): Remove function. 107 (lookup_label): New function. 108 (lookup_bc_label): New function. 109 (define_label): New function. 110 * d-objfile.cc (FuncDeclaration::toObjFile): Update for push/pop binding 111 changes. 112 * toir.cc (IRVisitor): Add break and continue label fields. 113 (IRVisitor::IRVisitor): Initialize here. 114 (IRVisitor::start_scope): Update signature. 115 (IRVisitor::end_scope): Return the finished scope, updated all callers. 116 (IRVisitor::push_break_label): New function. 117 (IRVisitor::pop_break_label): New function. 118 (IRVisitor::push_continue_label): New function. 119 (IRVisitor::pop_continue_label): New function. 120 (IRVisitor::start_condition): Remove function. 121 (IRVisitor::start_else): Remove function. 122 (IRVisitor::end_condition): Remove function. 123 (IRVisitor::start_catches): Remove function. 124 (IRVisitor::start_catch): Remove function. 125 (IRVisitor::end_catch): Remove function. 126 (IRVisitor::end_catches): Remove function. 127 (IRVisitor::start_finally): Remove function. 128 (IRVisitor::end_finally): Remove function. 129 (IRVisitor::start_case): Remove function. 130 (IRVisitor::end_case): Remove function. 131 * d-irstate.cc: Remove. 132 1332015-08-06 Iain Buclaw <ibuclaw@gdcproject.org> 134 135 * config-lang.in (gtfiles): Replace d-lang.h for d-tree.h 136 * d-lang.h: Move all GTY structures to d-tree.h, updated all source 137 header dependencies. 138 * d-tree.h: New file. 139 1402015-08-04 Iain Buclaw <ibuclaw@gdcproject.org> 141 142 * toir.cc (IRVisitor::start_condition): Don't cache condition. 143 (IRVisitor::start_else): Return the then body, updated all callers. 144 (IRVisitor::end_condition): Update signature. 145 (IRVisitor::start_catches): Return the try body, updated all callers. 146 (IRVisitor::start_catch): Don't cache catch type. 147 (IRVisitor::end_catch): Update signature. 148 (IRVisitor::end_catches): Update signature. 149 (IRVisitor::start_finally): Return the try body, updated all callers. 150 (IRVisitor::end_finally): Update signature. 151 (IRVisitor::start_case): Don't cache the condition. 152 (IRVisitor::end_case): Update signature. 153 * d-codegen.cc (convert_for_assignment): Use size_type_node for index. 154 * d-irstate.cc (IRState::beginFlow): Remove call to push_stmt_list. 155 1562015-08-04 Iain Buclaw <ibuclaw@gdcproject.org> 157 158 * d-codegen.cc (push_stmt_list): New function. 159 (pop_stmt_list): New function. 160 (add_stmt): New function. 161 (start_function): New function. 162 (end_function): New function. 163 (expand_decl): Update to use new interface. 164 (build_closure): Likewise. 165 (push_binding_level): Moved from d-lang.cc. 166 (pop_binding_level): Likewise. 167 * d-lang.cc (d_init): Inline call to init_global_binding_level. 168 (alloc_binding_level): Remove function. 169 (push_binding_level): Remove function. 170 (pop_binding_level): Remove function. 171 (init_global_binding_level): Remove function. 172 (set_decl_binding_chain): Remove function. 173 * d-elem.cc (DeclarationExp::toElem): Likewise. 174 * d-objfile.cc (VarDeclaration::toObjFile): Likewise. 175 (FuncDeclaration::toObjFile): Likewise. 176 * toir.cc (IRVisitor::start_scope): Moved from d-irstate.cc, updated 177 all callers in IRVisitor. 178 (IRVisitor::end_scope): Likewise. 179 (IRVisitor::is_return_label): Likewise. 180 (IRVisitor::do_label): Likewise. 181 (IRVisitor::do_jump): Likewise. 182 (IRVisitor::start_condition): Likewise. 183 (IRVisitor::start_else): Likewise. 184 (IRVisitor::end_condition): Likewise. 185 (IRVisitor::start_catches): Likewise. 186 (IRVisitor::start_catch): Likewise. 187 (IRVisitor::end_catch): Likewise. 188 (IRVisitor::end_catches): Likewise. 189 (IRVisitor::start_finally): Likewise. 190 (IRVisitor::end_finally): Likewise. 191 (IRVisitor::end_loop): Likewise. 192 (IRVisitor::start_case): Likewise. 193 (IRVisitor::end_case): Likewise. 194 (build_ir): Update signature. 195 1962015-08-01 Iain Buclaw <ibuclaw@gdcproject.org> 197 198 * Make-lang.in (DMD_COMPILE): Declare as COMPILE with WARN_CXXFLAGS 199 replaced with DMD_WARN_CXXFLAGS. 200 (DMDGEN_COMPILE): Declare as DMD_COMPILE but with COMPILER replaced 201 with COMPILER_FOR_BUILD. 202 (d/idgen): Use LINKER_FOR_BUILD. 203 (d/impcvgen): Likewise. 204 (d/%.o): Use DMD_COMPILE and POSTCOMPILE. 205 (d/%.dmdgen.o): Use DMDGEN_COMPILE and POSTCOMPILE. 206 2072015-07-27 Iain Buclaw <ibuclaw@gdcproject.org> 208 209 * d-codegen.cc (current_irstate): Remove. 210 (d_build_call): Check cfun before dereferencing. 211 * d-codegen.h (current_irstate): Redefine as macro. 212 * d-irstate.cc (IRState::IRState): Remove. 213 (IRState::startFunction): Initialize language-specific cfun field. 214 (IRState::endFunction): Free language-specific cfun field. 215 * d-lang.cc (d_parse_file): Don't initialize current_irstate. 216 * d-lang.h (language_function): Add irs field. 217 * d-objfile.cc (Dsymbol::toObjFile): Check cfun. 218 (FuncDeclaration::toObjFile): Adjust start and end calls. 219 2202015-07-26 Iain Buclaw <ibuclaw@gdcproject.org> 221 222 * d-irstate.cc (IRState::doArraySet): Remove function. 223 * d-codegen.cc (build_array_set): New function. 224 * d-elem.cc (AssignExp::toElem): Use build_array_set. 225 (StructLiteralExp::toElem): Likewise. 226 227 * d-codegen.cc (build_array_set): Don't set this_block, update call to 228 pop_binding_level. 229 * d-irstate.cc (IRState::endFunction): Update assert. 230 (IRState::startScope): Move IRState::startBindings here, clean-up. 231 (IRState::endScope): Move IRState::endBindings here, clean-up. 232 (IRState::startBindings): Remove function. 233 (IRState::endBindings): Likewise. 234 (IRState::currentScope): Likewise. 235 (IRState::scopes_): Remove. 236 * d-lang.cc (pop_binding_level): Update signature, clean-up. 237 (d_pushdecl): Don't set names_end. 238 (binding_level::names_end): Remove. 239 (binding_level::this_block): Remove. 240 (FuncDeclaration::toObjFile): Clean-up. 241 2422015-07-24 Sebastien Alaiwan <sebastien.alaiwan@gmail.com> 243 244 * d-lang.cc (deps_write): Use StringTable instead of hash_set of string 245 pointers. 246 2472015-07-23 Iain Buclaw <ibuclaw@gdcproject.org> 248 249 * d-attribs.h: Adjust includes. 250 * d-builtins.cc: Likewise. 251 * d-codegen.cc: Likewise. 252 * d-convert.cc: Likewise. 253 * d-decls.cc: Likewise. 254 * d-elem.cc: Likewise. 255 * d-glue.cc: Likewise. 256 * d-incpath.cc: Likewise. 257 * d-irstate.cc: Likewise. 258 * d-lang.cc: Likewise. 259 * d-longdouble.cc: Likewise. 260 * d-objfile.cc: Likewise. 261 * d-port.cc: Likewise. 262 * d-target.cc: Likewise. 263 * d-todt.cc: Likewise. 264 * toir.cc: Likewise. 265 * types.cc: Likewise. 266 2672015-07-22 Iain Buclaw <ibuclaw@gdcproject.org> 268 269 * d-codegen.cc (convert_expr): Warn about casts between imaginary 270 and non-imaginary types. 271 * d-convert (d_convert_basic): Rename to convert, handle conversions 272 between complex and imaginary types. 273 (convert): Remove. 274 (d_build_truthvalue_op): Update to call convert. 275 (d_truthvalue_conversion): Likewise. 276 277 * d-builtins.cc (d_init_builtins): Build imaginary types as distinct 278 floating point type nodes. 279 * d-codegen.cc (build_float_modulus): Update to handle imaginary types. 280 (d_array_type): Use the front-end equivalent of sizetype to represent 281 the index type of arrays. 282 (build_array_index): Likewise. 283 (build_offset_op): Likewise. 284 (expand_intrinsic): Only get the inner callee if it's an address. 285 286 * d-codegen.h (component_ref, modify_expr, vmodify_expr, build_vinit) 287 (build_nop, build_vconvert, build_boolop, compound_expr) 288 (vcompound_expr, real_part, imaginary_part): Move to d-codegen.cc, 289 use fold build functions for codegen. 290 * d-codeden.cc (build_address): Use build_fold_addr_expr_with_type, 291 remove special handling of taking an address of an indirect ref. 292 (return_expr): New function. 293 (complex_expr): New function. 294 (indirect_ref): Use fold build functions for codegen. 295 (build_deref): Likewise. 296 (build_array_index): Likewise. 297 (build_offset_op): Likewise. 298 (void_okay_p): Likewise. 299 (build_binary_op): Likewise. 300 (build_float_modulus): Likewise. 301 * d-objfile.cc (FuncDeclaration::toObjFile): Likewise. 302 * d-elem.cc (MinExp::toElem): Likewise. 303 (AddExp::toElem): Likewise. 304 (NotExp::toElem): Likewise. 305 (ComExp::toElem): Likwise. 306 (NegExp::toElem): Likewise. 307 * d-irstate.cc (IRState::doLabel): Likewise. 308 (IRState::doReturn): Likewise. 309 (IRState::doJump): Likewise. 310 311 * d-attribs.c: Adjust includes for flags.h changes. 312 * d-builtins.cc: Likewise. 313 * d-codegen.cc: Likewise. 314 * d-convert.cc: Likewise. 315 * d-elem.cc: Likewise. 316 * d-decls.cc: Likewise. 317 * d-glue.cc: Likewise. 318 * d-incpath.cc: Likewise. 319 * d-irstate.cc: Likewise. 320 * d-lang.cc: Likewise. 321 * d-longdouble.cc: Likewise. 322 * d-objfile.cc: Likewise. 323 * d-port.cc: Likewise. 324 * d-target.cc: Likewise. 325 * d-todt.cc: Likewise. 326 * toir.cc: Likewise. 327 * types.cc: Likewise. 328 3292015-07-20 Sebastien Alaiwan <sebastien.alaiwan@gmail.com> 330 331 * d-lang.cc (is_system_module): Extract function. 332 (write_one_dep): Extract function. 333 (deps_write): Eliminate duplicated dependencies, include 334 indirect and private dependencies. 335 3362015-07-19 Sebastien Alaiwan <sebastien.alaiwan@gmail.com> 337 338 * d-lang.cc (d_parse_file): Set ref flag on the module and make deps 339 file handle. 340 3412015-07-11 Iain Buclaw <ibuclaw@gdcproject.org> 342 343 * d-codegen.cc (convert_for_assignment): Remove handling of zero 344 initialising a structure using memset. 345 (d_build_call): Removing handling of setting of return slot 346 optimisation on in call expression. 347 * d-elem.cc (AssignExp::toElem): Emit a memset to zero initialise 348 structures here. Set return slot optimisation on construction of 349 static arrays and structs only. 350 3512015-07-07 Iain Buclaw <ibuclaw@gdcproject.org> 352 353 * d-codegen.cc (expand_intrinsic_arith): Use build_deref to handle 354 ref parameters being used for the 'overflow' parameter. 355 3562015-07-03 Iain Buclaw <ibuclaw@gdcproject.org> 357 358 * d-elem.cc (StringExp::toElem): Zero-terminate all string literals 359 types, except for static arrays. 360 * d-objfile.cc (build_type_decl): Add TYPE_DECLs to global declarations, 361 don't call rest_of_decl_declaration. 362 (d_finish_compilation): Call rest_of_decl_declaration on TYPE_DECLs. 363 (Dsymbol::toObjFile): Don't try to handle tuples when emitting import 364 declarations to debug. 365 * d-builtins.cc (builtin_sym): Use StructDeclaration for decl field. 366 (build_dtype): Don't handle anonymous structs. Create a stub parent 367 module for the declaration symbol. 368 (d_build_builtins_module): Always override the parent module of 369 converted struct declarations. 370 (maybe_set_builtin_1): Convert all static array parameters to ref 371 parameters, not just va_list. 372 3732015-07-01 Iain Buclaw <ibuclaw@gdcproject.org> 374 375 * d-attribs.c (d_handle_section_attribute): Use VAR_P throughout. 376 (d_handle_weak_attribute): Use VAR_OR_FUNCTION_DECL_P. 377 * d-codegen.cc (convert_for_assignment): Use VAR_P. 378 * d-lang.cc (pop_binding_level): Likewise. 379 (d_types_compatible_p): Likewise. 380 * d-objfile.cc (setup_symbol_storage): Likewise. 381 (mark_needed): Likewise. 382 (d_finish_compilation): Likewise. 383 3842015-06-30 Iain Buclaw <ibuclaw@gdcproject.org> 385 386 * intrinsics.def: Added ADDS, ADDSL, ADDU, ADDUL, SUBS, SUBSL, NEGS, 387 NEGSL, MULS, MULSL, MULU, and MULUL intrinsic definitions. 388 * d-codegen.cc (expand_intrinsic_arith): New function. 389 (expand_intrinsic): Add cases for core.checkedint functions adds, addu, 390 subs, subu, negs, muls, and mulu intrinsics. 391 3922015-06-27 Iain Buclaw <ibuclaw@gdcproject.org> 393 394 * Make-lang.in (D_DMD_H): Remove. 395 (D_TREE_H): Likewise. 396 (CFLAGS-d/d-spec.o): Declare extra CFLAGS for building driver. 397 (d-warn): Declare default warning flags for compiler. 398 (D_DMD_OBJS): Remove 'dmd' from the object file suffix. 399 (D_GLUE_OBJS): Remove 'cglue' and 'glue' from object file suffix. 400 (D_GENERATED_OBJS): Remove 'gen' from the object file suffix. 401 (D_BORROWED_C_OBJS): Remove. 402 (CFLAGS-d/id.o): Declare extra CFLAGS for building generated sources. 403 (CFLAGS-d/impcnvtab.o): Likewise. 404 * types.cc (TypeVisitor::visit (TypeClass)): Build a pointer type for 405 classes, not a reference type. 406 * types.cc (TypeVisitor::visit (TypeDelegate)): Don't build a 407 METHOD_TYPE for delegates, as that requires knowing the underlying 408 record type for the 'this' object parameter. 409 (TypeVisitor::visit (TypeEnum): Don't call rest_of_type_compilation. 410 (TypeVisitor::visit (TypeClass): Likewise. 411 (TypeVisitor::visit (TypeStruct): Likewise. 412 * d-decls.cc (TypeInfoDeclaration::toSymbol): Assert class is a pointer 413 type, not a reference type. 414 (FuncDeclaration::toSymbol): Don't convert nested functions into a 415 METHOD_TYPE to be strictly compatible with delegates. 416 * d-codegen.cc (convert_for_argument): Use correct accessors for array 417 .ptr and .length properties. 418 (expand_intrinsic_vaarg): Don't remove the va_list pointer reference, 419 as the backend now assumes this is what the front-end sets up. 420 (d_build_call): Remove assert as delegates and nested functions are no 421 longer represented as METHOD_TYPE. 422 (build_vthis_type): New function. 423 (d_decl_context): Don't set static/__gshared declaration context as 424 anything other than the enclosing module of the declaration. 425 * toir.cc (IRVisitor::visit (ExtAsmStatement)): Support named labels by 426 calling resolve_asm_operand_names. 427 * d-builtins.cc (d_backend_init): Remove. 428 (d_backend_term): Remove. 429 * d-lang.cc (d_write_global_declarations): Remove langhook. 430 (d_init): Move d_backend_init implementation here. 431 (d_parse_file): Move d_write_global_declarations implementation here. 432 (d_finish_compilation): Remove calls to finalize_compilation_unit, 433 check_global_declarations, and emit_debug_global_declarations. 434 (d-system.h): Remove file. Move all includes into local sources. 435 4362015-06-22 Iain Buclaw <ibuclaw@gdcproject.org> 437 438 * d-codegen.cc (d_build_call): Only apply CALL_EXPR_RETURN_SLOT_OPT to 439 calls returning an aggregate. 440 (expand_intrinsic): Use CALL_EXPR_FN and CALL_EXPR_ARG directly. 441 (layout_aggregate_type): Update signature. 442 (insert_aggregate_field): Likewise. 443 (finish_aggregate_type): Likewise. 444 * d-codegen.h (AggLayout): Remove helper class. 445 (AddrOfExpr): Remove helper class. 446 (CallExpr): Remove helper class. 447 * d-elem.cc (InExp::toElem): Use build_address directly. 448 (CatAssignExp::toElem): Likewise. 449 (IndexExp::toElem): Likewise. 450 (RemoveExp::toElem): Likewise. 451 * types.cc (TypeVisitor::visit (TypeFunction)): Only apply 452 TREE_ADDRESSABLE to function types returning an aggregate. 453 (TypeVisitor::visit (TypeStruct)): Update for layout_aggregate_type and 454 finish_aggregate_type changes. 455 (TypeVisitor::visit (TypeClass)): Likewise. 456 4572015-06-21 Iain Buclaw <ibuclaw@gdcproject.org> 458 459 * d-objfile.cc (setup_symbol_storage): Mark declarations as private or 460 protected for the benefit of debug code. 461 * d-elem.cc (ArrayLiteralExp::toElem): Only set a value at the given 462 index in the array constructor if it is non-zero. 463 (AssignExp::toElem): Use memset it assigning/initialising an array with 464 all zeroes. 465 (IndexExp::toElem): Simplify codegen to use a placeholder variable for 466 the dollar length. 467 (SliceExp::toElem): Likewise. 468 * d-codegen.cc (ArrayScope): Remove helper class. 469 * Make-lang.in (cc1d$(exeext)): Use link mutex. 470 4712015-05-03 Iain Buclaw <ibuclaw@gdcproject.org> 472 473 * Make-lang.in (D_GLUE_OBJS): Rename d-ctype.cc to types.cc. 474 (d-spec.o): Rename d-spec.cc to d-spec.c 475 * types.cc (build_ctype): New function. 476 (Type::toCtype): Convert toCtype methods to use Visitor interface. 477 4782015-04-29 Iain Buclaw <ibuclaw@gdcproject.org> 479 480 * Make-lang.in (D_GLUE_OBJS): Add d-attribs.o. Remove d-gt.o. 481 * d-attribs.c: New file. 482 * d-builtins.cc: Move attribute handler functions to d-attribs.c 483 * d-lang.cc: Likewise. Added include for gtype-d.h from d-gt.cc. 484 * d-gt.cc: Remove file. 485 4862015-04-27 Iain Buclaw <ibuclaw@gdcproject.org> 487 488 * d-builtins.cc, d-convert.cc, d-ctype.cc, d-decls.cc, d-elem.cc, 489 d-glue.cc, d-incpath.cc, d-irstate.cc, d-longdouble.cc, d-port.cc, 490 d-target.cc, d-typinf.cc, toir.cc: Re-order included headers. 491 * d-codegen.h, d-dmd-gcc.h, d-irstate.h, d-lang.h, d-objfile.cc, 492 d-system.h: Remove all includes from headers. 493 * d-codegen.cc: Re-order included headers. 494 (build_attributes): Use ctfeInterpret instead of optimize. 495 * d-lang.cc: Re-order included headers. 496 (d_init_options): Don't use tristate enum for flag_emit_templates. 497 (d_handle_option): Likewise. 498 * d-objfile.cc: Re-order included headers. 499 (output_declaration_p): Update check for flag_emit_templates. 500 (setup_symbol_storage): Likewise. 501 * d-todt.cc: Re-order included headers. 502 (ExpInitializer::toDt): Use ctfeInterpret instead of optimize. 503 (TypeInfoTupleDeclaration::toDt): Likewise. 504 5052015-04-20 Iain Buclaw <ibuclaw@gdcproject.org> 506 507 * d-codegen.cc (build_exception_object): Remove. 508 * runtime.def (BEGIN_CATCH): Declare runtime function __gdc_begin_catch. 509 * toir.cc (IRVisitor::visit::TryCatchStatement): Use LIBCALL_BEGIN_CATCH 510 to get the correct exception object for handler. 511 5122015-04-18 Iain Buclaw <ibuclaw@gdcproject.org> 513 514 * d-codegen.cc (d_build_call): Set CALL_EXPR_RETURN_SLOT_OPT on calls to 515 functions that return an aggregate or array that returns in memory. 516 (build_memref): New function. 517 (get_object_method): Use build_memref instead of building a 518 POINTER_PLUS_EXPR for vtable dereferences. 519 * d-objfile.cc (FuncDeclaration::toObjFile): Support NRVO on 520 ARRAY_TYPE's that may not return in registers. 521 * d-ctype.cc (TypeFunction::toCtype): Don't mark TREE_ADDRESSABLE when 522 returning non-POD types by reference. 523 5242015-04-15 Iain Buclaw <ibuclaw@gdcproject.org> 525 526 * d-decls.cc (EnumDeclaration::toDebug): Remove. 527 (ClassDeclaration::toDebug): Remove. 528 (StructDeclaration::toDebug): Remove. 529 * d-ctype.cc (TypeEnum::toCtype): Call rest_of_type_compilation here. 530 (TypeClass::toCtype): Likewise. 531 (TypeStruct::toCtype): Likewise. 532 5332015-04-12 Iain Buclaw <ibuclaw@gdcproject.org> 534 535 * d-objfile.cc (get_decl_tree): Check and generate correct code for when 536 a non-local 'this' is accessed through a closure pointer. 537 (FuncDeclaration::toObjFile): Remove check for _arguments. 538 * d-codegen.cc (build_local_var): Likewise. 539 5402015-04-11 Johannes Pfau <johannespfau@gmail.com> 541 542 * d-objfile.cc (setup_symbol_storage): Mark functions without 543 body as DECL_EXTERNAL. 544 5452015-04-08 Iain Buclaw <ibuclaw@gdcproject.org> 546 547 * d-codegen.cc (get_decl_tree): Get correct non-local 'this' decl by 548 constructing component reference through parent link of nested classes. 549 * d-builtins.cc (DEF_FUNCTION_TYPE_VAR_8): Remove. 550 (DEF_FUNCTION_TYPE_VAR_12): Likewise. 551 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros. 552 5532015-04-07 Iain Buclaw <ibuclaw@gdcproject.org> 554 555 * d-objfile.cc (output_declaration_p): Remove check for semanticRun. 556 (FuncDeclaration::toObjFile): Name bool parameter force_p, allow it to 557 override the initial output_declaration_p check. Force run all 558 semantic passes for symbols that it routine is generating code for. 559 (d_finish_function): Don't mark TREE_STATIC on functions that are 560 really DECL_EXTERN. 561 (finish_thunk): Force thunks referencing external methods to be 562 expanded to gimple. 563 * d-decls.cc (FuncDeclaration::toThunkSymbol): Call toObjFile on all 564 thunk target functions. 565 5662015-04-05 Johannes Pfau <johannespfau@gmail.com> 567 568 * d-lang.cc (d_handle_section_attribute): New function. 569 * d-builtins.cc (handle_alias_attribute): Move to d-lang.cc to 570 support attribute(alias) in user code. 571 * d-lang.cc (d_handle_alias_attribute): Ditto. 572 * d-lang.cc (d_handle_weak_attribute): New function. 573 * d-decls.cc (FuncDeclaration::toSymbol): Do not set 574 DECL_DECLARED_INLINE_P prematurely. 575 5762015-03-21 Johannes Pfau <johannespfau@gmail.com> 577 578 * d-lang.cc (d_init): Add GNU_EMUTLS version. 579 * d-objfile.cc (build_emutls_function): New function. 580 * d-objfile.cc (VarDeclaration::toObjFile): Collect all TLS variables 581 in a module into tlsVars array. 582 * d-objfile.cc (genmoduleinfo): Add reference to __modtlsscan 583 function generated by build_emutls_function to moduleinfo. 584 5852015-02-02 Iain Buclaw <ibuclaw@gdcproject.org> 586 587 * config-lang.in: Remove lang_requires_boot_languages. 588 * d-incpath.cc (iprefix): Remove global variable. 589 (multilib_dir): Ditto. 590 (prefixed_path): Add iprefix parameter. 591 (add_import_paths): Add iprefix and imultilib parameter. 592 Use cpp_include_defaults to get list of import paths. 593 * d-lang.cc (iprefix_dir): New static variable to cache -iprefix switch. 594 (imultilib_dir): New static variable to cache -imultilib switch. 595 (d_init): Pass iprefix_dir and imultilib_dir to add_import_paths. 596 (d_handle_option): Use new static variables. 597 5982015-02-01 Iain Buclaw <ibuclaw@gdcproject.org> 599 600 * d-lang.cc: Remove d-confdef.h header. 601 * d-incpath.cc: Ditto. 602 * d-spec.cc: Ditto. 603 6042015-01-31 Iain Buclaw <ibuclaw@gdcproject.org> 605 606 * d-incpath.cc (add_phobos_versyms): Remove function. 607 * d-lang.cc (d_init): Remove call to add_phobos_versyms. 608 6092015-01-28 Iain Buclaw <ibuclaw@gdcproject.org> 610 611 * d-builtins.cc (DEF_FUNCTION_TYPE_VAR_8) 612 (DEF_FUNCTION_TYPE_VAR_12): New macros. 613 6142015-01-24 Johannes Pfau <johannespfau@gmail.com> 615 616 * d-builtins.cc (d_build_builtins_module): Mark builtin functions 617 as @nogc. 618 6192015-01-18 Iain Buclaw <ibuclaw@gdcproject.org> 620 621 * Make-lang.in: Update for D frontend changes. 622 * d-asmstmt.cc: Remove file. 623 * d-builtins.cc (build_dtype): No longer set struct handle. 624 (d_gcc_paint_type): Move to Target::paintAsType. 625 * d-codegen.cc (convert_expr): No longer call getImpl on associative 626 array conversions. Add case for converting void pointers to delegates. 627 (unhandled_arrayop_p): Remove. 628 (build_two_field_type): Use layout_type instead of building 629 TYPE_STUB_DECL and calling rest_of_decl_compilation. 630 (build_binop_assignment): New function. 631 (libcall_ids): Remove static variable. 632 (get_libcall): New function. 633 (maybe_set_intrinsic): Remove druntime library call handling. 634 (expand_intrinsic_vaarg): Dereference ref va_list parameters. 635 (build_closure): New function. 636 (WrappedExp::WrappedExp): Move to frontend sources. 637 (WrappedExp::toCBuffer): Ditto. 638 * d-codegen.h (LibCallFlag): New enum. 639 (LibCall): Use runtime.def macro to define members. 640 * d-ctype.cc (Type::toCParamtype): Remove function. 641 (TypeTypedef::toCParamtype): Ditto. 642 (TypeClass::toSymbol): Ditto. 643 (TypeFunction::retStyle): Move to retStyle. 644 (TypeSArray::toCParamtype): Ditto. 645 (Type::toSymbol): Ditto. 646 (Type::totym): Ditto. 647 (TypeFunction::totym): Ditto. 648 * d-decls.cc (Dsymbol::toSymbolX): Update for frontend changes. 649 (Dsymbol::toImport): Ditto. 650 (VarDeclaration::toSymbol): Ditto. 651 (FuncDeclaration::toSymbol): Ditto. 652 (InterfaceDeclaration::toSymbol): Use TREE_READONLY instead of 653 (EnumDeclaration::toDebug): Only call rest_of_type_compilation on 654 ENUMERAL_TYPE types. 655 TREE_CONSTANT to declare that the symbol cannot be modified. 656 (ClassDeclaration::toVtblSymbol): Ditto. 657 (AggregateDeclaration::toInitializer): Ditto. 658 (EnumDeclaration::toInitializer): Ditto. 659 (TypedefDeclaration::toInitializer): Remove function. 660 (TypedefDeclaration::toDebug): Ditto. 661 (Dsymbol::cvMember): Remove stub function. 662 (EnumDeclaration::cvMember): Ditto. 663 (FuncDeclaration::cvMember): Ditto. 664 (VarDeclaration::cvMember): Ditto. 665 (TypedefDeclaration::cvMember): Ditto. 666 * d-elem.cc (XorExp::toElem): Remove call to unhandled_arrayop_p. 667 (OrExp::toElem): Ditto. 668 (AndExp::toElem): Ditto. 669 (UshrExp::toElem): Ditto. 670 (ShrExp::toElem): Ditto. 671 (ShlExp::toElem): Ditto. 672 (ModExp::toElem): Ditto. 673 (DivExp::toElem): Ditto. 674 (MulExp::toElem): Ditto. 675 (MinExp::toElem): Ditto. 676 (AddExp::toElem): Ditto. 677 (XorAssignExp::toElem): Ditto. 678 (OrAssignExp::toElem): Ditto. 679 (AndAssignExp::toElem): Ditto. 680 (UshrAssignExp::toElem): Ditto. 681 (ShrAssignExp::toElem): Ditto. 682 (ShlAssignExp::toElem): Ditto. 683 (ModAssignExp::toElem): Ditto. 684 (DivAssignExp::toElem): Ditto. 685 (MulAssignExp::toElem): Ditto. 686 (PowAssignExp::toElem): Ditto. 687 (MinAssignExp::toElem): Ditto. 688 (AddAssignExp::toElem): Ditto. 689 (BinExp::toElemBin): Move to build_binop_assignment. 690 (AssignExp::toElem): Update for frontend changes. 691 (DelegatePtrExp::toElem): New function. 692 (DelegateFuncptrExp::toElem): New function. 693 (DelegateExp::toElem): Update for frontend changes. 694 (FuncExp::toElem): Ditto. 695 (NewExp::toElem): Ditto. 696 (StringExp::toElem): Don't set TREE_READONLY on string literals. 697 (AssocArrayLiteralExp::toElem): Remove codegen rewrite for new 698 associative array implementation. 699 * d-glue.cc (Global::isSpeculativeGagging): Remove function. 700 (Dsymbol::ungagSpeculative): Ditto. 701 (Ungag::~Ungag): Ditto. 702 (Loc::toChars): Update for new column diagnostic support. 703 (Loc::Loc): Ditto. 704 (Loc::equals): Ditto. 705 (error): Ditto. 706 (binary): Remove function. 707 (asmSemantic): New function. 708 (retStyle): New function. 709 (FuncDeclaration::isBuiltin): Rename to isBuiltin. 710 * d-intrinsics.def: Rename to intrinsics.def. 711 * d-irstate.cc (IRState::addExp): Remove old warning to catch statements 712 with no side effects. Now handled in frontend. 713 * d-lang.cc (d_init_options): Update for frontend changes. 714 (d_initialize_diagnostics): Remove function. 715 (d_add_builtin_version): Update for frontend changes. 716 (d_init): Ditto. 717 (d_handle_option): Ditto. 718 (d_post_options): Ditto. 719 (d_parse_file): Ditto. 720 * d-objfile.cc (Nspace::toObjFile): New function. 721 (StructDeclaration::toObjFile): Update for frontend changes. 722 (TypedefDeclaration::toObjFile): Remove function. 723 (TemplateInstance::toObjFile): Update for frontend changes. 724 (TemplateMixin::toObjFile): Ditto. 725 (unnest_function): New function. 726 (output_declaration_p): Update for frontend changes. 727 (FuncDeclaration::toObjFile): Ditto. 728 (FuncDeclaration::buildClosure): Move to buildClosure. 729 (get_linemap): Update for frontend changes. 730 (build_simple_function): Ditto. 731 (build_call_function): Ditto. 732 * d-target.cc (Target::va_listType): New function. 733 (Target::paintAsType): Ditto. 734 * d-todt.cc (dt_container2): Do not set TREE_READONLY on initialisers. 735 (dt_container): Ditto. 736 (ClassReferenceExp::toDt2): Update for C++ class support. 737 (ClassReferenceExp::toInstanceDt): Ditto. 738 (TypeTypedef::toDt): Remove function. 739 (TypeInfoTypedefDeclaration::toDt): Ditto. 740 (TypeInfoAssociativeArrayDeclaration::toDt): Update typeinfo size. 741 (TypeInfoAssociativeArrayDeclaration::toDt): Remove reference to impl 742 field in TypeInfo struct. 743 (TypeInfoStructDeclaration::toDt): Update for frontend changes. 744 * d-typinf.cc (Type::getTypeInfo): Update for frontend changes. 745 (TypeTypedef::getTypeInfoDeclaration): Remove function. 746 (createTypeInfoArray): Remove function. 747 * runtime.def: New file. 748 * toir.cc (IRVisitor::visit::DtorExpStatement): Remove function. 749 (IRVisitor::visit::ExtAsmStatement): Update for frontend changes. 750 7512015-01-17 Iain Buclaw <ibuclaw@gdcproject.org> 752 753 * d-elem.cc (UshrAssignExp::toElem): Remove integer promotion on left 754 hand side of unsigned right shift expression. 755 7562015-01-13 Iain Buclaw <ibuclaw@gdcproject.org> 757 758 * d-system.h: Include hash-set.h, machmode.h, vec.h, double-int.h, 759 input.h, alias.h, symtab.h and inchash.h due to flattening of tree.h. 760 * d-gt.cc: Ditto. 761 7622015-01-02 Iain Buclaw <ibuclaw@gdcproject.org> 763 764 * d-codegen.h (build_boolop): Don't eagerly fold comparison expressions. 765 766 767Copyright (C) 2015 Free Software Foundation, Inc. 768 769Copying and distribution of this file, with or without modification, 770are permitted in any medium without royalty provided the copyright 771notice and this notice are preserved. 772