blob: 741747b06e54384c8a61d4823afc445a010d9bee [file] [log] [blame]
2013-02-15 Iain Buclaw <>
* (GDC_EXTENDED_ASM_SYNTAX): Remove macro.
2013-02-14 Iain Buclaw <>
* d-lang.h (D_DECL_IS_CONTRACT): Remove macro.
* (FuncDeclaration::toSymbol): Likewise.
2013-02-13 Iain Buclaw <>
* (d_gcc_is_target_win32): Remove.
(d_add_builtin_version): New function to handle define_builtin
callback from backend.
* (IRState::maybeExpandSpecialCall): Remove intrinsic bt.
* d-builtins.c: Merge with
* Remove.
2013-02-07 Johannes Pfau <>
* (d_init): Use gcc's config system for predefined OS versions.
* Likewise.
* Likewise.
2013-02-05 Iain Buclaw <>
* (gcc_type_to_d_type): Remove STRUCTTHISREF condition.
* (FuncDeclaration::toSymbol): Likewise.
* (ThisExp::toElem): Likewise.
* (TypeSArray::toCtype): Remove SARRAYVALUE condition.
* (IRState::isDeclarationReferenceType): Likewise.
(IRState::isArgumentReferenceType): Likewise.
2013-02-01 Johannes Pfau <>
* (d_init): Use gcc's config system for predefined CPU versions.
(d_init): Fix definition of D_LP64 version.
* Likewise.
* Likewise.
2012-12-16 Iain Buclaw <>
* (FuncDeclaration::toSymbol): Don't optimise PUREconst
2012-10-27 Iain Buclaw <>
* (IRState::buildAssignOp): Handle case where LHS type is
not compatible with expression type.
2012-10-26 Iain Buclaw <>
* (ClassDeclaration::toSymbol): Use empty RECORD_TYPE to
build internal symbol.
(Module::toSymbol): Likewise.
* (outdata): Set type size from constructor if not
COMPLETE_TYPE_P. Assert that DECL_INITIAL is never bigger than
2012-10-25 Iain Buclaw <>
* (IRState::getFrameInfo): Use vthis to determine whether
function is nested.
2012-10-21 Iain Buclaw <>
* (gcc_type_to_d_type): Remove special case for
double/long double types.
(d_gcc_magic_builtins_module): Cleanup generation of builtin types.
Add __builtin_unwind_int and __builtin_unwind_uint.
2012-10-16 Iain Buclaw <>
* (ObjectFile::outputThunk): Mark thunk as DECL_WEAK
rather than using weakref attribute.
2012-10-14 Iain Buclaw <>
* d-bi-attrs.h: Remove file.
* d-builtins.c (d_attribute_table): Define table of machine independant
attributes for gcc builtins.
(d_format_attribute_table): Define table of format attributes for gcc
(handle_noreturn_attribute, handle_leaf_attribute,
handle_const_attribute, handle_malloc_attribute,
handle_returns_twice_attribute, handle_pure_attribute,
handle_novops_attribute, get_nonnull_operand,
handle_nonnull_attribute, handle_nothrow_attribute,
handle_sentinel_attribute, handle_type_generic_attribute,
handle_fnspec_attribute, handle_transaction_pure_attribute,
ignore_attribute): Moved common attribute handlers from d-bi-attrs.h.
(d_attribute_table): Renamed from d_common_attribute_table.
(d_format_attribute_table): Renamed from
(d_init_ts): Renamed from d_common_init_ts.
* (d_bi_init): Determine D frontend type for size_t.
* (ObjectFile::hasModule): Remove old compatibility
2012-10-08 Iain Buclaw <>
* (VectorExp::toElem): Handle non-constant array literals as
vector expressions.
2012-10-04 Iain Buclaw <>
* (VectorExp::toElem): Handle both array literal as well as
single element constructors for vector expressions.
2012-09-27 Iain Buclaw <>
* (convert): Remove assert.
2012-09-22 Iain Buclaw <>
* (IRState::maybeCompound): Use IRState::compound.
(IRState::maybeVoidCompound): Use IRState::voidCompound.
(IRState::call): Check TREE_SIDE_EFFECTS to determine order of
evaluation in function calls. Evaluate callee before arguments if has
side effects.
* (FuncDeclaration::toSymbol): Don't set any pure/nothrow
attributes if asserts are generated in code.
* d-incpath (add_fileimp_path): Fix ICE using -J option.
* (Obj::moduleinfo): Clean-up.
2012-09-18 Iain Buclaw <>
* (d_initialize_diagnostics): New function, disable unneeded
diagnostic options.
(d_handle_option): Remove OPT_fdebug_c.
* d-spec.c (lang_specific_driver): Remove OPT_fod_, OPT_fop.
* lang.opt: Remove -fdebug-c, -fod, and -fop compiler options.
2012-09-17 Iain Buclaw <>
* d-codegen.h (CtorEltMaker::cons): Adjust call to VEC_safe_push.
* (ObjectFile::stripVarDecl): Clean-up.
2012-09-16 Iain Buclaw <>
* (IRState::isCallByAlias): New function.
(IRState::call): Use IRState::isCallByAlias.
* (ObjectFile::setupSymbolStorage): Mark
force_static_public symbols as public.
* d-spec.c (lang_specific_driver): Update for GCC-4.8.
* lang.opt: Fix spelling of option -static-libphobos
* (IRState::maybeExpandSpecialCall): Do not handle inp*
and outp* port intrinsic functions.
(IRState::maybeSetUpBuiltin): Likewise.
(IRState::expandPortIntrinsic): Remove.
2012-09-10 Iain Buclaw <>
* (AggLayout::doFields): Propagate volatile out of type.
(AggLayout::addField): Likewise.
* (VarDeclaration::toSymbol): Likewise.
2012-09-06 Iain Buclaw <>
* d-codegen.h (IRState::vconvert): Don't use VIEW_CONVERT_EXPR.
* (TypeEnum::toCtype): Mark TYPE_PACKED if flag_short_enums.
(TypeClass::toCtype): Mark TREE_ADDRESSABLE to ensure class is always
passed in memory.
* d-tree.def (UNSIGNED_RSHIFT_EXPR): Define new tree expression.
(FLOAT_MOD_EXPR): Define new tree expression.
* (d_common_init_ts): New function.
(d_write_global_declarations): Call check_global_declarations after
(d_gimplify_expr): Handle UNSIGNED_RSHIFT_EXPR, IASM_EXPR.
* (IRState::arrayOpNotImplemented): New function.
(IRState::buildOp): New function.
(IRState::buildAssignOp): New function.
* (build_bool_binop): Remove function, mostly move to
(build_math_op): Remove function, mostly move to IRState::buildOp.
(build_assign_math_op): Remove function, mostly move to
(BinExp::toElemBin): Remove function.
(IdentityExp::toElem, EqualExp::toElem, CmpExp::toElem)
(AndAndExp::toElem, OrOrExp::toElem): Clean-up, use IRState::boolOp.
(XorExp::toElem, OrExp::toElem, AndExp::toElem, UshrExp::toElem)
(ShrExp::toElem, ShlExp::toElem, ModExp::toElem, DivExp::toElem)
(MulExp::toElem, MinExp::toElem, AddExp::toElem):Use
IRState::arrayOpNotImplemented, IRState::buildOp.
(XorAssignExp::toElem, OrAssignExp::toElem, AndAssignExp::toElem)
(UshrAssignExp::toElem, ShrAssignExp::toElem, ShlAssignExp::toElem)
(ModAssignExp::toElem, DivAssignExp::toElem, MulAssignExp::toElem)
(MinAssignExp::toElem, AddAssignExp::toElem): Use
IRState::arrayOpNotImplemented, IRState::buildAssignOp.
* (libcall_ids): Remove _adCmpChar.
(IRState::getLibCallDecl): Remove LIBCALL_ADCMPCHAR.
* (CmpExp::toElem): Don't call LIBCALL_ADCMPCHAR.
* lang.opt: Define Wcast-result.
* (IRState::convertTo): Warn about null result, but only
if -Wcast-result.
(IRState::hwi2toli): Move to header.
(IRState::realPart): Likewise.
(IRState::imagPart): Likewise.
(IRState::toElemLvalue): Clean-up tree args array.
(IRState::doArraySet): New function.
(IRState::arraySetExpr): New function.
* (EqualExp::toElem): Clean-up tree args array.
(CatAssignExp::toElem): Likewise.
(AssignExp::toElem): Likewise.
(DeleteExp::toElem): Likewise.
(NewExp::toElem): Use IRState::modify.
(ArrayLiteralExp::toElem): Don't call ARRAYLITERALTX library function
if assigning to static array.
(StructLiteralExp::toElem): Use IRState::arraySetExpr.
(do_array_set): Move to IRState::doArraySet.
(array_set_expr): Move to IRState::arraySetExpr.
* d-lang.h (D_TYPE_IMAGINARY_FLOAT): Define.
(d_convert_basic): Remove.
* d-builtins.c (d_init_builtins): Mark imaginary types as
* (gcc_type_to_d_type): Use convert.
* (IRState::emitLocalVar): Call pushdecl earlier so
catches CONST_DECLs.
(IRState::convertTo): Remove handling of conversions between
imaginary/real, imaginary/complex, complex/imaginary types, use
(IRState::convertForArgument): Use convert.
(IRState::arrayElemRef): Likewise.
(IRState::call): Likewise.
(IRState::libCall): Likewise.
(IRState::maybeExpandSpecialCall): Likewise.
* (d_convert_basic): Mark static.
(convert): Handle correct conversions between imaginary/real,
imaginary/complex, complex/imaginary types.
* (InExp::toElem): Use convert.
(BoolExp::toElem): Likewise.
(FuncDeclaration::buildClosure): Likewise.
* d-builtins.c (def_fn_type): Use build_varargs_function_type_array and
build_function_type_array to create built-in functions.
(d_init_builtins): Use lang_hooks.types.type_for_size.
* (d_gcc_magic_builtins_module): Use
* (IRState::pointerIntSum): Use
(IRState::call): Use lang_hooks.types.type_promotes_to.
(IRState::maybeExpandSpecialCall): Likewise.
* (build_math_op): Use lang_hooks.types.type_for_mode.
* (d_type_for_mode): Mark static.
(d_type_for_size): Likewise.
(d_type_promotes_to): Likewise.
2012-08-31 Iain Buclaw <>
* (FuncDeclaration::toObjFile): Flatten nested levels and
loops in function, delay printing function name in verbose mode until
we know the function is being compiled.
* (IRState::buildFrameForFunction): New function.
(IRState::buildChain): Use IRState::buildFrameForFunction to get the
frame record type.
(IRState::getFrameInfo): Likewise.
* (FuncDeclaration::buildClosure): Likewise.
2012-08-30 Iain Buclaw <>
* (ExtAsmStatement::toCBuffer): Mark unused parameter as
* (WrappedExp::toCBuffer): Likewise.
* (ObjectFile::setupSymbolStorage): Revert to previous
behaviour of setting symbol storage.
* (IRState::expandDecl): Use IRState::vinit.
(IRState::binding): Likewise.
(IRState::var): Handle all declarations, not just vars.
* (PtrExp::toElem): Simplify use of IRState::var.
(SymbolExp::toElem ): Likewise.
(ThisExp::toElem): Likewise.
* (d_init): Remove 'Thumb' identifier for ARM as 16bit
platforms aren't supported.
(GNU_LongDouble128): Remove identifier as long double size is
determined from type information.
* (TypeInfoDeclaration::toSymbol): Mark all typeinfo decls
as 'used'.
* (one_elem_array): Remove.
(CatExp::toElem): Inline use of one_elem_array, clean-up.
* (ObjectFile::setupSymbolStorage): Update to better
handle use of declarations marked with comdat, extern or static.
(ObjectFile::doSimpleFunction): Mark function as 'used'.
* (dt2node): Clean-up indentation.
* Fix issue with cross-compiler configuration.
2012-08-29 Iain Buclaw <>
* lang-specs.h: Remove special case for handled D source files.
* Remove special case for building gcc.o, use
GCC_EXTRA_LIBS to link against, rather than specific gcc object files.
(D_DRIVER_NAME): Remove use of variable.
(D_DRIVER_OBJS): Likewise.
(D_COMPILER_NAME): Likewise.
2012-08-23 Iain Buclaw <>
* (eval_builtin): Use builtin_decl_explicit.
* (IRState::emitLocalVar): Use warning.
(IRState::convertTo): Likewise.
(IRState::addressOf): Use IRState::markAddressable.
(IRState::markAddressable): New function.
(IRState::markUsed): New function.
(IRState::markRead): New function.
(IRState::maybeExpandSpecialCall): Use builtin_decl_explicit.
(IRState::floatMod): Likewise.
(IRState::exceptionObject): Likewise.
* (IdentityExp::toElem): Likewise.
(EqualExp::toElem): Likewise.
(PowExp::toElem): Likewise.
(AssignExp::toElem): Likewise.
(HaltExp::toElem): Likewise.
(ArrayLiteralExp::toElem): Likewise.
(FuncDeclaration::toObjFile): Likewise.
* (d_mark_addressable): Remove function.
(d_mark_exp_read): Remove function.
* d-lang.h (d_warning): Remove macro.
(d_built_in_decls): Remove macro.
* (Obj::includelib): Use warning.
(Obj::startaddress): Likewise.
2012-08-22 Iain Buclaw <>
* (binary): Moved function from frontend.
* (IRState::extractMethodCallExpr): Update for new C++ VEC
template in GCC.
* d-bi-attrs.h (parse_optimize_options): Likewise.
* d-dmd-gcc.h: Remove ifdef __cplusplus, use GCC_SAFE_DMD.
* d-gcc-includes.h: Remove ifdef __cplusplus.
* d-lang.h: Likewise.
* Remove CC and CFLAGS from Makefile, add build rule for
new texi man pages.
* gdc.texi: New documentation for GDC.
2012-08-18 Iain Buclaw <>
* (IRState::convertTo): Fix to allow conversion between
void* and associative arrays.
(IRState::convertForArgument): Use d_convert_basic.
(IRState::call): Don't use d_convert_basic, now handled by
* (real_t::real_t): Increase real type mode to be greater
than integer type size to prevent overflow in conversions.
* (CastExp::toElem): Don't get implicit AA type.
2012-08-17 Iain Buclaw <>
* dfrontend: Update to D frontend version 2.060
* (libcall_ids): New library functions.
(IRState::getLibCallDecl): Implement new library function signatures.
* d-codegen.h (LibCall::LIBCALL_NEWITEMT): New enum value.
(LibCall::LIBCALL_NEWITEMIT): Likewise.
* (FuncDeclaration::toSymbol): Small readability cleanup.
* (NewExp::toElem): Use new library functions.
(StructLiteralExp::toElem): Update for new frontend.
(ReturnStatement::toIR): Likewise.
* (add_import_path): New signature.
(add_fileimp_path): Likewise.
(add_import_paths): Pass split Strings to helper functions.
* (d_parse_file): Use Obj::init and Obj::term.
* (objmod): New variable.
(Obj::init): New function.
(Obj::term): Likewise.
(Obj::includelib): Likewise.
(Obj::startaddress): Likewise.
(Obj::allowZeroSize): Likewise.
(Obj::moduleinfo): Likewise.
(Obj::export_symbol): Likewise.
* symbol.h (Obj): New struct to allow object oriented interface to glue
code from frontend.
* (d_gcc_magic_stdarg_check): Add new va_arg magic
function that stores the next value through a passed parameter.
Remove workaround for inout signature as va_list is always passed by
reference to intrinsic templates.
(d_gcc_magic_module): Assign module directly to global IRState.
* (IRState::builtinsModule): Remove static declaration.
(IRState::intrinsicModule): Likewise.
(IRState::intrinsicCoreModule): Likewise.
(IRState::mathModule): Likewise.
(IRState::mathCoreModule): Likewise.
(IRState::cstdargTemplateDecl): Likewise.
(IRState::cstdargStartTemplateDecl): Likewise.
(IRState::varsInScope): Likewise.
(IRState::call): Use flag_split_darrays.
(IRState::maybeExpandSpecialCall): Clean-up va_start and va_arg
(IRState::maybeSetUpBuiltin): Handle new va_arg function.
* d-codegen.h (Intrinsic::INTRINSIC_VA_ARG): New enum definition.
(IRState::setBuiltinsModule): Remove.
(IRState::setIntrinsicModule): Likewise.
(IRState::setMathModule): Likewise.
(IRState::setCStdArg): Likewise.
* (CatExp::toElem): Use flag_split_darrays.
* (IRBase::startFunction): Set varsInScope.
* (d_init_options): Set modules that require special
(d_handle_option): Don't handle OPT_fsplit_dynamic_arrays.
* lang.opt: fsplit-dynamic-arrays mapped to variable
2012-08-16 Iain Buclaw <>
* (IdentityExp::toElem): Re-order precendence of type
checking. Treat static arrays as D arrays in identity comparisons.
(EqualExp::toElem): Use adEq2 over built-in memcmp for equality
comparisons for static and dynamic arrays.
(TypeStruct::toCtype): Remove old platform specific workaround.
* (bi_lib_list): New decl to hold list of GCC library
(d_bi_init): Add decls to bi_list_list if recognising built-ins.
(d_gcc_magic_builtins_module): Rename built-in type C long to
__builtin_clong, built-in type C ulong to __builtin_culong.
(d_gcc_magic_libbuiltins_check): New function to assign internal
symbol for built-in library functions.
(d_gcc_magic_libbuiltins_module): New function to scan modules that
contain GCC library built-ins.
(d_gcc_magic_module): Search all core.stdc modules for possible GCC
library built-ins.
* d-codegen.h (IRState::useBuiltins): Remove.
* (d_init_options): Don't set IRState::useBuiltins.
(d_handle_option): Likewise.
* lang.opt: Re-order D frontend compiler options.
* (IRState::buildChain): Override chainLink and chainFunc
for function if static chain is passed via hidden 'this' and no frame
is created.
(IRState::getFrameInfo): Pass static chain around nested functions in
the same way as closures for better performance.
* (libcall_ids): Re-order list in ascii collating order,
add new library routines to lookup, rename all non-vararg functions to
match DMD ABI implementation.
(LibCall): Re-order enum and rename values to match libcall_ids.
(IRState::toElemLvalue): Use new LibCall name.
(IRState::getLibCallDecl): Update to match current library signatures,
add implementation of new library routines.
(IRState::maybeSetLibCallDecl): New function to set internal symbol
for special D RT library functions.
* (FuncDeclaration::toSymbol): Use
* (InExp::toElem): Use new LibCall name.
(CatAssignExp::toElem): Likewise.
(IndexExp::toElem): Likewise.
(DeleteExp::toElem): Likewise.
(RemoveExp::toElem): Likewise.
(NewExp::toElem): Likewise.
(ArrayLiteralExp::toElem): Likewise.
(AssocArrayLiteralExp::toElem): Likewise.
(NullExp::toElem): Use IRState::convertTo.
* (needs_temp): Remove.
(IRState::makeTemp): New function.
(IRState::maybeMakeTemp): Re-implement to use isFreeOfSideEffects.
(IRState::isFreeOfSideEffects): Re-implement to allow better CSE.
(IRState::call): Use IRState::makeTemp.
* (gcc_type_to_d_type): Use d_convert_basic.
* (IRState::emitLocalVar): Use IRState::vinit.
(IRState::convertTo): New function for tree conversions.
(IRState::convertTo): Use IRState::convertTo.
(IRState::convertForCondition): Likewise.
(IRState::darrayVal): Likewise.
(IRState::pointerIntSum): Likewise.
(IRState::pointerOffsetOp): Likewise.
(IRState::pvoidOkay): Likewise.
(IRState::boundsCond): Likewise.
* (convert): New function to be called from C.
(d_build_truthvalue_op): Use d_convert_basic.
* (convert): Remove.
(build_bool_binop): Use IRState::convertTo.
(build_math_op): Likewise.
(CmpExp::toElem): Likewise.
(PowExp::toElem): Likewise.
(do_array_set): Likewise.
(AssignExp::toElem): Likewise.
(VectorExp::toElem): Likewise.
(NotExp::toElem): Likewise.
(CallExp::toElem): Likewise.
(SymbolExp::toElem): Likewise.
* (dt2tree_list_of_elems): Use d_convert_basic.
2012-07-26 Iain Buclaw <>
* (real_t::real_t): Use d_float64 for constructor.
(real_t::isConst0): Remove.
(real_t::isConst1): Likewise.
(real_t::isConst2): Likewise.
(real_t::isConstMinus1): Likewise.
(real_t::isConstHalf): Likewise.
* d-gcc-real.h (longdouble): New typedef for real_t.
(ldouble): New template for ldouble conversions.
(ld_sprint): New function for ldouble to string formatting.
* (IRState::hwi2toli): Handle maximum 64bit value case.
2012-07-18 Iain Buclaw <>
* (IRState::delegateVal): Remove ENABLE_CHECKING code.
(IRState::objectInstanceMethod): Remove special case to avoid calling
* (CommaExp::toElem): Likewise.
(DotTypeExp::toElem): Implement function.
(StructLiteralExp::toElem): Assert instead that basetype is a struct.
* (real_t::real_t): New overload for 'double' type.
(real_t::format): Change function type to int, return size of buffer
from function.
(real_t::formatHex): Likewise.
* (d_gcc_magic_stdarg_check): Update signature, remove
check for is_c_std_arg.
(d_gcc_magic_stdarg_module): Likewise.
(d_gcc_magic_module): Remove check for core.vararg.
(IRState::maybeSetUpBuiltin): Don't handle INTRINSIC_STD_VA_ARG.
2012-07-13 Iain Buclaw <>
* (Dsymbol::toSymbolX): Remove use of PRIuSIZE format macro.
(FuncDeclaration::toThunkSymbol): Likewise.
2012-07-12 Iain Buclaw <>
* d-lang.h (D_DECL_IS_CONTRACT): New macro.
* (FuncDeclaration::toSymbol): Mark in and out contracts as
(FuncDeclaration::toThunkSymbol): D thunks no longer private by
design. Alter mangling of thunk symbols to be unique across the entire
compilation unit.
* (ObjectFile::makeDeclOneOnly): Catch public contracts to
mark them as one-only.
(ObjectFile::outputThunk): Mark weakref thunks as private.
2012-07-10 Iain Buclaw <>
* Remove unused borrowed objects.
* (d_bi_builtin_func): Don't add builtin if
-fno-builtin was given.
* (IRState::emitTemplates): Remove static declaration.
(IRState::splitDynArrayVarArgs): Likewise.
(IRState::useInlineAsm): Likewise.
(IRState::useBuiltins): Likewise.
(d_gcc_force_templates): Update to use global gen.
* d-codegen.h (emitTemplates): Remove static attribute.
(splitDynArrayVarArgs): Likewise.
(useBuiltins): Likewise.
(useInlineAsm): Remove member.
(stdInc): Define new member.
* (std_inc): Remove global.
(add_import_paths): Update function signature.
* (d_init_options): Default splitDynArrayVarArgs to false.
(d_init): Update call to add_import_paths.
(d_handle_option): Remove OPT_fd_inline_asm, add
* lang.opt: Likewise.
2012-07-08 Iain Buclaw <>
* (d_gcc_type_align): Update function signature. Use
type align size to determine the known align size of a decl.
* d-dmd-gcc.h (d_gcc_type_align): Update function signature.
* symbol.h (Symbol): New member, Salignment.
* (Symbol::Symbol): Initialise Salignment.
* (VarDeclaration::toSymbol): Set Salignment if there is an
alignment in effect on the decl.
(AggregateDeclaration::toInitializer): Likewise.
* (ObjectFile::outputStaticSymbol): Set DECL_ALIGN if
Salignment was given for static decl.
2012-07-07 Iain Buclaw <>
* (d_gcc_magic_builtins_module): Add check for
DECL_ASSEMBLER_NAME_SET_P when testing for builtins that can be
markable as pure in the D frontend.
* (IRState::integerConstant): Hide use of
(IRState::hwi2toli): Likewise.
(IRState::getTargetSizeConst): Likewise.
* d-builtins.c (d_global_trees): Move declaration here.
(lookup_C_type_name): Rename to lookup_ctype_name.
(d_init_builtins): Move set-up of d_global_trees here.
(gcc_d_backend_init): Move function from and refactored.
(gcc_d_backend_term): Likewise.
* (d_bi_init): Set-up D frontend sizes here.
* (gcc_d_backend_init): Removed.
(gcc_d_backend_term): Likewise.
* (add_phobos_versyms): New function to scan
phobos-vers-syms file.
(register_import_chains): Renamed to add_import_paths.
* (d_init): Call add_phobos_versyms and add_import_paths.
(d_parse_int): Don't use strtol to get number from argument string.
* (maybe_fixup_phobos_target): Remove.
(register_import_chains): Remove use of maybe_fixup_phobos_target.
* (maybe_fixup_os_versym): Remove
(d_init): Remove use of maybe_fixup_os_versym.
* (saved_reg_names): Remove.
(d_init): Remove use of saved_reg_names.
(d_post_options): Likewise.
2012-07-05 Iain Buclaw <>
* (StructLiteralExp::toElem): Stop after first assignment for
constructors built for union types.
2012-07-01 Iain Buclaw <>
* symbol.h (deferredNestedFuncs): Renamed from otherNestedFuncs, use as
value type rather than pointer.
(thunks): Use as value type rather than pointer.
* (FuncDeclaration::toSymbol): Remove check for
deferredNestedFuncs being NULL.
(FuncDeclaration::toThunkSymbol): Remove check for thunks being NULL.
* (DelegateExp::toElem): Remove check for deferredNestedFuncs
being NULL.
(FuncDeclaration::toObjFile): Likewise.
* (ObjectFile::shouldEmit): Add nested functions to
deferredNestedFuncs of their parent function incase parent is actually
emitted later in during compilation.
* (d_gcc_type_align): Explicit alignment of variables
takes precedence over default alignment.
* d-gcc-includes.h: Re-order list of includes.
2012-06-26 Iain Buclaw <>
* (IRState::twoFieldType): Use rest_of_decl_compilation.
* d-gcc-includes.h: Remove last of poisoned backend headers.
* (FuncDeclaration::toObjFile): Use fprintf for diagnostic
message. Use rest_of_decl_compilation directly.
(SynchronizedStatement::toIR): Likewise.
(TypeFunction::toCtype): Remove old version1 macro.
* (d_parse_file): Remove dependency on backend header. Use
fprintf for diagnostic messages.
(nametype): Use rest_of_decl_compilation directly.
(d_handle_option): Remove version 1 option.
* dmd-script: Likewise.
* lang.opt: Likewise.
* (ObjectFile::outputStaticSymbol): Use
rest_of_decl_compilation directly.
(ObjectFile::declareType): Likewise.
(obj_moduleinfo): Likewise.
(obj_tlssections): Likewise.
(ObjectFile::outputThunk): Implement new method of thunk generation
for external symbols using weakref.
* d-objfile.h (rodc): Remove.
2012-06-25 Iain Buclaw <>
* d-builtins.c (d_init_builtins): Use build_tree_list to initialise
* (ArrayLiteralExp::toElem): Always generate code for
(TypeFunction::toCtype): Chain on void_list_node to the end of the
function type parameters. Fixes function signatures in debugging.
2012-06-23 Iain Buclaw <>
* (d_OBJS): Add so IN_GCC_FRONTEND is defined when
building gdc sources.
* d-builtins.c: Remove poisoned headers.
* Likewise.
* d-gcc-includes.h: GCC system headers included first, removed
internally defined macros and poisoned headers.
* d-gcc-tree.h: Use GCC system headers instead of defining tree_node.
* GCC system headers included first.
(pushdecl_top_level): Removed.
* Remove poisoned headers.
* gdc_alloca.h: Use liberty.h instead of handling include of alloca.
* (Dsymbol::toSymbolX): Use snprintf rather than sprintf.
(FuncDeclaration::toSymbol): Likewise.
* (real_t::init): Likewise.
* (Symbol::Symbol): Use NULL_TREE to initialise tree.
(symbol_calloc): Use xstrdup to copy string.
* Remove D language version 1 from build
(_GNU_SOURCE): Removed macro from build.
(ELFOBJ): Likewise.
* (ExtAsmStatement::semantic): Removed use of V2 macro.
* (d_gcc_builtin_va_list_d_type): Removed use of
(gcc_type_to_d_type): Likewise.
(d_gcc_magic_stdarg_check): Likewise.
(d_gcc_magic_builtins_module): Removed use of V2 macro, and V1
encapsulated code.
* (IRState::convertTo): Likewise.
(IRState::toDArray): Likewise.
(IRState::typesCompatible): Likewise.
(IRState::arrayBoundsCheck): Likewise.
(IRState::assertCall): Likewise.
(libcall_ids): Likewise.
(IRState::getLibCallDecl): Likewise.
(IRState::getFrameForSymbol): Likewise.
(IRState::isFuncNestedIn): Likewise.
(IRState::buildChain): Likewise.
(IRState::getFrameInfo): Likewise.
(IRState::getFrameRef): Likewise.
(IRState::functionNeedsChain): Likewise.
(IRState::startCond): Likewise.
(IRState::exitIfFalse): Likewise.
(IRState::startCase): Likewise.
(IRState::doCase): Likewise.
(IRState::endCase): Likewise.
* (VarDeclaration::toSymbol): Likewise
(FuncDeclaration::toSymbol): Likewise.
* (CondExp::toElem): Likewise.
(build_bool_binop): Likewise.
(EqualExp::toElem): Likewise.
(CmpExp::toElem): Likewise.
(AndAndExp::toElem): Likewise.
(OrOrExp::toElem): Likewise.
(AssignExp::toElem): Likewise.
(CastExp::toElem): Likewise.
(CallExp::toElem): Likewise.
(AssertExp::toElem): Likewise.
(AssocArrayLiteralExp::toElem): Likewise.
(StructLiteralExp::toElem): Likewise.
(FuncDeclaration::toObjFile): Likewise.
(Module::genobjfile): Likewise.
(TypeFunction::toCtype): Likewise.
(ThrowStatement::toIR): Likewise.
(TryCatchStatement::toIR): Likewise.
(ReturnStatement::toIR): Likewise.
(SwitchStatement::toIR): Likewise.
(IfStatement::toIR): Likewise.
(ForStatement::toIR): Likewise.
(ExpStatement::toIR): Likewise.
* (IRBase::startFunction): Likewise.
* (d_init_options_struct): Likewise.
(d_handle_option): Likewise.
(d_parse_file): Likewise.
2012-06-21 Iain Buclaw <>
* Remove d-asm-i386.h
* (d_build_asm_stmt): Update signature, use build5.
(getFrameRelativeValue): Remove.
(d_format_priv_asm_label): Likewise.
(d_have_inline_asm): Likewise.
(AsmProcessor): Likewise.
(AsmStatement::toIR): Update sorry message.
* (IRState::expandPortIntrinsic): Update call to
(IRState::doAsm): Likewise.
* (FuncDeclaration::toSymbol): Remove check for inline asm.
* (FuncDeclaration::toObjFile): Likewise.
(LabelStatement::toIR): Likewise.
* (VersionCondition::addPredefinedGlobalIdent): Remove D
Inline Asm version identifiers.
* d-lang.h (d_build_asm_stmt): Update signature.
2012-06-19 Iain Buclaw <>
* (FuncDeclaration::toSymbol): Mark in/out contracts as
TREE_PUBLIC to allow calling cross-module.
* (d_parse_file): Update for 2.059.
2012-06-16 Iain Buclaw <>
* dfrontend: Merged with DMD 2.059.
* (gcc_type_to_d_type): Use new frontend value.
* (IRState::getLibCallDecl): Fix return type of _aaDelp.
(IRState::getVThis): Use frontend provided member to determine if
function has nested references.
* (FuncDeclaration::toSymbol): Weakly pure functions don't
guarantee no vops.
* (max_float_mode): Remove.
(real_t::convert): Catch imaginary types in conversion.
* (EqualExp::toElem): Use memcmp for struct comparisons.
(CatAssignExp::toElem): Rework order of logic to allow appending
delegates to an array.
(DelegateExp::toElem): Implement handling of lambda functions.
(FuncExp::toElem): Ditto.
(AssocArrayLiteralExp::toElem): Implement handling of AssociativeArray
types sent to backend.
* (lmtab): Remove.
(cvtLocToloc_t): Update implementation.
(outdata): Now assert that we don't receive error nodes.
2012-06-05 Iain Buclaw <>
* (FuncDeclaration::toSymbol): Make better use of 'pure' and
'pure const' functions in GCC codegen.
* d-bi-attrs.h: Added TM_ATTR* masks.
(handle_tm_wrap_attribute, handle_tm_attribute, tm_attr_to_mask,
find_tm_attribute): New.
(struct d_common_attribute_table): Added transaction* attributes.
2012-06-04 Iain Buclaw <>
* (ObjectFile::outputThunk): Output thunks moved back to
the frontend, as backend does not emit them for DECL_EXTERNAL functions.
2012-05-29 Daniel Green <>
* Add GCC 4.8 to list of supported GCC versions. Patch
courtesy of Calrama
2012-05-29 Iain Buclaw <>
* (IRState::endCase): Remove parameter from function. Use
condition type as the SWITCH_EXPR type, rather than use of void.
* d-codegen.h (IRState::endCase): Update signature.
* (SwitchStatement::toIR): Update call to endCase.
2012-05-28 Daniel Green <>
* d-builtins.c (DEF_ATTR_STRING): Define and undefine along with other
* (d_write_global_declartions): Use
finalize_compilation_unit. GCC 2012-04-30
* (ObjectFile::outputThunk): Use
symtab_add_to_same_comdat_group. GCC 2012-04-30
* lang.opt: Match help strings for duplicated options.
2012-02-01 Iain Buclaw <>
* Remove -hg option.
* dfrontend/func.c (FuncDeclaration::semantic): Remove code adding
method to flat list.
(FuncDeclaration::semantic3): Re-add here.
2012-01-01 Iain Buclaw <>
* (IRState::buildChain): Don't do nrvo if the
variable is put in a closure.
* (FuncDeclaration::buildClosure): Ditto.
(ReturnStatement::toIR): Don't call postblit on nrvo returns.
(DtorExpStatement::toIR): Don't call destructor if var is returned as
the nrvo variable.
Copyright (C) 2012 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.