aboutsummaryrefslogtreecommitdiff
path: root/libphobos/src
AgeCommit message (Collapse)AuthorFilesLines
2022-08-28d: Merge upstream dmd 817610b16d, phobos b578dfad9Iain Buclaw29-4913/+3934
D front-end changes: - Import latest bug fixes to mainline. Phobos changes: - Import latest bug fixes to mainline. - std.logger module has been moved out of experimental. - Removed std.experimental.typecons module. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 817610b16d. * d-ctfloat.cc (CTFloat::parse): Update for new front-end interface. * d-lang.cc (d_parse_file): Likewise. * expr.cc (ExprVisitor::visit (AssignExp *)): Remove handling of array assignments to non-trivial static and dynamic arrays. * runtime.def (ARRAYASSIGN): Remove. (ARRAYASSIGN_L): Remove. (ARRAYASSIGN_R): Remove. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 817610b16d. * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/internal/array/arrayassign.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos b578dfad9. * src/Makefile.am (PHOBOS_DSOURCES): Remove std/experimental/typecons.d. Add std/logger package. * src/Makefile.in: Regenerate.
2022-08-03d: Merge upstream dmd d7772a2369, phobos 5748ca43f.Iain Buclaw20-184/+387
In upstream dmd, the compiler front-end and run-time have been merged together into one repository. Both dmd and libdruntime now track that. D front-end changes: - Deprecated `scope(failure)' blocks that contain `return' statements. - Deprecated using integers for `version' or `debug' conditions. - Deprecated returning a discarded void value from a function. - `new' can now allocate an associative array. D runtime changes: - Added avx512f detection to core.cpuid module. Phobos changes: - Changed std.experimental.logger.core.sharedLog to return shared(Logger). gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd d7772a2369. * dmd/VERSION: Bump version to v2.100.1. * d-codegen.cc (get_frameinfo): Check whether decision to generate closure changed since semantic finished. * d-lang.cc (d_handle_option): Remove handling of -fdebug=level and -fversion=level. * decl.cc (DeclVisitor::visit (VarDeclaration *)): Generate evaluation of noreturn variable initializers before throw. * expr.cc (ExprVisitor::visit (AssignExp *)): Don't generate assignment for noreturn types, only evaluate for side effects. * lang.opt (fdebug=): Undocument -fdebug=level. (fversion=): Undocument -fversion=level. libphobos/ChangeLog: * configure: Regenerate. * configure.ac (libtool_VERSION): Update to 4:0:0. * libdruntime/MERGE: Merge upstream druntime d7772a2369. * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/internal/array/duplication.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 5748ca43f. * testsuite/libphobos.gc/nocollect.d:
2022-07-06d: Merge upstream dmd 56589f0f4, druntime 651389b5, phobos 1516ecad9.Iain Buclaw4-267/+422
D front-end changes: - Import latest bug fixes to mainline. D runtime changes: - Import latest bug fixes to mainline. Phobos changes: - Import latest bug fixes to mainline. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 56589f0f4. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 651389b5. * src/MERGE: Merge upstream phobos 1516ecad9.
2022-06-22d: Merge upstream dmd 6203135dc, druntime e150cca1, phobos a4a18d21c.Iain Buclaw11-352/+195
D front-end changes: - Input parameters can now be applied on extern(C++) functions to bind to `const &' when the `-fpreview=in' flag is in effect. D runtime changes: - Run-time flag `--DRT-oncycle=deprecate' has been removed. Phobos changes: - Removed std.experimental.logger's capability to set the minimal LogLevel at compile time. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 6203135dc. * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): Update for new front-end interface. (SpeculativeTypeVisitor::visit (TypeStruct *)): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e150cca1. * src/MERGE: Merge upstream phobos a4a18d21c. * testsuite/libphobos.cycles/cycles.exp (cycle_test_list): Update expected result of deprecate test.
2022-06-13d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f.Iain Buclaw3-21/+13
D front-end changes: - Import latest bug fixes to mainline. D runtime changes: - Fix duplicate Elf64_Dyn definitions on Solaris. - _d_newThrowable has been converted to a template. Phobos changes: - Import latest bug fixes to mainline. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 821ed393d. * expr.cc (ExprVisitor::visit (NewExp *)): Remove handled of allocating `@nogc' throwable object. * runtime.def (NEWTHROW): Remove. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 454471d8. * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/sync/package.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 1206fc94f.
2022-05-27d: Merge upstream dmd 4d07f22f2, druntime f89da313, phobos d46814c86.Iain Buclaw4-5/+7
D front-end changes: - `scope' semantics are now enforced in `@safe' code on pointers to stack memory, but only as deprecation warnings. - Overriding virtual functions are now marked with the `override' and `final' in the generated headers of `-fdump-c++-spec='. - `-fpreview=fiximmmutableconv` has been added that disallows implicitly converting a return value with indirections to immutable if it determines the result must be unique. D runtime changes: - Posix (excluding Darwin): Switch default GC signals from SIGUSR1/2 to SIGRTMIN/SIGRTMIN+1 Phobos changes: - Import latest bug fixes to mainline. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 4d07f22f2 * d-lang.cc (d_handle_option): Handle OPT_fpreview_fiximmutableconv. * lang.opt (fpreview=fiximmutableconv): New option. * runtime.def (ARRAYAPPENDT): Remove. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime f89da313. * src/MERGE: Merge upstream phobos d46814c86. Signed-off-by: Iain Buclaw <ibuclaw@gdcproject.org>
2022-05-16d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.Iain Buclaw10-56/+137
D front-end changes: - Import dmd v2.100.0. - Add bit fields to D, enabled via the -fpreview=bitfields switch. - Removed the -ftransition=markdown and -frevert=markdown switches. - Added new trait `__traits(classInstanceAlignment)' to provide the required data alignment for classes. - The check for `pragma(crt_constructor)' and `pragma(crt_destructor)' linkage has been relaxed to allow all `void()' signatures. - ImportC parser now recognizes the `typeof(...)' operator. D runtime changes: - Import druntime v2.100.0. Phobos changes: - Import phobos v2.100.0. - To comply with dip1000, `std.socket.Socket` methods now accept only `scope' arrays. - The `fill', `alignSize', `align2', and `align4' methods of `std.outbuffer.OutBuffer' have been extended to allow specifying a custom value when pre-filling or padding the buffer. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 60bfa0ee7. * dmd/VERSION: Update version to v2.100.0. * d-builtins.cc (d_init_versions): Update for new front-end interface. * d-codegen.cc (d_decl_context): Use resolvedLinkage to get declaration linkage. (build_struct_literal): Track offset in bits. * d-gimplify.cc (d_gimplify_modify_expr): Check both operands for a bit-field reference. * d-lang.cc (d_handle_option): Handle -fpreview=bitfields, remove -frevert=markdown and -ftransition=vmarkdown. (d_post_options): Set flag_rtti and flag_exceptions if -fno-druntime was seen on command-line. (d_parse_file): Update for new front-end interface. (d_type_promotes_to): Use resolvedLinkage to get declaration linkage. * decl.cc (make_thunk): Likewise. * expr.cc (ExprVisitor::visit (CatAssignExp *)): Remove lowering for appending of an element or array to another array. * lang.opt (fpreview=bitfields): New option. (frevert=markdown): Remove. (ftransition=vmarkdown): Remove. * types.cc (layout_aggregate_members): Ignore anonymous fields in total count. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 94bd5bcb. * libdruntime/Makefile.am (ALL_DRUNTIME_INSTALL_DSOURCES): Add $(DRUNTIME_DSOURCES_ELF). (ALL_DRUNTIME_SOURCES): Likewise. (DRUNTIME_DSOURCES_ELF): New variable. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 3a1cd9a01. * testsuite/libphobos.init_fini/custom_gc.d: Update test.
2022-04-21d: Merge upstream dmd eb7bee331, druntime 27834edb, phobos ac296f80c.Iain Buclaw7-17/+408
D front-end changes: - Import dmd v2.100.0-beta.1. - Print deprecation messages for scope violations unless `-frevert=dip1000' is used. - Fixed a missed case of switch case fallthrough not being caught by the compiler. D runtime changes: - Import druntime v2.100.0-beta.1. Phobos changes: - Import phobos v2.100.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd eb7bee331. * dmd/VERSION: Update version to v2.100.0-beta.1. * d-lang.cc (d_handle_option): Handle OPT_frevert_dip1000. * lang.opt (frevert=dip1000): New option. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 27834edb. * src/MERGE: Merge upstream phobos ac296f80c. * src/Makefile.am (PHOBOS_DSOURCES): Add std/int128.d. * src/Makefile.in: Regenerate.
2022-04-13d: Merge upstream dmd 4d1bfcf14, druntime 9ba9a6ae, phobos c0cc5e917.Iain Buclaw3-99/+116
D front-end changes: - Import dmd v2.099.1. - Added `@mustuse' attribute, implmenting DIP 1038. - Added `.tupleof` property for static arrays D runtime changes: - Import druntime v2.099.1. Phobos changes: - Import phobos v2.099.1. - Zlib bindings have been updated to 1.2.12. gcc/d/ChangeLog: * Make-lang.in (D_FRONTEND_OBJS): Add d/common-bitfields.o, d/mustuse.o. * d-ctfloat.cc (CTFloat::isIdentical): Don't treat NaN values as identical. * dmd/MERGE: Merge upstream dmd 4d1bfcf14. * expr.cc (ExprVisitor::visit (VoidInitExp *)): New. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 9ba9a6ae. * src/MERGE: Merge upstream phobos c0cc5e917.
2022-04-02d: Merge upstream dmd 47871363d, druntime, c52e28b7, phobos 99e9c1b77.Iain Buclaw23-158/+467
D front-end changes: - Import dmd v2.099.1-beta.1. - The address of NRVO variables is now stored in scoped closures when they have nested references. - Using `__traits(parameters)' in foreach loops now always returns the parameters to the function the foreach appears within. Previously, when used inside a `foreach' using an overloaded `opApply', the trait would yield the parameters to the delegate. - The deprecation period of unannotated `asm' blocks has been ended. - The `inout' attribute no longer implies the `return' attribute. - Added new `D_PreConditions', `D_PostConditions', and `D_Invariants' version identifiers. D runtime changes: - Import druntime v2.099.1-beta.1. Phobos changes: - Import phobos v2.099.1-beta.1. - `Nullable' in `std.typecons' can now act as a range. - std.experimental.logger default level changed to `info' instead of `warning'. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 47871363d. * d-builtins.cc (d_init_versions): Add predefined version identifiers D_PreConditions, D_PostConditions, and D_Invariants. * d-codegen.cc (d_build_call): Update for new front-end interface. (build_frame_type): Generate reference field for NRVO variables with nested references. (build_closure): Generate assignment of return address to closure. * d-tree.h (DECL_INSTANTIATED): Use DECL_LANG_FLAG_2. (bind_expr): Remove. * decl.cc (DeclVisitor::visit (FuncDeclaration *)): Update for new front-end interface. (get_symbol_decl): Likewise. (get_decl_tree): Check DECL_LANG_FRAME_FIELD before DECL_LANG_NRVO. Dereference the field when both are set. * expr.cc (ExprVisitor::visit (DeleteExp *)): Update for new front-end interface. * modules.cc (get_internal_fn): Likewise. * toir.cc (IRVisitor::visit (ReturnStatement *)): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime c52e28b7. * libdruntime/Makefile.am (DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/pwd.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 99e9c1b77. * testsuite/libphobos.exceptions/message_with_null.d: New test. gcc/testsuite/ChangeLog: * gdc.dg/nrvo1.d: New test.
2022-03-21d: Merge upstream dmd 2503f17e5, phobos a74fa63e6.Iain Buclaw5-19/+97
D front-end changes: - Import dmd mainline development. - Removed internal d_intN and d_unsN aliases to stdint types, which caused a regression on Solaris where int8_t is a char (PR104911). Phobos changes: - Import phobos mainline development. PR d/104911 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 2503f17e5. * d-convert.cc (convert_expr): Replace d_uns64 with dinteger_t. * d-lang.cc: Remove dmd/root/file.h include. (d_handle_option): Update for new front-end interface. (d_parse_file): Likewise. libphobos/ChangeLog: * src/MERGE: Merge upstream phobos a74fa63e6.
2022-03-13d: Merge upstream dmd 02a3fafc6, druntime 26b58167, phobos 16cb085b5.Iain Buclaw9-8/+186
D front-end changes: - Import dmd v2.099.0. - The deprecation period for D1-style operators has ended, any use of the D1 overload operators will now result in a compiler error. - `scope' as a type constraint on class, struct, union, and enum declarations has been deprecated. - Fix segmentation fault when emplacing a new front-end Expression node during CTFE (PR104835). D runtime changes: - Import druntime v2.099.0. - Fix C bindings for stdint types (PR104738). - Fix bus error when allocating new array on the GC (PR104742). - Fix bus error when allocating new pointer on the GC (PR104745). Phobos changes: - Import phobos v2.099.0. - New function `bind' in `std.functional'. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 02a3fafc6. * dmd/VERSION: Update version to v2.099.0. * imports.cc (ImportVisitor::visit (EnumDeclaration *)): Don't cache decl in front-end AST node. (ImportVisitor::visit (AggregateDeclaration *)): Likewise. (ImportVisitor::visit (ClassDeclaration *)): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 26b58167. * src/MERGE: Merge upstream phobos 16cb085b5.
2022-03-02d: Merge upstream dmd 423f19b41, druntime 100a608c, phobos a1f8c4c07.Iain Buclaw3-57/+21
D Runtime changes: - Fix stdc.stdio bindings to not depend on druntime (PR104729). - Implement stdc.math for Solaris (PR104735). gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 423f19b41. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 100a608c. * src/MERGE: Merge upstream phobos a1f8c4c07.
2022-02-28d: Merge upstream dmd cf63dd8e5, druntime caf14b0f, phobos 41aaf8c26.Iain Buclaw5-23/+110
D front-end changes: - Import dmd v2.099.0-rc.1. - The `main' can now return type `noreturn' and supports return inference. D Runtime changes: - Import druntime v2.099.0-rc.1. - C bindings for stat_t on powerpc-linux has been fixed. Phobos changes: - Import phobos v2.099.0-rc.1. gcc/d/ChangeLog: * d-target.cc (Target::_init): Initialize C type size fields. * dmd/MERGE: Merge upstream dmd cf63dd8e5. * dmd/VERSION: Update version to v2.099.0-rc.1. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime caf14b0f. * src/MERGE: Merge upstream phobos 41aaf8c26. gcc/testsuite/ChangeLog: * gdc.dg/torture/simd7413a.d: Update. * gdc.dg/ubsan/pr88957.d: Update. * gdc.dg/simd18489.d: New test. * gdc.dg/torture/simd21727.d: New test.
2022-02-20d: Merge upstream dmd cb49e99f8, druntime 55528bd1, phobos 1a3e80ec2.Iain Buclaw13-77/+119
D front-end changes: - Import dmd v2.099.0-beta.1. - It's now an error to use `alias this' for partial assignment. - The `delete' keyword has been removed from the language. - Using `this' and `super' as types has been removed from the language, the parser no longer specially handles this wrong code with an informative error. D Runtime changes: - Import druntime v2.099.0-beta.1. Phobos changes: - Import phobos v2.099.0-beta.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd cb49e99f8. * dmd/VERSION: Update version to v2.099.0-beta.1. * decl.cc (layout_class_initializer): Update call to NewExp::create. * expr.cc (ExprVisitor::visit (DeleteExp *)): Remove handling of deleting arrays and pointers. (ExprVisitor::visit (DotVarExp *)): Convert complex types to the front-end library type representing them. (ExprVisitor::visit (StringExp *)): Use getCodeUnit instead of charAt to get the value of each index in a string expression. * runtime.def (DELMEMORY): Remove. (DELARRAYT): Remove. * types.cc (TypeVisitor::visit (TypeEnum *)): Handle anonymous enums. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 55528bd1. * src/MERGE: Merge upstream phobos 1a3e80ec2. * testsuite/libphobos.hash/test_hash.d: Update. * testsuite/libphobos.betterc/test19933.d: New test.
2022-02-16d: Merge upstream dmd 52844d4b1, druntime dbd0c874, phobos 896b1d0e1.Iain Buclaw26-3741/+4340
D front-end changes: - Parsing and compiling C code is now possible using `import'. - `throw' statements can now be used as an expression. - Improvements to the D template emission strategy when compiling with `-funittest'. D Runtime changes: - New core.int128 module for implementing intrinsics to support 128-bit integer types. - C bindings for the kernel and C runtime have been better separated to allow compiling for hybrid targets, such as kFreeBSD. Phobos changes: - The std.experimental.checkedint module has been renamed to std.checkedint. gcc/d/ChangeLog: * d-builtins.cc (d_build_builtins_module): Set purity of DECL_PURE_P functions to PURE::const_. * d-gimplify.cc (bit_field_ref): New function. (d_gimplify_modify_expr): Handle implicit casting for assignments to bit-fields. (d_gimplify_unary_expr): New function. (d_gimplify_binary_expr): New function. (d_gimplify_expr): Handle UNARY_CLASS_P and BINARY_CLASS_P. * d-target.cc (Target::_init): Initialize bitFieldStyle. (TargetCPP::parameterType): Update signature. (Target::supportsLinkerDirective): New function. * dmd/MERGE: Merge upstream dmd 52844d4b1. * expr.cc (ExprVisitor::visit (ThrowExp *)): New function. * types.cc (d_build_bitfield_integer_type): New function. (insert_aggregate_bitfield): New function. (layout_aggregate_members): Handle inserting bit-fields into an aggregate type. libphobos/ChangeLog: * Makefile.in: Regenerate. * libdruntime/MERGE: Merge upstream druntime dbd0c874. * libdruntime/Makefile.am (DRUNTIME_CSOURCES): Add core/int128.d. (DRUNTIME_DISOURCES): Add __builtins.di. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 896b1d0e1. * src/Makefile.am (PHOBOS_DSOURCES): Add std/checkedint.d. * src/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add -fall-instantiations to --gdcflags.
2022-01-03d: Merge upstream dmd 001bfd97b, druntime 759e6023, phobos 468788323.Iain Buclaw10-54/+88
D front-end changes: - Import latest changes to mainline. - Fix bad format specifiers in front-end errors (PR103840). - Refactoring of some leaf modules to the dmd/root package. - Updating copyright notice dates and urls. Phobos changes: - Import latest changes to mainline. gcc/d/ChangeLog: PR d/103840 * dmd/MERGE: Merge upstream dmd 001bfd97b. * Make-lang.in (D_FRONTEND_OBJS): Rename d/complex.o to d/root-complex.o, and d/utf.o to d/root/utf.o. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 759e6023. * src/MERGE: Merge upstream phobos 468788323.
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-12-20d: Merge upstream dmd ad8412530, druntime fd9a4544, phobos 495e835c2.Iain Buclaw4-2/+34
D front-end changes: - Import dmd v2.098.1 - Remove calling of _d_delstruct from code generator. Druntime changes: - Import druntime v2.098.1 Phobos changes: - Import phobos v2.098.1 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd ad8412530. * expr.cc (ExprVisitor::visit (DeleteExp *)): Remove code generation of _d_delstruct. * runtime.def (DELSTRUCT): Remove. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime fd9a4544. * src/MERGE: Merge upstream phobos 495e835c2.
2021-12-15d: Merge upstream dmd 93108bb9e, druntime 6364e010, phobos 575b67a9b.Iain Buclaw6-12/+32
D front-end changes: - Import dmd v2.098.1-beta.1. - Default extern(C++) compatibility to C++17. Druntime changes: - Import druntime v2.098.1-beta.1. - Fix definition of stat_t on MIPS64 (PR103604) Phobos changes: - Import phobos v2.098.1-beta.1. gcc/d/ChangeLog: * d-lang.cc (d_init_options): Set default -fextern-std= to C++17. * dmd/MERGE: Merge upstream dmd 93108bb9e. * gdc.texi (Runtime Options): Document the default for -fextern-std=. libphobos/ChangeLog: PR d/103604 * configure: Regenerate. * configure.ac (libtool_VERSION): Update to 3:0:0. * libdruntime/MERGE: Merge upstream druntime 6364e010. * src/MERGE: Merge upstream phobos 575b67a9b. * testsuite/libphobos.traits/all_satisfy.d: New test. * testsuite/libphobos.traits/traits.exp: New test.
2021-12-10d: Merge upstream dmd 3982604c5, druntime bc58b1e9, phobos 12329adb6.Iain Buclaw21-155/+224
D front-end changes: - Import dmd mainline development. - Split off enum EXP from enum TOK. - Integer promotions now follow C integral promotions by default. - Implements __traits(initSymbol). - Lowering of array construction has been moved to the dmd front-end. - Fix segfault in dmd.lexer from unaligned read (PR103529). Druntime changes: - Import druntime mainline development. - Define SIG_BLOCK for Solaris (PR103528). Phobos changes: - Import phobos mainline development. gcc/d/ChangeLog: PR d/103529 * dmd/MERGE: Merge upstream dmd 3982604c5. * Make-lang.in (D_FRONTEND_OBJS): Add d/root-optional.o. * d-attribs.cc (build_attributes): Update for new front-end interface. * d-codegen.cc (d_build_call): Likewise. * d-compiler.cc (Compiler::paintAsType): Likewise. * d-lang.cc (d_handle_option): Remove OPT_fpreview_intpromote, add handling of OPT_frevert_intpromote. * d-port.cc (Port::valcpy): Assert buffer is aligned. * d-target.cc (Target::isVectorOpSupported): Update for new front-end interface. * decl.cc (layout_class_initializer): Likewise. * expr.cc (lvalue_p): Likewise. (binop_assignment): Likewise. (ExprVisitor::visit): Likewise. (ExprVisitor::visit (AssignExp *)): Remove generation of _d_arrayctor and _d_arraysetctor library helpers. (ExprVisitor::visit (VarExp *)): Support __traits(initSymbol). * intrinsics.cc (expand_intrinsic_rotate): Update for new front-end interface. * lang.opt (fpreview=intpromote): Remove. (frevert=intpromote): New. * runtime.def (ARRAYCTOR): Remove. (ARRAYSETCTOR): Remove. * toir.cc (IRVisitor::visit): Update for new front-end interface. * types.cc (layout_aggregate_members): Likewise. * dmd/root/optional.d: New file. * dmd/root/optional.h: New file. libphobos/ChangeLog: PR d/103528 * libdruntime/MERGE: Merge upstream druntime bc58b1e9. * libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Remove core/sys/linux/syscalls.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 12329adb6. * testsuite/libphobos.config/config.exp: Add test22523. * libdruntime/core/sys/linux/syscalls.d: Removed. * testsuite/libphobos.config/test22523.d: New test.
2021-12-09d: Merge upstream dmd 568496d5b, druntime 178c44ff, phobos 574bf883b.Iain Buclaw45-1496/+1763
D front-end changes: - Import dmd v2.098.0 - New ImportC module for compiling preprocessed C11 code into D. - New -ftransition=in switch. - Improved handling of new 'noreturn' type. Druntime changes: - Import druntime v2.098.0 - Fix broken import in core.sys.linux.perf_event module (PR103558). Phobos changes: - Import phobos v2.098.0 - All sources are now compiled with -fpreview=fieldwise. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 568496d5b. * Make-lang.in (D_FRONTEND_OBJS): Add d/common-file.o, d/common-outbuffer.o, d/common-string.o, d/file_manager.o, d/importc.o. Remove d/root-outbuffer.o. (d/common-%.o): New recipe. * d-builtins.cc (build_frontend_type): Update for new front-end interface. (d_build_d_type_nodes): Set noreturn_type_node. * d-codegen.cc (d_build_call): Don't call function if one of the arguments is type 'noreturn'. (build_vthis_function): Propagate TYPE_QUAL_VOLATILE from original function type. * d-frontend.cc (eval_builtin): Update signature. (getTypeInfoType): Likewise. (toObjFile): New function. * d-gimplify.cc (d_gimplify_call_expr): Always evaluate arguments from left to right. * d-lang.cc (d_handle_option): Handle OPT_ftransition_in. (d_parse_file): Don't generate D main if it is declared in user code. * d-tree.h (CALL_EXPR_ARGS_ORDERED): Remove. (enum d_tree_index): Add DTI_BOTTOM_TYPE. (noreturn_type_node): New. * decl.cc (apply_pragma_crt): Remove. (DeclVisitor::visit): Update for new front-end interface. (DeclVisitor::visit (PragmaDeclaration *)): Don't handle crt_constructor and crt_destructor pragmas. (DeclVisitor::visit (VarDeclaration *)): Don't generate declarations of type 'noreturn'. (DeclVisitor::visit (FuncDeclaration *)): Stop adding parameters when 'noreturn' type has been encountered. (get_symbol_decl): Set DECL_STATIC_CONSTRUCTOR and DECL_STATIC_DESTRUCTOR on decl node if requested. (aggregate_initializer_decl): Update for new front-end interface. * expr.cc (ExprVisitor::visit (CallExp *)): Always use the 'this' object as the result of calling any constructor function. (ExprVisitor::visit): Update for new front-end interface. * gdc.texi (Runtime Options): Document -fmain and -ftransition=in. * lang.opt (ftransition=in): New option. * modules.cc (get_internal_fn): Update for new front-end interface. * types.cc (TypeVisitor::visit): Likewise. (TypeVisitor::visit (TypeNoreturn *)): Return noreturn_type_node. (TypeVisitor::visit (TypeFunction *)): Stop adding parameters when 'notreturn' type has been encountered. Qualify function types that return 'noreturn' as TYPE_QUAL_VOLATILE. libphobos/ChangeLog: PR d/103558 * libdruntime/MERGE: Merge upstream druntime 178c44ff. * libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Add core/sys/linux/syscalls.d. (DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/pthread_np.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 574bf883b. * src/Makefile.am (D_EXTRA_DFLAGS): Add -fpreview=fieldwise. * src/Makefile.in: Regenerate. * testsuite/libphobos.exceptions/assert_fail.d: Update test. * testsuite/libphobos.betterc/test22336.d: New test.
2021-12-02libphobos: Add missing ControlState variable for AArch64Iain Buclaw1-0/+1
Fixes a typo that occurred during the splitting of the std.math module into a package. libphobos/ChangeLog: * src/std/math/hardware.d (FloatingPointControl.getControlState): Add missing ControlState variable for AArch64.
2021-11-30d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)Iain Buclaw158-44269/+84438
The D front-end is now itself written in D, in order to build GDC, you will need a working GDC compiler (GCC version 9.1 or later). GCC changes: - Add support for bootstrapping the D front-end. These add the required components in order to have a D front-end written in D itself. Because the compiler front-end only depends on the core runtime modules, only libdruntime is built for the bootstrap stages. D front-end changes: - Import dmd v2.098.0-beta.1. Druntime changes: - Import druntime v2.098.0-beta.1. Phobos changes: - Import phobos v2.098.0-beta.1. The jump from v2.076.1 to v2.098.0 covers nearly 4 years worth of development on the D programming language and run-time libraries. ChangeLog: * Makefile.def: Add bootstrap to libbacktrace, libphobos, zlib, and libatomic. * Makefile.in: Regenerate. * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Fix command for GDC. (STAGE1_CONFIGURE_FLAGS): Add --with-libphobos-druntime-only if target-libphobos-bootstrap. (STAGE2_CONFIGURE_FLAGS): Likewise. * configure: Regenerate. * configure.ac: Add support for bootstrapping D front-end. config/ChangeLog: * acx.m4 (ACX_PROG_GDC): New m4 function. gcc/ChangeLog: * Makefile.in (GDC): New variable. (GDCFLAGS): New variable. * configure: Regenerate. * configure.ac: Add call to ACX_PROG_GDC. Substitute GDCFLAGS. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd b8384668f. * Make-lang.in (d-warn): Use strict warnings. (DMD_WARN_CXXFLAGS): Remove. (DMD_COMPILE): Remove. (CHECKING_DFLAGS): Define. (WARN_DFLAGS): Define. (ALL_DFLAGS): Define. (DCOMPILE.base): Define. (DCOMPILE): Define. (DPOSTCOMPILE): Define. (DLINKER): Define. (DLLINKER): Define. (D_FRONTEND_OBJS): Add new dmd front-end objects. (D_GENERATED_SRCS): Remove. (D_GENERATED_OBJS): Remove. (D_ALL_OBJS): Remove D_GENERATED_OBJS. (d21$(exeext)): Build using DLLINKER and -static-libphobos. (d.tags): Remove dmd/*.c and dmd/root/*.c. (d.mostlyclean): Remove D_GENERATED_SRCS, d/idgen$(build_exeext), d/impcnvgen$(build_exeext). (D_INCLUDES): Include $(srcdir)/d/dmd/res. (CFLAGS-d/id.o): Remove. (CFLAGS-d/impcnvtab.o): Remove. (d/%.o): Build using DCOMPILE and DPOSTCOMPILE. Update dependencies from d/dmd/%.c to d/dmd/%.d. (d/idgen$(build_exeext)): Remove. (d/impcnvgen$(build_exeext)): Remove. (d/id.c): Remove. (d/id.h): Remove. (d/impcnvtab.c): Remove. (d/%.dmdgen.o): Remove. (D_SYSTEM_H): Remove. (d/idgen.dmdgen.o): Remove. (d/impcnvgen.dmdgen.o): Remove. * config-lang.in (boot_language): New variable. * d-attribs.cc: Include dmd/expression.h. * d-builtins.cc: Include d-frontend.h. (build_frontend_type): Update for new front-end interface. (d_eval_constant_expression): Likewise. (d_build_builtins_module): Likewise. (maybe_set_builtin_1): Likewise. (d_build_d_type_nodes): Likewise. * d-codegen.cc (d_decl_context): Likewise. (declaration_reference_p): Likewise. (declaration_type): Likewise. (parameter_reference_p): Likewise. (parameter_type): Likewise. (get_array_length): Likewise. (build_delegate_cst): Likewise. (build_typeof_null_value): Likewise. (identity_compare_p): Likewise. (lower_struct_comparison): Likewise. (build_filename_from_loc): Likewise. (build_assert_call): Remove LIBCALL_SWITCH_ERROR. (build_bounds_index_condition): Call LIBCALL_ARRAYBOUNDS_INDEXP on bounds error. (build_bounds_slice_condition): Call LIBCALL_ARRAYBOUNDS_SLICEP on bounds error. (array_bounds_check): Update for new front-end interface. (checkaction_trap_p): Handle CHECKACTION_context. (get_function_type): Update for new front-end interface. (d_build_call): Likewise. * d-compiler.cc: Remove include of dmd/scope.h. (Compiler::genCmain): Remove. (Compiler::paintAsType): Update for new front-end interface. (Compiler::onParseModule): Likewise. * d-convert.cc (convert_expr): Remove call to LIBCALL_ARRAYCAST. (convert_for_rvalue): Update for new front-end interface. (convert_for_assignment): Likewise. (convert_for_condition): Likewise. (d_array_convert): Likewise. * d-diagnostic.cc (error): Remove. (errorSupplemental): Remove. (warning): Remove. (warningSupplemental): Remove. (deprecation): Remove. (deprecationSupplemental): Remove. (message): Remove. (vtip): New. * d-frontend.cc (global): Remove. (Global::_init): Remove. (Global::startGagging): Remove. (Global::endGagging): Remove. (Global::increaseErrorCount): Remove. (Loc::Loc): Remove. (Loc::toChars): Remove. (Loc::equals): Remove. (isBuiltin): Update for new front-end interface. (eval_builtin): Likewise. (getTypeInfoType): Likewise. (inlineCopy): Remove. * d-incpath.cc: Include d-frontend.h. (add_globalpaths): Call d_gc_malloc to allocate Strings. (add_filepaths): Likewise. * d-lang.cc: Include dmd/id.h, dmd/root/file.h, d-frontend.h. Remove include of dmd/mars.h, id.h. (entrypoint_module): Remove. (entrypoint_root_module): Remove. (deps_write_string): Update for new front-end interface. (deps_write): Likewise. (d_init_options): Call rt_init. Remove setting global params that are default initialized by the front-end. (d_handle_option): Handle OPT_fcheckaction_, OPT_fdump_c___spec_, OPT_fdump_c___spec_verbose, OPT_fextern_std_, OPT_fpreview, OPT_revert, OPT_fsave_mixins_, and OPT_ftransition. (d_post_options): Propagate dip1021 and dip1000 preview flags to dip25, and flag_diagnostics_show_caret to printErrorContext. (d_add_entrypoint_module): Remove. (d_parse_file): Update for new front-end interface. (d_type_promotes_to): Likewise. (d_types_compatible_p): Likewise. * d-longdouble.cc (CTFloat::zero): Remove. (CTFloat::one): Remove. (CTFloat::minusone): Remove. (CTFloat::half): Remove. * d-system.h (POSIX): Remove. (realpath): Remove. (isalpha): Remove. (isalnum): Remove. (isdigit): Remove. (islower): Remove. (isprint): Remove. (isspace): Remove. (isupper): Remove. (isxdigit): Remove. (tolower): Remove. (_mkdir): Remove. (INT32_MAX): Remove. (INT32_MIN): Remove. (INT64_MIN): Remove. (UINT32_MAX): Remove. (UINT64_MAX): Remove. * d-target.cc: Include calls.h. (target): Remove. (define_float_constants): Remove initialization of snan. (Target::_init): Update for new front-end interface. (Target::isVectorTypeSupported): Likewise. (Target::isVectorOpSupported): Remove cases for unordered operators. (TargetCPP::typeMangle): Update for new front-end interface. (TargetCPP::parameterType): Likewise. (Target::systemLinkage): Likewise. (Target::isReturnOnStack): Likewise. (Target::isCalleeDestroyingArgs): Define. (Target::preferPassByRef): Define. * d-tree.h (d_add_entrypoint_module): Remove. * decl.cc (gcc_attribute_p): Update for new front-end interface. (apply_pragma_crt): Define. (DeclVisitor::visit(PragmaDeclaration *)): Handle pragmas crt_constructor and crt_destructor. (DeclVisitor::visit(TemplateDeclaration *)): Update for new front-end interface. (DeclVisitor::visit): Likewise. (DeclVisitor::finish_vtable): Likewise. (get_symbol_decl): Error if template has more than one nesting context. Update for new front-end interface. (make_thunk): Update for new front-end interface. (get_vtable_decl): Likewise. * expr.cc (ExprVisitor::visit): Likewise. (build_return_dtor): Likewise. * imports.cc (ImportVisitor::visit): Likewise. * intrinsics.cc: Include dmd/expression.h. Remove include of dmd/mangle.h. (maybe_set_intrinsic): Update for new front-end interface. * intrinsics.def (INTRINSIC_ROL): Update intrinsic signature. (INTRINSIC_ROR): Likewise. (INTRINSIC_ROR_TIARG): Likewise. (INTRINSIC_TOPREC): Likewise. (INTRINSIC_TOPRECL): Likewise. (INTRINSIC_TAN): Update intrinsic module and signature. (INTRINSIC_ISNAN): Likewise. (INTRINSIC_ISFINITE): Likewise. (INTRINSIC_COPYSIGN): Define intrinsic. (INTRINSIC_COPYSIGNI): Define intrinsic. (INTRINSIC_EXP): Update intrinsic module. (INTRINSIC_EXPM1): Likewise. (INTRINSIC_EXP2): Likewise. (INTRINSIC_LOG): Likewise. (INTRINSIC_LOG2): Likewise. (INTRINSIC_LOG10): Likewise. (INTRINSIC_POW): Likewise. (INTRINSIC_ROUND): Likewise. (INTRINSIC_FLOORF): Likewise. (INTRINSIC_FLOOR): Likewise. (INTRINSIC_FLOORL): Likewise. (INTRINSIC_CEILF): Likewise. (INTRINSIC_CEIL): Likewise. (INTRINSIC_CEILL): Likewise. (INTRINSIC_TRUNC): Likewise. (INTRINSIC_FMIN): Likewise. (INTRINSIC_FMAX): Likewise. (INTRINSIC_FMA): Likewise. (INTRINSIC_VA_ARG): Update intrinsic signature. (INTRINSIC_VASTART): Likewise. * lang.opt (fcheck=): Add alternate aliases for contract switches. (fcheckaction=): New option. (check_action): New Enum and EnumValue entries. (fdump-c++-spec-verbose): New option. (fdump-c++-spec=): New option. (fextern-std=): New option. (extern_stdcpp): New Enum and EnumValue entries (fpreview=): New options. (frevert=): New options. (fsave-mixins): New option. (ftransition=): Update options. * modules.cc (get_internal_fn): Replace Prot with Visibility. (build_internal_fn): Likewise. (build_dso_cdtor_fn): Likewise. (build_module_tree): Remove check for __entrypoint module. * runtime.def (P5): Define. (ARRAYBOUNDS_SLICEP): Define. (ARRAYBOUNDS_INDEXP): Define. (NEWTHROW): Define. (ADCMP2): Remove. (ARRAYCAST): Remove. (SWITCH_STRING): Remove. (SWITCH_USTRING): Remove. (SWITCH_DSTRING): Remove. (SWITCH_ERROR): Remove. * toir.cc (IRVisitor::visit): Update for new front-end interface. (IRVisitor::check_previous_goto): Remove checks for case and default statements. (IRVisitor::visit(SwitchStatement *)): Remove handling of string switch conditions. * typeinfo.cc: Include d-frontend.h. (get_typeinfo_kind): Update for new front-end interface. (make_frontend_typeinfo): Likewise. (TypeInfoVisitor::visit): Likewise. (builtin_typeinfo_p): Likewise. (get_typeinfo_decl): Likewise. (build_typeinfo): Likewise. * types.cc (valist_array_p): Likewise. (make_array_type): Likewise. (merge_aggregate_types): Likewise. (TypeVisitor::visit(TypeBasic *)): Likewise. (TypeVisitor::visit(TypeFunction *)): Likewise. (TypeVisitor::visit(TypeStruct *)): Update comment. * verstr.h: Removed. * d-frontend.h: New file. gcc/po/ChangeLog: * EXCLUDES: Remove d/dmd sources from list. gcc/testsuite/ChangeLog: * gdc.dg/Wcastresult2.d: Update test. * gdc.dg/asm1.d: Likewise. * gdc.dg/asm2.d: Likewise. * gdc.dg/asm3.d: Likewise. * gdc.dg/gdc282.d: Likewise. * gdc.dg/imports/gdc170.d: Likewise. * gdc.dg/intrinsics.d: Likewise. * gdc.dg/pr101672.d: Likewise. * gdc.dg/pr90650a.d: Likewise. * gdc.dg/pr90650b.d: Likewise. * gdc.dg/pr94777a.d: Likewise. * gdc.dg/pr95250.d: Likewise. * gdc.dg/pr96869.d: Likewise. * gdc.dg/pr98277.d: Likewise. * gdc.dg/pr98457.d: Likewise. * gdc.dg/simd1.d: Likewise. * gdc.dg/simd2a.d: Likewise. * gdc.dg/simd2b.d: Likewise. * gdc.dg/simd2c.d: Likewise. * gdc.dg/simd2d.d: Likewise. * gdc.dg/simd2e.d: Likewise. * gdc.dg/simd2f.d: Likewise. * gdc.dg/simd2g.d: Likewise. * gdc.dg/simd2h.d: Likewise. * gdc.dg/simd2i.d: Likewise. * gdc.dg/simd2j.d: Likewise. * gdc.dg/simd7951.d: Likewise. * gdc.dg/torture/gdc309.d: Likewise. * gdc.dg/torture/pr94424.d: Likewise. * gdc.dg/torture/pr94777b.d: Likewise. * lib/gdc-utils.exp (gdc-convert-args): Handle new compiler options. (gdc-convert-test): Handle CXXFLAGS, EXTRA_OBJC_SOURCES, and ARG_SETS test directives. (gdc-do-test): Only import modules in the test run directory. * gdc.dg/pr94777c.d: New test. * gdc.dg/pr96156b.d: New test. * gdc.dg/pr96157c.d: New test. * gdc.dg/simd_ctfe.d: New test. * gdc.dg/torture/simd17344.d: New test. * gdc.dg/torture/simd20052.d: New test. * gdc.dg/torture/simd6.d: New test. * gdc.dg/torture/simd7.d: New test. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime e6caaab9. * libdruntime/Makefile.am (D_EXTRA_FLAGS): Build libdruntime with -fpreview=dip1000, -fpreview=fieldwise, and -fpreview=dtorfields. (ALL_DRUNTIME_SOURCES): Add DRUNTIME_DSOURCES_STDCXX. (DRUNTIME_DSOURCES): Update list of C binding modules. (DRUNTIME_DSOURCES_STDCXX): Likewise. (DRUNTIME_DSOURCES_LINUX): Likewise. (DRUNTIME_DSOURCES_OPENBSD): Likewise. (DRUNTIME_DISOURCES): Remove __entrypoint.di. * libdruntime/Makefile.in: Regenerated. * libdruntime/__entrypoint.di: Removed. * libdruntime/gcc/deh.d (_d_isbaseof): Update signature. (_d_createTrace): Likewise. (__gdc_begin_catch): Remove reference to the exception. (_d_throw): Increment reference count of thrown object before unwind. (__gdc_personality): Chain exceptions with Throwable.chainTogether. * libdruntime/gcc/emutls.d: Update imports. * libdruntime/gcc/sections/elf.d: Update imports. (DSO.moduleGroup): Update signature. * libdruntime/gcc/sections/macho.d: Update imports. (DSO.moduleGroup): Update signature. * libdruntime/gcc/sections/pecoff.d: Update imports. (DSO.moduleGroup): Update signature. * src/MERGE: Merge upstream phobos 5ab9ad256. * src/Makefile.am (D_EXTRA_DFLAGS): Add -fpreview=dip1000 and -fpreview=dtorfields flags. (PHOBOS_DSOURCES): Update list of std modules. * src/Makefile.in: Regenerate. * testsuite/lib/libphobos.exp (libphobos-dg-test): Handle assembly compile types. (dg-test): Override. (additional_prunes): Define. (libphobos-dg-prune): Filter any additional_prunes set by tests. * testsuite/libphobos.aa/test_aa.d: Update test. * testsuite/libphobos.druntime/druntime.exp (version_flags): Add -fversion=CoreUnittest. * testsuite/libphobos.druntime_shared/druntime_shared.exp (version_flags): Add -fversion=CoreUnittest -fversion=Shared. * testsuite/libphobos.exceptions/unknown_gc.d: Update test. * testsuite/libphobos.hash/test_hash.d: Update test. * testsuite/libphobos.phobos/phobos.exp (version_flags): Add -fversion=StdUnittest * testsuite/libphobos.phobos_shared/phobos_shared.exp (version_flags): Likewise. * testsuite/libphobos.shared/host.c: Update test. * testsuite/libphobos.shared/load.d: Update test. * testsuite/libphobos.shared/load_13414.d: Update test. * testsuite/libphobos.thread/fiber_guard_page.d: Update test. * testsuite/libphobos.thread/tlsgc_sections.d: Update test. * testsuite/testsuite_flags.in: Add -fpreview=dip1000 to --gdcflags. * testsuite/libphobos.shared/link_mod_collision.d: Removed. * testsuite/libphobos.shared/load_mod_collision.d: Removed. * testsuite/libphobos.betterc/betterc.exp: New test. * testsuite/libphobos.config/config.exp: New test. * testsuite/libphobos.gc/gc.exp: New test. * testsuite/libphobos.imports/imports.exp: New test. * testsuite/libphobos.lifetime/lifetime.exp: New test. * testsuite/libphobos.unittest/unittest.exp: New test.
2021-09-01libphobos: Don't add zlib when ENABLE_LIBDRUNTIME_ONLYIain Buclaw2-2/+7
The D run-time library does not depend on zlib, so only include it in the library when Phobos is being built as well. libphobos/ChangeLog: * src/Makefile.am: Don't add zlib when ENABLE_LIBDRUNTIME_ONLY. * src/Makefile.in: Regenerate.
2021-06-11d: foreach over a tuple doesn't work on 16-bit targets (PR100999)Iain Buclaw2-8/+9
Improves semantic passes in the front-end around the `foreach' and `static foreach' statements to be more resilient to compiling in a minimal D runtime environment. Checking of the index type has been improved as well so now there won't be needless compiler errors when using 8 or 16-bit integers as index types when the size fits the expected loop range. gcc/d/ChangeLog: PR d/100999 * dmd/MERGE: Merge upstream dmd 7a3808254. libphobos/ChangeLog: PR d/100999 * src/MERGE: Merge upstream phobos 55bb17543.
2021-05-14Cleanup temp files in libphobos unittest at src/std/process.dBernd Edlinger2-1/+2
2021-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de> * src/std/process.d (unittest): Remove tmpname on exit. * src/MERGE: Merge upstream phobos 63f4caa90.
2021-05-10libphobos: Fix visibility of std.process.searchPathForIain Buclaw2-2/+2
This symbol is used by std.file.thisExePath on OpenBSD. Reviewed-on: https://github.com/dlang/phobos/pull/8041 libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 32cfe9b61.
2021-04-19libphobos: Merge upstream druntime 89f870b7, phobos e6907ff3eIain Buclaw2-5/+48
Phobos changes: - Synchronize C bindings with the latest port fixes in upstream druntime. - Add Config.stderrPassThrough to std.process (PR98494). Reviewed-on: https://github.com/dlang/druntime/pull/3448 https://github.com/dlang/phobos/pull/7984 libphobos/ChangeLog: PR d/98494 * libdruntime/MERGE: Merge upstream druntime 89f870b7. * src/MERGE: Merge upstream phobos e6907ff3e.
2021-04-10libphobos: Build runtime library with -ffunction-sections -fdata-sectionsIain Buclaw2-2/+3
Tests for `-ffunction-sections -fdata-sections' and sets SECTION_FLAGS accordingly. If there is no warning when using it, take advantage of the smaller executables that can be had with `--gc-sections'. libphobos/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Call DRUNTIME_SECTION_FLAGS. * libdruntime/Makefile.am: Add SECTION_FLAGS to AM_DFLAGS. * libdruntime/Makefile.in: Regenerate. * m4/druntime.m4 (DRUNTIME_SECTION_FLAGS): New macro. * src/Makefile.am: Add SECTION_FLAGS to AM_DFLAGS. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate.
2021-04-04d: Merge upstream dmd 3b808e838, druntime 483bc129, phobos f89dc217aIain Buclaw21-699/+714
D front-end changes: - Explicit package visibility attribute is now always applied to introducing scopes. - Added `__traits(totype, string)' to convert mangled type string to an existing type. - Printf-like and scanf-like functions are now detected by prefixing them with `pragma(printf)' for printf-like functions or `pragma(scanf)' for scanf-like functions. - Added `__c_wchar_t', `__c_complex_float', `__c_complex_double', and `__c_complex_real' types for interfacing with C and C++. - Template alias parameters can now be instantiated with basic types, such as `int` or `void function()`. - Mixins can now be used as types in the form `mixin(string) var'. - Mixin expressions can take an argument list, same as `pragma(msg)'. - Implement DIP1034, add `typeof(*null)' types to represent `noreturn'. - `pragma(msg)' can print expressions of type `void'. - It is now an error to use private variables selectively imported from other modules. Due to a bug, some imported private members were visible from other modules, violating the specification. - Added new syntax to declare an alias to a function type using the `alias' syntax based on the assignment operator. - Function literals can now return a value by reference. Phobos changes: - Synchronize C bindings with the latest port fixes in upstream druntime. - Added alias for a `noreturn' type in object.d - Make use of the new `pragma(printf)' and `pragma(scanf)' pragmas, fix all code that got flagged as being incorrect. - Fixed code that relied on bugs in the D import package system. Reviewed-on: https://github.com/dlang/dmd/pull/12339 https://github.com/dlang/druntime/pull/3422 https://github.com/dlang/phobos/pull/7932 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 3b808e838. * Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o. * d-codegen.cc (build_struct_literal): Handle special enums. * d-convert.cc (convert_expr): Handle noreturn type. (convert_for_condition): Likewise. * d-target.cc (Target::_init): Set type for wchar_t. (TargetCPP::derivedClassOffset): New method. (Target::libraryObjectMonitors): New method. * decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of type noreturn. * toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning noreturn types. * types.cc (TypeVisitor::visit (TypeNoreturn *)): New method. (TypeVisitor::visit (TypeEnum *)): Handle special enums. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 483bc129. * libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/fcntl.d. (DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/unistd.d. (DRUNTIME_DSOURCES_WINDOWS): Add core/sys/windows/stdc/malloc.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos f89dc217a. * src/Makefile.am (PHOBOS_DSOURCES): Add std/regex/internal/tests2.d. * src/Makefile.in: Regenerate. * testsuite/libphobos.exceptions/chain.d: Fix format arguments. * testsuite/libphobos.exceptions/line_trace.d: Likewise.
2021-03-26libphobos: Build all modules with -fversion=Shared when configured with ↵Iain Buclaw2-2/+5
--enable-shared The libgdruntime_convenience library was built with `-fversion=Shared', but the libphobos part wasn't when creating the static library. As there are no issues compiling in Shared code into the static library, to avoid mismatches the flag is now always present when --enable-shared is turned on. Libtool's compiler PIC D flag is now the combination of compiler PIC and D Shared flags, and AM_DFLAGS passes `-prefer-pic' to libtool unless --enable-shared is turned off. libphobos/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Substitute enable_shared, enable_static, and phobos_lt_pic_flag. * libdruntime/Makefile.am (AM_DFLAGS): Replace phobos_compiler_pic_flag with phobos_lt_pic_flags, and phobos_compiler_shared_flag. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am (AM_DFLAGS): Replace phobos_compiler_pic_flag with phobos_lt_pic_flag, and phobos_compiler_shared_flag. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/libphobos.druntime_shared/druntime_shared.exp: Remove -fversion=Shared and -fno-moduleinfo from default extra test flags. * testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise. * testsuite/testsuite_flags.in: Add phobos_compiler_shared_flag to --gdcflags.
2021-02-03libphobos: Merge upstream druntime 9d0c8364, phobos 9d575282e.Iain Buclaw13-158/+412
Druntime changes: - Add platform-specific bindings for stdlib.h and sys/syctl.h. - Add darwin bindings for mach/dyld.h. - Fix solaris bindings for locale.h (PR98910). - Remove deprecated bindings from the module headers. Phobos changes: - Backport platform-specific fixes for std.conv, std.datetime, std.exception, std.experimental.allocator, std.file, std.math, std.parallelism, std.socket, std.stdio, and std.system. Reviewed-on: https://github.com/dlang/druntime/pull/3363 https://github.com/dlang/phobos/pull/7784 libphobos/ChangeLog: PR d/98910 * libdruntime/MERGE: Merge upstream druntime 9d0c8364. * libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add core/internal/attributes.d (DRUNTIME_DSOURCES_BIONIC): Add core/sys/bionic/stdlib.d. (DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/stdlib.d, and core/sys/darwin/sys/sysctl.d. (DRUNTIME_DSOURCES_DRAGONFLYBSD): Add core/sys/dragonflybsd/stdlib.d, and core/sys/dragonflybsd/sys/sysctl.d. (DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/stdlib.d, and core/sys/freebsd/sys/sysctl.d. (DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/stdlib.d, and core/sys/netbsd/sys/sysctl.d. (DRUNTIME_DSOURCES_OPENBSD): Add core/sys/openbsd/stdlib.d, and core/sys/openbsd/sys/sysctl.d. (DRUNTIME_DSOURCES_SOLARIS): Add core/sys/solaris/stdlib.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 9d575282e.
2021-01-26d: Merge upstream dmd 609c3ce2d, phobos 3dd5df686Iain Buclaw4-312/+347
D front-end changes: - Contracts for pre- and postconditions are now implicitly "this" const, so that state can no longer be altered in these functions. - Inside a constructor scope, assigning to aggregate declaration members is done by considering the first assignment as initialization and subsequent assignments as modifications of the constructed object. For const/immutable fields the initialization is accepted in the constructor but subsequent modifications are not. However this rule did not apply when inside a constructor scope there is a call to a different constructor. This been changed so it is now an error when there's a double initialization of immutable fields inside a constructor. Phobos changes: - Don't run unit-tests for unsupported clocks in std.datetime. The phobos and phobos_shared tests now add -fversion=Linux_Pre_2639 if required. - Deprecate public extern(C) bindings for getline and getdelim in std.stdio. The correct module for bindings is core.sys.posix.stdio. Reviewed-on: https://github.com/dlang/dmd/pull/12153 https://github.com/dlang/phobos/pull/7768 gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 609c3ce2d. * d-compiler.cc (Compiler::loadModule): Rename to ... (Compiler::onParseModule): ... this. (Compiler::onImport): New function. * d-lang.cc (d_parse_file): Remove call to Compiler::loadModule. libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 3dd5df686. * testsuite/libphobos.phobos/phobos.exp: Add compiler flag -fversion=Linux_Pre_2639 if target is linux_pre_2639. * testsuite/libphobos.phobos_shared/phobos_shared.exp: Likewise.
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-11-27libphobos: Fix segfault at run-time when using custom Fibers (PR 98025)Iain Buclaw1-0/+1
When libphobos is configured with --enable-cet, this adds extra fields to the Fiber class to support the ucontext_t fallback implementation. These fields get omitted when compiling user code unless they also used `-fversion=CET' to build their project, which resulted in data being overwritten from within swapcontext(). On reviewing the ucontext_t definitions, it was found that the shadow stack fields were missing, and the struct size didn't match up on X32. This has been fixed in upstream druntime and merged down here. Reviewed-on: https://github.com/dlang/druntime/pull/3293 libphobos/ChangeLog: PR d/98025 * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (DCFG_ENABLE_CET): Substitute. * libdruntime/MERGE: Merge upstream druntime 0fe7974c. * libdruntime/Makefile.in: Regenerate. * libdruntime/core/thread.d: Import gcc.config. (class Fiber): Add ucontext_t fields when GNU_Enable_CET is true. * libdruntime/gcc/config.d.in (GNU_Enable_CET): Define. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate.
2020-11-27libphobos: Merge upstream phobos 38873fe6e.Iain Buclaw6-41/+92
Adds support for FreeBSD/x86 53-bit precision reals, and removes all support code and tests for the extern(Pascal) calling convention. Reviewed-on: https://github.com/dlang/phobos/pull/7704 https://github.com/dlang/phobos/pull/7705 libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 38873fe6e.
2020-11-18libphobos: Merge upstream phobos 7948e0967.Iain Buclaw2-268/+1
Removes deprecated functions from std.string module. Reviewed-on: https://github.com/dlang/phobos/pull/7694 libphobos/ChangeLog: * src/MERGE: Merge upstream phobos 7948e0967.
2020-09-10libphobos: libdruntime doesn't support shadow stack (PR95680)Iain Buclaw2-3/+9
The first implementation hit a front-end implementation bug where version conditions are resolved ahead of static if confitions. The logic for whether to use asm implemented fiber_switchContext or libc's swapcontext has been moved from GNU_Enable_CET to version CET. libphobos/ChangeLog: PR d/95680 PR d/97007 * Makefile.am (AM_MAKEFLAGS): Remove $(CET_FLAGS). * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (DCFG_ENABLE_CET): Remove substitution. (CET_DFLAGS): Substitute. * libdruntime/Makefile.am (AM_DFLAGS): Add $(CET_DFLAGS). (AM_CFLAGS): Add $(CET_FLAGS). (AM_CCASFLAGS): Likewise. * libdruntime/Makefile.in: Regenerate. * libdruntime/core/thread.d: Replace static if GNU_Enable_CET condition with `version (CET)'. * libdruntime/gcc/config.d.in (GNU_Enable_CET): Remove. * src/Makefile.am (AM_DFLAGS): Add $(CET_DFLAGS). (AM_CFLAGS): Add $(CET_FLAGS). * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add $(CET_DFLAGS) to --gdcflags.
2020-09-08libphobos: libdruntime doesn't support shadow stack (PR95680)Iain Buclaw1-0/+4
Rather than implementing support within D runtime itself, use libc getcontext/swapcontext functions if CET is enabled. Removes whatever CET support was in the switchContext routine for x86 D runtime, along with setting version AsmExternal, so that the fallback ucontext_t implementation is used, which is capable of doing shadow stack handling. libphobos/ChangeLog: PR d/95680 * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (DCFG_ENABLE_CET): Substitute. * libdruntime/Makefile.in: Regenerate. * libdruntime/config/x86/switchcontext.S: Remove CET support code. * libdruntime/core/thread.d: Import gcc.config. Don't set version AsmExternal when GNU_Enable_CET is true. * libdruntime/gcc/config.d.in (GNU_Enable_CET): Define. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate.
2020-06-25d: Turn on deprecation warnings by default.Iain Buclaw2-2/+2
This is the default in the upstream reference compiler, and can reduce some confusion when comparing warning/error messages of gdc and dmd side by side. Merges libphobos with upstream druntime d05ebaad and phobos 021ae0df7. Reviewed-on: https://github.com/dlang/druntime/pull/3127 https://github.com/dlang/phobos/pull/7521 gcc/d/ChangeLog: * d-lang.cc (d_init_options): Turn on deprecation warnings by default. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime d05ebaad. * src/MERGE: Merge upstream phobos 021ae0df7. * testsuite/libphobos.typeinfo/struct-align.d: Remove empty statement. gcc/testsuite/ChangeLog: * gdc.dg/asm1.d: Don't use deprecated asm syntax. * gdc.dg/compilable.d: Add public to selective import. * gdc.dg/lto/ltotests_0.d: Explicitly catch Throwable. * gdc.dg/runnable.d: Remove empty statement.
2020-05-17libphobos: Merge upstream druntime 5cc061a8, phobos 64ed4684fIain Buclaw3-13/+39
- core.cpuid has been fixed to not use i7 detection on AMD processors. - std.net.curl has been fixed to correctly handle HTTP/2 status lines. - std.zip has had a test fixed to not rely on unzip being installed. Fixes: PR d/95166 PR d/95167 PR d/95168 Reviewed-on: https://github.com/dlang/druntime/pull/3107 https://github.com/dlang/phobos/pull/7486
2020-04-21libphobos: Remove GDCFLAGSX variable from configure scripts.Iain Buclaw1-1/+0
Always run testsuite with same GDCFLAGS as used in build. libphobos/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Remove GDCFLAGSX. * libdruntime/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Use GDCFLAGS in --gdcflags. * testsuite/libphobos.thread/fiber_guard_page.d: Test using -O0.
2020-04-19libphobos: Merge upstream phobos bf0d0a37cIain Buclaw2-53/+87
std.array.Appender and RefAppender: use .opSlice() instead of data() Previously, Appender.data() was used to extract a slice of the Appender's array. Now use the [] slice operator instead. The same goes for RefAppender. Fixes: PR d/94455 Reviewed-on: https://github.com/dlang/phobos/pull/7450
2020-04-19libphobos: Merge upstream phobos 99003a75aIain Buclaw2-3/+3
Fixes hasLength unittest to pass on X32. References: PR d/94609 Reviewed-on: https://github.com/dlang/phobos/pull/7448
2020-04-18libphobos: Add --with-libphobos-druntime-only option.Iain Buclaw2-134/+188
The intended purpose of the option is both for targets that don't support phobos yet, and for gdc itself to support bootstrapping itself as a self-hosted D compiler. The libphobos testsuite has been updated to only add libphobos to the search paths if it's being built. A new D2 testsuite directive RUNNABLE_PHOBOS_TEST has also been patched in to disable some runnable tests that have phobos dependencies, of which is a temporary measure until upstream DMD fixes or removes these tests entirely. gcc/testsuite/ChangeLog: * lib/gdc-utils.exp (gdc-convert-test): Add dg-skip-if for tests that depending on the phobos standard library. libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Add --with-libphobos-druntime-only option and the conditional ENABLE_LIBDRUNTIME_ONLY. * configure.tgt: Define LIBDRUNTIME_ONLY. * src/Makefile.am: Add phobos sources if not ENABLE_LIBDRUNTIME_ONLY. * src/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add phobos path if compiling phobos.
2020-04-10libphobos: Use libdruntime as a convenience library for libphobos.Iain Buclaw2-16/+25
As a prerequesite for PR94304, it becomes easier to manage selectively compiling sublibraries when there's only one library to link to. So a druntime convenience library is built to be part of phobos, however separate druntime library is still built and installed, to allow linking only to the core runtime explicitly, rather than pulling in the entire standard library with it. The gdc driver no longer generates an '-lgdruntime' option, and the inclusion of the libdruntime library path has been removed from the testsuite. gcc/d/ChangeLog: * d-spec.cc (LIBDRUNTIME): Remove. (LIBDRUNTIME_PROFILE): Remove. (lang_specific_driver): Don't link in libgdruntime. gcc/testsuite/ChangeLog: * lib/gdc.exp (gdc_link_flags): Remove libdruntime library path. libphobos/ChangeLog: * d_rules.am (libdgruntime_la_LINK): Move to libdruntime/Makefile.am. (libgphobos_la_LINK): Move to src/Makefile.am * libdruntime/Makefile.am: Add libgdruntime_convenience library. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am (libgphobos_la_LIBADD): Add libgdruntime_convenience library. (libgphobos_la_DEPENDENCIES): Likewise. * src/Makefile.in: Regenerate. * testsuite/lib/libphobos.exp: Remove libdruntime library paths. * testsuite/testsuite_flags.in: Likewise.
2020-04-09libphobos: Add --enable-libphobos-checking configure optionIain Buclaw2-2/+3
As GDCFLAGS is overriden by the top-level make file with '-O2 -g', libphobos ends up always being built with all contracts, invariants, and asserts compiled in. This adds a new configurable that defaults to omit compiling any run-time checks into the library using '-frelease'. Other choices either set the flags '-fno-release', enabling all run-time checks, or '-fassert', which only compiles in asserts. The omission of compiling in contracts results in a smaller library size, with faster build times. libphobos/ChangeLog: PR d/94305 * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Add --enable-libphobos-checking and substitute CHECKING_DFLAGS. Remove -frelease from GDCFLAGS. * libdruntime/Makefile.am: Add CHECKING_DFLAGS to AM_DFLAGS. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am: Add CHECKING_DFLAGS to AM_DFLAGS. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add -fno-release -funittest to --gdcflags.
2020-04-08libphobos: Always build with warning flags enabledIain Buclaw2-2/+8
This moves WARN_DFLAGS from GDCFLAGS to AM_DFLAGS so it is always included in the build and testsuite of libphobos. Currently, this doesn't happen as GDCFLAGS is overriden by it being set at the top-level. libphobos/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Substite WARN_DFLAGS independently of GDCFLAGS. * libdruntime/Makefile.am: Add WARN_DFLAGS to AM_DFLAGS. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am: Add WARN_DFLAGS to AM_DFLAGS. * src/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add WARN_DFLAGS to --gdcflags.
2020-04-08libphobos: Merge upstream phobos fb4f6a713Iain Buclaw2-143/+151
Improves the versioning of IeeeFlags and FloatingPointControl code and unit-tests, making it clearer which targets can and cannot support it. Reviewed-on: https://github.com/dlang/phobos/pull/7435