12014-12-14 Iain Buclaw <ibuclaw@gdcproject.org> 2 3 * Make-lang.in (check_gdc_parallelize): Update for testsuite changes. 4 * d-convert.cc (d_convert_basic): Avoid stack overflow when converting 5 from pointer to integer. 6 * d-objfile.cc (FuncDeclaration::toObjFile): Emit correct frame 7 information for closures rather than generic void pointers. 8 92014-11-10 Iain Buclaw <ibuclaw@gdcproject.org> 10 11 * d-elem.cc (CatExp::toElem): Split dynamic arrays when passing as 12 varargs to arraycatT and arraycatnT. 13 142014-11-09 Iain Buclaw <ibuclaw@gdcproject.org> 15 16 * d-codegen.cc (build_vthis): Handle getting static chain for nested 17 templated structs. 18 192014-09-07 Iain Buclaw <ibuclaw@gdcproject.org> 20 21 * d-elem.cc (ArrayLiteralExp::toElem): Remove special handling for 22 immutable arrays. 23 242014-08-03 Iain Buclaw <ibuclaw@gdcproject.org> 25 26 * d-longdouble.cc (longdouble::formatHex): Convert buffer to uppercase 27 for use in mangling templates. 28 292014-07-29 Iain Buclaw <ibuclaw@gdcproject.org> 30 31 * d-elem.cc (NewExp::toElem): Check for opaque structs before 32 continuing to generate the new expression. 33 34 * d-lang.h.cc (d_vtbl_ptr_type_node): Renamed to vtbl_ptr_type_node. 35 (d_boolean_type_node): Renamed to bool_type_node. 36 (d_char_type_node): Renamed to char8_type_node. 37 (d_wchar_type_node): Renamed to char16_type_node. 38 (d_dchar_type_node): Renamed to char32_type_node. 39 (d_ifloat_type_node): Renamed to ifloat_type_node. 40 (d_idouble_type_node): Renamed to idouble_type_node. 41 (d_ireal_type_node): Renamed to ireal_type_node. 42 (byte_type_node, ubyte_type_node): New macros for fixed integral 43 types in D. 44 (short_type_node, ushort_type_node): Likewise. 45 (int_type_node, uint_type_node): Likewise. 46 (long_type_node, ulong_type_node): Likewise. 47 (cent_type_node, ucent_type_node): Likewise. 48 * d-builtins.c (d_init_builtins): Initialise all D specific type nodes. 49 * d-codegen.cc (d_bounds_condition): Use D-specific type macros instead 50 of backend C types. 51 (layout_aggregate_type): Likewise. 52 (build_integer_cst): Likewise. 53 (build_boolop): Likewise. 54 * d-convert.cc (d_build_truthvalue_op): Likewise. 55 (d_truthvalue_conversion): Likewise. 56 * d-ctype.cc (Type::toCtype): Likewise. 57 * d-decls.cc (FuncDeclaration::toSymbol): Likewise. 58 * d-elem.cc (CmpExp::toElem): Likewise. 59 (OrOrExp::toElem): Likewise. 60 (NotExp::toElem): Likewise. 61 * d-lang.cc (d_type_for_mode): Likewise. 62 (d_type_for_size): Likewise. 63 (d_signed_or_unsigned_type): Likewise. 64 652014-07-23 Iain Buclaw <ibuclaw@gdcproject.org> 66 67 * d-ctype.cc (TypeFunction::toCtype): Only check for ref return for 68 functions returning non-void. 69 702014-07-21 Iain Buclaw <ibuclaw@gdcproject.org> 71 72 * d-objfile.cc (output_declaration_p): Don't emit any declarations from 73 the gcc.attribute module. 74 (StructDeclaration::toObjFile): Call output_declaration_p. 75 * d-glue.cc (verror): Only call vasprintf on the initial format string. 76 772014-07-17 Iain Buclaw <ibuclaw@gdcproject.org> 78 79 * d-lang.cc (d_init_options_struct): Set flag_wrapv as on by default. 80 812014-07-14 Iain Buclaw <ibuclaw@gdcproject.org> 82 83 * d-elem.cc (NewExp::toElem): Don't initialise a new'd struct at the 84 caller. The callee ensures this is done. 85 862014-07-13 Iain Buclaw <ibuclaw@gdcproject.org> 87 88 * d-objfile.cc (d_finish_symbol): Always set TREE_STATIC for symbols 89 being sent to the backend here. 90 912014-07-12 Iain Buclaw <ibuclaw@gdcproject.org> 92 93 * d-objfile.cc (d_finish_symbol): Don't set DECL_INITIAL if the 94 initialiser is all zeros. 95 962014-07-10 Iain Buclaw <ibuclaw@gdcproject.org> 97 98 * d-builtins.cc (lookup_ctype_name): Remove function. 99 (string_type_node): Move to static declaration from d_global_trees. 100 (const_string_type_node): Likewise. 101 (wint_type_node): Likewise. 102 (intmax_type_node): Likewise. 103 (uintmax_type_node): Likewise. 104 (signed_size_type_node): Likewise. 105 (d_init_builtins): Update. 106 * d-lang.cc (d_type_for_mode): Return only fixed size types. 107 (d_type_for_size): Likewise. 108 (d_signed_or_unsigned_type): Likewise. 109 (d_unsigned_type): Remove duplicated code from 110 d_signed_or_unsigned_type. 111 (d_signed_type): Likewise. 112 1132014-07-03 Iain Buclaw <ibuclaw@gdcproject.org> 114 115 * d-objfile.cc (finish_thunk): Use set_decl_section_name, copy the 116 implicit section flag. 117 (setup_symbol_storage): Use decl_default_tls_model. 118 1192014-06-26 Iain Buclaw <ibuclaw@gdcproject.org> 120 121 * d-codegen.h (d_types_compatible): Remove function. 122 (d_types_same): Use more conservative approach to type equality. 123 * d-codegen.cc (get_libcall): Allow backend to be able to optimise 124 closure memory allocations. 125 (convert_for_assignment): Use d_types_same. 126 * d-elem.cc (CatExp::toElem): Likewise. 127 (BinExp::toElemBin): Likewise. 128 (CatAssignExp::toElem): Likewise. 129 (StructLiteralExp::toElem): Likewise. 130 1312014-06-14 Iain Buclaw <ibuclaw@gdcproject.org> 132 133 * d-elem.cc (CondExp::toElem): Handle void type condition expressions. 134 (AssignExp::toElem): Use ismemset to test for initialising arrays with 135 a single value. 136 (StructLiteralExp::toElem): Build static initialiser if a symbol was 137 created by the front-end. 138 * d-codegen.h (d_types_compatible): First check equality of types, then 139 implicit compatibility. 140 * d-convert.cc (d_default_conversion): Remove function, fold 141 implementation into... 142 (d_truthvalue_conversion): ... here. 143 1442014-06-12 Iain Buclaw <ibuclaw@gdcproject.org> 145 146 * d-convert.cc (d_scalar_conversion): Remove function. 147 (d_build_truthvalue_op): Update. 148 (d_truthvalue_conversion): Update. 149 150 * d-codegen.cc (get_frame_for_symbol): Remove glue-specific error 151 messages and refactor. 152 (build_vthis): Likewise. 153 (get_framedecl): Likewise. 154 * d-elem.cc (AssignExp::toElem): Update call to build_vthis. 155 (NewExp::toElem): Likewise. 156 (StructLiteralExp::toElem): Likewise. 157 * d-objfile.cc (Dsymbol::toObjFile): Fix build warning. 158 159 * d-codegen.cc (d_decl_context): Always return parent context for 160 functions nested in functions. 161 (is_degenerate_closure): Remove function. 162 (needs_static_chain): Remove function. 163 * d-decls.cc (FuncDeclaration::toSymbol): Remove workaround for cgraph 164 nesting structure, saving the original context decl. 165 * d-lang.h (D_DECL_STATIC_CHAIN): Remove macro. 166 * d-objfile.cc (Symbol::Symbol): Remove ScontextDecl field. 167 (FuncDeclaration::toObjFile): Remove workaround for cgraph nesting 168 structure, restoring the original context decl. Delay building the 169 cgraph node until... 170 (d_finish_function): ... here, where the function is unnested. 171 1722014-06-11 Iain Buclaw <ibuclaw@gdcproject.org> 173 174 * d-objfile.cc (d_finish_function): Update the callgraph to reflect 175 unnesting of the function, as unravelling has already been handled by 176 the frontend. Do not delay calling cgraph_finalize_function. 177 1782014-06-09 Iain Buclaw <ibuclaw@gdcproject.org> 179 180 * d-objfile.cc (d_comdat_group): Return a decl. 181 * d-decl.cc (FuncDeclaration::toThunkSymbol): Don't set comdat group. 182 * d-elem.cc (EqualExp::toElem): Always store temporaries when comparing 183 two dynamic arrays. 184 1852014-06-08 Iain Buclaw <ibuclaw@gdcproject.org> 186 187 * d-decls.cc (TypeInfoDeclaration::toSymbol): Add assert that Error 188 types never reach the backend. 189 * d-typinf.cc (Type::getTypeInfo): Likewise. 190 1912014-06-08 Iain Buclaw <ibuclaw@gdcproject.org> 192 193 * dfrontend: Update to D front-end version 2.065. 194 195 * d-codegen.cc (d_build_call): Evaluate side effects of the object 196 parameter for method or delegate calls before passing. 197 (libcall_ids): Rename _d_array_bounds to _d_arraybounds. 198 (get_libcall): Update parameter types for _d_arraycopy. 199 (finish_aggregate_type): Update for frontend UDA changes. 200 * d-ctype.cc (TypeTypedef::toCtype): Update for frontend UDA changes. 201 (TypeEnum::toCtype): Likewise. 202 (TypeStruct::toCtype): Likewise. 203 (TypeClass::toCtype): Likewise. 204 * d-elem.cc (BoolExp::toElem): New function. 205 * d-lang.cc (rootmodule): New declaration for frontend entrypoint 206 changes. 207 (genCmain): Update for frontend entrypoint changes. 208 (d_handle_option): Don't duplicate memory for argument values. 209 (d_parse_file): Don't duplicate memory for source filenames. 210 * d-objfile.cc (VarDeclaration::toObjFile): Don't emit instantiated 211 manifest constants to debug. 212 (TemplateInstance::toObjFile): Update for frontend changes. 213 (output_template_p): Remove function. 214 (output_declaration_p): Update for frontend changes. 215 (setup_symbol_storage): Update for frontend UDA changes. 216 * d-target.cc (Target::reverseCppOverloads): New declaration. 217 * d-typinf.cc (Type::getInternalTypeInfo): Update for frontend changes. 218 (Type::getTypeInfo, Type::getTypeInfoDeclaration): Likewise. 219 (TypeTypedef::getTypeInfoDeclaration): Likewise. 220 (TypePointer::getTypeInfoDeclaration): Likewise. 221 (TypeDArray::getTypeInfoDeclaration): Likewise. 222 (TypeSArray::getTypeInfoDeclaration): Likewise. 223 (TypeAArray::getTypeInfoDeclaration): Likewise. 224 (TypeStruct::getTypeInfoDeclaration): Likewise. 225 (TypeClass::getTypeInfoDeclaration): Likewise. 226 (TypeVector::getTypeInfoDeclaration): Likewise. 227 (TypeEnum::getTypeInfoDeclaration): Likewise. 228 (TypeFunction::getTypeInfoDeclaration): Likewise. 229 (TypeDelegate::getTypeInfoDeclaration): Likewise. 230 (TypeTuple::getTypeInfoDeclaration): Likewise. 231 (createTypeInfoArray): Likewise. 232 233 * d-intrinsics.def: New file for declaring D intrinsics. 234 235 * d-builtins.cc (std_intrinsic_module, std_math_module) 236 (core_math_module, va_arg_template, va_arg2_template) 237 (va_start_template): Remove declarations. 238 (is_intrinsic_module_p, is_math_module_p, is_builtin_va_arg_p) 239 (is_builtin_va_start_p, d_gcc_magic_stdarg_check) 240 (d_gcc_magic_stdarg_module): Remove functions. 241 (d_gcc_magic_builtins_module): Rename to d_build_builtins_module. 242 (d_gcc_magic_libbuiltins_module): Rename to maybe_set_builtin. 243 (d_gcc_magic_libbuiltins_check): Rename to maybe_set_builtin_1. 244 (gcc_type_to_d_type): Rename to build_dtype. 245 (gcc_cst_to_d_expr): Rename to build_expression. 246 (d_gcc_eval_builtin): Remove function. 247 (eval_builtin): Moved to... 248 * d-glue.cc (eval_builtin): New function, updated for glue changes. 249 (FuncDeclaration::isBuiltin): New function to determine whether a 250 given function symbol is a compiler intrinsic. 251 * d-codegen.cc (maybe_expand_builtin): Rename to expand_intrinsic. 252 (Intrinsic): Remove enum declaration, replaced with... 253 (intrinsic_code): New enum for compiler intrinsics. 254 (intrinsic_decls): New declaration for store intrinsic information. 255 (expand_intrinsic_bt): Update signature. 256 (maybe_set_intrinsic): New function to replace... 257 (maybe_set_builtin_frontend): Remove function. 258 * d-decls.cc (FuncDeclaration::toSymbol): Update for glue changes. 259 260 * d-builtins.c: Rename to d-builtins.cc 261 * d-gt.c: Rename to d-gt.cc 262 * d-spec.c: Rename to d-spec.cc 263 264 * d-toir.cc: Renamed to toir.cc 265 * toir.cc: New file, re-implement toIR methods as a visitor. 266 267 * d-codegen.cc (insert_type_modifiers): Handle MODwildconst modifiers. 268 (build_ir): New function. 269 * d-objfile.cc (FuncDeclaration::toObjFile): Use build_ir to walk 270 front-end IR trees. 271 * d-decls.cc (VarDeclaration::toSymbol): Mark compiler temporaries as 272 DECL_ARTIFICIAL. 273 (ClassDeclaration::toVtblSymbol): Update for front-end changes. 274 * d-builtins.c (gcc_type_to_d_type): Likewise. 275 * d-elem.cc (CatAssignExp::toElem): Likewise. 276 (ArrayLiteralExp::toElem): Likewise. 277 (BoolExp::toElem): Remove function. 278 (ComExp::toElem): Assert that unhandled array operations no longer 279 leak from the front-end. 280 (NegExp::toElem): Likewise. 281 * d-glue.cc (Global::init): Initialise new member run_noext. 282 * d-incpath (add_import_path): Update for front-end changes. 283 * d-lang.cc (d_add_builtin_version): Likewise. 284 * d-todt.cc (StructDeclaration::toDt): Likewise. 285 * d-toir.cc (LabelStatement::toIR): Don't delete forward references. 286 (GotoStatement::toIR): Assert that undefined labels no longer leak 287 from the front-end. 288 2892014-05-31 Iain Buclaw <ibuclaw@gdcproject.org> 290 291 * d-todt.cc (dt_container): Properly handle zero length static arrays. 292 * d-codegen.h (build_dtype): Rename to lang_dtype. 293 (build_ddecl): Rename to lang_ddecl. 294 2952014-05-21 Iain Buclaw <ibuclaw@gdcproject.org> 296 297 * d-builtins.c (d_init_builtins): Use void_node instead of 298 d_void_zero_node. 299 * d-lang.h (d_void_zero_node): Remove. 300 * d-elem.cc (AndAndExp::toElem): Adjust. 301 (OrOrExp::toElem): Likewise. 302 (AssertExp::toElem): Likewise. 303 (TupleExp::toElem): Likewise. 304 305 * d-builtins.c (d_init_builtins): Use null_pointer_node instead of 306 d_null_pointer. 307 * d-lang.h (d_null_pointer): Remove. 308 * d-codegen.cc (convert_expr): Adjust. 309 (get_frame_for_symbol): Likewise. 310 (build_vthis): Likewise. 311 (get_framedecl): Likewise. 312 * d-elem.cc (DeleteExp::toElem): Likewise. 313 (CallExp::toElem): Likewise. 314 (AssertExp::toElem): Likewise. 315 (NewExp::toElem): Likewise. 316 (ArrayLiteralExp::toElem): Likewise. 317 (NullExp::toElem): Likewise. 318 * d-objfile.cc (ClassDeclaration::toObjFile): Likewise. 319 (InterfaceDeclaration::toObjFile): Likewise. 320 (FuncDeclaration::toObjFile): Likewise. 321 (build_moduleinfo): Likewise. 322 * d-todt.cc (TypeInfoTypedefDeclaration::toDt): Likewise. 323 (TypeInfoEnumDeclaration::toDt): Likewise. 324 (TypeInfoStructDeclaration::toDt): Likewise. 325 3262014-05-18 Iain Buclaw <ibuclaw@gdcproject.org> 327 328 * d-longdouble.cc (longdouble::from_shwi): Rename to from_int. 329 (longdouble::from_uhwi): Rename to from_uint. 330 (longdouble::to_shwi): Rename to to_int. 331 (longdouble::to_uhwi): Rename to to_uint. 332 (longdouble::set): Adjust. 333 (longdouble::operator): Likewise. 334 335 * d-lang.cc (alloc_binding_level): Adjust. 336 (build_d_type_lang_specific): Likewise. 337 (build_d_decl_lang_specific): Likewise. 338 * d-lang.h (lang_type): Don't use variable_size gty attribute. 339 * d-codegen.cc (cst_to_hwi): Remove function. 340 * d-codegen.cc (tree_to_hwi): Remove function. 341 * d-builtins.c (gcc_type_to_d_type): Adjust. 342 (gcc_cst_to_d_expr): Likewise. 343 * d-convert.cc (d_truthvalue_conversion): Use integer_zerop. 344 (get_nonnull_operand): Use tree_fits_uhwi_p. 345 * d-longdouble.cc (longdouble::from_int): Adjust. 346 (longdouble::from_uint): Likewise. 347 (longdouble::to_int): Likewise. 348 3492014-04-30 Johannes Pfau <johannespfau@gmail.com> 350 351 * d-lang.cc (d_init): Define GNU_SEH_Exceptions and 352 GNU_DWARF2_Exceptions versions. 353 3542014-04-21 Iain Buclaw <ibuclaw@gdcproject.org> 355 356 * d-lang.cc (d_init_options): Default deprecation warnings to off. 357 * d-ctype.cc (TypeDelegate::toCtype): Propogate TREE_ADDRESSABLE from 358 the base function to the delegatised copy. 359 3602014-04-15 Johannes Pfau <johannespfau@gmail.com> 361 362 * d-lang.cc (d_handle_noclone_attribute): New function to handle 363 noclone attribute. noclone is required by the naked attribute. 364 * d-elem.cc (SymbolExp::toElem): Convert symbols to the expression 365 type. 366 3672014-04-13 Iain Buclaw <ibuclaw@gdcproject.org> 368 369 * d-codegen.cc (get_frameinfo): Don't copy the node for frame record. 370 * d-irstate.cc (IRState::endCatches): Rebuild the STATEMENT_LIST of 371 catches in a TRY_CATCH_EXPR if it gets optimised away by 372 IRState::popStatement. 373 * d-codegen.cc (d_attribute_p): Provide access to target attributes. 374 3752014-03-31 Iain Buclaw <ibuclaw@gdcproject.org> 376 377 * d-codegen.cc (error_mark_p): Removed function, replace uses with 378 error_operand_p. 379 (error_mark): Removed function, replace uses with error_mark_node. 380 * d-ctype.cc (Type::toCtype): Return d_unknown_type_node for frontend 381 error types. 382 * d-objfile.cc (VarDeclaration::toObjFile): Don't build CONST_DECLs for 383 non-scalar manifests. 384 3852014-03-23 Iain Buclaw <ibuclaw@gdcproject.org> 386 387 * d-decls.cc (Dsymbol::toImport): Prevent GC from collecting 388 IMPORTED_DECL nodes whilst front-end compilation in progress. 389 3902014-03-19 Iain Buclaw <ibuclaw@gdcproject.org> 391 392 * d-codegen.cc (AggLayout::visit): Rename to layout_aggregate_type. 393 (AggLayout::doFields, AggLayout::doInterfaces): Remove function and 394 move implementation into layout_aggregate_type. 395 (AggLayout::addField): Rename to insert_aggregate_field. 396 (AggLayout::finish): Rename to finish_aggregate_type. 397 * d-codegen.h (AggLayout): Update definition. 398 * d-ctype.cc (TypeStruct::toCtype): Update for glue changes. 399 (TypeFunction::toCtype): Fix ICE on generic function types. 400 (TypeClass::toCtype): Move generation of vptr and monitor fields into 401 layout_aggregate_type. Moved generation of TYPE_METHODS from ... 402 * d-objfile.cc (FuncDeclaration::toObjFile): ... here into 403 TypeClass::toCtype. Don't build up TYPE_METHODS on a per-function 404 basis, generate the entire vtable. 405 4062014-03-18 Iain Buclaw <ibuclaw@gdcproject.org> 407 408 * d-decls.cc (Dsymbol::toSymbolX): Set the symbol prettyIdent. 409 (Dsymbol::toImport): Emit packages as their fully qualified names. 410 (ClassDeclaration::toSymbol): Distinguish between the classinfo 411 assembler and decl name. 412 (InterfaceDeclaration::toSymbol): Likewise for interface symbol. 413 (Module::toSymbol): Likewise for moduleinfo symbol. 414 (ClassDeclaration::toVtblSymbol): Likewise for class vtable symbol. 415 (AggregateDeclaration::toInitializer) 416 (TypedefDeclaration::toInitializer, EnumDeclaration::toInitializer): 417 Likewise for default initialisers. 418 * d-objfile.cc (Module::genobjfile): Don't set-up moduleinfo symbol 419 storage twice. 420 4212014-03-17 Iain Buclaw <ibuclaw@gdcproject.org> 422 423 * d-codegen.cc (d_decl_context): Fix null pointer dereference. 424 * d-objfile.cc (FuncDeclaration::toObjFile): Don't override the setting 425 of DECL_CONTEXT on the declaration here. 426 (d_finish_symbol): Likewise. 427 * d-objfile.cc (VarDeclaration::toObjFile): Move the generation of 428 manifest constants to ... 429 * d-decls.cc (VarDeclaration::toSymbol): ... here, and emit them as 430 CONST_DECLs. Set the DECL_CONTEXT for all variable symbols. 431 432 * d-builtins.cc (d_gcc_magic_builtins_module): Don't store compiler 433 generated builtins in Symbol::isym, use Symbol::csym instead. 434 (d_gcc_magic_libbuiltins_check): Likewise. 435 * d-codegen.cc (d_decl_context): Return the imported symbol tree of 436 modules where the NAMESPACE_DECL is now stored. 437 (d_build_module): Remove function. Move implementation to ... 438 * d-decls.cc (Dsymbol::toImport): ... here. Build an IMPORTED_DECL for 439 all imported declarations. 440 (FuncDeclaration::toSymbol): Remove special handling of Symbol::isym. 441 (Module::toSymbol): Remove call to d_build_module. 442 * d-objfile.cc (Dsymbol::toObjFile): Handle emission of IMPORTED_DECL 443 symbols to debug. 444 4452014-03-16 Iain Buclaw <ibuclaw@gdcproject.org> 446 447 * d-codegen.cc (build_attributes): Ensure D-specific attributes have 448 their value interpreted through CTFE. 449 4502014-02-21 Iain Buclaw <ibuclaw@gdcproject.org> 451 452 * d-codegen.cc (d_build_module): Update signature to accept a Loc 453 location to the module declaration. 454 * d-decls.cc (Module::toSymbol): Update call to d_build_module. 455 Set TREE_PUBLIC/DECL_EXTERNAL to distingush which modules are being 456 compiled. 457 * d-objfile.cc (Dsymbol::toObjFile): Handle Import symbols, and emit 458 debug information for imported modules. 459 (ImportStatement::toIR): Likewise. 460 (set_input_location): New function to implement the equivalent of 461 set_decl_location, but instead sets input_location. 462 4632014-02-19 Johannes Pfau <johannespfau@gmail.com> 464 465 * d-objfile.cc (build_call_function): Call set_input_location 466 to set debug info correctly 467 4682014-02-18 Iain Buclaw <ibuclaw@gdcproject.org> 469 470 * d-objfile.cc (VarDeclaration::toObjFile): Remove toplevel check. 471 DECL_CONTEXT is never set on manifest constants. 472 (d_finish_compilation): Remove fancy check on force outputting 473 symbols to object file. 474 (build_type_decl): Don't emit the qualified identifier in debug 475 information. The fully qualified name is now determined through the 476 NAMESPACE_DECL context chain. 477 * d-ctype.cc (TypeEnum::toCtype): Likewise for enum members. 478 (VarDeclaration::toSymbol): Likewise for static variables. 479 (FuncDeclaration::toSymbol): Likewise for functions. 480 481 * d-decls.cc (FuncDeclaration::toSymbol): Don't emit the 'D main' 482 symbol to debug as plain 'main'. 483 * d-objfile.cc (VarDeclaration::toObjFile): Don't emit the qualified 484 identifier of manifest constants in debug information. 485 4862014-02-17 Iain Buclaw <ibuclaw@gdcproject.org> 487 488 * d-codegen.cc (d_build_module): New function. 489 * d-decls.cc (Module::toSymbol): Use d_build_module to build up the 490 qualified module namespace. 491 492 * d-codegen.cc (expand_intrinsic_op, expand_intrinsic_op2): New 493 functions to build a call to a builtin code. 494 (expand_intrinsic_bsr, expand_intrinsic_bt): New functions to expand a 495 BUILTIN_FRONTEND call to core.bitop intrinsics. 496 (expand_intrinsic_vaarg, expand_intrinsic_vastart): New functions to 497 expand a BUILTIN_FRONTEND call to core.vararg intrinsics. 498 (maybe_expand_builtin): Update. 499 5002014-02-16 Iain Buclaw <ibuclaw@gdcproject.org> 501 502 * d-decls.cc (Module::toSymbol): Build a NAMESPACE_DECL to populate the 503 DECL_CONTEXT of toplevel functions. 504 * d-codegen.cc (d_decl_context): Return the enclosing module 505 NAMESPACE_DECL as the decl context only when the symbol is extern(D) 506 and not D main. 507 5082014-02-15 Iain Buclaw <ibuclaw@gdcproject.org> 509 510 * d-decls.cc (VarDeclaration::toSymbol): Don't call 511 setup_symbol_storage until after SET_DECL_ASSEMBLER_NAME has been set. 512 513 * d-decls.cc (VarDeclaration::toSymbol): Give prettyIdent precedence 514 for the DECL_NAME over the simple identifier. 515 (FuncDeclaration::toSymbol): Likewise. 516 * d-objfile.cc (d_finish_symbol): Remove setting DECL_NAME as 517 prettyIdent, this has already been done in Declaration::toSymbol. 518 (d_finish_function): Likewise. 519 520 * d-decls.cc (VarDeclaration::toSymbol): Call set_user_assembler_name 521 if pragma(mangle) was seen. 522 (FuncDeclaration::toSymbol): Likewise. 523 5242014-02-12 Johannes Pfau <johannespfau@gmail.com> 525 526 * d-decls.cc (FuncDeclaration::toSymbol): Do not set TREE_NOTHROW on 527 nothrow functions. 528 * d-decls.cc (TypeInfoDeclaration::toSymbol): Call relayout_decl after 529 changing the type. 530 5312014-02-03 Iain Buclaw <ibuclaw@gdcproject.org> 532 533 534 * d-codegen.cc (d_build_call): Remove special handling of 535 flag_split_darrays switch. 536 (maybe_expand_builtin): Likewise. 537 * d-elem.cc (CatExp::toElem): Likewise. 538 * lang.opt (fsplit-dynamic-arrays): Remove. 539 5402014-02-02 Iain Buclaw <ibuclaw@gdcproject.org> 541 542 * d-glue.cc (readFile, writeFile, ensurePathToNameExists): Define. 543 * d-incpath.cc (add_import_path): Update for frontend changes. 544 (add_fileimp_path): Likewise. 545 * d-lang.cc (deps_write): Likewise. 546 (d_parse_file): Likewise. 547 * d-todt.cc (Dts): Update define for frontend changes. 548 * d-decls.cc (ClassDeclaration::toVtblSymbol): Don't mark __vtbl 549 symbols as virtual. They are global static symbols. 550 5512014-01-12 Iain Buclaw <ibuclaw@gdcproject.org> 552 553 * d-decls.cc (EnumDeclaration::toDebug): Build TYPE_DECL only for 554 enumeral types. 555 5562014-01-06 Iain Buclaw <ibuclaw@gdcproject.org> 557 558 * d-ctype.cc (TypeClass::toCtype): Don't add __monitor field for 559 extern(C++) classes. 560 561 * d-builtins.c (d_gcc_magic_module): Remove tdata. 562 * d-codegen.cc (build_interface_binfo): Likewise. 563 * d-ctype.cc (TypeEnum::toCtype): Likewise. 564 (TypeClass::toCtype): Likewise. 565 * d-lang.cc (deps_write): Likewise. 566 5672014-01-05 Iain Buclaw <ibuclaw@gdcproject.org> 568 569 * d-ctype.cc (TypeEnum::toCtype): Don't push CONST_DECLs into current 570 function. 571 * d-decls.cc (FuncDeclaration::toThunkSymbol): Don't mark symbol as 572 TREE_PRIVATE, just TREE_PUBLIC as false. 573 (StructLiteralExp::toSymbol): Likewise. 574 (ClassReferenceExp::toSymbol): Likewise. 575 * d-objfile.cc (d_comdat_linkage): Likewise. 576 (d_finish_symbol): Likewise. 577 (build_moduleinfo): Likewise. 578 579 * config-lang.in: Add d-lang.cc to gtfiles. 580 * d-irstate.h (IRState::varsInScope): Change from Array to vec<> type. 581 (IRState::statementList_): Likewise. 582 (IRState::scopes_): Likewise. 583 (IRState::loops_): Likewise. 584 (IRState::labels_): Likewise. 585 * d-lang.h (d_bi_builtin_func): Remove declaration. 586 (d_bi_builtin_type): Likewise. 587 (d_keep_list): Likewise. 588 * d-objfile.h (Symbol::thunks): Change from Array to vec<> type. 589 (ModuleInfo::classes): Likewise. 590 (ModuleInfo::ctors): Likewise. 591 (ModuleInfo::dtors): Likewise. 592 (ModuleInfo::ctorgates): Likewise. 593 (ModuleInfo::sharedctors): Likewise. 594 (ModuleInfo::shareddtors): Likewise. 595 (ModuleInfo::sharedctorgates): Likewise. 596 (ModuleInfo::unitTests): Likewise. 597 (build_simple_function): Remove declaration. 598 (build_call_function): Likewise. 599 (build_ctor_function): Likewise. 600 (build_dtor_function): Likewise. 601 (build_unittest_function): Likewise. 602 * d-builtins.c (bi_fn_list): Rename to gcc_builtins_functions. 603 (bi_lib_list): Rename to gcc_builtins_libfuncs. 604 (bi_type_list): Rename to gcc_builtins_types. 605 (builtin_converted_types): Remove. 606 (builtin_converted_decls): Change from Array to vec<> type. 607 (gcc_type_to_d_type): Update. 608 (d_bi_builtin_func): Remove and move to d_builtin_function. 609 (d_bi_builtin_type): Remove and move to d_register_builtin_type. 610 (d_gcc_magic_builtins_module): Update. 611 * d-ctype.cc (TypeClass::toCtype): Remove unused var. 612 * d-decls.cc (FuncDeclaration::toThunkSymbol): Update for change to 613 vec<> type. 614 * d-elem.cc (CatExp::toElem): Change stashed vars from Array to vec<>. 615 (Expression::toElemDtor): Update for change to vec<> type. 616 * d-irstate.cc (IRState::startFunction): Likewise. 617 (IRState::endFunction): Likewise. 618 (IRState::addExp): Likewise. 619 (IRState::pushStatementList): Likewise. 620 (IRState::popStatementList): Likewise. 621 (IRState::getLabelBlock): Likewise. 622 (IRState::getLoopForLabel): Likewise. 623 (IRState::beginFlow): Likewise. 624 (IRState::endFlow): Likewise. 625 (IRState::startScope): Likewise. 626 (IRState::pushLabel): Likewise. 627 (IRState::checkGoto): Likewise. 628 (IRState::checkPreviousGoto): Change from Array to Blocks type. 629 * d-lang.cc (global_declarations): Change from Array to vec<> type. 630 (d_add_global_declaration): Update for change to vec<> type. 631 (d_write_global_declarations): Likewise. 632 (d_keep_list): Make static to source file. 633 * d-objfile.cc (static_ctor_list): Change from Array to vec<> type. 634 (static_dtor_list): Likewise. 635 (Module::genobjfile): Update for change to vec<> type. 636 (d_finish_module): Likewise. 637 (d_finish_function): Likewise. 638 (deferred_thunks): Change from ArrayBase<> to vec<> type. 639 (write_deferred_thunks): Update for change to vec<> type. 640 (use_thunk): Likewise. 641 (build_simple_function): Make static to source file. 642 (build_call_function): Likewise. 643 (build_ctor_function): Likewise. 644 (build_dtor_function): Likewise. 645 (build_unittest_function): Likewise. 646 6472014-01-02 Iain Buclaw <ibuclaw@gdcproject.org> 648 649 * d-objfile.cc (setup_symbol_storage): Use output_module_p on template 650 instantiating module to determine if symbol is externally compiled. 651 (d_finish_function): Set function local if function body was compiled. 652 * d-decls.cc (Dsymbol::toSymbolX): Use unsigned integer format for the 653 prefix string length. 654 655 656Copyright (C) 2014 Free Software Foundation, Inc. 657 658Copying and distribution of this file, with or without modification, 659are permitted in any medium without royalty provided the copyright 660notice and this notice are preserved. 661