2014-03-31  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(error_mark_p): Removed function, replace uses with
	error_operand_p.
	(error_mark): Removed function, replace uses with error_mark_node.
	* d-ctype.cc(Type::toCtype): Return d_unknown_type_node for frontend
	error types.
	* d-objfile.cc(VarDeclaration::toObjFile): Don't build CONST_DECLs for
	non-scalar manifests.

2014-03-23  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(Dsymbol::toImport): Prevent GC from collecting
	IMPORTED_DECL nodes whilst front-end compilation in progress.

2014-03-19  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(AggLayout::visit): Rename to layout_aggregate_type.
	(AggLayout::doFields, AggLayout::doInterfaces): Remove function and
	move implementation into layout_aggregate_type.
	(AggLayout::addField): Rename to insert_aggregate_field.
	(AggLayout::finish): Rename to finish_aggregate_type.
	* d-codegen.h(AggLayout): Update definition.
	* d-ctype.cc(TypeStruct::toCtype): Update for glue changes.
	(TypeFunction::toCtype): Fix ICE on generic function types.
	(TypeClass::toCtype): Move generation of vptr and monitor fields into
	layout_aggregate_type.  Moved generation of TYPE_METHODS from ...
	* d-objfile.cc(FuncDeclaration::toObjFile): ... here into
	TypeClass::toCtype.  Don't build up TYPE_METHODS on a per-function
	basis, generate the entire vtable.

2014-03-18  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(Dsymbol::toSymbolX): Set the symbol prettyIdent.
	(Dsymbol::toImport): Emit packages as their fully qualified names.
	(ClassDeclaration::toSymbol): Distinguish between the classinfo
	assembler and decl name.
	(InterfaceDeclaration::toSymbol): Likewise for interface symbol.
	(Module::toSymbol): Likewise for moduleinfo symbol.
	(ClassDeclaration::toVtblSymbol): Likewise for class vtable symbol.
	(AggregateDeclaration::toInitializer)
	(TypedefDeclaration::toInitializer, EnumDeclaration::toInitializer):
	Likewise for default initialisers.
	* d-objfile.cc(Module::genobjfile): Don't set-up moduleinfo symbol
	storage twice.

2014-03-17  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(d_decl_context): Fix null pointer dereference.
	* d-objfile.cc(FuncDeclaration::toObjFile): Don't override the setting
	of DECL_CONTEXT on the declaration here.
	(d_finish_symbol): Likewise.
	* d-objfile.cc(VarDeclaration::toObjFile): Move the generation of
	manifest constants to ...
	* d-decls.cc(VarDeclaration::toSymbol): ... here, and emit them as
	CONST_DECLs.  Set the DECL_CONTEXT for all variable symbols.

	* d-builtins.cc(d_gcc_magic_builtins_module): Don't store compiler
	generated builtins in Symbol::isym, use Symbol::csym instead.
	(d_gcc_magic_libbuiltins_check): Likewise.
	* d-codegen.cc(d_decl_context): Return the imported symbol tree of
	modules where the NAMESPACE_DECL is now stored.
	(d_build_module): Remove function.  Move implementation to ...
	* d-decls.cc(Dsymbol::toImport): ... here.  Build an IMPORTED_DECL for
	all imported declarations.
	(FuncDeclaration::toSymbol): Remove special handling of Symbol::isym.
	(Module::toSymbol): Remove call to d_build_module.
	* d-objfile.cc(Dsymbol::toObjFile): Handle emission of IMPORTED_DECL
	symbols to debug.

2014-03-16  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(build_attributes): Ensure D-specific attributes have
	their value interpreted through CTFE.

2014-02-21  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(d_build_module): Update signature to accept a Loc
	location to the module declaration.
	* d-decls.cc(Module::toSymbol): Update call to d_build_module.
	Set TREE_PUBLIC/DECL_EXTERNAL to distingush which modules are being
	compiled.
	* d-objfile.cc(Dsymbol::toObjFile): Handle Import symbols, and emit
	debug information for imported modules.
	(ImportStatement::toIR): Likewise.
	(set_input_location): New function to implement the equivalent of
	set_decl_location, but instead sets input_location.

2014-02-19  Johannes Pfau  <johannespfau@gmail.com>

	* d-objfile.cc(build_call_function): Call set_input_location
	to set debug info correctly

2014-02-18  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-objfile.cc(VarDeclaration::toObjFile): Remove toplevel check.
	DECL_CONTEXT is never set on manifest constants.
	(d_finish_compilation): Remove fancy check on force outputting
	symbols to object file.
	(build_type_decl): Don't emit the qualified identifier in debug
	information.  The fully qualified name is now determined through the
	NAMESPACE_DECL context chain.
	* d-ctype.cc(TypeEnum::toCtype): Likewise for enum members.
	(VarDeclaration::toSymbol): Likewise for static variables.
	(FuncDeclaration::toSymbol): Likewise for functions.

	* d-decls.cc(FuncDeclaration::toSymbol): Don't emit the 'D main'
	symbol to debug as plain 'main'.
	* d-objfile.cc(VarDeclaration::toObjFile): Don't emit the qualified
	identifier of manifest constants in debug information.

2014-02-17  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(d_build_module): New function.
	* d-decls.cc(Module::toSymbol): Use d_build_module to build up the
	qualified module namespace.

	* d-codegen.cc(expand_intrinsic_op, expand_intrinsic_op2): New
	functions to build a call to a builtin code.
	(expand_intrinsic_bsr, expand_intrinsic_bt): New functions to expand a
	BUILTIN_FRONTEND call to core.bitop intrinsics.
	(expand_intrinsic_vaarg, expand_intrinsic_vastart): New functions to
	expand a BUILTIN_FRONTEND call to core.vararg intrinsics.
	(maybe_expand_builtin): Update.

2014-02-16  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(Module::toSymbol): Build a NAMESPACE_DECL to populate the
	DECL_CONTEXT of toplevel functions.
	* d-codegen.cc(d_decl_context): Return the enclosing module
	NAMESPACE_DECL as the decl context only when the symbol is extern(D)
	and not D main.

2014-02-15  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(VarDeclaration::toSymbol): Don't call
	setup_symbol_storage until after SET_DECL_ASSEMBLER_NAME has been set.

	* d-decls.cc(VarDeclaration::toSymbol): Give prettyIdent precedence
	for the DECL_NAME over the simple identifier.
	(FuncDeclaration::toSymbol): Likewise.
	* d-objfile.cc(d_finish_symbol): Remove setting DECL_NAME as
	prettyIdent, this has already been done in Declaration::toSymbol.
	(d_finish_function): Likewise.

	* d-decls.cc(VarDeclaration::toSymbol): Call set_user_assembler_name
	if pragma(mangle) was seen.
	(FuncDeclaration::toSymbol): Likewise.

2014-02-12  Johannes Pfau  <johannespfau@gmail.com>

	* d-decls.cc(FuncDeclaration::toSymbol): Do not set TREE_NOTHROW on
	nothrow functions.
	* d-decls.cc(TypeInfoDeclaration::toSymbol): Call relayout_decl after
	changing the type.

2014-02-03  Iain Buclaw  <ibuclaw@gdcproject.org>


	* d-codegen.cc(d_build_call): Remove special handling of
	flag_split_darrays switch.
	(maybe_expand_builtin): Likewise.
	* d-elem.cc(CatExp::toElem): Likewise.
	* lang.opt(fsplit-dynamic-arrays): Remove.

2014-02-02  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-glue.cc(readFile, writeFile, ensurePathToNameExists): Define.
	* d-incpath.cc(add_import_path): Update for frontend changes.
	(add_fileimp_path): Likewise.
	* d-lang.cc(deps_write): Likewise.
	(d_parse_file): Likewise.
	* d-todt.cc(Dts): Update define for frontend changes.
	* d-decls.cc(ClassDeclaration::toVtblSymbol): Don't mark __vtbl
	symbols as virtual.  They are global static symbols.

2014-01-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(EnumDeclaration::toDebug): Build TYPE_DECL only for
	enumeral types.

2014-01-06  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-ctype.cc(TypeClass::toCtype): Don't add __monitor field for
	extern(C++) classes.

	* d-builtins.c(d_gcc_magic_module): Remove tdata.
	* d-codegen.cc(build_interface_binfo): Likewise.
	* d-ctype.cc(TypeEnum::toCtype): Likewise.
	(TypeClass::toCtype): Likewise.
	* d-lang.cc(deps_write): Likewise.

2014-01-05  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-ctype.cc(TypeEnum::toCtype): Don't push CONST_DECLs into current
	function.
	* d-decls.cc(FuncDeclaration::toThunkSymbol): Don't mark symbol as
	TREE_PRIVATE, just TREE_PUBLIC as false.
	(StructLiteralExp::toSymbol): Likewise.
	(ClassReferenceExp::toSymbol): Likewise.
	* d-objfile.cc(d_comdat_linkage): Likewise.
	(d_finish_symbol): Likewise.
	(build_moduleinfo): Likewise.

	* config-lang.in: Add d-lang.cc to gtfiles.
	* d-irstate.h(IRState::varsInScope): Change from Array to vec<> type.
	(IRState::statementList_): Likewise.
	(IRState::scopes_): Likewise.
	(IRState::loops_): Likewise.
	(IRState::labels_): Likewise.
	* d-lang.h(d_bi_builtin_func): Remove declaration.
	(d_bi_builtin_type): Likewise.
	(d_keep_list): Likewise.
	* d-objfile.h(Symbol::thunks): Change from Array to vec<> type.
	(ModuleInfo::classes): Likewise.
	(ModuleInfo::ctors): Likewise.
	(ModuleInfo::dtors): Likewise.
	(ModuleInfo::ctorgates): Likewise.
	(ModuleInfo::sharedctors): Likewise.
	(ModuleInfo::shareddtors): Likewise.
	(ModuleInfo::sharedctorgates): Likewise.
	(ModuleInfo::unitTests): Likewise.
	(build_simple_function): Remove declaration.
	(build_call_function): Likewise.
	(build_ctor_function): Likewise.
	(build_dtor_function): Likewise.
	(build_unittest_function): Likewise.
	* d-builtins.c(bi_fn_list): Rename to gcc_builtins_functions.
	(bi_lib_list): Rename to gcc_builtins_libfuncs.
	(bi_type_list): Rename to gcc_builtins_types.
	(builtin_converted_types): Remove.
	(builtin_converted_decls): Change from Array to vec<> type.
	(gcc_type_to_d_type): Update.
	(d_bi_builtin_func): Remove and move to d_builtin_function.
	(d_bi_builtin_type): Remove and move to d_register_builtin_type.
	(d_gcc_magic_builtins_module): Update.
	* d-ctype.cc(TypeClass::toCtype): Remove unused var.
	* d-decls.cc(FuncDeclaration::toThunkSymbol): Update for change to
	vec<> type.
	* d-elem.cc(CatExp::toElem): Change stashed vars from Array to vec<>.
	(Expression::toElemDtor): Update for change to vec<> type.
	* d-irstate.cc(IRState::startFunction): Likewise.
	(IRState::endFunction): Likewise.
	(IRState::addExp): Likewise.
	(IRState::pushStatementList): Likewise.
	(IRState::popStatementList): Likewise.
	(IRState::getLabelBlock): Likewise.
	(IRState::getLoopForLabel): Likewise.
	(IRState::beginFlow): Likewise.
	(IRState::endFlow): Likewise.
	(IRState::startScope): Likewise.
	(IRState::pushLabel): Likewise.
	(IRState::checkGoto): Likewise.
	(IRState::checkPreviousGoto): Change from Array to Blocks type.
	* d-lang.cc(global_declarations): Change from Array to vec<> type.
	(d_add_global_declaration): Update for change to vec<> type.
	(d_write_global_declarations): Likewise.
	(d_keep_list): Make static to source file.
	* d-objfile.cc(static_ctor_list): Change from Array to vec<> type.
	(static_dtor_list): Likewise.
	(Module::genobjfile): Update for change to vec<> type.
	(d_finish_module): Likewise.
	(d_finish_function): Likewise.
	(deferred_thunks): Change from ArrayBase<> to vec<> type.
	(write_deferred_thunks): Update for change to vec<> type.
	(use_thunk): Likewise.
	(build_simple_function): Make static to source file.
	(build_call_function): Likewise.
	(build_ctor_function): Likewise.
	(build_dtor_function): Likewise.
	(build_unittest_function): Likewise.

2014-01-02  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-objfile.cc(setup_symbol_storage): Use output_module_p on template
	instantiating module to determine if symbol is externally compiled.
	(d_finish_function): Set function local if function body was compiled.
	* d-decls.cc(Dsymbol::toSymbolX): Use unsigned integer format for the
	prefix string length.

