2013-06-01  Johannes Pfau  <johannespfau@gmail.com>

	* d-codegen.cc(maybe_set_builtin_frontend): Check parameter and
	return types of intrinsics.

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

	* d-codegen.cc(IRState::var): Handle variables used for NRVO.
	* d-ir.cc(ReturnStatement::toIR): Return result decl directly if NRVO.
	* d-objfile.cc(Symbol::SnamedResult): New member to hold the named
	RESULT_DECL of the function.
	(FuncDeclaration::toObjFile): Set-up function for NRVO.
	(build_tlssections): Align _tlsstart and _tlsend symbols to target
	address size.
	* d-ctype(TypeFunction::toSymbol): Mark functions returning non-POD
	structs as TREE_ADDRESSABLE to force return in memory.
	* d-decls.cc(FuncDeclaration::toSymbol): Propagate TREE_ADDRESSABLE
	from the original function type.

2013-05-29  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-target.cc: New source file to handle Target structure.

	* d-builtins.c(d_bi_init): Remove function.
	(d_gcc_type_align): Move to Target::alignsize.
	(d_gcc_field_align): Move to Target::fieldalign.
	(d_init_builtins): Build va_list type for D frontend.
	* d-lang.cc(d_init): Use isLP64 to determine LP64 targets.
	(d_add_builtin_version): Set is64bit if target is X86_64.
	* d-codegen.cc(convert_for_assignment): Use memset to implement front
	end code (struct = 0) here, rather than build an empty constructor.
	* d-elem.cc(AssignExp::toElem): Remove handling of (struct = 0) and
	call convert_for_assignment.

2013-05-28  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-gcc-complex_t.h: Rename to complex_t.h.
	* d-gcc-real.cc: Rename to d-longdouble.cc.
	* d-gcc-real.h: Rename to longdouble.h
	* d-port.cc: New source file to handle Port structure.
	* gdc_alloca.h: Remove source.

	* d-longdouble.cc(real_t): Rename to longdouble.
	(longdouble::getnan): Move to Port::nan.
	(longdouble::getsnan): Move to Port::snan.
	(longdouble::getinfinity): Move to Port::infinity.
	(longdouble::isInf): Move to Port::isInfinite.
	(longdouble::isNan): Move to Port::isNan.
	(longdouble::isSignallingNan): Move to Port::isSignallingNan.
	* d-builtins.c(gcc_d_backend_init): Rename to d_backend_init.
	(gcc_d_backend_term): Rename to d_backend_term.
	(gcc_type_to_d_type): Don't map 128bit integers to D front end.

	* d-elem.cc(AssignExp::toElem): Remove handling of fillHoles, use
	memset to implement (struct = 0).
	(StructLiteralExp::toElem): Handle fillHoles here, creating a
	temporary var that is zero init'd with memset and returned.

2013-05-27  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::localVar): Rename to build_local_var.
	(IRState::exprVar): Rename to create_temporary_var.
	(IRState::maybeExprvar): Rename to maybe_temporary_var.
	(IRState::pointerIntSum): Rename to build_array_index.
	* d-lang.cc(d_handle_target_attribute): New function to handle D
	target attributes.

2013-05-26  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-incpath.cc(prefixed_path): Add cpp_GCC_INCLUDE_DIR back in as
	second method for relocation.
	* d-elem.cc(IndexExp::toElem): Fix call to _aaGetX as from
	IRState::toElemLvalue.
	* d-codegen.cc(IRState::toElemLvalue): Remove function.
	(IRState::convertForAssignment): Rename to convert_for_assignment.
	(IRState::convertForCondition): Rename to convert_for_condition.
	(IRState::checkedIndex): Rename to d_checked_index.
	(IRState::boundsCond): Rename to d_bounds_condition.
	(IRState::arrayBoundsCheck): Rename to array_bounds_check.
	(IRState::assertCall): Rename to d_assert_call.
	(IRState::doLineNote): Move to irstate.h.
	* d-irstate.cc(IRBase::getLocalContext): Remove function.
	* d-decls.cc(VarDeclaration::toSymbol): Build decl lang specific for
	decl to point back to D front end type.
	(FuncDeclaration::toSymbol): Likewise.

2013-05-23  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(AggLayout::finish): Unset TYPE_SIZE before
	re-calculating.
	* d-ctype.cc(TypeStruct::toCtype): Don't call decl_attribute on the
	type twice.

2013-05-21  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-lang.cc(d_gcc_dump_source): Remove function.
	(d_post_options): Set flag_excess_precision_cmd as standard.
	* d-gcc-real.cc(real_t::convert): Remove function.
	(real_t::floatCompare): Remove function.
	(real_t::operator): Always perform floating point compilation at the
	precision of the target real mode.
	* d-todt.cc(dt_last): Remove function.
	(dtlist_to_tree): Rename to dtvector_to_tree.
	(dt_cons): Replace TREE_CHAIN implementation for use of CONSTRUCTOR.
	(dt_chainon): Likewise.
	(dt_container): Likewise.
	(dt_container2): Likewise.
	(StructInitializer::toDt): Likewise.
	(StructLiteralExp::toDt): Likewise.

2013-05-17  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::convertTo): Replace with d_convert and
	convert_expr.
	(IRState::declContext): Replace with d_decl_context.
	(IRState::functionNeedsChain): Replace with needs_static_chain.
	(IRState::label): Replace with d_build_label.
	(IRState::emitTemplates): Move to ObjectFile.
	(functionDegenerateClosure): Replace with is_degenerate_closure.
	(get_object_method): Assert that function is a method.
	(IRState::startCond): Move to IRBase.
	(IRState::startElse): Likewise.
	(IRState::endCond): Likewise.
	(IRState::startLoop): Likewise.
	(IRState::continueHere): Likewise.
	(IRState::setContinueLabel): Likewise.
	(IRState::exitIfFalse): Likewise.
	(IRState::endLoop): Likewise.
	(IRState::startCase): Likewise.
	(IRState::doCase): Likewise.
	(IRState::endCase): Likewise.
	(IRState::continueLoop): Likewise.
	(IRState::exitLoop): Likewise.
	(IRState::startTry): Likewise.
	(IRState::startCatches): Likewise.
	(IRState::startCatch): Likewise.
	(IRState::endCatch): Likewise.
	(IRState::endCatches): Likewise.
	(IRState::startFinally): Likewise.
	(IRState::endFinally): Likewise.
	(IRState::doReturn): Likewise.
	(IRState::doJump): Likewise.
	(IRState::pushLabel): Likewise.
	(IRState::checkSwitchCase): Likewise.
	(IRState::checkGoto): Likewise.
	(IRState::checkPreviousGoto): Likewise.

	* d-elem.cc(CatAssignExp::toElem): Call postblit on appending array of
	structs if required.

2013-05-16  Johannes Pfau  <johannespfau@gmail.com>

	* d-incpath.cc(prefixed_path): use cpp_PREFIX instead of
	cpp_GCC_INCLUDE_DIR for relocation.

2013-05-16  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::convertForAssignment): Remove use of
	CtorEltMaker wrapper for vec<constructor_elt, va_gc>.
	(d_array_value): Likewise.
	(build_delegate_cst): Likewise.
	(extract_from_method_call): Likewise.
	* d-elem.cc(NewExp::toElem): Likewise.
	(ArrayLiteralExp::toElem): Likewise.
	(AssocArrayLiteralExp::toElem): Likewise.
	(StructLiteralExp::toElem): Likewise.
	(NullExp::toElem): Likewise.
	(VectorExp::toElem): Likewise.
	* d-objfile.cc(build_moduleinfo): Likewise.
	* d-todt.cc(dt_container): Likewise.
	(dt_container2): Likewise.

	* d-asmstmt.cc(ExtAsmStatement::toIR): Remove use of ListMaker
	wrapper for tree chaining.
	* d-builtins.c(d_bi_builtin_func): Likewise.
	(d_bi_builtin_type): Likewise.
	(d_gcc_magic_builtins_module): Likewise.
	(d_gcc_magic_libbuiltins_module): Likewise.
	* d-codegen.cc(build_attributes): Likewise.
	(IRState::call): Likewise.
	(IRState::buildFrameForFunction): Likewise.
	(AggLayout::doFields): Likewise.
	(AggLayout::addField): Likewise.
	* d-ctype.cc(TypeEnum::toCtype): Likewise.
	(TypeFunction::toCtype): Likewise.
	* d-todt.cc(dt_container2): Likewise.

	* d-codegen.cc(IRState::getFrameInfo): Replace with get_frameinfo.
	(IRState::buildFrameForFunction): Replace with build_frame_type.
	(IRState::isClassNestedInFunction): Replace with d_nested_class.
	(IRState::isStructNestedInFunction): Replace with d_nested_struct.
	(IRState::getFrameForFunction): Fold into IRState::getFrameForSymbol.
	(IRState::getFrameForNestedClass): Likewise.
	(IRState::getFrameForNestedStruct): Likewise.

2013-05-15  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::buildFrameForFunction): Also copy the
	parameters of functions with 'in' contracts to a local frame decl.
	* d-lang.cc(d_handle_flatten_attribute): New function to handle D
	flatten attributes.

2013-05-14  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::chainLink): Remove function.
	(IRState::chainFunc): Remove function.
	(IRState::sthis): New member which holds the chain of function.
	(IRState::buildChain): Update to use new static chain decl.
	(IRState::getFrameInfo): Likewise.
	* d-objfile.cc(FuncDeclaration::buildClosure): Likewise.
	(FuncDeclaration::toObjFile): Default the function static chain decl
	to null unless vthis is given for the function.

2013-05-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-lang.cc(d_handle_noinline_attribute): New function to handle D
	noinline attributes.
	(d_handle_forceinline_attribute): New function to handle D forceinline
	attributes.
	* d-elem.cc(StructLiteralExp::toElem): Return the struct initialiser
	symbol directly if the tree has already been built.
	* d-decls.cc(Dsymbol::toSymbolX): Constify the mangling name to use.

2013-05-10  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-typinf.cc: New file containing type info routines originally in
	the D Front End.

	* d-todt.cc(dt_last): New helper function to retrieve last node in a
	dt_t tree list.
	(dt_cons): New helper function to append nodes to the end of a list.
	(dt_chainon): New helper function to concatenate two lists together.
	(dt_container): New helper function to build a ctor from a list.
	(build_vptr_monitor): New helper function to generate the class
	vtable, and put out __vptr and __monitor.
	symbol default values in a class declaration.
	(dtlist_to_tree): New helper function to convert a dt_t list into a
	constructor tree.
	(Type::toDt): Implement routines for new dt_t format.
	(TypeInfoDeclaration::toDt): Likewise.
	(Initializer::toDt): Likewise.
	(Expression::toDt): Likewise.
	(Declaration::toDt): Likewise.

	* d-objfile.cc(Dsymbol::toObjFile): Update for new dt_t format.
	(Module::genmoduleinfo): Likewise.
	(Symbol::Symbol): Moved from symbol.cc
	(Obj::objmod): Remove abstraction layer.
	(Obj::moduleinfo): Renamed to build_moduleinfo.
	(obj_tlssections): Renamed to build_tlssections.
	(outdata): Renamed to d_finish_symbol.
	(check_static_sym): Moved into d_finish_symbol.

	* d-codegen.cc(d_gcc_emit_local_variable): Remove.

	* d-decls.cc(Dsymbol::toSymbolX): Update to not call symbol_calloc.
	(FuncDeclaration::toThunkSymbol): Likewise.
	(ClassDeclaration::toSymbol): Build type as d_unknown_type_node.
	(InterfaceDeclaration::toSymbol): Likewise.
	(Module::toSymbol): Likewise.
	(ClassDeclaration::toVtblSymbol): Update call to toSymbolX.
	(AggregateDeclaration::toInitializer): Likewise.
	(TypedefDeclaration::toInitializer): Likewise.
	(EnumDeclaration::toInitializer): Likewise.

	* d-ir.cc(CaseStatement::toIR): Don't call static_sym.

	* d-lang.cc(rtlsym): Remove symbol.
	(D_DECL_READONLY_STATIC): Remove macro.
	(d_unknown_type_node): New LANG_TYPE node for marking TypeInfo_Class,
	Interface, and ModuleInfo types that are of a variable size determined
	at compile time.

	* d-elem.cc(StringExp::toElem): Clean up for new dt_t format.

	* symbol.cc: Remove file.

2013-05-08  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::getFrameInfo): Don't create a frame/closure
	for member functions, only required for nested.
	* d-elem.cc(Expression::toElemDtor): Call dtors in the correct order.
	(DeclarationExp::toElem): Don't call dtor on static, manifest, or
	extern symbols upon declaration.
	(AssignExp::toElem): Only call postblit on lvalues in assignment.
	(ArrayLiteralExp::toElem): Always generate literals on heap.

2013-05-06  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-elem.cc(StructLiteralExp::toElem): Return the default initialiser
	symbol if one exists.
	* d-builtins.c(d_gcc_magic_libbuiltins_check): Override the function
	type with the correct built-in function type as defined in backend.

2013-04-15  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-elem.cc(IdentityExp::toElem): Remove special handling of class,
	reference and array types.

2013-04-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(maybe_make_temp): Save call expressions so aren't
	evaluated more than once.
	(d_has_side_effects): Remove check for exceptional class types.

2013-04-10  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(FuncDeclaration::toSymbol): Harden logic for marking
	functions pure as in 'has no side effects'.

2013-04-07  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(FuncDeclaration::toSymbol): Push deferred functions to
	FuncDeclaration::deferred.
	* d-elem.cc(DelegateExp::toElem): Likewise.
	(FuncExp::toElem): Likewise.
	* d-objfile.cc(ObjectFile::shouldEmit): Likewise.
	(FuncDeclaration::toObjFile): Process all deferred functions in
	FuncDeclaration::deferred.
	* symbol.cc(Symbol::deferredNestedFuncs): Remove.

2013-04-05  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-elem.cc(FuncExp::toElem): Defer function literals and lambdas
	until parent function has finished processing.

2013-04-04  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::buildChain): Use __frame decl directly when
	setting up the function frame.
	(maybe_set_builtin_frontend): Exit early if symbol has no parent.
	* d-decls.cc(FuncDeclaration::toSymbol): Defer all nested functions,
	not just templated instances.
	* d-objfile.cc(FuncDeclaration::toObjFile): Delay processed deferred
	nested functions until function has finished being generated.
	(ObjectFile::shouldEmit): Don't emit nested functions if the parent
	function hasn't finished processing.

2013-04-03  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(maybe_set_builtin_frontend): Merged from
	maybe_set_builtin and maybe_set_libcall.
	* d-decls.cc(FuncDeclaration::toSymbol): Use
	maybe_set_builtin_frontend.

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

	* d-lang.cc(d_init_options): Default module info emission to on.
	(d_handle_option): New femit-moduleinfo switch.
	* d-objfile.cc(Module::genobjfile): Don't emit module if disabled
	explicitly.
	* d-builtins(is_intrinsic_module_p): New function to test whether
	module is core.bitops.
	(is_math_module_p): New function to test whether module is std.math or
	core.stdc.math.
	(is_builtin_va_arg_p): New function to test whether symbol is
	specially handled va_arg template.
	(is_builtin_va_start_p): New function to test whether symbol is
	specially handled va_start template.
	* d-codegen.cc(IRState::binding): Replace with bind_expr.
	(IRState::mathModule): Replace with std_math_module.
	(IRState::mathCoreModule): Replace with core_math_module.
	(IRState::intrinsicModule): Replace with std_intrinsic_module.
	(IRState::cstdargTemplateDecl): Replace with va_arg_template.
	(IRState::stdargTemplateDecl): Replace with va_arg2_template.
	(IRState::cstdargStartTemplateDecl): Replace with va_start_template.
	(IRState::getLibCallDecl): Replace with get_libcall.
	(IRState::maybeSetLibCallDecl): Replace with maybe_set_libcall.
	(IRState::libCall): Replace with build_libcall.
	(IRState::maybeSetUpBuiltin): Replace with maybe_set_builtin.
	(IRState::Intrinsic): Move enum out of IRState.

2013-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::darrayPtrRef): Replace with d_array_ptr.
	(IRState::darrayLenRef): Replace with d_array_length.
	(IRState::darrayVal): Replace with d_array_value.
	(IRState::darrayString): Replace with d_array_string.
	(IRState::arrayLength): Replace with get_array_length.
	(get_object_method): Remove dependancy on irs parameter.
	* d-lang.cc(d_init): Use static bool std_inc to determine whether to
	include standard module paths.
	(d_post_options): Canonicalize the input filename.
	(d_parse_file): Correctly catch cases where input file is stdin.

2013-03-27  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::getFrameInfo) Create a custom static chain for
	all nested functions.
	* d-gcc-includes.h: Rename to d-system.h

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

	* d-builtins.c(d_bi_init): Set REALPAD to be TYPE_PRECISION of
	long_double_type_node.
	* d-codegen.cc(IRState::twoFieldType): Replace with
	build_two_field_type.
	(IRState::arrayOpNotImplemented): Replace with unhandled_arrayop_p.
	(IRState::delegateMethodRef): Replace with delegate_method.
	(IRState::delegateObjectRef): Replace with delegate_object.
	(IRState::delegateVal): Replace with build_delegate_cst.
	(IRState::methodCallExpr): Replace with build_method_call.
	(IRState::extractMethodCallExpr): Replace with
	extract_from_method_call.
	(IRState::objectInstanceMethod): Replace with get_object_method.
	(IRState::twoFieldCtor): Remove.
	(IRState::call): Assert that if calling a normal FUNCTION_TYPE,
	'object' is not set.
	* d-ctype.cc(TypeDelegate::toCtype): Build a METHOD_TYPE for the .func
	field type in delegates.
	* d-lang.h(D_IS_METHOD_CALL_EXPR): Rename to D_METHOD_CALL_EXPR.
	* d-objfile.cc(FuncDeclaration::toObjFile): Remove assert for chain
	function.

2013-03-20  Johannes Pfau  <johannespfau@gmail.com>

	* d-codegen.cc(IRState::objectInstanceMethod): Recursively check
	for TOKsuper / TOKdottype. Do not ignore CastExp.
	* d-elem.cc(IdentityExp::toElem): Ignore padding in bitwise floating
	point comparisons.
	* testsuite: Cleanup. Remove invalid tests, adjust tests, etc. 

2013-03-20  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::objectInstanceMethod): Get function pointer
	off function TREE_TYPE.
	(build_deref): Handle cases where expression to dereference is an
	address expression.
	(modify_expr): New function overload to set return type directly.
	* d-elem.cc(CatAssignExp::toElem): Use new modify_expr.
	(AssignExp::toElem): Likewise.
	* d-decls.cc(FuncDeclaration::toSymbol): Don't build a method type for
	nested functions / delegates.  Just add on the hidden 'this' pointer
	containing the custom static chain/closure object.

	* d-codegen.cc(GlobalValues): Replace with current_module,
	current_irs, object_file.
	(IRState::getFuncType): Replace with get_function_type.
	(IRState::isCallByAlias): Replace with call_by_alias_p.
	(IRState::isFuncType): Replace with function_type_p.
	(IRState::doExp): Remove.

	* d-asmstmt.cc(ExtAsmStatement::syntaxCopy): Use arraySyntaxCopy to
	copy front end expressions.

	* d-codegen.cc(AssignExp::toElem): Call _d_arrayassign / _d_arrayctor
	when assigning arrays of structs.

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

	* d-codegen.cc(IRState::realPart): Replace with real_part.
	(IRState::imagPart): Replace with imaginary_part.
	(IRState::integerConstant): Replace with build_integer_cst.
	(IRState::floatConstant): Replace with build_float_cst.
	(IRState::hwi2toli): Replace with cst_to_hwi.
	(IRState::addressOf): Replace with build_address.
	(IRState::markAddressable): Replace with d_mark_addressable.
	(IRState::markUsed): Replace with d_mark_used.
	(IRState::markRead): Replace with d_mark_read.
	(IRState::indirect): Replace with indirect_ref.
	(IRState::pvoidOkay): Replace with void_okay_p.
	(IRState::maybeCompound): Replace with maybe_compound_expr.
	(IRState::maybeVoidCompound): Replace with maybe_vcompound_expr.
	(IRState::isErrorMark): Replace with error_mark_p.
	(IRState::getTargetSizeConst): Replace with tree_to_hwi.
	(IRState::modify): Replace with modify_expr.
	(IRState::vmodify): Replace with vmodify_expr.
	(IRState::vinit): Replace with build_vinit.
	(IRState::nop): Replace with build_nop.
	(IRState::vconvert): Replace with build_vconvert.
	(IRState::boolOp): Replace with build_boolop.
	(IRState::compound): Replace with compound_expr.
	(IRState::voidCompound): Replace with vcompound_expr.
	(IRState::component): Replace with component_ref.
	(IRState::errorMark): Replace with error_mark.
	(IRState::typesSame): Replace with d_types_same.
	(IRState::typesCompatible): Replace with d_types_compatible.
	(IRState::getDType): Replace with build_dtype.
	(IRState::getObjectType): Replace with build_object_type.
	(IRState::isDeclarationReferenceType): Replace with decl_reference_p.
	(IRState::trueDeclarationType): Replace with declaration_type.
	(IRState::isArgumentReferenceType): Replace with arg_reference_p.
	(IRState::trueArgumentType): Replace with type_passed_as.
	(IRState::arrayType): Replace with d_array_type.
	(IRState::addTypeAttribute): Replace with insert_type_attributes.
	(IRState::addDeclAttribute): Replace with insert_decl_attributes.
	(IRState::attributes): Replace with build_attributes.
	(IRState::addTypeModifiers): Replace with insert_type_modifiers.
	(IRState::maybeMakeTemp): Replace with maybe_make_temp.
	(IRState::isFreeOfSideEffects): Replace with d_has_side_effects.
	(IRState::pointerOffsetOp): Replace with build_offset_op.
	(IRState::pointerOffset): Replace with build_offset.
	(IRState::buildCall): Replace with d_build_call.
	(IRState::exceptionObject): Replace with build_exception_object.

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

	* d-asmstmt.cc(d_build_asm_stmt): Remove.
	(ExtAsmStatement::ExtAsmStatement): Update to match renamed members.
	(ExtAsmStatement::syntaxCopy): Likewise.
	(ExtAsmStatement::semantic): Likewise.
	(ExtAsmStatement::toCBuffer): Likewise.
	(ExtAsmStatement::comeFrom): New.
	(ExtAsmStatement::blockExit): Don't error if must not throw.
	(naturalString): Remove.
	(ExtAsmStatement::toIR): Inline IRState::doAsm implementation.
	* d-codegen.cc(IRState::doAsm): Remove.
	* d-decls.cc(FuncDeclaration::toSymbol): Don't generate 'naked'
	attribute.
	(binfo_for): Move into d-decls.cc.
	(intfc_binfo_for): Likewise.
	(ClassDeclaration::toDebug): Likewise.
	(EnumDeclaration::toDebug): Likewise.
	(TypedefDeclaration::toDebug): Likewise.
	(StructDeclaration::toDebug): Likewise.
	* d-objfile.cc(FuncDeclaration::toObjFile): Move into d-objfile.cc.
	(FuncDeclaration::buildClosure): Likewise.
	(Module::genobjfile): Likewise.
	* d-glue.cc: Remove file.

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

	* d-ir.cc(SynchronizedStatement::toIR): Remove implementation as is
	now handled by the frontend.

2013-03-15  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(IRState::maybeExpandSpecialCall): Handle ref argptr
	arguments.

2013-03-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-builtins.c(handle_alias_attribute): New function to handle
	internal 'alias' attribute.
	(handle_weakref_attribute): New function to handle internal 'weakref'
	attribute.
	* d-objfile.cc(ObjectFile::outputThunk): Define thunks to external
	symbols as weakref, alias

2013-03-12  Johannes Pfau  <johannespfau@gmail.com>

	* patch-versym-os-4.8.x(mingw32.h): Fix typo
	* patch-versym-cpu-4.8.x(mips.h): Fix typo
	Update version symbols to latest dlang specification.

2013-03-10  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(FuncDeclaration::toSymbol): Delay setting TREE_TYPE as
	function type could be hidden in a nested function not yet built.
	* d-codegen.cc(IRState::findThis): Don't get 'this' from outer
	function if it's a closure type.  This has already been handled by
	IRState::getFrameForSymbol.
	(IRState::buildChain): Give frame decl debug name '__frame'.
	Always set '__chain' link field.
	(IRState::getFrameInfo): Don't build a frame for all nested functions.
	Search through nested aggregates for static chain in outer functions.
	* d-codegen.h(IRState::useParentChain): Remove.
	* d-glue.cc(FuncDeclaration::toObjFile): Don't call useParentChain.
	Don't create a local var for the chain link for a function.
	(FuncDeclaration::buildClosure): Always set '__chain' link field.

2013-03-08  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(d_gcc_force_templates): Only check for emitting
	templates as private.
	* d-lang.cc(d_handle_option): Remove -femit-templates= option.
	* d-objfile.cc(ObjectFile::makeDeclOneOnly): Fix code logic so
	fallback method could be reached.
	* d-objfile.h(TEall, TEauto): Remove.

2013-03-07  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-ir.cc(ReturnStatement::toIR): Don't call postblit on return.
	* d-codegen.cc(IRState::trueDeclarationType): Don't set
	D_TYPE_ADDRESSABLE.
	(IRState::makeTemp): Remove.
	(IRState::maybeMakeTemp): Copy makeTemp into function.
	* d-glue.cc(d_genericize): Remove D_TYPE_ADDRESSABLE handling.
	* d-lang.h(D_TYPE_ADDRESSABLE): Remove macro.

2013-03-04  Johannes Pfau  <johannespfau@gmail.com>

	* d-ctype.cc(Type::toCtype): Always call gen.addTypeModifiers to
	make sure TYPE_MAIN_VARIANT is set. Reuse tree from unqualified
	variant for that. Also cache the resulting qualified tree.
	(TypeTypedef::toCtype): Likewise.
	(TypeEnum::toCtype): Likewise.
	(TypeStruct::toCtype): Likewise.
	(TypeFunction::toCtype): Likewise.
	(TypeVector::toCtype): Likewise.
	(TypeSArray::toCtype): Likewise.
	(TypeDArray::toCtype): Likewise.
	(TypeAArray::toCtype): Likewise.
	(TypeDelegate::toCtype): Likewise.
	(TypeClass::toCtype): Likewise.
	* d-objfile.cc(ObjectFile::giveDeclUniqueName): Make sure DECL_NAME is set

2013-03-01  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-decls.cc(VarDeclaration::toSymbol): Remove use of c_ident.
	(FuncDeclaration::toSymbol): Likewise.
	* d-builtins.c(handle_noreturn_attribute): Assert that this is only
	used for internal purposes.
	(handle_const_attribute): Likewise.
	(handle_malloc_attribute): Likewise.
	(handle_pure_attribute): Likewise.
	(handle_nonnull_attribute): Likewise.
	(handle_nothrow_attribute): Likewise.
	(handle_sentinel_attribute): Likewise.
	(handle_transaction_pure_attribute): Likewise.
	(handle_returns_twice_attribute): Likewise.
	* d-glue.cc(FuncDeclaration::toObjFile): Result variables have no
	default initialiser.
	* d-codegen.cc(IRState::emitLocalVar): Add in assert that the local
	variable has no initialiser if called with no_init = true.
	(IRState::getLibCallDecl): Mark exceptional library functions as
	noreturn.
	(IRState::attributes): Gracefully handle @attribute, and
	@attribute(null).

2013-02-28  Jernej Krempus  <jkrempus@gmail.com>

	* d-builtins.c(d_attribute_table): Renamed it to
	d_builtins_attribute_table.
	* d-lang.cc(d_attribute_table): Added an empty table	
	* d-lang.cc(LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Defined it as
	d_builtins_attribute_table.
	* d-lang.h(d_builtins_attribute_table): Added a declaration.
	* d-codegen.cc(IRState::attributes): Changed it so it goes through
	in_attrs and looks for any @gcc.attribute.attribute("attr_name").
	* d-objfile.cc(ObjectFile::setupSymbolStorage): Pass userAttributes
	instead of attributes in all calls to IRState::attributes.
	* d-ctype.cc(TypeTypedef::toCtype): Likewise.
	(TypeEnum::toCtype): Likewise.
	(TypeStruct::toCtype): Likewise.
	(TypeClass::toCtype): Likewise.
	* libphobos/libdruntime/gcc/attribute.d: New file.

2013-02-28  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-lang.cc(d_handle_option): Remove OPT_fdeprecated and
	OPT_Wsign_compare, add handling for OPT_Wdeprecated.
	(d_post_options): Handle Wdeprecated and Werror switch combination.

2013-02-27  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-codegen.cc(ArrayScope::ArrayScope): Don't setup length var if its
	value is known at compile time.
	(ArrayScope::setArrayExp): Likewise.
	* d-decls.cc(uniqueName): Remove function.
	(VarDeclaration::toSymbol): Set decl assembler name directly.
	(FuncDeclaration::toSymbol): Likewise.

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

	* Make-lang.in(GDC_EXTENDED_ASM_SYNTAX): Remove macro.

2013-02-14  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-lang.h(D_DECL_IS_CONTRACT): Remove macro.
	* d-decls.cc(FuncDeclaration::toSymbol): Likewise.

2013-02-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	* d-lang.cc(d_gcc_is_target_win32): Remove.
	(d_add_builtin_version): New function to handle define_builtin
	callback from backend.
	* d-codegen.cc(IRState::maybeExpandSpecialCall): Remove intrinsic bt.

	* d-builtins.c: Merge with d-builtins2.cc.
	* d-builtins2.cc: Remove.

2013-02-07  Johannes Pfau  <johannespfau@gmail.com>

	* d-lang.cc(d_init): Use gcc's config system for predefined OS versions.
	* setup-gcc.sh: Likewise.
	* target-ver-syms.sh: Likewise.

2013-02-05  Iain Buclaw  <ibuclaw@ubuntu.com>

	* d-builtins2.cc(gcc_type_to_d_type): Remove STRUCTTHISREF condition.
	* d-decls.cc(FuncDeclaration::toSymbol): Likewise.
	* d-elem.cc(ThisExp::toElem): Likewise.
	* d-ctype.cc(TypeSArray::toCtype): Remove SARRAYVALUE condition.
	* d-codegen.cc(IRState::isDeclarationReferenceType): Likewise.
	(IRState::isArgumentReferenceType): Likewise.

2013-02-01  Johannes Pfau  <johannespfau@gmail.com>

	* d-lang.cc(d_init): Use gcc's config system for predefined CPU versions.
	(d_init): Fix definition of D_LP64 version.
	* setup-gcc.sh: Likewise.
	* target-ver-syms.sh: Likewise.

