From c43b5909031c7aa32ac65df3e392a12d32c45194 Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Sun, 2 Jan 2022 13:36:51 +0100 Subject: d: Merge upstream dmd 001bfd97b, druntime 759e6023, phobos 468788323. 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. --- gcc/d/Make-lang.in | 4 +- gcc/d/dmd/MERGE | 2 +- gcc/d/dmd/README.md | 7 +- gcc/d/dmd/VERSION | 2 +- gcc/d/dmd/access.d | 6 +- gcc/d/dmd/aggregate.d | 6 +- gcc/d/dmd/aggregate.h | 6 +- gcc/d/dmd/aliasthis.d | 6 +- gcc/d/dmd/aliasthis.h | 6 +- gcc/d/dmd/apply.d | 6 +- gcc/d/dmd/arrayop.d | 6 +- gcc/d/dmd/arraytypes.d | 6 +- gcc/d/dmd/arraytypes.h | 6 +- gcc/d/dmd/ast_node.d | 6 +- gcc/d/dmd/ast_node.h | 6 +- gcc/d/dmd/astenums.d | 4 +- gcc/d/dmd/attrib.d | 6 +- gcc/d/dmd/attrib.h | 6 +- gcc/d/dmd/blockexit.d | 6 +- gcc/d/dmd/builtin.d | 6 +- gcc/d/dmd/canthrow.d | 6 +- gcc/d/dmd/chkformat.d | 12 +- gcc/d/dmd/clone.d | 6 +- gcc/d/dmd/common/file.d | 6 +- gcc/d/dmd/common/outbuffer.d | 6 +- gcc/d/dmd/common/outbuffer.h | 6 +- gcc/d/dmd/common/string.d | 6 +- gcc/d/dmd/compiler.d | 6 +- gcc/d/dmd/compiler.h | 6 +- gcc/d/dmd/complex.d | 112 ---- gcc/d/dmd/complex_t.h | 71 --- gcc/d/dmd/cond.d | 6 +- gcc/d/dmd/cond.h | 6 +- gcc/d/dmd/constfold.d | 10 +- gcc/d/dmd/cparse.d | 6 +- gcc/d/dmd/cppmangle.d | 6 +- gcc/d/dmd/ctfe.h | 6 +- gcc/d/dmd/ctfeexpr.d | 21 +- gcc/d/dmd/ctorflow.d | 6 +- gcc/d/dmd/dcast.d | 8 +- gcc/d/dmd/dclass.d | 6 +- gcc/d/dmd/declaration.d | 6 +- gcc/d/dmd/declaration.h | 6 +- gcc/d/dmd/delegatize.d | 6 +- gcc/d/dmd/denum.d | 6 +- gcc/d/dmd/dimport.d | 6 +- gcc/d/dmd/dinterpret.d | 8 +- gcc/d/dmd/dmacro.d | 6 +- gcc/d/dmd/dmangle.d | 8 +- gcc/d/dmd/dmodule.d | 8 +- gcc/d/dmd/doc.d | 8 +- gcc/d/dmd/doc.h | 6 +- gcc/d/dmd/dscope.d | 6 +- gcc/d/dmd/dstruct.d | 6 +- gcc/d/dmd/dsymbol.d | 6 +- gcc/d/dmd/dsymbol.h | 6 +- gcc/d/dmd/dsymbolsem.d | 8 +- gcc/d/dmd/dtemplate.d | 6 +- gcc/d/dmd/dtoh.d | 6 +- gcc/d/dmd/dversion.d | 6 +- gcc/d/dmd/entity.d | 10 +- gcc/d/dmd/enum.h | 6 +- gcc/d/dmd/errors.d | 6 +- gcc/d/dmd/errors.h | 6 +- gcc/d/dmd/escape.d | 6 +- gcc/d/dmd/expression.d | 52 +- gcc/d/dmd/expression.h | 8 +- gcc/d/dmd/expressionsem.d | 14 +- gcc/d/dmd/file_manager.d | 4 +- gcc/d/dmd/file_manager.h | 6 +- gcc/d/dmd/foreachvar.d | 6 +- gcc/d/dmd/func.d | 6 +- gcc/d/dmd/globals.d | 14 +- gcc/d/dmd/globals.h | 8 +- gcc/d/dmd/gluelayer.d | 6 +- gcc/d/dmd/hdrgen.d | 8 +- gcc/d/dmd/hdrgen.h | 6 +- gcc/d/dmd/iasm.d | 6 +- gcc/d/dmd/iasmgcc.d | 4 +- gcc/d/dmd/id.d | 6 +- gcc/d/dmd/id.h | 6 +- gcc/d/dmd/identifier.d | 8 +- gcc/d/dmd/identifier.h | 6 +- gcc/d/dmd/impcnvtab.d | 6 +- gcc/d/dmd/imphint.d | 6 +- gcc/d/dmd/import.h | 6 +- gcc/d/dmd/importc.d | 6 +- gcc/d/dmd/init.d | 6 +- gcc/d/dmd/init.h | 6 +- gcc/d/dmd/initsem.d | 6 +- gcc/d/dmd/inline.d | 6 +- gcc/d/dmd/intrange.d | 8 +- gcc/d/dmd/json.d | 6 +- gcc/d/dmd/json.h | 6 +- gcc/d/dmd/lambdacomp.d | 6 +- gcc/d/dmd/lexer.d | 8 +- gcc/d/dmd/mangle.h | 6 +- gcc/d/dmd/module.h | 6 +- gcc/d/dmd/mtype.d | 6 +- gcc/d/dmd/mtype.h | 6 +- gcc/d/dmd/nogc.d | 6 +- gcc/d/dmd/nspace.d | 6 +- gcc/d/dmd/nspace.h | 6 +- gcc/d/dmd/ob.d | 6 +- gcc/d/dmd/objc.d | 6 +- gcc/d/dmd/objc.h | 6 +- gcc/d/dmd/opover.d | 6 +- gcc/d/dmd/optimize.d | 6 +- gcc/d/dmd/parse.d | 20 +- gcc/d/dmd/printast.d | 6 +- gcc/d/dmd/root/README.md | 5 +- gcc/d/dmd/root/aav.d | 6 +- gcc/d/dmd/root/array.d | 6 +- gcc/d/dmd/root/array.h | 6 +- gcc/d/dmd/root/bitarray.d | 6 +- gcc/d/dmd/root/bitarray.h | 6 +- gcc/d/dmd/root/complex.d | 112 ++++ gcc/d/dmd/root/complex_t.h | 71 +++ gcc/d/dmd/root/ctfloat.d | 6 +- gcc/d/dmd/root/ctfloat.h | 6 +- gcc/d/dmd/root/dcompat.h | 6 +- gcc/d/dmd/root/file.d | 6 +- gcc/d/dmd/root/file.h | 6 +- gcc/d/dmd/root/filename.d | 6 +- gcc/d/dmd/root/filename.h | 6 +- gcc/d/dmd/root/hash.d | 6 +- gcc/d/dmd/root/object.h | 6 +- gcc/d/dmd/root/optional.d | 6 +- gcc/d/dmd/root/optional.h | 6 +- gcc/d/dmd/root/port.d | 6 +- gcc/d/dmd/root/port.h | 6 +- gcc/d/dmd/root/region.d | 6 +- gcc/d/dmd/root/rmem.d | 6 +- gcc/d/dmd/root/rmem.h | 6 +- gcc/d/dmd/root/rootobject.d | 6 +- gcc/d/dmd/root/speller.d | 6 +- gcc/d/dmd/root/string.d | 6 +- gcc/d/dmd/root/stringtable.d | 8 +- gcc/d/dmd/root/utf.d | 561 +++++++++++++++++++++ gcc/d/dmd/safe.d | 6 +- gcc/d/dmd/sapply.d | 6 +- gcc/d/dmd/scope.h | 6 +- gcc/d/dmd/semantic2.d | 8 +- gcc/d/dmd/semantic3.d | 8 +- gcc/d/dmd/sideeffect.d | 6 +- gcc/d/dmd/statement.d | 8 +- gcc/d/dmd/statement.h | 6 +- gcc/d/dmd/statement_rewrite_walker.d | 6 +- gcc/d/dmd/statementsem.d | 6 +- gcc/d/dmd/staticassert.d | 6 +- gcc/d/dmd/staticassert.h | 6 +- gcc/d/dmd/staticcond.d | 6 +- gcc/d/dmd/stmtstate.d | 6 +- gcc/d/dmd/target.d | 8 +- gcc/d/dmd/target.h | 6 +- gcc/d/dmd/template.h | 6 +- gcc/d/dmd/templateparamsem.d | 6 +- gcc/d/dmd/tokens.d | 8 +- gcc/d/dmd/tokens.h | 6 +- gcc/d/dmd/traits.d | 6 +- gcc/d/dmd/typesem.d | 10 +- gcc/d/dmd/typinf.d | 6 +- gcc/d/dmd/utf.d | 561 --------------------- gcc/d/dmd/utils.d | 6 +- gcc/d/dmd/version.h | 6 +- gcc/d/dmd/visitor.d | 6 +- gcc/d/dmd/visitor.h | 6 +- gcc/testsuite/gdc.test/compilable/99bottles.d | 2 +- gcc/testsuite/gdc.test/compilable/art4769.d | 2 +- gcc/testsuite/gdc.test/compilable/test69.d | 2 +- gcc/testsuite/gdc.test/fail_compilation/fail11.d | 2 +- gcc/testsuite/gdc.test/fail_compilation/fail15.d | 2 +- gcc/testsuite/gdc.test/fail_compilation/fail35.d | 2 +- gcc/testsuite/gdc.test/fail_compilation/fail73.d | 2 +- .../fail_compilation/misc_parser_err_cov1.d | 12 +- gcc/testsuite/gdc.test/fail_compilation/parseStc.d | 13 +- gcc/testsuite/gdc.test/runnable/mars1.d | 4 +- gcc/testsuite/gdc.test/runnable/template1.d | 4 +- gcc/testsuite/gdc.test/runnable/template2.d | 2 +- gcc/testsuite/gdc.test/runnable/template9.d | 2 +- gcc/testsuite/gdc.test/runnable/test12.d | 2 +- gcc/testsuite/gdc.test/runnable/test15.d | 2 +- gcc/testsuite/gdc.test/runnable/test20855.d | 1 + gcc/testsuite/gdc.test/runnable/test22.d | 2 +- gcc/testsuite/gdc.test/runnable/testarray.d | 2 +- gcc/testsuite/gdc.test/runnable/testcontracts.d | 2 +- gcc/testsuite/gdc.test/runnable/testsafe.d | 10 +- gcc/testsuite/gdc.test/runnable/traits_child.d | 2 +- gcc/testsuite/gdc.test/runnable/xtest46.d | 10 +- 189 files changed, 1347 insertions(+), 1320 deletions(-) delete mode 100644 gcc/d/dmd/complex.d delete mode 100644 gcc/d/dmd/complex_t.h create mode 100644 gcc/d/dmd/root/complex.d create mode 100644 gcc/d/dmd/root/complex_t.h create mode 100644 gcc/d/dmd/root/utf.d delete mode 100644 gcc/d/dmd/utf.d (limited to 'gcc') diff --git a/gcc/d/Make-lang.in b/gcc/d/Make-lang.in index 06b8c89..6c90657 100644 --- a/gcc/d/Make-lang.in +++ b/gcc/d/Make-lang.in @@ -93,7 +93,6 @@ D_FRONTEND_OBJS = \ d/common-outbuffer.o \ d/common-string.o \ d/compiler.o \ - d/complex.o \ d/cond.o \ d/constfold.o \ d/cparse.o \ @@ -157,6 +156,7 @@ D_FRONTEND_OBJS = \ d/root-aav.o \ d/root-array.o \ d/root-bitarray.o \ + d/root-complex.o \ d/root-ctfloat.o \ d/root-file.o \ d/root-filename.o \ @@ -170,6 +170,7 @@ D_FRONTEND_OBJS = \ d/root-speller.o \ d/root-string.o \ d/root-stringtable.o \ + d/root-utf.o \ d/safe.o \ d/sapply.o \ d/semantic2.o \ @@ -188,7 +189,6 @@ D_FRONTEND_OBJS = \ d/transitivevisitor.o \ d/typesem.o \ d/typinf.o \ - d/utf.o \ d/utils.o \ d/visitor.o diff --git a/gcc/d/dmd/MERGE b/gcc/d/dmd/MERGE index b42576c..5915706 100644 --- a/gcc/d/dmd/MERGE +++ b/gcc/d/dmd/MERGE @@ -1,4 +1,4 @@ -ad8412530e607ffebec36f2dbdff1a6f2798faf7 +001bfd97b0e75423970260dac54f453be9b57f4c The first line of this file holds the git revision number of the last merge done from the dlang/dmd repository. diff --git a/gcc/d/dmd/README.md b/gcc/d/dmd/README.md index 3cb7e12..6b91e22 100644 --- a/gcc/d/dmd/README.md +++ b/gcc/d/dmd/README.md @@ -2,12 +2,12 @@ This is the source code to the DMD compiler for the D Programming Language defined in the documents at -http://dlang.org/ +https://dlang.org/ These sources are free, they are redistributable and modifiable under the terms of the Boost Software License, Version 1.0. The terms of this license are in the file boostlicense.txt, -or see http://www.boost.org/LICENSE_1_0.txt. +or see https://www.boost.org/LICENSE_1_0.txt. If a particular file has a different license in it, that overrides this license for that file. @@ -247,12 +247,9 @@ Note: many other utilities are in [dmd/root](https://github.com/dlang/dmd/tree/m | File | Purpose | |-----------------------------------------------------------------------------------|---------------------------------------------------| -| [env.d](https://github.com/dlang/dmd/blob/master/src/dmd/env.d) | Modify environment variables | | [console.d](https://github.com/dlang/dmd/blob/master/src/dmd/console.d) | Print error messages in color | -| [utf.d](https://github.com/dlang/dmd/blob/master/src/dmd/utf.d) | Encoding/decoding Unicode text | | [file_manager.d](https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.d) | Keep file contents in memory | | [utils.d](https://github.com/dlang/dmd/blob/master/src/dmd/utils.d) | Utility functions related to files and file paths | -| [complex.d](https://github.com/dlang/dmd/blob/master/src/dmd/complex.d) | A complex number type | | File | Purpose | |---------------------------------------------------------------------------------|---------------------------------------------------------------| diff --git a/gcc/d/dmd/VERSION b/gcc/d/dmd/VERSION index 822edd4..0aa03f4 100644 --- a/gcc/d/dmd/VERSION +++ b/gcc/d/dmd/VERSION @@ -1 +1 @@ -v2.098.1-beta.1 +v2.098.1 diff --git a/gcc/d/dmd/access.d b/gcc/d/dmd/access.d index d8a6517..51ef049 100644 --- a/gcc/d/dmd/access.d +++ b/gcc/d/dmd/access.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/attribute.html#visibility_attributes, Visibility Attributes) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/access.d, _access.d) * Documentation: https://dlang.org/phobos/dmd_access.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/access.d diff --git a/gcc/d/dmd/aggregate.d b/gcc/d/dmd/aggregate.d index dc772e8..1add36a 100644 --- a/gcc/d/dmd/aggregate.d +++ b/gcc/d/dmd/aggregate.d @@ -4,9 +4,9 @@ * Specification: $(LINK2 https://dlang.org/spec/struct.html, Structs, Unions), * $(LINK2 https://dlang.org/spec/class.html, Class). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aggregate.d, _aggregate.d) * Documentation: https://dlang.org/phobos/dmd_aggregate.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aggregate.d diff --git a/gcc/d/dmd/aggregate.h b/gcc/d/dmd/aggregate.h index 48e5f4a..796144a 100644 --- a/gcc/d/dmd/aggregate.h +++ b/gcc/d/dmd/aggregate.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/aggregate.h */ diff --git a/gcc/d/dmd/aliasthis.d b/gcc/d/dmd/aliasthis.d index 80db47d..458e821 100644 --- a/gcc/d/dmd/aliasthis.d +++ b/gcc/d/dmd/aliasthis.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/class.html#alias-this, Alias This) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.d, _aliasthis.d) * Documentation: https://dlang.org/phobos/dmd_aliasthis.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/aliasthis.d diff --git a/gcc/d/dmd/aliasthis.h b/gcc/d/dmd/aliasthis.h index de93a8e..3b67903 100644 --- a/gcc/d/dmd/aliasthis.h +++ b/gcc/d/dmd/aliasthis.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2009-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2009-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/aliasthis.h */ diff --git a/gcc/d/dmd/apply.d b/gcc/d/dmd/apply.d index ab427e8..75b4af1 100644 --- a/gcc/d/dmd/apply.d +++ b/gcc/d/dmd/apply.d @@ -1,9 +1,9 @@ /** * A depth-first visitor for expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/apply.d, _apply.d) * Documentation: https://dlang.org/phobos/dmd_apply.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/apply.d diff --git a/gcc/d/dmd/arrayop.d b/gcc/d/dmd/arrayop.d index a234501..e82413f 100644 --- a/gcc/d/dmd/arrayop.d +++ b/gcc/d/dmd/arrayop.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/arrays.html#array-operations, Array Operations) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/arrayop.d, _arrayop.d) * Documentation: https://dlang.org/phobos/dmd_arrayop.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/arrayop.d diff --git a/gcc/d/dmd/arraytypes.d b/gcc/d/dmd/arraytypes.d index b1f8d86..ffbaf95 100644 --- a/gcc/d/dmd/arraytypes.d +++ b/gcc/d/dmd/arraytypes.d @@ -1,9 +1,9 @@ /** * Provide aliases for arrays of certain declarations or statements. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/arraytypes.d, _arraytypes.d) * Documentation: https://dlang.org/phobos/dmd_arraytypes.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/arraytypes.d diff --git a/gcc/d/dmd/arraytypes.h b/gcc/d/dmd/arraytypes.h index 602d890..d7dfa0b 100644 --- a/gcc/d/dmd/arraytypes.h +++ b/gcc/d/dmd/arraytypes.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2006-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2006-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/arraytypes.h */ diff --git a/gcc/d/dmd/ast_node.d b/gcc/d/dmd/ast_node.d index 82d62a0..843cc02 100644 --- a/gcc/d/dmd/ast_node.d +++ b/gcc/d/dmd/ast_node.d @@ -1,9 +1,9 @@ /** * Defines the base class for all nodes which are part of the AST. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ast_node.d, _ast_node.d) * Documentation: https://dlang.org/phobos/dmd_ast_node.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ast_node.d diff --git a/gcc/d/dmd/ast_node.h b/gcc/d/dmd/ast_node.h index 5576dd7..0e04e38 100644 --- a/gcc/d/dmd/ast_node.h +++ b/gcc/d/dmd/ast_node.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/ast_node.h */ diff --git a/gcc/d/dmd/astenums.d b/gcc/d/dmd/astenums.d index f638765..3e86cfa 100644 --- a/gcc/d/dmd/astenums.d +++ b/gcc/d/dmd/astenums.d @@ -1,8 +1,8 @@ /** * Defines enums common to dmd and dmd as parse library. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/astenums.d, _astenums.d) * Documentation: https://dlang.org/phobos/dmd_astenums.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/astenums.d diff --git a/gcc/d/dmd/attrib.d b/gcc/d/dmd/attrib.d index e8704aa..5d44760 100644 --- a/gcc/d/dmd/attrib.d +++ b/gcc/d/dmd/attrib.d @@ -14,9 +14,9 @@ * - Protection (`private`, `public`) * - Deprecated declarations (`@deprecated`) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/attrib.d, _attrib.d) * Documentation: https://dlang.org/phobos/dmd_attrib.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/attrib.d diff --git a/gcc/d/dmd/attrib.h b/gcc/d/dmd/attrib.h index e63c80b..812729b 100644 --- a/gcc/d/dmd/attrib.h +++ b/gcc/d/dmd/attrib.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/attrib.h */ diff --git a/gcc/d/dmd/blockexit.d b/gcc/d/dmd/blockexit.d index 5945644..c4a9577 100644 --- a/gcc/d/dmd/blockexit.d +++ b/gcc/d/dmd/blockexit.d @@ -1,9 +1,9 @@ /** * Find out in what ways control flow can exit a statement block. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/blockexit.d, _blockexit.d) * Documentation: https://dlang.org/phobos/dmd_blockexit.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/blockexit.d diff --git a/gcc/d/dmd/builtin.d b/gcc/d/dmd/builtin.d index 2f5b6c7..06db97b 100644 --- a/gcc/d/dmd/builtin.d +++ b/gcc/d/dmd/builtin.d @@ -3,9 +3,9 @@ * * Currently includes functions from `std.math`, `core.math` and `core.bitop`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/builtin.d, _builtin.d) * Documentation: https://dlang.org/phobos/dmd_builtin.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/builtin.d diff --git a/gcc/d/dmd/canthrow.d b/gcc/d/dmd/canthrow.d index b187715..e6eb0ac 100644 --- a/gcc/d/dmd/canthrow.d +++ b/gcc/d/dmd/canthrow.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#nothrow-functions, Nothrow Functions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/canthrow.d, _canthrow.d) * Documentation: https://dlang.org/phobos/dmd_canthrow.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/canthrow.d diff --git a/gcc/d/dmd/chkformat.d b/gcc/d/dmd/chkformat.d index b168b4f..a3f3bc4 100644 --- a/gcc/d/dmd/chkformat.d +++ b/gcc/d/dmd/chkformat.d @@ -1,9 +1,9 @@ /** * Check the arguments to `printf` and `scanf` against the `format` string. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/chkformat.d, _chkformat.d) * Documentation: https://dlang.org/phobos/dmd_chkformat.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/chkformat.d @@ -57,7 +57,7 @@ import dmd.target; * `true` if errors occurred * References: * C99 7.19.6.1 - * http://www.cplusplus.com/reference/cstdio/printf/ + * https://www.cplusplus.com/reference/cstdio/printf/ */ bool checkPrintfFormat(ref const Loc loc, scope const char[] format, scope Expression[] args, bool isVa_list) { @@ -331,7 +331,7 @@ bool checkPrintfFormat(ref const Loc loc, scope const char[] format, scope Expre * `true` if errors occurred * References: * C99 7.19.6.2 - * http://www.cplusplus.com/reference/cstdio/scanf/ + * https://www.cplusplus.com/reference/cstdio/scanf/ */ bool checkScanfFormat(ref const Loc loc, scope const char[] format, scope Expression[] args, bool isVa_list) { @@ -955,7 +955,7 @@ Format parseGenericFormatSpecifier(scope const char[] format, case 'm': if (useGNUExts) { - // http://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html + // https://www.gnu.org/software/libc/manual/html_node/Other-Output-Conversions.html specifier = Format.GNU_m; break; } diff --git a/gcc/d/dmd/clone.d b/gcc/d/dmd/clone.d index c536d25..1a143cb 100644 --- a/gcc/d/dmd/clone.d +++ b/gcc/d/dmd/clone.d @@ -2,9 +2,9 @@ * Builds struct member functions if needed and not defined by the user. * Includes `opEquals`, `opAssign`, post blit, copy constructor and destructor. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/clone.d, _clone.d) * Documentation: https://dlang.org/phobos/dmd_clone.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/clone.d diff --git a/gcc/d/dmd/common/file.d b/gcc/d/dmd/common/file.d index b8cde37..e4483d5 100644 --- a/gcc/d/dmd/common/file.d +++ b/gcc/d/dmd/common/file.d @@ -4,9 +4,9 @@ * Functions and objects dedicated to file I/O and management. TODO: Move here artifacts * from places such as root/ so both the frontend and the backend have access to them. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/file.d, common/_file.d) * Documentation: https://dlang.org/phobos/dmd_common_file.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/file.d diff --git a/gcc/d/dmd/common/outbuffer.d b/gcc/d/dmd/common/outbuffer.d index c5a8437..e5cc43b 100644 --- a/gcc/d/dmd/common/outbuffer.d +++ b/gcc/d/dmd/common/outbuffer.d @@ -1,9 +1,9 @@ /** * An expandable buffer in which you can write text or binary data. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/outbuffer.d, root/_outbuffer.d) * Documentation: https://dlang.org/phobos/dmd_root_outbuffer.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/outbuffer.d diff --git a/gcc/d/dmd/common/outbuffer.h b/gcc/d/dmd/common/outbuffer.h index ce23436..fed25c0 100644 --- a/gcc/d/dmd/common/outbuffer.h +++ b/gcc/d/dmd/common/outbuffer.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/common/outbuffer.h */ diff --git a/gcc/d/dmd/common/string.d b/gcc/d/dmd/common/string.d index 026374a..d3bc24f 100644 --- a/gcc/d/dmd/common/string.d +++ b/gcc/d/dmd/common/string.d @@ -1,9 +1,9 @@ /** * Common string functions including filename manipulation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/common/string.d, common/_string.d) * Documentation: https://dlang.org/phobos/dmd_common_string.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/common/string.d diff --git a/gcc/d/dmd/compiler.d b/gcc/d/dmd/compiler.d index 28f9ba6..dd26d40 100644 --- a/gcc/d/dmd/compiler.d +++ b/gcc/d/dmd/compiler.d @@ -1,9 +1,9 @@ /** * Describes a back-end compiler and implements compiler-specific actions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/compiler.d, _compiler.d) * Documentation: https://dlang.org/phobos/dmd_compiler.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/compiler.d diff --git a/gcc/d/dmd/compiler.h b/gcc/d/dmd/compiler.h index 27e87b6..e8b7704 100644 --- a/gcc/d/dmd/compiler.h +++ b/gcc/d/dmd/compiler.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/compiler.h */ diff --git a/gcc/d/dmd/complex.d b/gcc/d/dmd/complex.d deleted file mode 100644 index 84bf5e97..0000000 --- a/gcc/d/dmd/complex.d +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Implements a complex number type. - * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) - * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/complex.d, _complex.d) - * Documentation: https://dlang.org/phobos/dmd_complex.html - * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/complex.d - */ - -module dmd.complex; - -import dmd.root.ctfloat; - -extern (C++) struct complex_t -{ - real_t re; - real_t im; - - this() @disable; - - this(real_t re) - { - this(re, CTFloat.zero); - } - - this(real_t re, real_t im) - { - this.re = re; - this.im = im; - } - - extern (D) complex_t opBinary(string op)(complex_t y) - if (op == "+") - { - return complex_t(re + y.re, im + y.im); - } - - extern (D) complex_t opBinary(string op)(complex_t y) - if (op == "-") - { - return complex_t(re - y.re, im - y.im); - } - - extern (D) complex_t opUnary(string op)() - if (op == "-") - { - return complex_t(-re, -im); - } - - extern (D) complex_t opBinary(string op)(complex_t y) - if (op == "*") - { - return complex_t(re * y.re - im * y.im, im * y.re + re * y.im); - } - - extern (D) complex_t opBinaryRight(string op)(real_t x) - if (op == "*") - { - return complex_t(x) * this; - } - - extern (D) complex_t opBinary(string op)(real_t y) - if (op == "*") - { - return this * complex_t(y); - } - - extern (D) complex_t opBinary(string op)(real_t y) - if (op == "/") - { - return this / complex_t(y); - } - - extern (D) complex_t opBinary(string op)(complex_t y) - if (op == "/") - { - if (CTFloat.fabs(y.re) < CTFloat.fabs(y.im)) - { - const r = y.re / y.im; - const den = y.im + r * y.re; - return complex_t((re * r + im) / den, (im * r - re) / den); - } - else - { - const r = y.im / y.re; - const den = y.re + r * y.im; - return complex_t((re + r * im) / den, (im - r * re) / den); - } - } - - extern (D) bool opCast(T : bool)() const - { - return re || im; - } - - int opEquals(complex_t y) const - { - return re == y.re && im == y.im; - } -} - -extern (C++) real_t creall(complex_t x) -{ - return x.re; -} - -extern (C++) real_t cimagl(complex_t x) -{ - return x.im; -} diff --git a/gcc/d/dmd/complex_t.h b/gcc/d/dmd/complex_t.h deleted file mode 100644 index 3359171..0000000 --- a/gcc/d/dmd/complex_t.h +++ /dev/null @@ -1,71 +0,0 @@ - -/* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * written by Walter Bright - * http://www.digitalmars.com - * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt - * https://github.com/dlang/dmd/blob/master/src/dmd/complex_t.h - */ - -#pragma once - -#include "root/ctfloat.h" - -/* Roll our own complex type for compilers that don't support complex - */ - -struct complex_t -{ - real_t re; - real_t im; - - complex_t(real_t re) : re(re), im(CTFloat::zero) {} - complex_t(real_t re, real_t im) : re(re), im(im) {} - - complex_t operator + (complex_t y) { return complex_t(re + y.re, im + y.im); } - complex_t operator - (complex_t y) { return complex_t(re - y.re, im - y.im); } - complex_t operator - () { return complex_t(-re, -im); } - complex_t operator * (complex_t y) { return complex_t(re * y.re - im * y.im, im * y.re + re * y.im); } - - complex_t operator / (complex_t y) - { - if (CTFloat::fabs(y.re) < CTFloat::fabs(y.im)) - { - real_t r = y.re / y.im; - real_t den = y.im + r * y.re; - return complex_t((re * r + im) / den, - (im * r - re) / den); - } - else - { - real_t r = y.im / y.re; - real_t den = y.re + r * y.im; - return complex_t((re + r * im) / den, - (im - r * re) / den); - } - } - - operator bool () { return re || im; } - - int operator == (complex_t y) { return re == y.re && im == y.im; } - int operator != (complex_t y) { return re != y.re || im != y.im; } - -private: - complex_t() : re(CTFloat::zero), im(CTFloat::zero) {} -}; - -inline complex_t operator * (real_t x, complex_t y) { return complex_t(x) * y; } -inline complex_t operator * (complex_t x, real_t y) { return x * complex_t(y); } -inline complex_t operator / (complex_t x, real_t y) { return x / complex_t(y); } - - -inline real_t creall(complex_t x) -{ - return x.re; -} - -inline real_t cimagl(complex_t x) -{ - return x.im; -} diff --git a/gcc/d/dmd/cond.d b/gcc/d/dmd/cond.d index abf2814..dee0a17 100644 --- a/gcc/d/dmd/cond.d +++ b/gcc/d/dmd/cond.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/version.html, Conditional Compilation) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cond.d, _cond.d) * Documentation: https://dlang.org/phobos/dmd_cond.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cond.d diff --git a/gcc/d/dmd/cond.h b/gcc/d/dmd/cond.h index 4f26116..d69c13e 100644 --- a/gcc/d/dmd/cond.h +++ b/gcc/d/dmd/cond.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/cond.h */ diff --git a/gcc/d/dmd/constfold.d b/gcc/d/dmd/constfold.d index 3cc358e..76e1d7f 100644 --- a/gcc/d/dmd/constfold.d +++ b/gcc/d/dmd/constfold.d @@ -5,9 +5,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/float.html#fp_const_folding, Floating Point Constant Folding) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/constfold.d, _constfold.d) * Documentation: https://dlang.org/phobos/dmd_constfold.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/constfold.d @@ -19,7 +19,6 @@ import core.stdc.string; import core.stdc.stdio; import dmd.arraytypes; import dmd.astenums; -import dmd.complex; import dmd.ctfeexpr; import dmd.declaration; import dmd.dstruct; @@ -27,13 +26,14 @@ import dmd.errors; import dmd.expression; import dmd.globals; import dmd.mtype; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.port; import dmd.root.rmem; +import dmd.root.utf; import dmd.sideeffect; import dmd.target; import dmd.tokens; -import dmd.utf; private enum LOG = false; diff --git a/gcc/d/dmd/cparse.d b/gcc/d/dmd/cparse.d index b1532ad..8d3f3b3 100644 --- a/gcc/d/dmd/cparse.d +++ b/gcc/d/dmd/cparse.d @@ -3,9 +3,9 @@ * * Specification: C11 * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cparse.d, _cparse.d) * Documentation: https://dlang.org/phobos/dmd_cparse.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cparse.d diff --git a/gcc/d/dmd/cppmangle.d b/gcc/d/dmd/cppmangle.d index 4ad79da..7cb2092 100644 --- a/gcc/d/dmd/cppmangle.d +++ b/gcc/d/dmd/cppmangle.d @@ -4,9 +4,9 @@ * This is the POSIX side of the implementation. * It exports two functions to C++, `toCppMangleItanium` and `cppTypeInfoMangleItanium`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/cppmangle.d, _cppmangle.d) * Documentation: https://dlang.org/phobos/dmd_cppmangle.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/cppmangle.d diff --git a/gcc/d/dmd/ctfe.h b/gcc/d/dmd/ctfe.h index 242dd55..5979aa7 100644 --- a/gcc/d/dmd/ctfe.h +++ b/gcc/d/dmd/ctfe.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/ctfe.h */ diff --git a/gcc/d/dmd/ctfeexpr.d b/gcc/d/dmd/ctfeexpr.d index baacaa6..43dce4b 100644 --- a/gcc/d/dmd/ctfeexpr.d +++ b/gcc/d/dmd/ctfeexpr.d @@ -1,9 +1,9 @@ /** * CTFE for expressions involving pointers, slices, array concatenation etc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ctfeexpr.d, _ctfeexpr.d) * Documentation: https://dlang.org/phobos/dmd_ctfeexpr.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ctfeexpr.d @@ -16,7 +16,6 @@ import core.stdc.stdlib; import core.stdc.string; import dmd.arraytypes; import dmd.astenums; -import dmd.complex; import dmd.constfold; import dmd.compiler; import dmd.dclass; @@ -29,6 +28,7 @@ import dmd.expression; import dmd.func; import dmd.globals; import dmd.mtype; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.port; import dmd.root.rmem; @@ -1362,6 +1362,15 @@ private int ctfeRawCmp(const ref Loc loc, Expression e1, Expression e2, bool ide mem.xfree(used); return 0; } + else if (e1.op == EXP.assocArrayLiteral && e2.op == EXP.null_) + { + return e1.isAssocArrayLiteralExp.keys.dim != 0; + } + else if (e1.op == EXP.null_ && e2.op == EXP.assocArrayLiteral) + { + return e2.isAssocArrayLiteralExp.keys.dim != 0; + } + error(loc, "CTFE internal error: bad compare of `%s` and `%s`", e1.toChars(), e2.toChars()); assert(0); } @@ -1553,7 +1562,7 @@ Expression ctfeIndex(UnionExp* pue, const ref Loc loc, Type type, Expression e1, { if (indx >= es1.len) { - error(loc, "string index %llu is out of bounds `[0 .. %zu]`", indx, es1.len); + error(loc, "string index %llu is out of bounds `[0 .. %llu]`", indx, cast(ulong)es1.len); return CTFEExp.cantexp; } emplaceExp!IntegerExp(pue, loc, es1.charAt(indx), type); @@ -1564,7 +1573,7 @@ Expression ctfeIndex(UnionExp* pue, const ref Loc loc, Type type, Expression e1, { if (indx >= ale.elements.dim) { - error(loc, "array index %llu is out of bounds `%s[0 .. %zu]`", indx, e1.toChars(), ale.elements.dim); + error(loc, "array index %llu is out of bounds `%s[0 .. %llu]`", indx, e1.toChars(), cast(ulong)ale.elements.dim); return CTFEExp.cantexp; } Expression e = (*ale.elements)[cast(size_t)indx]; diff --git a/gcc/d/dmd/ctorflow.d b/gcc/d/dmd/ctorflow.d index c8b61be..cc251b0 100644 --- a/gcc/d/dmd/ctorflow.d +++ b/gcc/d/dmd/ctorflow.d @@ -1,9 +1,9 @@ /** * Manage flow analysis for constructors. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ctorflow.d, _ctorflow.d) * Documentation: https://dlang.org/phobos/dmd_ctorflow.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ctorflow.d diff --git a/gcc/d/dmd/dcast.d b/gcc/d/dmd/dcast.d index a572a1f..4a80d17 100644 --- a/gcc/d/dmd/dcast.d +++ b/gcc/d/dmd/dcast.d @@ -1,9 +1,9 @@ /** * Semantic analysis for cast-expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dcast.d, _dcast.d) * Documentation: https://dlang.org/phobos/dmd_dcast.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dcast.d @@ -40,9 +40,9 @@ import dmd.opover; import dmd.root.ctfloat; import dmd.common.outbuffer; import dmd.root.rmem; +import dmd.root.utf; import dmd.tokens; import dmd.typesem; -import dmd.utf; import dmd.visitor; enum LOG = false; diff --git a/gcc/d/dmd/dclass.d b/gcc/d/dmd/dclass.d index 34a236b..1fb4779 100644 --- a/gcc/d/dmd/dclass.d +++ b/gcc/d/dmd/dclass.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/class.html, Classes) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dclass.d, _dclass.d) * Documentation: https://dlang.org/phobos/dmd_dclass.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dclass.d diff --git a/gcc/d/dmd/declaration.d b/gcc/d/dmd/declaration.d index 18c8ca2..aa143d4 100644 --- a/gcc/d/dmd/declaration.d +++ b/gcc/d/dmd/declaration.d @@ -2,9 +2,9 @@ * Miscellaneous declarations, including typedef, alias, variable declarations including the * implicit this declaration, type tuples, ClassInfo, ModuleInfo and various TypeInfos. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/declaration.d, _declaration.d) * Documentation: https://dlang.org/phobos/dmd_declaration.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/declaration.d diff --git a/gcc/d/dmd/declaration.h b/gcc/d/dmd/declaration.h index 884146e..353d36c 100644 --- a/gcc/d/dmd/declaration.h +++ b/gcc/d/dmd/declaration.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/declaration.h */ diff --git a/gcc/d/dmd/delegatize.d b/gcc/d/dmd/delegatize.d index 07c1bbd..77e09bc 100644 --- a/gcc/d/dmd/delegatize.d +++ b/gcc/d/dmd/delegatize.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#lazy-params, Lazy Parameters) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/delegatize.d, _delegatize.d) * Documentation: https://dlang.org/phobos/dmd_delegatize.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/delegatize.d diff --git a/gcc/d/dmd/denum.d b/gcc/d/dmd/denum.d index 54467d8..dd6dd41 100644 --- a/gcc/d/dmd/denum.d +++ b/gcc/d/dmd/denum.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/enum.html, Enums) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/denum.d, _denum.d) * Documentation: https://dlang.org/phobos/dmd_denum.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/denum.d diff --git a/gcc/d/dmd/dimport.d b/gcc/d/dmd/dimport.d index 8cd4364..156cce2 100644 --- a/gcc/d/dmd/dimport.d +++ b/gcc/d/dmd/dimport.d @@ -1,9 +1,9 @@ /** * A `Dsymbol` representing a renamed import. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dimport.d, _dimport.d) * Documentation: https://dlang.org/phobos/dmd_dimport.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dimport.d diff --git a/gcc/d/dmd/dinterpret.d b/gcc/d/dmd/dinterpret.d index fc5b9a8..fb8ed9b 100644 --- a/gcc/d/dmd/dinterpret.d +++ b/gcc/d/dmd/dinterpret.d @@ -3,9 +3,9 @@ * * Specification: ($LINK2 https://dlang.org/spec/function.html#interpretation, Compile Time Function Execution (CTFE)) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dinterpret.d, _dinterpret.d) * Documentation: https://dlang.org/phobos/dmd_dinterpret.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dinterpret.d @@ -46,9 +46,9 @@ import dmd.root.array; import dmd.root.ctfloat; import dmd.root.region; import dmd.root.rootobject; +import dmd.root.utf; import dmd.statement; import dmd.tokens; -import dmd.utf; import dmd.visitor; /************************************* diff --git a/gcc/d/dmd/dmacro.d b/gcc/d/dmd/dmacro.d index 357f7bd..0e891fb 100644 --- a/gcc/d/dmd/dmacro.d +++ b/gcc/d/dmd/dmacro.d @@ -1,9 +1,9 @@ /** * Text macro processor for Ddoc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmacro.d, _dmacro.d) * Documentation: https://dlang.org/phobos/dmd_dmacro.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmacro.d diff --git a/gcc/d/dmd/dmangle.d b/gcc/d/dmd/dmangle.d index 0659680..78d17b2 100644 --- a/gcc/d/dmd/dmangle.d +++ b/gcc/d/dmd/dmangle.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/abi.html#name_mangling, Name Mangling) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmangle.d, _dmangle.d) * Documentation: https://dlang.org/phobos/dmd_dmangle.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmangle.d @@ -143,9 +143,9 @@ import dmd.common.outbuffer; import dmd.root.aav; import dmd.root.string; import dmd.root.stringtable; +import dmd.root.utf; import dmd.target; import dmd.tokens; -import dmd.utf; import dmd.visitor; private immutable char[TMAX] mangleChar = diff --git a/gcc/d/dmd/dmodule.d b/gcc/d/dmd/dmodule.d index 4e00713..46e89d0 100644 --- a/gcc/d/dmd/dmodule.d +++ b/gcc/d/dmd/dmodule.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/module.html, Modules) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dmodule.d, _dmodule.d) * Documentation: https://dlang.org/phobos/dmd_dmodule.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dmodule.d @@ -837,7 +837,7 @@ extern (C++) final class Module : Package if (buf.length >= 2) { /* Convert all non-UTF-8 formats to UTF-8. - * BOM : http://www.unicode.org/faq/utf_bom.html + * BOM : https://www.unicode.org/faq/utf_bom.html * 00 00 FE FF UTF-32BE, big-endian * FF FE 00 00 UTF-32LE, little-endian * FE FF UTF-16BE, big-endian diff --git a/gcc/d/dmd/doc.d b/gcc/d/dmd/doc.d index f9b765c..d03b5bb 100644 --- a/gcc/d/dmd/doc.d +++ b/gcc/d/dmd/doc.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/ddoc.html, Documentation Generator) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/doc.d, _doc.d) * Documentation: https://dlang.org/phobos/dmd_doc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/doc.d @@ -49,8 +49,8 @@ import dmd.common.outbuffer; import dmd.root.port; import dmd.root.rmem; import dmd.root.string; +import dmd.root.utf; import dmd.tokens; -import dmd.utf; import dmd.utils; import dmd.visitor; diff --git a/gcc/d/dmd/doc.h b/gcc/d/dmd/doc.h index a144417..8dc2d9f 100644 --- a/gcc/d/dmd/doc.h +++ b/gcc/d/dmd/doc.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/doc.h */ diff --git a/gcc/d/dmd/dscope.d b/gcc/d/dmd/dscope.d index 42c0d18..07ebc27 100644 --- a/gcc/d/dmd/dscope.d +++ b/gcc/d/dmd/dscope.d @@ -3,9 +3,9 @@ * * Not to be confused with the `scope` storage class. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dscope.d, _dscope.d) * Documentation: https://dlang.org/phobos/dmd_dscope.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dscope.d diff --git a/gcc/d/dmd/dstruct.d b/gcc/d/dmd/dstruct.d index 1f05642..de5f145 100644 --- a/gcc/d/dmd/dstruct.d +++ b/gcc/d/dmd/dstruct.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/struct.html, Structs, Unions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dstruct.d, _dstruct.d) * Documentation: https://dlang.org/phobos/dmd_dstruct.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dstruct.d diff --git a/gcc/d/dmd/dsymbol.d b/gcc/d/dmd/dsymbol.d index e34a94a..c4b3380 100644 --- a/gcc/d/dmd/dsymbol.d +++ b/gcc/d/dmd/dsymbol.d @@ -1,9 +1,9 @@ /** * The base class for a D symbol, which can be a module, variable, function, enum, etc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dsymbol.d, _dsymbol.d) * Documentation: https://dlang.org/phobos/dmd_dsymbol.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbol.d diff --git a/gcc/d/dmd/dsymbol.h b/gcc/d/dmd/dsymbol.h index 668b079..a6bd999 100644 --- a/gcc/d/dmd/dsymbol.h +++ b/gcc/d/dmd/dsymbol.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/dsymbol.h */ diff --git a/gcc/d/dmd/dsymbolsem.d b/gcc/d/dmd/dsymbolsem.d index 118b861..387dfe3 100644 --- a/gcc/d/dmd/dsymbolsem.d +++ b/gcc/d/dmd/dsymbolsem.d @@ -2,9 +2,9 @@ * Does the semantic 1 pass on the AST, which looks at symbol declarations but not initializers * or function bodies. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dsymbolsem.d, _dsymbolsem.d) * Documentation: https://dlang.org/phobos/dmd_dsymbolsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dsymbolsem.d @@ -60,13 +60,13 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; +import dmd.root.utf; import dmd.semantic2; import dmd.semantic3; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; -import dmd.utf; import dmd.utils; import dmd.statement; import dmd.target; diff --git a/gcc/d/dmd/dtemplate.d b/gcc/d/dmd/dtemplate.d index b1760dd..c0d17f7 100644 --- a/gcc/d/dmd/dtemplate.d +++ b/gcc/d/dmd/dtemplate.d @@ -28,9 +28,9 @@ * arguments, and uses it if found. * - Otherwise, the rest of semantic is run on the `TemplateInstance`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dtemplate.d, _dtemplate.d) * Documentation: https://dlang.org/phobos/dmd_dtemplate.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dtemplate.d diff --git a/gcc/d/dmd/dtoh.d b/gcc/d/dmd/dtoh.d index 51f53c8..dbc21b3 100644 --- a/gcc/d/dmd/dtoh.d +++ b/gcc/d/dmd/dtoh.d @@ -2,9 +2,9 @@ * This module contains the implementation of the C++ header generation available through * the command line switch -Hc. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dtohd, _dtoh.d) * Documentation: https://dlang.org/phobos/dmd_dtoh.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dtoh.d diff --git a/gcc/d/dmd/dversion.d b/gcc/d/dmd/dversion.d index 49ee4b3..94753bb 100644 --- a/gcc/d/dmd/dversion.d +++ b/gcc/d/dmd/dversion.d @@ -4,9 +4,9 @@ * Specification: $(LINK2 https://dlang.org/spec/version.html#version-specification, Version Specification), * $(LINK2 https://dlang.org/spec/version.html#debug_specification, Debug Specification). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/dversion.d, _dversion.d) * Documentation: https://dlang.org/phobos/dmd_dversion.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/dversion.d diff --git a/gcc/d/dmd/entity.d b/gcc/d/dmd/entity.d index f22dfdb..ef2fdef 100644 --- a/gcc/d/dmd/entity.d +++ b/gcc/d/dmd/entity.d @@ -3,9 +3,9 @@ * * Specification $(LINK2 https://dlang.org/spec/entity.html, Named Character Entities) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/entity.d, _entity.d) * Documentation: https://dlang.org/phobos/dmd_entity.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/entity.d @@ -36,8 +36,8 @@ private: /********************************************* * Convert from named entity to its encoding. * For reference: - * http://www.htmlhelp.com/reference/html40/entities/ - * http://www.w3.org/2003/entities/2007/w3centities-f.ent + * https://www.htmlhelp.com/reference/html40/entities/ + * https://www.w3.org/2003/entities/2007/w3centities-f.ent */ struct NameId { diff --git a/gcc/d/dmd/enum.h b/gcc/d/dmd/enum.h index 76c1235..ab80c8b 100644 --- a/gcc/d/dmd/enum.h +++ b/gcc/d/dmd/enum.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/enum.h */ diff --git a/gcc/d/dmd/errors.d b/gcc/d/dmd/errors.d index 91a5c77..114bd44 100644 --- a/gcc/d/dmd/errors.d +++ b/gcc/d/dmd/errors.d @@ -1,9 +1,9 @@ /** * Functions for raising errors. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/errors.d, _errors.d) * Documentation: https://dlang.org/phobos/dmd_errors.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/errors.d diff --git a/gcc/d/dmd/errors.h b/gcc/d/dmd/errors.h index 6d9587d..000242c 100644 --- a/gcc/d/dmd/errors.h +++ b/gcc/d/dmd/errors.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/errors.h */ diff --git a/gcc/d/dmd/escape.d b/gcc/d/dmd/escape.d index 62f87e5..e60ee9c 100644 --- a/gcc/d/dmd/escape.d +++ b/gcc/d/dmd/escape.d @@ -1,9 +1,9 @@ /** * Most of the logic to implement scoped pointers and scoped references is here. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/escape.d, _escape.d) * Documentation: https://dlang.org/phobos/dmd_escape.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/escape.d diff --git a/gcc/d/dmd/expression.d b/gcc/d/dmd/expression.d index 749a50a..523015e 100644 --- a/gcc/d/dmd/expression.d +++ b/gcc/d/dmd/expression.d @@ -3,9 +3,9 @@ * * Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expression.d, _expression.d) * Documentation: https://dlang.org/phobos/dmd_expression.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expression.d @@ -26,7 +26,6 @@ import dmd.astenums; import dmd.ast_node; import dmd.gluelayer; import dmd.canthrow; -import dmd.complex; import dmd.constfold; import dmd.ctfeexpr; import dmd.ctorflow; @@ -57,6 +56,7 @@ import dmd.nspace; import dmd.objc; import dmd.opover; import dmd.optimize; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.filename; import dmd.common.outbuffer; @@ -64,12 +64,12 @@ import dmd.root.optional; import dmd.root.rmem; import dmd.root.rootobject; import dmd.root.string; +import dmd.root.utf; import dmd.safe; import dmd.sideeffect; import dmd.target; import dmd.tokens; import dmd.typesem; -import dmd.utf; import dmd.visitor; enum LOGSEMANTIC = false; @@ -659,7 +659,7 @@ enum WANTvalue = 0; // default enum WANTexpand = 1; // expand const/immutable variables if possible /*********************************************************** - * http://dlang.org/spec/expression.html#expression + * https://dlang.org/spec/expression.html#expression */ extern (C++) abstract class Expression : ASTNode { @@ -2262,7 +2262,7 @@ extern (C++) final class DsymbolExp : Expression } /*********************************************************** - * http://dlang.org/spec/expression.html#this + * https://dlang.org/spec/expression.html#this */ extern (C++) class ThisExp : Expression { @@ -2318,7 +2318,7 @@ extern (C++) class ThisExp : Expression } /*********************************************************** - * http://dlang.org/spec/expression.html#super + * https://dlang.org/spec/expression.html#super */ extern (C++) final class SuperExp : ThisExp { @@ -2334,7 +2334,7 @@ extern (C++) final class SuperExp : ThisExp } /*********************************************************** - * http://dlang.org/spec/expression.html#null + * https://dlang.org/spec/expression.html#null */ extern (C++) final class NullExp : Expression { @@ -2380,7 +2380,7 @@ extern (C++) final class NullExp : Expression } /*********************************************************** - * http://dlang.org/spec/expression.html#string_literals + * https://dlang.org/spec/expression.html#string_literals */ extern (C++) final class StringExp : Expression { @@ -2904,7 +2904,7 @@ extern (C++) final class TupleExp : Expression /*********************************************************** * [ e1, e2, e3, ... ] * - * http://dlang.org/spec/expression.html#array_literals + * https://dlang.org/spec/expression.html#array_literals */ extern (C++) final class ArrayLiteralExp : Expression { @@ -3069,7 +3069,7 @@ extern (C++) final class ArrayLiteralExp : Expression /*********************************************************** * [ key0 : value0, key1 : value1, ... ] * - * http://dlang.org/spec/expression.html#associative_array_literals + * https://dlang.org/spec/expression.html#associative_array_literals */ extern (C++) final class AssocArrayLiteralExp : Expression { @@ -5423,7 +5423,7 @@ extern (C++) final class VectorArrayExp : UnaExp /*********************************************************** * e1 [lwr .. upr] * - * http://dlang.org/spec/expression.html#slice_expressions + * https://dlang.org/spec/expression.html#slice_expressions */ extern (C++) final class SliceExp : UnaExp { @@ -5506,7 +5506,7 @@ extern (C++) final class ArrayLengthExp : UnaExp /*********************************************************** * e1 [ a0, a1, a2, a3 ,... ] * - * http://dlang.org/spec/expression.html#index_expressions + * https://dlang.org/spec/expression.html#index_expressions */ extern (C++) final class ArrayExp : UnaExp { @@ -6208,7 +6208,7 @@ extern (C++) final class CatDcharAssignExp : CatAssignExp } /*********************************************************** - * http://dlang.org/spec/expression.html#add_expressions + * https://dlang.org/spec/expression.html#add_expressions */ extern (C++) final class AddExp : BinExp { @@ -6239,7 +6239,7 @@ extern (C++) final class MinExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#cat_expressions + * https://dlang.org/spec/expression.html#cat_expressions */ extern (C++) final class CatExp : BinExp { @@ -6262,7 +6262,7 @@ extern (C++) final class CatExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#mul_expressions + * https://dlang.org/spec/expression.html#mul_expressions */ extern (C++) final class MulExp : BinExp { @@ -6278,7 +6278,7 @@ extern (C++) final class MulExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#mul_expressions + * https://dlang.org/spec/expression.html#mul_expressions */ extern (C++) final class DivExp : BinExp { @@ -6294,7 +6294,7 @@ extern (C++) final class DivExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#mul_expressions + * https://dlang.org/spec/expression.html#mul_expressions */ extern (C++) final class ModExp : BinExp { @@ -6310,7 +6310,7 @@ extern (C++) final class ModExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#pow_expressions + * https://dlang.org/spec/expression.html#pow_expressions */ extern (C++) final class PowExp : BinExp { @@ -6416,8 +6416,8 @@ extern (C++) final class XorExp : BinExp } /*********************************************************** - * http://dlang.org/spec/expression.html#andand_expressions - * http://dlang.org/spec/expression.html#oror_expressions + * https://dlang.org/spec/expression.html#andand_expressions + * https://dlang.org/spec/expression.html#oror_expressions */ extern (C++) final class LogicalExp : BinExp { @@ -6437,7 +6437,7 @@ extern (C++) final class LogicalExp : BinExp * `op` is one of: * EXP.lessThan, EXP.lessOrEqual, EXP.greaterThan, EXP.greaterOrEqual * - * http://dlang.org/spec/expression.html#relation_expressions + * https://dlang.org/spec/expression.html#relation_expressions */ extern (C++) final class CmpExp : BinExp { @@ -6490,7 +6490,7 @@ extern (C++) final class RemoveExp : BinExp * * EXP.equal and EXP.notEqual * - * http://dlang.org/spec/expression.html#equality_expressions + * https://dlang.org/spec/expression.html#equality_expressions */ extern (C++) final class EqualExp : BinExp { @@ -6511,7 +6511,7 @@ extern (C++) final class EqualExp : BinExp * * EXP.identity and EXP.notIdentity * - * http://dlang.org/spec/expression.html#identity_expressions + * https://dlang.org/spec/expression.html#identity_expressions */ extern (C++) final class IdentityExp : BinExp { @@ -6530,7 +6530,7 @@ extern (C++) final class IdentityExp : BinExp /*********************************************************** * `econd ? e1 : e2` * - * http://dlang.org/spec/expression.html#conditional_expressions + * https://dlang.org/spec/expression.html#conditional_expressions */ extern (C++) final class CondExp : BinExp { diff --git a/gcc/d/dmd/expression.h b/gcc/d/dmd/expression.h index 411822c..f848cce 100644 --- a/gcc/d/dmd/expression.h +++ b/gcc/d/dmd/expression.h @@ -1,22 +1,22 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/expression.h */ #pragma once #include "ast_node.h" -#include "complex_t.h" #include "globals.h" #include "arraytypes.h" #include "visitor.h" #include "tokens.h" +#include "root/complex_t.h" #include "root/dcompat.h" #include "root/optional.h" diff --git a/gcc/d/dmd/expressionsem.d b/gcc/d/dmd/expressionsem.d index 2f1cd47..1008606 100644 --- a/gcc/d/dmd/expressionsem.d +++ b/gcc/d/dmd/expressionsem.d @@ -3,9 +3,9 @@ * * Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/expressionsem.d, _expressionsem.d) * Documentation: https://dlang.org/phobos/dmd_expressionsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expressionsem.d @@ -67,6 +67,7 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rootobject; import dmd.root.string; +import dmd.root.utf; import dmd.semantic2; import dmd.semantic3; import dmd.sideeffect; @@ -76,7 +77,6 @@ import dmd.tokens; import dmd.traits; import dmd.typesem; import dmd.typinf; -import dmd.utf; import dmd.utils; import dmd.visitor; @@ -5980,7 +5980,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor /* Be wary of CWE-22: Improper Limitation of a Pathname to a Restricted Directory * ('Path Traversal') attacks. - * http://cwe.mitre.org/data/definitions/22.html + * https://cwe.mitre.org/data/definitions/22.html */ if (FileName.absolute(namez)) @@ -6013,7 +6013,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor const attr = FileName.exists(path); const(char)* err = attr == 2 ? "" : (attr == 1 ? " (not a directory)" : " (path not found)"); - e.errorSupplemental("[%zu]: `%s`%s", idx, path, err); + e.errorSupplemental("[%llu]: `%s`%s", cast(ulong)idx, path, err); } return setError(); } @@ -13108,7 +13108,7 @@ private bool fit(StructDeclaration sd, const ref Loc loc, Scope* sc, Expressions // CTFE sometimes creates null as hidden pointer; we'll allow this. continue; } - .error(loc, "more initializers than fields (%zu) of `%s`", nfields, sd.toChars()); + .error(loc, "more initializers than fields (%llu) of `%s`", cast(ulong)nfields, sd.toChars()); return false; } VarDeclaration v = sd.fields[i]; diff --git a/gcc/d/dmd/file_manager.d b/gcc/d/dmd/file_manager.d index 05aeb7d..0ca756e 100644 --- a/gcc/d/dmd/file_manager.d +++ b/gcc/d/dmd/file_manager.d @@ -1,8 +1,8 @@ /** * Read a file from disk and store it in memory. * - * Copyright: Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.d, _file_manager.d) * Documentation: https://dlang.org/phobos/dmd_file_manager.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/file_manager.d diff --git a/gcc/d/dmd/file_manager.h b/gcc/d/dmd/file_manager.h index 7488fab1..6705f24 100644 --- a/gcc/d/dmd/file_manager.h +++ b/gcc/d/dmd/file_manager.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/file_manager.h */ diff --git a/gcc/d/dmd/foreachvar.d b/gcc/d/dmd/foreachvar.d index e9a43f9..b779eaeee 100644 --- a/gcc/d/dmd/foreachvar.d +++ b/gcc/d/dmd/foreachvar.d @@ -1,9 +1,9 @@ /** * Utility to visit every variable in an expression. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/foreachvar.d, _foreachvar.d) * Documentation: https://dlang.org/phobos/dmd_foreachvar.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/foreachvar.d diff --git a/gcc/d/dmd/func.d b/gcc/d/dmd/func.d index da33587..b5148be 100644 --- a/gcc/d/dmd/func.d +++ b/gcc/d/dmd/func.d @@ -8,9 +8,9 @@ * - `invariant` * - `unittest` * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/func.d, _func.d) * Documentation: https://dlang.org/phobos/dmd_func.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/func.d diff --git a/gcc/d/dmd/globals.d b/gcc/d/dmd/globals.d index 7409dcc..22ccddd 100644 --- a/gcc/d/dmd/globals.d +++ b/gcc/d/dmd/globals.d @@ -1,9 +1,9 @@ /** * Stores command line options and contains other miscellaneous declarations. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/globals.d, _globals.d) * Documentation: https://dlang.org/phobos/dmd_globals.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/globals.d @@ -126,7 +126,7 @@ extern (C++) struct Param bool stackstomp; // add stack stomping code bool useUnitTests; // generate unittest code bool useInline = false; // inline expand functions - FeatureState useDIP25; // implement http://wiki.dlang.org/DIP25 + FeatureState useDIP25; // implement https://wiki.dlang.org/DIP25 FeatureState useDIP1000; // implement https://dlang.org/spec/memory-safe-d.html#scope-return-params bool useDIP1021; // implement https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md bool release; // build release version @@ -162,7 +162,7 @@ extern (C++) struct Param // https://issues.dlang.org/show_bug.cgi?id=14246 bool fieldwise; // do struct equality testing field-wise rather than by memcmp() bool rvalueRefParam; // allow rvalues to be arguments to ref parameters - // http://dconf.org/2019/talks/alexandrescu.html + // https://dconf.org/2019/talks/alexandrescu.html // https://gist.github.com/andralex/e5405a5d773f07f73196c05f8339435a // https://digitalmars.com/d/archives/digitalmars/D/Binding_rvalues_to_ref_parameters_redux_325087.html // Implementation: https://github.com/dlang/dmd/pull/9817 @@ -303,7 +303,7 @@ extern (C++) struct Global { const(char)[] inifilename; /// filename of configuration file as given by `-conf=`, or default value - string copyright = "Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved"; + string copyright = "Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved"; string written = "written by Walter Bright"; Array!(const(char)*)* path; /// Array of char*'s which form the import lookup path @@ -655,7 +655,7 @@ enum PINLINE : ubyte always, /// always inline } -alias StorageClass = uinteger_t; +alias StorageClass = ulong; /// Collection of global state extern (C++) __gshared Global global; diff --git a/gcc/d/dmd/globals.h b/gcc/d/dmd/globals.h index 2275ec5..4e76967 100644 --- a/gcc/d/dmd/globals.h +++ b/gcc/d/dmd/globals.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/globals.h */ @@ -115,7 +115,7 @@ struct Param bool stackstomp; // add stack stomping code bool useUnitTests; // generate unittest code bool useInline; // inline expand functions - FeatureState useDIP25; // implement http://wiki.dlang.org/DIP25 + FeatureState useDIP25; // implement https://wiki.dlang.org/DIP25 FeatureState useDIP1000; // implement https://dlang.org/spec/memory-safe-d.html#scope-return-params bool useDIP1021; // implement https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1021.md bool release; // build release version diff --git a/gcc/d/dmd/gluelayer.d b/gcc/d/dmd/gluelayer.d index 4018126..73a1f00 100644 --- a/gcc/d/dmd/gluelayer.d +++ b/gcc/d/dmd/gluelayer.d @@ -3,9 +3,9 @@ * * This 'glues' either the DMC or GCC back-end to the front-end. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/gluelayer.d, _gluelayer.d) * Documentation: https://dlang.org/phobos/dmd_gluelayer.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/gluelayer.d diff --git a/gcc/d/dmd/hdrgen.d b/gcc/d/dmd/hdrgen.d index a454298..6fc86c3 100644 --- a/gcc/d/dmd/hdrgen.d +++ b/gcc/d/dmd/hdrgen.d @@ -3,9 +3,9 @@ * * Also used to convert AST nodes to D code in general, e.g. for error messages or `printf` debugging. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/hdrgen.d, _hdrgen.d) * Documentation: https://dlang.org/phobos/dmd_hdrgen.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/hdrgen.d @@ -21,7 +21,6 @@ import dmd.aliasthis; import dmd.arraytypes; import dmd.astenums; import dmd.attrib; -import dmd.complex; import dmd.cond; import dmd.ctfeexpr; import dmd.dclass; @@ -43,6 +42,7 @@ import dmd.init; import dmd.mtype; import dmd.nspace; import dmd.parse; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.common.outbuffer; import dmd.root.rootobject; diff --git a/gcc/d/dmd/hdrgen.h b/gcc/d/dmd/hdrgen.h index 531d5d8..0488c51 100644 --- a/gcc/d/dmd/hdrgen.h +++ b/gcc/d/dmd/hdrgen.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Dave Fladebo - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/hdrgen.h */ diff --git a/gcc/d/dmd/iasm.d b/gcc/d/dmd/iasm.d index df8d1c9..29aca3e 100644 --- a/gcc/d/dmd/iasm.d +++ b/gcc/d/dmd/iasm.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/iasm.html, Inline Assembler) * - * Copyright (C) 2018-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright (C) 2018-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/iasm.d, _iasm.d) * Documentation: https://dlang.org/phobos/dmd_iasm.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/iasm.d diff --git a/gcc/d/dmd/iasmgcc.d b/gcc/d/dmd/iasmgcc.d index cd30117..495126d 100644 --- a/gcc/d/dmd/iasmgcc.d +++ b/gcc/d/dmd/iasmgcc.d @@ -1,9 +1,9 @@ /** * Inline assembler for the GCC D compiler. * - * Copyright (C) 2018-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2018-2022 by The D Language Foundation, All Rights Reserved * Authors: Iain Buclaw - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/iasmgcc.d, _iasmgcc.d) * Documentation: https://dlang.org/phobos/dmd_iasmgcc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/iasmgcc.d diff --git a/gcc/d/dmd/id.d b/gcc/d/dmd/id.d index d33b676..cef1b8e 100644 --- a/gcc/d/dmd/id.d +++ b/gcc/d/dmd/id.d @@ -1,9 +1,9 @@ /** * Contains the `Id` struct with a list of predefined symbols the compiler knows about. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/id.d, _id.d) * Documentation: https://dlang.org/phobos/dmd_id.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/id.d diff --git a/gcc/d/dmd/id.h b/gcc/d/dmd/id.h index 8066747..984c203 100644 --- a/gcc/d/dmd/id.h +++ b/gcc/d/dmd/id.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2017-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2017-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/id.h */ diff --git a/gcc/d/dmd/identifier.d b/gcc/d/dmd/identifier.d index 8add74a..b42b4a1 100644 --- a/gcc/d/dmd/identifier.d +++ b/gcc/d/dmd/identifier.d @@ -1,9 +1,9 @@ /** * Defines an identifier, which is the name of a `Dsymbol`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/identifier.d, _identifier.d) * Documentation: https://dlang.org/phobos/dmd_identifier.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/identifier.d @@ -20,8 +20,8 @@ import dmd.common.outbuffer; import dmd.root.rootobject; import dmd.root.string; import dmd.root.stringtable; +import dmd.root.utf; import dmd.tokens; -import dmd.utf; /*********************************************************** diff --git a/gcc/d/dmd/identifier.h b/gcc/d/dmd/identifier.h index 790d5a0..4c748be 100644 --- a/gcc/d/dmd/identifier.h +++ b/gcc/d/dmd/identifier.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/identifier.h */ diff --git a/gcc/d/dmd/impcnvtab.d b/gcc/d/dmd/impcnvtab.d index db09f0c..ab46f5e 100644 --- a/gcc/d/dmd/impcnvtab.d +++ b/gcc/d/dmd/impcnvtab.d @@ -6,9 +6,9 @@ * Specification: $(LINK2 https://dlang.org/spec/type.html#integer-promotions, Integer Promotions), * $(LINK2 https://dlang.org/spec/type.html#usual-arithmetic-conversions, Usual Arithmetic Conversions). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/impcnvtab.d, _impcnvtab.d) * Documentation: https://dlang.org/phobos/dmd_impcnvtab.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/impcnvtab.d diff --git a/gcc/d/dmd/imphint.d b/gcc/d/dmd/imphint.d index e1919a6..f03113d 100644 --- a/gcc/d/dmd/imphint.d +++ b/gcc/d/dmd/imphint.d @@ -3,9 +3,9 @@ * * For example, prompt to `import std.stdio` when using `writeln`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/imphint.d, _imphint.d) * Documentation: https://dlang.org/phobos/dmd_imphint.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/imphint.d diff --git a/gcc/d/dmd/import.h b/gcc/d/dmd/import.h index 34c5a05..5e7550e 100644 --- a/gcc/d/dmd/import.h +++ b/gcc/d/dmd/import.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/import.h */ diff --git a/gcc/d/dmd/importc.d b/gcc/d/dmd/importc.d index 5ee961f..1b92386 100644 --- a/gcc/d/dmd/importc.d +++ b/gcc/d/dmd/importc.d @@ -3,9 +3,9 @@ * * Specification: C11 * - * Copyright: Copyright (C) 2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 2021-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/importc.d, _importc.d) * Documentation: https://dlang.org/phobos/dmd_importc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/importc.d diff --git a/gcc/d/dmd/init.d b/gcc/d/dmd/init.d index d036ee1..179e0b6 100644 --- a/gcc/d/dmd/init.d +++ b/gcc/d/dmd/init.d @@ -1,9 +1,9 @@ /** * Defines initializers of variables, e.g. the array literal in `int[3] x = [0, 1, 2]`. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/init.d, _init.d) * Documentation: https://dlang.org/phobos/dmd_init.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/init.d diff --git a/gcc/d/dmd/init.h b/gcc/d/dmd/init.h index 23204b8..c6c8c62 100644 --- a/gcc/d/dmd/init.h +++ b/gcc/d/dmd/init.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/init.h */ diff --git a/gcc/d/dmd/initsem.d b/gcc/d/dmd/initsem.d index 826b0ad..6b10ace 100644 --- a/gcc/d/dmd/initsem.d +++ b/gcc/d/dmd/initsem.d @@ -1,9 +1,9 @@ /** * Semantic analysis of initializers. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/initsem.d, _initsem.d) * Documentation: https://dlang.org/phobos/dmd_initsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/initsem.d diff --git a/gcc/d/dmd/inline.d b/gcc/d/dmd/inline.d index cfd619a..25982a6 100644 --- a/gcc/d/dmd/inline.d +++ b/gcc/d/dmd/inline.d @@ -4,9 +4,9 @@ * The AST is traversed, and every function call is considered for inlining using `inlinecost.d`. * The function call is then inlined if this cost is below a threshold. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/inline.d, _inline.d) * Documentation: https://dlang.org/phobos/dmd_inline.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/inline.d diff --git a/gcc/d/dmd/intrange.d b/gcc/d/dmd/intrange.d index 9b70f49..d0206b6 100644 --- a/gcc/d/dmd/intrange.d +++ b/gcc/d/dmd/intrange.d @@ -1,9 +1,9 @@ /** * Implement $(LINK2 https://digitalmars.com/articles/b62.html, Value Range Propagation). * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/intrange.d, _intrange.d) * Documentation: https://dlang.org/phobos/dmd_intrange.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/intrange.d @@ -255,7 +255,7 @@ struct SignExtendedNumber uinteger_t v = copySign(value, negative); // compute base-2 log of 'v' to determine the maximum allowed bits to shift. - // Ref: http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog + // Ref: https://graphics.stanford.edu/~seander/bithacks.html#IntegerLog // Why is this a size_t? Looks like a bug. size_t r, s; diff --git a/gcc/d/dmd/json.d b/gcc/d/dmd/json.d index fef5150..ba2dd17 100644 --- a/gcc/d/dmd/json.d +++ b/gcc/d/dmd/json.d @@ -1,9 +1,9 @@ /** * Code for generating .json descriptions of the module when passing the `-X` flag to dmd. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/json.d, _json.d) * Documentation: https://dlang.org/phobos/dmd_json.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/json.d diff --git a/gcc/d/dmd/json.h b/gcc/d/dmd/json.h index 1311fb3..979440c 100644 --- a/gcc/d/dmd/json.h +++ b/gcc/d/dmd/json.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/json.h */ diff --git a/gcc/d/dmd/lambdacomp.d b/gcc/d/dmd/lambdacomp.d index 336f8dd..91df9cc 100644 --- a/gcc/d/dmd/lambdacomp.d +++ b/gcc/d/dmd/lambdacomp.d @@ -5,9 +5,9 @@ * The serialization is a string which contains the type of the parameters and the string * represantation of the lambda expression. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lamdbacomp.d, _lambdacomp.d) * Documentation: https://dlang.org/phobos/dmd_lambdacomp.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lambdacomp.d diff --git a/gcc/d/dmd/lexer.d b/gcc/d/dmd/lexer.d index bb76a1a..e74b192 100644 --- a/gcc/d/dmd/lexer.d +++ b/gcc/d/dmd/lexer.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/lex.html, Lexical) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/lexer.d, _lexer.d) * Documentation: https://dlang.org/phobos/dmd_lexer.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/lexer.d @@ -32,8 +32,8 @@ import dmd.common.outbuffer; import dmd.root.port; import dmd.root.rmem; import dmd.root.string; +import dmd.root.utf; import dmd.tokens; -import dmd.utf; import dmd.utils; nothrow: diff --git a/gcc/d/dmd/mangle.h b/gcc/d/dmd/mangle.h index 670cf4d..512184a 100644 --- a/gcc/d/dmd/mangle.h +++ b/gcc/d/dmd/mangle.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/mangle.h */ diff --git a/gcc/d/dmd/module.h b/gcc/d/dmd/module.h index fe4c73a..f020bfd 100644 --- a/gcc/d/dmd/module.h +++ b/gcc/d/dmd/module.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/module.h */ diff --git a/gcc/d/dmd/mtype.d b/gcc/d/dmd/mtype.d index e338a05..0257faa 100644 --- a/gcc/d/dmd/mtype.d +++ b/gcc/d/dmd/mtype.d @@ -1,9 +1,9 @@ /** * Defines a D type. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/mtype.d, _mtype.d) * Documentation: https://dlang.org/phobos/dmd_mtype.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/mtype.d diff --git a/gcc/d/dmd/mtype.h b/gcc/d/dmd/mtype.h index 430b39b..fde5027 100644 --- a/gcc/d/dmd/mtype.h +++ b/gcc/d/dmd/mtype.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/mtype.h */ diff --git a/gcc/d/dmd/nogc.d b/gcc/d/dmd/nogc.d index 8bdddb8..ed3f832 100644 --- a/gcc/d/dmd/nogc.d +++ b/gcc/d/dmd/nogc.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#nogc-functions, No-GC Functions) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/nogc.d, _nogc.d) * Documentation: https://dlang.org/phobos/dmd_nogc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/nogc.d diff --git a/gcc/d/dmd/nspace.d b/gcc/d/dmd/nspace.d index 215f259..29f920a 100644 --- a/gcc/d/dmd/nspace.d +++ b/gcc/d/dmd/nspace.d @@ -36,9 +36,9 @@ * are valid D identifier. * * See_Also: https://github.com/dlang/dmd/pull/10031 - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/nspace.d, _nspace.d) * Documentation: https://dlang.org/phobos/dmd_nspace.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/nspace.d diff --git a/gcc/d/dmd/nspace.h b/gcc/d/dmd/nspace.h index 43d36e9..7d6f65d 100644 --- a/gcc/d/dmd/nspace.h +++ b/gcc/d/dmd/nspace.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/nspace.h */ diff --git a/gcc/d/dmd/ob.d b/gcc/d/dmd/ob.d index 156428e..c2594fe 100644 --- a/gcc/d/dmd/ob.d +++ b/gcc/d/dmd/ob.d @@ -1,9 +1,9 @@ /** * Flow analysis for Ownership/Borrowing * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/ob.d, _ob.d) * Documentation: https://dlang.org/phobos/dmd_escape.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/ob.d diff --git a/gcc/d/dmd/objc.d b/gcc/d/dmd/objc.d index 4236381..6d283e1 100644 --- a/gcc/d/dmd/objc.d +++ b/gcc/d/dmd/objc.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/objc_interface.html, Interfacing to Objective-C) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/objc.d, _objc.d) * Documentation: https://dlang.org/phobos/dmd_objc.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/objc.d diff --git a/gcc/d/dmd/objc.h b/gcc/d/dmd/objc.h index 483e501..a030154 100644 --- a/gcc/d/dmd/objc.h +++ b/gcc/d/dmd/objc.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2015-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2015-2022 by The D Language Foundation, All Rights Reserved * written by Michel Fortin - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/objc.h */ diff --git a/gcc/d/dmd/opover.d b/gcc/d/dmd/opover.d index bafeaa3..c932d043 100644 --- a/gcc/d/dmd/opover.d +++ b/gcc/d/dmd/opover.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/operatoroverloading.html, Operator Overloading) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/opover.d, _opover.d) * Documentation: https://dlang.org/phobos/dmd_opover.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/opover.d diff --git a/gcc/d/dmd/optimize.d b/gcc/d/dmd/optimize.d index ca9e0b3..5864fa2 100644 --- a/gcc/d/dmd/optimize.d +++ b/gcc/d/dmd/optimize.d @@ -1,9 +1,9 @@ /** * Perform constant folding. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/optimize.d, _optimize.d) * Documentation: https://dlang.org/phobos/dmd_optimize.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/optimize.d diff --git a/gcc/d/dmd/parse.d b/gcc/d/dmd/parse.d index 94056ab..700f3c5 100644 --- a/gcc/d/dmd/parse.d +++ b/gcc/d/dmd/parse.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/grammar.html, D Grammar) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/parse.d, _parse.d) * Documentation: https://dlang.org/phobos/dmd_parse.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/parse.d @@ -6081,7 +6081,19 @@ LagainStc: check(TOK.leftParenthesis); param = parseAssignCondition(); condition = parseExpression(); - check(TOK.rightParenthesis); + if (token.value != TOK.rightParenthesis && condition) + { + error("missing closing `)` after `if (%s`", param ? "declaration".ptr : condition.toChars()); + } + else + check(TOK.rightParenthesis); + if (token.value == TOK.rightParenthesis) + { + if (condition) // if not an error in condition + error("extra `)` after `if (%s)`", param ? "declaration".ptr : condition.toChars()); + nextToken(); + } + { const lookingForElseSave = lookingForElse; lookingForElse = loc; diff --git a/gcc/d/dmd/printast.d b/gcc/d/dmd/printast.d index 33b5e7f3..6133145 100644 --- a/gcc/d/dmd/printast.d +++ b/gcc/d/dmd/printast.d @@ -1,9 +1,9 @@ /** * Provides an AST printer for debugging. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/printast.d, _printast.d) * Documentation: https://dlang.org/phobos/dmd_printast.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/printast.d diff --git a/gcc/d/dmd/root/README.md b/gcc/d/dmd/root/README.md index e062d93..b393c12 100644 --- a/gcc/d/dmd/root/README.md +++ b/gcc/d/dmd/root/README.md @@ -5,7 +5,9 @@ | [aav.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/aav.d) | An associative array implementation | | [array.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/array.d) | A dynamic array implementation | | [bitarray.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.d) | A compact array of bits | +| [complex.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/complex.d) | A complex number type | | [ctfloat.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.d) | A floating point type for compile-time calculations | +| [env.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/env.d) | Modify environment variables | | [file.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/file.d) | Read a file from disk and store it in memory | | [filename.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d) | Encapsulate path and file names | | [hash.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/hash.d) | Calculate a hash for a byte array | @@ -19,4 +21,5 @@ | [speller.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/speller.d) | Try to detect typos in identifiers | | [string.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/string.d) | Various string related functions | | [stringtable.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/stringtable.d) | Specialized associative array with string keys stored in a variable length structure | -| [strtold.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/strtold.d) | D implementation of the standard C function `strtold` (String to long double) | +| [strtold.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/strtold.d) | D implementation of the standard C function `strtold` (String to long double) | +| [utf.d](https://github.com/dlang/dmd/blob/master/src/dmd/root/utf.d) | Encoding/decoding Unicode text | diff --git a/gcc/d/dmd/root/aav.d b/gcc/d/dmd/root/aav.d index 92b58ba..5b8cc82 100644 --- a/gcc/d/dmd/root/aav.d +++ b/gcc/d/dmd/root/aav.d @@ -1,9 +1,9 @@ /** * Associative array implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/aav.d, root/_aav.d) * Documentation: https://dlang.org/phobos/dmd_root_aav.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/aav.d diff --git a/gcc/d/dmd/root/array.d b/gcc/d/dmd/root/array.d index ed925c8..cd2d709 100644 --- a/gcc/d/dmd/root/array.d +++ b/gcc/d/dmd/root/array.d @@ -2,9 +2,9 @@ /** * Dynamic array implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/array.d, root/_array.d) * Documentation: https://dlang.org/phobos/dmd_root_array.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/array.d diff --git a/gcc/d/dmd/root/array.h b/gcc/d/dmd/root/array.h index f573dca..866b952 100644 --- a/gcc/d/dmd/root/array.h +++ b/gcc/d/dmd/root/array.h @@ -1,8 +1,8 @@ -/* Copyright (C) 2011-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 2011-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/array.h */ diff --git a/gcc/d/dmd/root/bitarray.d b/gcc/d/dmd/root/bitarray.d index f912961..42c09fa 100644 --- a/gcc/d/dmd/root/bitarray.d +++ b/gcc/d/dmd/root/bitarray.d @@ -1,9 +1,9 @@ /** * Implementation of a bit array. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.d, root/_bitarray.d) * Documentation: https://dlang.org/phobos/dmd_root_array.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/bitarray.d diff --git a/gcc/d/dmd/root/bitarray.h b/gcc/d/dmd/root/bitarray.h index e773711..c5c5d3a 100644 --- a/gcc/d/dmd/root/bitarray.h +++ b/gcc/d/dmd/root/bitarray.h @@ -1,8 +1,8 @@ -/* Copyright (C) 2011-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 2011-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/bitarray.h */ diff --git a/gcc/d/dmd/root/complex.d b/gcc/d/dmd/root/complex.d new file mode 100644 index 0000000..d9a396d --- /dev/null +++ b/gcc/d/dmd/root/complex.d @@ -0,0 +1,112 @@ +/** + * Implements a complex number type. + * + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/complex.d, _complex.d) + * Documentation: https://dlang.org/phobos/dmd_root_complex.html + * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/complex.d + */ + +module dmd.root.complex; + +import dmd.root.ctfloat; + +extern (C++) struct complex_t +{ + real_t re; + real_t im; + + this() @disable; + + this(real_t re) + { + this(re, CTFloat.zero); + } + + this(real_t re, real_t im) + { + this.re = re; + this.im = im; + } + + extern (D) complex_t opBinary(string op)(complex_t y) + if (op == "+") + { + return complex_t(re + y.re, im + y.im); + } + + extern (D) complex_t opBinary(string op)(complex_t y) + if (op == "-") + { + return complex_t(re - y.re, im - y.im); + } + + extern (D) complex_t opUnary(string op)() + if (op == "-") + { + return complex_t(-re, -im); + } + + extern (D) complex_t opBinary(string op)(complex_t y) + if (op == "*") + { + return complex_t(re * y.re - im * y.im, im * y.re + re * y.im); + } + + extern (D) complex_t opBinaryRight(string op)(real_t x) + if (op == "*") + { + return complex_t(x) * this; + } + + extern (D) complex_t opBinary(string op)(real_t y) + if (op == "*") + { + return this * complex_t(y); + } + + extern (D) complex_t opBinary(string op)(real_t y) + if (op == "/") + { + return this / complex_t(y); + } + + extern (D) complex_t opBinary(string op)(complex_t y) + if (op == "/") + { + if (CTFloat.fabs(y.re) < CTFloat.fabs(y.im)) + { + const r = y.re / y.im; + const den = y.im + r * y.re; + return complex_t((re * r + im) / den, (im * r - re) / den); + } + else + { + const r = y.im / y.re; + const den = y.re + r * y.im; + return complex_t((re + r * im) / den, (im - r * re) / den); + } + } + + extern (D) bool opCast(T : bool)() const + { + return re || im; + } + + int opEquals(complex_t y) const + { + return re == y.re && im == y.im; + } +} + +extern (C++) real_t creall(complex_t x) +{ + return x.re; +} + +extern (C++) real_t cimagl(complex_t x) +{ + return x.im; +} diff --git a/gcc/d/dmd/root/complex_t.h b/gcc/d/dmd/root/complex_t.h new file mode 100644 index 0000000..c384848 --- /dev/null +++ b/gcc/d/dmd/root/complex_t.h @@ -0,0 +1,71 @@ + +/* Compiler implementation of the D programming language + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * written by Walter Bright + * https://www.digitalmars.com + * Distributed under the Boost Software License, Version 1.0. + * https://www.boost.org/LICENSE_1_0.txt + * https://github.com/dlang/dmd/blob/master/src/dmd/root/complex_t.h + */ + +#pragma once + +#include "ctfloat.h" + +/* Roll our own complex type for compilers that don't support complex + */ + +struct complex_t +{ + real_t re; + real_t im; + + complex_t(real_t re) : re(re), im(CTFloat::zero) {} + complex_t(real_t re, real_t im) : re(re), im(im) {} + + complex_t operator + (complex_t y) { return complex_t(re + y.re, im + y.im); } + complex_t operator - (complex_t y) { return complex_t(re - y.re, im - y.im); } + complex_t operator - () { return complex_t(-re, -im); } + complex_t operator * (complex_t y) { return complex_t(re * y.re - im * y.im, im * y.re + re * y.im); } + + complex_t operator / (complex_t y) + { + if (CTFloat::fabs(y.re) < CTFloat::fabs(y.im)) + { + real_t r = y.re / y.im; + real_t den = y.im + r * y.re; + return complex_t((re * r + im) / den, + (im * r - re) / den); + } + else + { + real_t r = y.im / y.re; + real_t den = y.re + r * y.im; + return complex_t((re + r * im) / den, + (im - r * re) / den); + } + } + + operator bool () { return re || im; } + + int operator == (complex_t y) { return re == y.re && im == y.im; } + int operator != (complex_t y) { return re != y.re || im != y.im; } + +private: + complex_t() : re(CTFloat::zero), im(CTFloat::zero) {} +}; + +inline complex_t operator * (real_t x, complex_t y) { return complex_t(x) * y; } +inline complex_t operator * (complex_t x, real_t y) { return x * complex_t(y); } +inline complex_t operator / (complex_t x, real_t y) { return x / complex_t(y); } + + +inline real_t creall(complex_t x) +{ + return x.re; +} + +inline real_t cimagl(complex_t x) +{ + return x.im; +} diff --git a/gcc/d/dmd/root/ctfloat.d b/gcc/d/dmd/root/ctfloat.d index 9b98742..5ccc7bf 100644 --- a/gcc/d/dmd/root/ctfloat.d +++ b/gcc/d/dmd/root/ctfloat.d @@ -1,9 +1,9 @@ /** * Collects functions for compile-time floating-point calculations. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.d, root/_ctfloat.d) * Documentation: https://dlang.org/phobos/dmd_root_ctfloat.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/ctfloat.d diff --git a/gcc/d/dmd/root/ctfloat.h b/gcc/d/dmd/root/ctfloat.h index 1221b82..6b83dbf 100644 --- a/gcc/d/dmd/root/ctfloat.h +++ b/gcc/d/dmd/root/ctfloat.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/ctfloat.h */ diff --git a/gcc/d/dmd/root/dcompat.h b/gcc/d/dmd/root/dcompat.h index 8b0bcf2..5823e7c 100644 --- a/gcc/d/dmd/root/dcompat.h +++ b/gcc/d/dmd/root/dcompat.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/dcompat.h */ diff --git a/gcc/d/dmd/root/file.d b/gcc/d/dmd/root/file.d index 2722529..6331a62 100644 --- a/gcc/d/dmd/root/file.d +++ b/gcc/d/dmd/root/file.d @@ -1,9 +1,9 @@ /** * Read a file from disk and store it in memory. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/file.d, root/_file.d) * Documentation: https://dlang.org/phobos/dmd_root_file.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/file.d diff --git a/gcc/d/dmd/root/file.h b/gcc/d/dmd/root/file.h index ee0d51e..44ca024 100644 --- a/gcc/d/dmd/root/file.h +++ b/gcc/d/dmd/root/file.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/file.h */ diff --git a/gcc/d/dmd/root/filename.d b/gcc/d/dmd/root/filename.d index d1500c8..292fccf 100644 --- a/gcc/d/dmd/root/filename.d +++ b/gcc/d/dmd/root/filename.d @@ -1,9 +1,9 @@ /** * Encapsulate path and file names. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d, root/_filename.d) * Documentation: https://dlang.org/phobos/dmd_root_filename.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/filename.d diff --git a/gcc/d/dmd/root/filename.h b/gcc/d/dmd/root/filename.h index 9f773b5..419a4c9 100644 --- a/gcc/d/dmd/root/filename.h +++ b/gcc/d/dmd/root/filename.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.h */ diff --git a/gcc/d/dmd/root/hash.d b/gcc/d/dmd/root/hash.d index f484819..fe97c42 100644 --- a/gcc/d/dmd/root/hash.d +++ b/gcc/d/dmd/root/hash.d @@ -1,9 +1,9 @@ /** * Hash functions for arbitrary binary data. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Martin Nowak, Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Martin Nowak, Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/hash.d, root/_hash.d) * Documentation: https://dlang.org/phobos/dmd_root_hash.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/hash.d diff --git a/gcc/d/dmd/root/object.h b/gcc/d/dmd/root/object.h index fb367bc..609e763 100644 --- a/gcc/d/dmd/root/object.h +++ b/gcc/d/dmd/root/object.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/object.h */ diff --git a/gcc/d/dmd/root/optional.d b/gcc/d/dmd/root/optional.d index a593ddd..bb8150f 100644 --- a/gcc/d/dmd/root/optional.d +++ b/gcc/d/dmd/root/optional.d @@ -1,9 +1,9 @@ /** * Optional implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/optional.d, root/_optional.d) * Documentation: https://dlang.org/phobos/dmd_root_optional.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.d diff --git a/gcc/d/dmd/root/optional.h b/gcc/d/dmd/root/optional.h index fa52b58..e4a41a0 100644 --- a/gcc/d/dmd/root/optional.h +++ b/gcc/d/dmd/root/optional.h @@ -3,9 +3,9 @@ /** * Optional implementation. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/optional.h, root/_optional.h) * Documentation: https://dlang.org/phobos/dmd_root_optional.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/optional.h diff --git a/gcc/d/dmd/root/port.d b/gcc/d/dmd/root/port.d index 1bafa20..0c8088c 100644 --- a/gcc/d/dmd/root/port.d +++ b/gcc/d/dmd/root/port.d @@ -1,9 +1,9 @@ /** * Portable routines for functions that have different implementations on different platforms. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/port.d, root/_port.d) * Documentation: https://dlang.org/phobos/dmd_root_port.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/port.d diff --git a/gcc/d/dmd/root/port.h b/gcc/d/dmd/root/port.h index 08cf66c..069a365 100644 --- a/gcc/d/dmd/root/port.h +++ b/gcc/d/dmd/root/port.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/port.h */ diff --git a/gcc/d/dmd/root/region.d b/gcc/d/dmd/root/region.d index 50689fe..1e86f32 100644 --- a/gcc/d/dmd/root/region.d +++ b/gcc/d/dmd/root/region.d @@ -1,9 +1,9 @@ /** * Region storage allocator implementation. * - * Copyright: Copyright (C) 2019-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 2019-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/region.d, root/_region.d) * Documentation: https://dlang.org/phobos/dmd_root_region.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/region.d diff --git a/gcc/d/dmd/root/rmem.d b/gcc/d/dmd/root/rmem.d index 198f3d0..ffe5ee1 100644 --- a/gcc/d/dmd/root/rmem.d +++ b/gcc/d/dmd/root/rmem.d @@ -1,9 +1,9 @@ /** * Allocate memory using `malloc` or the GC depending on the configuration. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/rmem.d, root/_rmem.d) * Documentation: https://dlang.org/phobos/dmd_root_rmem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/rmem.d diff --git a/gcc/d/dmd/root/rmem.h b/gcc/d/dmd/root/rmem.h index 04d9e3f..1338d7c 100644 --- a/gcc/d/dmd/root/rmem.h +++ b/gcc/d/dmd/root/rmem.h @@ -1,9 +1,9 @@ -/* Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved +/* Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/root/rmem.h */ diff --git a/gcc/d/dmd/root/rootobject.d b/gcc/d/dmd/root/rootobject.d index 64104b8..7390d07 100644 --- a/gcc/d/dmd/root/rootobject.d +++ b/gcc/d/dmd/root/rootobject.d @@ -1,9 +1,9 @@ /** * Provide the root object that classes in dmd inherit from. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/rootobject.d, root/_rootobject.d) * Documentation: https://dlang.org/phobos/dmd_root_rootobject.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/rootobject.d diff --git a/gcc/d/dmd/root/speller.d b/gcc/d/dmd/root/speller.d index 543005b..b3e59f5 100644 --- a/gcc/d/dmd/root/speller.d +++ b/gcc/d/dmd/root/speller.d @@ -3,9 +3,9 @@ * * Does not have any dependencies on the rest of DMD. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/speller.d, root/_speller.d) * Documentation: https://dlang.org/phobos/dmd_root_speller.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/speller.d diff --git a/gcc/d/dmd/root/string.d b/gcc/d/dmd/root/string.d index 73fe562..0c7cad0 100644 --- a/gcc/d/dmd/root/string.d +++ b/gcc/d/dmd/root/string.d @@ -1,9 +1,9 @@ /** * Contains various string related functions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/string.d, root/_string.d) * Documentation: https://dlang.org/phobos/dmd_root_string.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/string.d diff --git a/gcc/d/dmd/root/stringtable.d b/gcc/d/dmd/root/stringtable.d index 42b26e2..884a9f1 100644 --- a/gcc/d/dmd/root/stringtable.d +++ b/gcc/d/dmd/root/stringtable.d @@ -1,9 +1,9 @@ /** * A specialized associative array with string keys stored in a variable length structure. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: Walter Bright, http://www.digitalmars.com - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: Walter Bright, https://www.digitalmars.com + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/stringtable.d, root/_stringtable.d) * Documentation: https://dlang.org/phobos/dmd_root_stringtable.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/stringtable.d @@ -284,7 +284,7 @@ private: size_t findSlot(hash_t hash, scope const(char)[] str) const @nogc nothrow pure { // quadratic probing using triangular numbers - // http://stackoverflow.com/questions/2348187/moving-from-linear-probing-to-quadratic-probing-hash-collisons/2349774#2349774 + // https://stackoverflow.com/questions/2348187/moving-from-linear-probing-to-quadratic-probing-hash-collisons/2349774#2349774 for (size_t i = hash & (table.length - 1), j = 1;; ++j) { const(StringValue!T)* sv; diff --git a/gcc/d/dmd/root/utf.d b/gcc/d/dmd/root/utf.d new file mode 100644 index 0000000..15838e9 --- /dev/null +++ b/gcc/d/dmd/root/utf.d @@ -0,0 +1,561 @@ +/** + * Functions related to UTF encoding. + * + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/root/utf.d, _utf.d) + * Documentation: https://dlang.org/phobos/dmd_root_utf.html + * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/utf.d + */ + +module dmd.root.utf; + +nothrow pure @nogc: + +/// The Unicode code space is the range of code points [0x000000,0x10FFFF] +/// except the UTF-16 surrogate pairs in the range [0xD800,0xDFFF] +bool utf_isValidDchar(dchar c) +{ + // TODO: Whether non-char code points should be rejected is pending review. + // 0xFFFE and 0xFFFF are valid for internal use, like Phobos std.utf.isValidDChar + // See also https://issues.dlang.org/show_bug.cgi?id=1357 + if (c < 0xD800) // Almost all characters in a typical document. + return true; + if (c > 0xDFFF && c <= 0x10FFFF) + return true; + return false; +} + +/******************************* + * Return !=0 if unicode alpha. + * Use table from C99 Appendix D. + */ +bool isUniAlpha(dchar c) +{ + static immutable wchar[2][] ALPHA_TABLE = + [ + [0x00AA, 0x00AA], + [0x00B5, 0x00B5], + [0x00B7, 0x00B7], + [0x00BA, 0x00BA], + [0x00C0, 0x00D6], + [0x00D8, 0x00F6], + [0x00F8, 0x01F5], + [0x01FA, 0x0217], + [0x0250, 0x02A8], + [0x02B0, 0x02B8], + [0x02BB, 0x02BB], + [0x02BD, 0x02C1], + [0x02D0, 0x02D1], + [0x02E0, 0x02E4], + [0x037A, 0x037A], + [0x0386, 0x0386], + [0x0388, 0x038A], + [0x038C, 0x038C], + [0x038E, 0x03A1], + [0x03A3, 0x03CE], + [0x03D0, 0x03D6], + [0x03DA, 0x03DA], + [0x03DC, 0x03DC], + [0x03DE, 0x03DE], + [0x03E0, 0x03E0], + [0x03E2, 0x03F3], + [0x0401, 0x040C], + [0x040E, 0x044F], + [0x0451, 0x045C], + [0x045E, 0x0481], + [0x0490, 0x04C4], + [0x04C7, 0x04C8], + [0x04CB, 0x04CC], + [0x04D0, 0x04EB], + [0x04EE, 0x04F5], + [0x04F8, 0x04F9], + [0x0531, 0x0556], + [0x0559, 0x0559], + [0x0561, 0x0587], + [0x05B0, 0x05B9], + [0x05BB, 0x05BD], + [0x05BF, 0x05BF], + [0x05C1, 0x05C2], + [0x05D0, 0x05EA], + [0x05F0, 0x05F2], + [0x0621, 0x063A], + [0x0640, 0x0652], + [0x0660, 0x0669], + [0x0670, 0x06B7], + [0x06BA, 0x06BE], + [0x06C0, 0x06CE], + [0x06D0, 0x06DC], + [0x06E5, 0x06E8], + [0x06EA, 0x06ED], + [0x06F0, 0x06F9], + [0x0901, 0x0903], + [0x0905, 0x0939], + [0x093D, 0x094D], + [0x0950, 0x0952], + [0x0958, 0x0963], + [0x0966, 0x096F], + [0x0981, 0x0983], + [0x0985, 0x098C], + [0x098F, 0x0990], + [0x0993, 0x09A8], + [0x09AA, 0x09B0], + [0x09B2, 0x09B2], + [0x09B6, 0x09B9], + [0x09BE, 0x09C4], + [0x09C7, 0x09C8], + [0x09CB, 0x09CD], + [0x09DC, 0x09DD], + [0x09DF, 0x09E3], + [0x09E6, 0x09F1], + [0x0A02, 0x0A02], + [0x0A05, 0x0A0A], + [0x0A0F, 0x0A10], + [0x0A13, 0x0A28], + [0x0A2A, 0x0A30], + [0x0A32, 0x0A33], + [0x0A35, 0x0A36], + [0x0A38, 0x0A39], + [0x0A3E, 0x0A42], + [0x0A47, 0x0A48], + [0x0A4B, 0x0A4D], + [0x0A59, 0x0A5C], + [0x0A5E, 0x0A5E], + [0x0A66, 0x0A6F], + [0x0A74, 0x0A74], + [0x0A81, 0x0A83], + [0x0A85, 0x0A8B], + [0x0A8D, 0x0A8D], + [0x0A8F, 0x0A91], + [0x0A93, 0x0AA8], + [0x0AAA, 0x0AB0], + [0x0AB2, 0x0AB3], + [0x0AB5, 0x0AB9], + [0x0ABD, 0x0AC5], + [0x0AC7, 0x0AC9], + [0x0ACB, 0x0ACD], + [0x0AD0, 0x0AD0], + [0x0AE0, 0x0AE0], + [0x0AE6, 0x0AEF], + [0x0B01, 0x0B03], + [0x0B05, 0x0B0C], + [0x0B0F, 0x0B10], + [0x0B13, 0x0B28], + [0x0B2A, 0x0B30], + [0x0B32, 0x0B33], + [0x0B36, 0x0B39], + [0x0B3D, 0x0B43], + [0x0B47, 0x0B48], + [0x0B4B, 0x0B4D], + [0x0B5C, 0x0B5D], + [0x0B5F, 0x0B61], + [0x0B66, 0x0B6F], + [0x0B82, 0x0B83], + [0x0B85, 0x0B8A], + [0x0B8E, 0x0B90], + [0x0B92, 0x0B95], + [0x0B99, 0x0B9A], + [0x0B9C, 0x0B9C], + [0x0B9E, 0x0B9F], + [0x0BA3, 0x0BA4], + [0x0BA8, 0x0BAA], + [0x0BAE, 0x0BB5], + [0x0BB7, 0x0BB9], + [0x0BBE, 0x0BC2], + [0x0BC6, 0x0BC8], + [0x0BCA, 0x0BCD], + [0x0BE7, 0x0BEF], + [0x0C01, 0x0C03], + [0x0C05, 0x0C0C], + [0x0C0E, 0x0C10], + [0x0C12, 0x0C28], + [0x0C2A, 0x0C33], + [0x0C35, 0x0C39], + [0x0C3E, 0x0C44], + [0x0C46, 0x0C48], + [0x0C4A, 0x0C4D], + [0x0C60, 0x0C61], + [0x0C66, 0x0C6F], + [0x0C82, 0x0C83], + [0x0C85, 0x0C8C], + [0x0C8E, 0x0C90], + [0x0C92, 0x0CA8], + [0x0CAA, 0x0CB3], + [0x0CB5, 0x0CB9], + [0x0CBE, 0x0CC4], + [0x0CC6, 0x0CC8], + [0x0CCA, 0x0CCD], + [0x0CDE, 0x0CDE], + [0x0CE0, 0x0CE1], + [0x0CE6, 0x0CEF], + [0x0D02, 0x0D03], + [0x0D05, 0x0D0C], + [0x0D0E, 0x0D10], + [0x0D12, 0x0D28], + [0x0D2A, 0x0D39], + [0x0D3E, 0x0D43], + [0x0D46, 0x0D48], + [0x0D4A, 0x0D4D], + [0x0D60, 0x0D61], + [0x0D66, 0x0D6F], + [0x0E01, 0x0E3A], + [0x0E40, 0x0E5B], + [0x0E81, 0x0E82], + [0x0E84, 0x0E84], + [0x0E87, 0x0E88], + [0x0E8A, 0x0E8A], + [0x0E8D, 0x0E8D], + [0x0E94, 0x0E97], + [0x0E99, 0x0E9F], + [0x0EA1, 0x0EA3], + [0x0EA5, 0x0EA5], + [0x0EA7, 0x0EA7], + [0x0EAA, 0x0EAB], + [0x0EAD, 0x0EAE], + [0x0EB0, 0x0EB9], + [0x0EBB, 0x0EBD], + [0x0EC0, 0x0EC4], + [0x0EC6, 0x0EC6], + [0x0EC8, 0x0ECD], + [0x0ED0, 0x0ED9], + [0x0EDC, 0x0EDD], + [0x0F00, 0x0F00], + [0x0F18, 0x0F19], + [0x0F20, 0x0F33], + [0x0F35, 0x0F35], + [0x0F37, 0x0F37], + [0x0F39, 0x0F39], + [0x0F3E, 0x0F47], + [0x0F49, 0x0F69], + [0x0F71, 0x0F84], + [0x0F86, 0x0F8B], + [0x0F90, 0x0F95], + [0x0F97, 0x0F97], + [0x0F99, 0x0FAD], + [0x0FB1, 0x0FB7], + [0x0FB9, 0x0FB9], + [0x10A0, 0x10C5], + [0x10D0, 0x10F6], + [0x1E00, 0x1E9B], + [0x1EA0, 0x1EF9], + [0x1F00, 0x1F15], + [0x1F18, 0x1F1D], + [0x1F20, 0x1F45], + [0x1F48, 0x1F4D], + [0x1F50, 0x1F57], + [0x1F59, 0x1F59], + [0x1F5B, 0x1F5B], + [0x1F5D, 0x1F5D], + [0x1F5F, 0x1F7D], + [0x1F80, 0x1FB4], + [0x1FB6, 0x1FBC], + [0x1FBE, 0x1FBE], + [0x1FC2, 0x1FC4], + [0x1FC6, 0x1FCC], + [0x1FD0, 0x1FD3], + [0x1FD6, 0x1FDB], + [0x1FE0, 0x1FEC], + [0x1FF2, 0x1FF4], + [0x1FF6, 0x1FFC], + [0x203F, 0x2040], + [0x207F, 0x207F], + [0x2102, 0x2102], + [0x2107, 0x2107], + [0x210A, 0x2113], + [0x2115, 0x2115], + [0x2118, 0x211D], + [0x2124, 0x2124], + [0x2126, 0x2126], + [0x2128, 0x2128], + [0x212A, 0x2131], + [0x2133, 0x2138], + [0x2160, 0x2182], + [0x3005, 0x3007], + [0x3021, 0x3029], + [0x3041, 0x3093], + [0x309B, 0x309C], + [0x30A1, 0x30F6], + [0x30FB, 0x30FC], + [0x3105, 0x312C], + [0x4E00, 0x9FA5], + [0xAC00, 0xD7A3] + ]; + + size_t high = ALPHA_TABLE.length - 1; + // Shortcut search if c is out of range + size_t low = (c < ALPHA_TABLE[0][0] || ALPHA_TABLE[high][1] < c) ? high + 1 : 0; + // Binary search + while (low <= high) + { + size_t mid = (low + high) >> 1; + if (c < ALPHA_TABLE[mid][0]) + high = mid - 1; + else if (ALPHA_TABLE[mid][1] < c) + low = mid + 1; + else + { + assert(ALPHA_TABLE[mid][0] <= c && c <= ALPHA_TABLE[mid][1]); + return true; + } + } + return false; +} + +/** + * Returns the code length of c in code units. + */ +int utf_codeLengthChar(dchar c) +{ + if (c <= 0x7F) + return 1; + if (c <= 0x7FF) + return 2; + if (c <= 0xFFFF) + return 3; + if (c <= 0x10FFFF) + return 4; + assert(false); +} + +int utf_codeLengthWchar(dchar c) +{ + return c <= 0xFFFF ? 1 : 2; +} + +/** + * Returns the code length of c in code units for the encoding. + * sz is the encoding: 1 = utf8, 2 = utf16, 4 = utf32. + */ +int utf_codeLength(int sz, dchar c) +{ + if (sz == 1) + return utf_codeLengthChar(c); + if (sz == 2) + return utf_codeLengthWchar(c); + assert(sz == 4); + return 1; +} + +void utf_encodeChar(char* s, dchar c) +{ + assert(s !is null); + assert(utf_isValidDchar(c)); + if (c <= 0x7F) + { + s[0] = cast(char)c; + } + else if (c <= 0x07FF) + { + s[0] = cast(char)(0xC0 | (c >> 6)); + s[1] = cast(char)(0x80 | (c & 0x3F)); + } + else if (c <= 0xFFFF) + { + s[0] = cast(char)(0xE0 | (c >> 12)); + s[1] = cast(char)(0x80 | ((c >> 6) & 0x3F)); + s[2] = cast(char)(0x80 | (c & 0x3F)); + } + else if (c <= 0x10FFFF) + { + s[0] = cast(char)(0xF0 | (c >> 18)); + s[1] = cast(char)(0x80 | ((c >> 12) & 0x3F)); + s[2] = cast(char)(0x80 | ((c >> 6) & 0x3F)); + s[3] = cast(char)(0x80 | (c & 0x3F)); + } + else + assert(0); +} + +void utf_encodeWchar(wchar* s, dchar c) +{ + assert(s !is null); + assert(utf_isValidDchar(c)); + if (c <= 0xFFFF) + { + s[0] = cast(wchar)c; + } + else + { + s[0] = cast(wchar)((((c - 0x010000) >> 10) & 0x03FF) + 0xD800); + s[1] = cast(wchar)(((c - 0x010000) & 0x03FF) + 0xDC00); + } +} + +void utf_encode(int sz, void* s, dchar c) +{ + if (sz == 1) + utf_encodeChar(cast(char*)s, c); + else if (sz == 2) + utf_encodeWchar(cast(wchar*)s, c); + else + { + assert(sz == 4); + *(cast(dchar*)s) = c; + } +} + +/******************************************** + * Decode a UTF-8 sequence as a single UTF-32 code point. + * Params: + * s = UTF-8 sequence + * ridx = starting index in s[], updated to reflect number of code units decoded + * rresult = set to character decoded + * Returns: + * null on success, otherwise error message string + */ +string utf_decodeChar(const(char)[] s, ref size_t ridx, out dchar rresult) +{ + // UTF-8 decoding errors + static immutable string UTF8_DECODE_OK = null; // no error + static immutable string UTF8_DECODE_OUTSIDE_CODE_SPACE = "Outside Unicode code space"; + static immutable string UTF8_DECODE_TRUNCATED_SEQUENCE = "Truncated UTF-8 sequence"; + static immutable string UTF8_DECODE_OVERLONG = "Overlong UTF-8 sequence"; + static immutable string UTF8_DECODE_INVALID_TRAILER = "Invalid trailing code unit"; + static immutable string UTF8_DECODE_INVALID_CODE_POINT = "Invalid code point decoded"; + + /* The following encodings are valid, except for the 5 and 6 byte + * combinations: + * 0xxxxxxx + * 110xxxxx 10xxxxxx + * 1110xxxx 10xxxxxx 10xxxxxx + * 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + * 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + * 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + */ + static immutable ubyte[256] UTF8_STRIDE = + [ + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + 1,1,1,1, 1,1,1,1, + + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, + + 2,2,2,2, 2,2,2,2, + 2,2,2,2, 2,2,2,2, + 2,2,2,2, 2,2,2,2, + 2,2,2,2, 2,2,2,2, + + 3,3,3,3, 3,3,3,3, + 3,3,3,3, 3,3,3,3, + + 4,4,4,4, 4,4,4,4, + 5,5,5,5, 6,6,0xFF,0xFF + ]; + + assert(s !is null); + size_t i = ridx++; + + const char u = s[i]; + // Pre-stage results for ASCII and error cases + rresult = u; + //printf("utf_decodeChar(s = %02x, %02x, %02x len = %d)\n", u, s[1], s[2], len); + // Get expected sequence length + const size_t n = UTF8_STRIDE[u]; + switch (n) + { + case 1: + // ASCII + return UTF8_DECODE_OK; + case 2: + case 3: + case 4: + // multi-byte UTF-8 + break; + default: + // 5- or 6-byte sequence + return UTF8_DECODE_OUTSIDE_CODE_SPACE; + } + if (s.length < i + n) // source too short + return UTF8_DECODE_TRUNCATED_SEQUENCE; + // Pick off 7 - n low bits from first code unit + dchar c = u & ((1 << (7 - n)) - 1); + /* The following combinations are overlong, and illegal: + * 1100000x (10xxxxxx) + * 11100000 100xxxxx (10xxxxxx) + * 11110000 1000xxxx (10xxxxxx 10xxxxxx) + * 11111000 10000xxx (10xxxxxx 10xxxxxx 10xxxxxx) + * 11111100 100000xx (10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx) + */ + const char u2 = s[++i]; + // overlong combination + if ((u & 0xFE) == 0xC0 || (u == 0xE0 && (u2 & 0xE0) == 0x80) || (u == 0xF0 && (u2 & 0xF0) == 0x80) || (u == 0xF8 && (u2 & 0xF8) == 0x80) || (u == 0xFC && (u2 & 0xFC) == 0x80)) + return UTF8_DECODE_OVERLONG; + // Decode remaining bits + for (const m = n + i - 1; i != m; ++i) + { + const u3 = s[i]; + if ((u3 & 0xC0) != 0x80) // trailing bytes are 10xxxxxx + return UTF8_DECODE_INVALID_TRAILER; + c = (c << 6) | (u3 & 0x3F); + } + if (!utf_isValidDchar(c)) + return UTF8_DECODE_INVALID_CODE_POINT; + ridx = i; + rresult = c; + return UTF8_DECODE_OK; +} + +/******************************************** + * Decode a UTF-16 sequence as a single UTF-32 code point. + * Params: + * s = UTF-16 sequence + * ridx = starting index in s[], updated to reflect number of code units decoded + * rresult = set to character decoded + * Returns: + * null on success, otherwise error message string + */ +string utf_decodeWchar(const(wchar)[] s, ref size_t ridx, out dchar rresult) +{ + // UTF-16 decoding errors + static immutable string UTF16_DECODE_OK = null; // no error + static immutable string UTF16_DECODE_TRUNCATED_SEQUENCE = "Truncated UTF-16 sequence"; + static immutable string UTF16_DECODE_INVALID_SURROGATE = "Invalid low surrogate"; + static immutable string UTF16_DECODE_UNPAIRED_SURROGATE = "Unpaired surrogate"; + static immutable string UTF16_DECODE_INVALID_CODE_POINT = "Invalid code point decoded"; + + assert(s !is null); + size_t i = ridx++; + + // Pre-stage results for single wchar and error cases + dchar u = rresult = s[i]; + if (u < 0xD800) // Single wchar codepoint + return UTF16_DECODE_OK; + if (0xD800 <= u && u <= 0xDBFF) // Surrogate pair + { + if (s.length <= i + 1) + return UTF16_DECODE_TRUNCATED_SEQUENCE; + wchar u2 = s[i + 1]; + if (u2 < 0xDC00 || 0xDFFF < u) + return UTF16_DECODE_INVALID_SURROGATE; + u = ((u - 0xD7C0) << 10) + (u2 - 0xDC00); + ++ridx; + } + else if (0xDC00 <= u && u <= 0xDFFF) + return UTF16_DECODE_UNPAIRED_SURROGATE; + if (!utf_isValidDchar(u)) + return UTF16_DECODE_INVALID_CODE_POINT; + rresult = u; + return UTF16_DECODE_OK; +} diff --git a/gcc/d/dmd/safe.d b/gcc/d/dmd/safe.d index 7eb3e23..bad071e 100644 --- a/gcc/d/dmd/safe.d +++ b/gcc/d/dmd/safe.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/function.html#function-safety, Function Safety) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/safe.d, _safe.d) * Documentation: https://dlang.org/phobos/dmd_safe.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/safe.d diff --git a/gcc/d/dmd/sapply.d b/gcc/d/dmd/sapply.d index 018b046..7314d5b 100644 --- a/gcc/d/dmd/sapply.d +++ b/gcc/d/dmd/sapply.d @@ -1,9 +1,9 @@ /** * Provides a depth-first statement visitor. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/sparse.d, _sparse.d) * Documentation: https://dlang.org/phobos/dmd_sapply.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/sapply.d diff --git a/gcc/d/dmd/scope.h b/gcc/d/dmd/scope.h index 4d8c0bb..a163e75 100644 --- a/gcc/d/dmd/scope.h +++ b/gcc/d/dmd/scope.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/scope.h */ diff --git a/gcc/d/dmd/semantic2.d b/gcc/d/dmd/semantic2.d index c3fe752..f36cdc9 100644 --- a/gcc/d/dmd/semantic2.d +++ b/gcc/d/dmd/semantic2.d @@ -1,9 +1,9 @@ /** * Performs the semantic2 stage, which deals with initializer expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/semantic2.d, _semantic2.d) * Documentation: https://dlang.org/phobos/dmd_semantic2.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic2.d @@ -56,11 +56,11 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; +import dmd.root.utf; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; -import dmd.utf; import dmd.statement; import dmd.target; import dmd.templateparamsem; diff --git a/gcc/d/dmd/semantic3.d b/gcc/d/dmd/semantic3.d index 49b87d6..7bcb7ec 100644 --- a/gcc/d/dmd/semantic3.d +++ b/gcc/d/dmd/semantic3.d @@ -1,9 +1,9 @@ /** * Performs the semantic3 stage, which deals with function bodies. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/semantic3.d, _semantic3.d) * Documentation: https://dlang.org/phobos/dmd_semantic3.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/semantic3.d @@ -58,11 +58,11 @@ import dmd.root.filename; import dmd.common.outbuffer; import dmd.root.rmem; import dmd.root.rootobject; +import dmd.root.utf; import dmd.sideeffect; import dmd.statementsem; import dmd.staticassert; import dmd.tokens; -import dmd.utf; import dmd.semantic2; import dmd.statement; import dmd.target; diff --git a/gcc/d/dmd/sideeffect.d b/gcc/d/dmd/sideeffect.d index 99833b5..d365049 100644 --- a/gcc/d/dmd/sideeffect.d +++ b/gcc/d/dmd/sideeffect.d @@ -1,9 +1,9 @@ /** * Find side-effects of expressions. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/sideeffect.d, _sideeffect.d) * Documentation: https://dlang.org/phobos/dmd_sideeffect.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/sideeffect.d diff --git a/gcc/d/dmd/statement.d b/gcc/d/dmd/statement.d index 91e3fe7..be568f5 100644 --- a/gcc/d/dmd/statement.d +++ b/gcc/d/dmd/statement.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/statement.html, Statements) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statement.d, _statement.d) * Documentation: https://dlang.org/phobos/dmd_statement.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statement.d @@ -72,7 +72,7 @@ TypeIdentifier getException() } /*********************************************************** - * Specification: http://dlang.org/spec/statement.html + * Specification: https://dlang.org/spec/statement.html */ extern (C++) abstract class Statement : ASTNode { diff --git a/gcc/d/dmd/statement.h b/gcc/d/dmd/statement.h index 98b7bd3..dfb65a1 100644 --- a/gcc/d/dmd/statement.h +++ b/gcc/d/dmd/statement.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/statement.h */ diff --git a/gcc/d/dmd/statement_rewrite_walker.d b/gcc/d/dmd/statement_rewrite_walker.d index 2f6605c..b1f659d 100644 --- a/gcc/d/dmd/statement_rewrite_walker.d +++ b/gcc/d/dmd/statement_rewrite_walker.d @@ -1,9 +1,9 @@ /** * Provides a visitor for statements that allows rewriting the currently visited node. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statement_rewrite_walker.d, _statement_rewrite_walker.d) * Documentation: https://dlang.org/phobos/dmd_statement_rewrite_walker.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statement_rewrite_walker.d diff --git a/gcc/d/dmd/statementsem.d b/gcc/d/dmd/statementsem.d index 91855ac..faeba114 100644 --- a/gcc/d/dmd/statementsem.d +++ b/gcc/d/dmd/statementsem.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/statement.html, Statements) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/statementsem.d, _statementsem.d) * Documentation: https://dlang.org/phobos/dmd_statementsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/statementsem.d diff --git a/gcc/d/dmd/staticassert.d b/gcc/d/dmd/staticassert.d index 984dc42..7daf7cd 100644 --- a/gcc/d/dmd/staticassert.d +++ b/gcc/d/dmd/staticassert.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/version.html#static-assert, Static Assert) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/staticassert.d, _staticassert.d) * Documentation: https://dlang.org/phobos/dmd_staticassert.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticassert.d diff --git a/gcc/d/dmd/staticassert.h b/gcc/d/dmd/staticassert.h index 8f88080..5c00b46 100644 --- a/gcc/d/dmd/staticassert.h +++ b/gcc/d/dmd/staticassert.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/staticassert.h */ diff --git a/gcc/d/dmd/staticcond.d b/gcc/d/dmd/staticcond.d index 6d74ad2..6ff166a 100644 --- a/gcc/d/dmd/staticcond.d +++ b/gcc/d/dmd/staticcond.d @@ -1,9 +1,9 @@ /** * Lazily evaluate static conditions for `static if`, `static assert` and template constraints. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/staticcond.d, _staticcond.d) * Documentation: https://dlang.org/phobos/dmd_staticcond.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/staticcond.d diff --git a/gcc/d/dmd/stmtstate.d b/gcc/d/dmd/stmtstate.d index bb13d7c..3e26b8f 100644 --- a/gcc/d/dmd/stmtstate.d +++ b/gcc/d/dmd/stmtstate.d @@ -1,9 +1,9 @@ /** * Used to help transform statement AST into flow graph. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/stmtstate.d, _stmtstate.d) * Documentation: https://dlang.org/phobos/dmd_stmtstate.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/stmtstate.d diff --git a/gcc/d/dmd/target.d b/gcc/d/dmd/target.d index 8e434a3..619304d 100644 --- a/gcc/d/dmd/target.d +++ b/gcc/d/dmd/target.d @@ -15,9 +15,9 @@ * - $(LINK2 https://github.com/ldc-developers/ldc, LDC repository) * - $(LINK2 https://github.com/D-Programming-GDC/gcc, GDC repository) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/target.d, _target.d) * Documentation: https://dlang.org/phobos/dmd_target.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/target.d @@ -74,7 +74,7 @@ extern (C++) struct Target /* These are mutually exclusive; one and only one is set. * Match spelling and casing of corresponding version identifiers */ - Freestanding = 0, + none = 0, linux = 1, Windows = 2, OSX = 4, diff --git a/gcc/d/dmd/target.h b/gcc/d/dmd/target.h index 6348d93..9c879de 100644 --- a/gcc/d/dmd/target.h +++ b/gcc/d/dmd/target.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2013-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 2013-2022 by The D Language Foundation, All Rights Reserved * written by Iain Buclaw - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/target.h */ diff --git a/gcc/d/dmd/template.h b/gcc/d/dmd/template.h index 69cc84f..95cd349 100644 --- a/gcc/d/dmd/template.h +++ b/gcc/d/dmd/template.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/template.h */ diff --git a/gcc/d/dmd/templateparamsem.d b/gcc/d/dmd/templateparamsem.d index b462742..e093260 100644 --- a/gcc/d/dmd/templateparamsem.d +++ b/gcc/d/dmd/templateparamsem.d @@ -1,9 +1,9 @@ /** * Semantic analysis of template parameters. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/templateparamsem.d, _templateparamsem.d) * Documentation: https://dlang.org/phobos/dmd_templateparamsem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/templateparamsem.d diff --git a/gcc/d/dmd/tokens.d b/gcc/d/dmd/tokens.d index e5b05d3..5830dbb 100644 --- a/gcc/d/dmd/tokens.d +++ b/gcc/d/dmd/tokens.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/lex.html#tokens, Tokens) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/tokens.d, _tokens.d) * Documentation: https://dlang.org/phobos/dmd_tokens.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/tokens.d @@ -21,7 +21,7 @@ import dmd.identifier; import dmd.root.ctfloat; import dmd.common.outbuffer; import dmd.root.rmem; -import dmd.utf; +import dmd.root.utf; enum TOK : ubyte { diff --git a/gcc/d/dmd/tokens.h b/gcc/d/dmd/tokens.h index e095aa6..0a00ae7 100644 --- a/gcc/d/dmd/tokens.h +++ b/gcc/d/dmd/tokens.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/tokens.h */ diff --git a/gcc/d/dmd/traits.d b/gcc/d/dmd/traits.d index 7b9a8c8..ae8ab9b 100644 --- a/gcc/d/dmd/traits.d +++ b/gcc/d/dmd/traits.d @@ -3,9 +3,9 @@ * * Specification: $(LINK2 https://dlang.org/spec/traits.html, Traits) * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/traits.d, _traits.d) * Documentation: https://dlang.org/phobos/dmd_traits.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/traits.d diff --git a/gcc/d/dmd/typesem.d b/gcc/d/dmd/typesem.d index b8c4317..34b363d 100644 --- a/gcc/d/dmd/typesem.d +++ b/gcc/d/dmd/typesem.d @@ -1,9 +1,9 @@ /** * Semantic analysis for D types. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/typesem.d, _typesem.d) * Documentation: https://dlang.org/phobos/dmd_typesem.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/typesem.d @@ -22,7 +22,6 @@ import dmd.arrayop; import dmd.arraytypes; import dmd.astcodegen; import dmd.astenums; -import dmd.complex; import dmd.dcast; import dmd.dclass; import dmd.declaration; @@ -52,6 +51,7 @@ import dmd.mtype; import dmd.objc; import dmd.opover; import dmd.parse; +import dmd.root.complex; import dmd.root.ctfloat; import dmd.root.rmem; import dmd.common.outbuffer; @@ -161,7 +161,7 @@ private void resolveTupleIndex(const ref Loc loc, Scope* sc, Dsymbol s, out Expr const(uinteger_t) d = eindex.toUInteger(); if (d >= tup.objects.dim) { - .error(loc, "tuple index `%llu` exceeds length %zu", d, tup.objects.dim); + .error(loc, "tuple index `%llu` exceeds length %llu", d, cast(ulong)tup.objects.dim); pt = Type.terror; return; } diff --git a/gcc/d/dmd/typinf.d b/gcc/d/dmd/typinf.d index d05af61..21447ae 100644 --- a/gcc/d/dmd/typinf.d +++ b/gcc/d/dmd/typinf.d @@ -1,9 +1,9 @@ /** * Generate `TypeInfo` objects, which are needed for run-time introspection of types. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/typeinf.d, _typeinf.d) * Documentation: https://dlang.org/phobos/dmd_typinf.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/typinf.d diff --git a/gcc/d/dmd/utf.d b/gcc/d/dmd/utf.d deleted file mode 100644 index 1125c21..0000000 --- a/gcc/d/dmd/utf.d +++ /dev/null @@ -1,561 +0,0 @@ -/** - * Functions related to UTF encoding. - * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) - * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/utf.d, _utf.d) - * Documentation: https://dlang.org/phobos/dmd_utf.html - * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/utf.d - */ - -module dmd.utf; - -nothrow pure @nogc: - -/// The Unicode code space is the range of code points [0x000000,0x10FFFF] -/// except the UTF-16 surrogate pairs in the range [0xD800,0xDFFF] -bool utf_isValidDchar(dchar c) -{ - // TODO: Whether non-char code points should be rejected is pending review. - // 0xFFFE and 0xFFFF are valid for internal use, like Phobos std.utf.isValidDChar - // See also https://issues.dlang.org/show_bug.cgi?id=1357 - if (c < 0xD800) // Almost all characters in a typical document. - return true; - if (c > 0xDFFF && c <= 0x10FFFF) - return true; - return false; -} - -/******************************* - * Return !=0 if unicode alpha. - * Use table from C99 Appendix D. - */ -bool isUniAlpha(dchar c) -{ - static immutable wchar[2][] ALPHA_TABLE = - [ - [0x00AA, 0x00AA], - [0x00B5, 0x00B5], - [0x00B7, 0x00B7], - [0x00BA, 0x00BA], - [0x00C0, 0x00D6], - [0x00D8, 0x00F6], - [0x00F8, 0x01F5], - [0x01FA, 0x0217], - [0x0250, 0x02A8], - [0x02B0, 0x02B8], - [0x02BB, 0x02BB], - [0x02BD, 0x02C1], - [0x02D0, 0x02D1], - [0x02E0, 0x02E4], - [0x037A, 0x037A], - [0x0386, 0x0386], - [0x0388, 0x038A], - [0x038C, 0x038C], - [0x038E, 0x03A1], - [0x03A3, 0x03CE], - [0x03D0, 0x03D6], - [0x03DA, 0x03DA], - [0x03DC, 0x03DC], - [0x03DE, 0x03DE], - [0x03E0, 0x03E0], - [0x03E2, 0x03F3], - [0x0401, 0x040C], - [0x040E, 0x044F], - [0x0451, 0x045C], - [0x045E, 0x0481], - [0x0490, 0x04C4], - [0x04C7, 0x04C8], - [0x04CB, 0x04CC], - [0x04D0, 0x04EB], - [0x04EE, 0x04F5], - [0x04F8, 0x04F9], - [0x0531, 0x0556], - [0x0559, 0x0559], - [0x0561, 0x0587], - [0x05B0, 0x05B9], - [0x05BB, 0x05BD], - [0x05BF, 0x05BF], - [0x05C1, 0x05C2], - [0x05D0, 0x05EA], - [0x05F0, 0x05F2], - [0x0621, 0x063A], - [0x0640, 0x0652], - [0x0660, 0x0669], - [0x0670, 0x06B7], - [0x06BA, 0x06BE], - [0x06C0, 0x06CE], - [0x06D0, 0x06DC], - [0x06E5, 0x06E8], - [0x06EA, 0x06ED], - [0x06F0, 0x06F9], - [0x0901, 0x0903], - [0x0905, 0x0939], - [0x093D, 0x094D], - [0x0950, 0x0952], - [0x0958, 0x0963], - [0x0966, 0x096F], - [0x0981, 0x0983], - [0x0985, 0x098C], - [0x098F, 0x0990], - [0x0993, 0x09A8], - [0x09AA, 0x09B0], - [0x09B2, 0x09B2], - [0x09B6, 0x09B9], - [0x09BE, 0x09C4], - [0x09C7, 0x09C8], - [0x09CB, 0x09CD], - [0x09DC, 0x09DD], - [0x09DF, 0x09E3], - [0x09E6, 0x09F1], - [0x0A02, 0x0A02], - [0x0A05, 0x0A0A], - [0x0A0F, 0x0A10], - [0x0A13, 0x0A28], - [0x0A2A, 0x0A30], - [0x0A32, 0x0A33], - [0x0A35, 0x0A36], - [0x0A38, 0x0A39], - [0x0A3E, 0x0A42], - [0x0A47, 0x0A48], - [0x0A4B, 0x0A4D], - [0x0A59, 0x0A5C], - [0x0A5E, 0x0A5E], - [0x0A66, 0x0A6F], - [0x0A74, 0x0A74], - [0x0A81, 0x0A83], - [0x0A85, 0x0A8B], - [0x0A8D, 0x0A8D], - [0x0A8F, 0x0A91], - [0x0A93, 0x0AA8], - [0x0AAA, 0x0AB0], - [0x0AB2, 0x0AB3], - [0x0AB5, 0x0AB9], - [0x0ABD, 0x0AC5], - [0x0AC7, 0x0AC9], - [0x0ACB, 0x0ACD], - [0x0AD0, 0x0AD0], - [0x0AE0, 0x0AE0], - [0x0AE6, 0x0AEF], - [0x0B01, 0x0B03], - [0x0B05, 0x0B0C], - [0x0B0F, 0x0B10], - [0x0B13, 0x0B28], - [0x0B2A, 0x0B30], - [0x0B32, 0x0B33], - [0x0B36, 0x0B39], - [0x0B3D, 0x0B43], - [0x0B47, 0x0B48], - [0x0B4B, 0x0B4D], - [0x0B5C, 0x0B5D], - [0x0B5F, 0x0B61], - [0x0B66, 0x0B6F], - [0x0B82, 0x0B83], - [0x0B85, 0x0B8A], - [0x0B8E, 0x0B90], - [0x0B92, 0x0B95], - [0x0B99, 0x0B9A], - [0x0B9C, 0x0B9C], - [0x0B9E, 0x0B9F], - [0x0BA3, 0x0BA4], - [0x0BA8, 0x0BAA], - [0x0BAE, 0x0BB5], - [0x0BB7, 0x0BB9], - [0x0BBE, 0x0BC2], - [0x0BC6, 0x0BC8], - [0x0BCA, 0x0BCD], - [0x0BE7, 0x0BEF], - [0x0C01, 0x0C03], - [0x0C05, 0x0C0C], - [0x0C0E, 0x0C10], - [0x0C12, 0x0C28], - [0x0C2A, 0x0C33], - [0x0C35, 0x0C39], - [0x0C3E, 0x0C44], - [0x0C46, 0x0C48], - [0x0C4A, 0x0C4D], - [0x0C60, 0x0C61], - [0x0C66, 0x0C6F], - [0x0C82, 0x0C83], - [0x0C85, 0x0C8C], - [0x0C8E, 0x0C90], - [0x0C92, 0x0CA8], - [0x0CAA, 0x0CB3], - [0x0CB5, 0x0CB9], - [0x0CBE, 0x0CC4], - [0x0CC6, 0x0CC8], - [0x0CCA, 0x0CCD], - [0x0CDE, 0x0CDE], - [0x0CE0, 0x0CE1], - [0x0CE6, 0x0CEF], - [0x0D02, 0x0D03], - [0x0D05, 0x0D0C], - [0x0D0E, 0x0D10], - [0x0D12, 0x0D28], - [0x0D2A, 0x0D39], - [0x0D3E, 0x0D43], - [0x0D46, 0x0D48], - [0x0D4A, 0x0D4D], - [0x0D60, 0x0D61], - [0x0D66, 0x0D6F], - [0x0E01, 0x0E3A], - [0x0E40, 0x0E5B], - [0x0E81, 0x0E82], - [0x0E84, 0x0E84], - [0x0E87, 0x0E88], - [0x0E8A, 0x0E8A], - [0x0E8D, 0x0E8D], - [0x0E94, 0x0E97], - [0x0E99, 0x0E9F], - [0x0EA1, 0x0EA3], - [0x0EA5, 0x0EA5], - [0x0EA7, 0x0EA7], - [0x0EAA, 0x0EAB], - [0x0EAD, 0x0EAE], - [0x0EB0, 0x0EB9], - [0x0EBB, 0x0EBD], - [0x0EC0, 0x0EC4], - [0x0EC6, 0x0EC6], - [0x0EC8, 0x0ECD], - [0x0ED0, 0x0ED9], - [0x0EDC, 0x0EDD], - [0x0F00, 0x0F00], - [0x0F18, 0x0F19], - [0x0F20, 0x0F33], - [0x0F35, 0x0F35], - [0x0F37, 0x0F37], - [0x0F39, 0x0F39], - [0x0F3E, 0x0F47], - [0x0F49, 0x0F69], - [0x0F71, 0x0F84], - [0x0F86, 0x0F8B], - [0x0F90, 0x0F95], - [0x0F97, 0x0F97], - [0x0F99, 0x0FAD], - [0x0FB1, 0x0FB7], - [0x0FB9, 0x0FB9], - [0x10A0, 0x10C5], - [0x10D0, 0x10F6], - [0x1E00, 0x1E9B], - [0x1EA0, 0x1EF9], - [0x1F00, 0x1F15], - [0x1F18, 0x1F1D], - [0x1F20, 0x1F45], - [0x1F48, 0x1F4D], - [0x1F50, 0x1F57], - [0x1F59, 0x1F59], - [0x1F5B, 0x1F5B], - [0x1F5D, 0x1F5D], - [0x1F5F, 0x1F7D], - [0x1F80, 0x1FB4], - [0x1FB6, 0x1FBC], - [0x1FBE, 0x1FBE], - [0x1FC2, 0x1FC4], - [0x1FC6, 0x1FCC], - [0x1FD0, 0x1FD3], - [0x1FD6, 0x1FDB], - [0x1FE0, 0x1FEC], - [0x1FF2, 0x1FF4], - [0x1FF6, 0x1FFC], - [0x203F, 0x2040], - [0x207F, 0x207F], - [0x2102, 0x2102], - [0x2107, 0x2107], - [0x210A, 0x2113], - [0x2115, 0x2115], - [0x2118, 0x211D], - [0x2124, 0x2124], - [0x2126, 0x2126], - [0x2128, 0x2128], - [0x212A, 0x2131], - [0x2133, 0x2138], - [0x2160, 0x2182], - [0x3005, 0x3007], - [0x3021, 0x3029], - [0x3041, 0x3093], - [0x309B, 0x309C], - [0x30A1, 0x30F6], - [0x30FB, 0x30FC], - [0x3105, 0x312C], - [0x4E00, 0x9FA5], - [0xAC00, 0xD7A3] - ]; - - size_t high = ALPHA_TABLE.length - 1; - // Shortcut search if c is out of range - size_t low = (c < ALPHA_TABLE[0][0] || ALPHA_TABLE[high][1] < c) ? high + 1 : 0; - // Binary search - while (low <= high) - { - size_t mid = (low + high) >> 1; - if (c < ALPHA_TABLE[mid][0]) - high = mid - 1; - else if (ALPHA_TABLE[mid][1] < c) - low = mid + 1; - else - { - assert(ALPHA_TABLE[mid][0] <= c && c <= ALPHA_TABLE[mid][1]); - return true; - } - } - return false; -} - -/** - * Returns the code length of c in code units. - */ -int utf_codeLengthChar(dchar c) -{ - if (c <= 0x7F) - return 1; - if (c <= 0x7FF) - return 2; - if (c <= 0xFFFF) - return 3; - if (c <= 0x10FFFF) - return 4; - assert(false); -} - -int utf_codeLengthWchar(dchar c) -{ - return c <= 0xFFFF ? 1 : 2; -} - -/** - * Returns the code length of c in code units for the encoding. - * sz is the encoding: 1 = utf8, 2 = utf16, 4 = utf32. - */ -int utf_codeLength(int sz, dchar c) -{ - if (sz == 1) - return utf_codeLengthChar(c); - if (sz == 2) - return utf_codeLengthWchar(c); - assert(sz == 4); - return 1; -} - -void utf_encodeChar(char* s, dchar c) -{ - assert(s !is null); - assert(utf_isValidDchar(c)); - if (c <= 0x7F) - { - s[0] = cast(char)c; - } - else if (c <= 0x07FF) - { - s[0] = cast(char)(0xC0 | (c >> 6)); - s[1] = cast(char)(0x80 | (c & 0x3F)); - } - else if (c <= 0xFFFF) - { - s[0] = cast(char)(0xE0 | (c >> 12)); - s[1] = cast(char)(0x80 | ((c >> 6) & 0x3F)); - s[2] = cast(char)(0x80 | (c & 0x3F)); - } - else if (c <= 0x10FFFF) - { - s[0] = cast(char)(0xF0 | (c >> 18)); - s[1] = cast(char)(0x80 | ((c >> 12) & 0x3F)); - s[2] = cast(char)(0x80 | ((c >> 6) & 0x3F)); - s[3] = cast(char)(0x80 | (c & 0x3F)); - } - else - assert(0); -} - -void utf_encodeWchar(wchar* s, dchar c) -{ - assert(s !is null); - assert(utf_isValidDchar(c)); - if (c <= 0xFFFF) - { - s[0] = cast(wchar)c; - } - else - { - s[0] = cast(wchar)((((c - 0x010000) >> 10) & 0x03FF) + 0xD800); - s[1] = cast(wchar)(((c - 0x010000) & 0x03FF) + 0xDC00); - } -} - -void utf_encode(int sz, void* s, dchar c) -{ - if (sz == 1) - utf_encodeChar(cast(char*)s, c); - else if (sz == 2) - utf_encodeWchar(cast(wchar*)s, c); - else - { - assert(sz == 4); - *(cast(dchar*)s) = c; - } -} - -/******************************************** - * Decode a UTF-8 sequence as a single UTF-32 code point. - * Params: - * s = UTF-8 sequence - * ridx = starting index in s[], updated to reflect number of code units decoded - * rresult = set to character decoded - * Returns: - * null on success, otherwise error message string - */ -string utf_decodeChar(const(char)[] s, ref size_t ridx, out dchar rresult) -{ - // UTF-8 decoding errors - static immutable string UTF8_DECODE_OK = null; // no error - static immutable string UTF8_DECODE_OUTSIDE_CODE_SPACE = "Outside Unicode code space"; - static immutable string UTF8_DECODE_TRUNCATED_SEQUENCE = "Truncated UTF-8 sequence"; - static immutable string UTF8_DECODE_OVERLONG = "Overlong UTF-8 sequence"; - static immutable string UTF8_DECODE_INVALID_TRAILER = "Invalid trailing code unit"; - static immutable string UTF8_DECODE_INVALID_CODE_POINT = "Invalid code point decoded"; - - /* The following encodings are valid, except for the 5 and 6 byte - * combinations: - * 0xxxxxxx - * 110xxxxx 10xxxxxx - * 1110xxxx 10xxxxxx 10xxxxxx - * 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - * 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - * 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - */ - static immutable ubyte[256] UTF8_STRIDE = - [ - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - 1,1,1,1, 1,1,1,1, - - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - 0xFF,0xFF,0xFF,0xFF, 0xFF,0xFF,0xFF,0xFF, - - 2,2,2,2, 2,2,2,2, - 2,2,2,2, 2,2,2,2, - 2,2,2,2, 2,2,2,2, - 2,2,2,2, 2,2,2,2, - - 3,3,3,3, 3,3,3,3, - 3,3,3,3, 3,3,3,3, - - 4,4,4,4, 4,4,4,4, - 5,5,5,5, 6,6,0xFF,0xFF - ]; - - assert(s !is null); - size_t i = ridx++; - - const char u = s[i]; - // Pre-stage results for ASCII and error cases - rresult = u; - //printf("utf_decodeChar(s = %02x, %02x, %02x len = %d)\n", u, s[1], s[2], len); - // Get expected sequence length - const size_t n = UTF8_STRIDE[u]; - switch (n) - { - case 1: - // ASCII - return UTF8_DECODE_OK; - case 2: - case 3: - case 4: - // multi-byte UTF-8 - break; - default: - // 5- or 6-byte sequence - return UTF8_DECODE_OUTSIDE_CODE_SPACE; - } - if (s.length < i + n) // source too short - return UTF8_DECODE_TRUNCATED_SEQUENCE; - // Pick off 7 - n low bits from first code unit - dchar c = u & ((1 << (7 - n)) - 1); - /* The following combinations are overlong, and illegal: - * 1100000x (10xxxxxx) - * 11100000 100xxxxx (10xxxxxx) - * 11110000 1000xxxx (10xxxxxx 10xxxxxx) - * 11111000 10000xxx (10xxxxxx 10xxxxxx 10xxxxxx) - * 11111100 100000xx (10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx) - */ - const char u2 = s[++i]; - // overlong combination - if ((u & 0xFE) == 0xC0 || (u == 0xE0 && (u2 & 0xE0) == 0x80) || (u == 0xF0 && (u2 & 0xF0) == 0x80) || (u == 0xF8 && (u2 & 0xF8) == 0x80) || (u == 0xFC && (u2 & 0xFC) == 0x80)) - return UTF8_DECODE_OVERLONG; - // Decode remaining bits - for (const m = n + i - 1; i != m; ++i) - { - const u3 = s[i]; - if ((u3 & 0xC0) != 0x80) // trailing bytes are 10xxxxxx - return UTF8_DECODE_INVALID_TRAILER; - c = (c << 6) | (u3 & 0x3F); - } - if (!utf_isValidDchar(c)) - return UTF8_DECODE_INVALID_CODE_POINT; - ridx = i; - rresult = c; - return UTF8_DECODE_OK; -} - -/******************************************** - * Decode a UTF-16 sequence as a single UTF-32 code point. - * Params: - * s = UTF-16 sequence - * ridx = starting index in s[], updated to reflect number of code units decoded - * rresult = set to character decoded - * Returns: - * null on success, otherwise error message string - */ -string utf_decodeWchar(const(wchar)[] s, ref size_t ridx, out dchar rresult) -{ - // UTF-16 decoding errors - static immutable string UTF16_DECODE_OK = null; // no error - static immutable string UTF16_DECODE_TRUNCATED_SEQUENCE = "Truncated UTF-16 sequence"; - static immutable string UTF16_DECODE_INVALID_SURROGATE = "Invalid low surrogate"; - static immutable string UTF16_DECODE_UNPAIRED_SURROGATE = "Unpaired surrogate"; - static immutable string UTF16_DECODE_INVALID_CODE_POINT = "Invalid code point decoded"; - - assert(s !is null); - size_t i = ridx++; - - // Pre-stage results for single wchar and error cases - dchar u = rresult = s[i]; - if (u < 0xD800) // Single wchar codepoint - return UTF16_DECODE_OK; - if (0xD800 <= u && u <= 0xDBFF) // Surrogate pair - { - if (s.length <= i + 1) - return UTF16_DECODE_TRUNCATED_SEQUENCE; - wchar u2 = s[i + 1]; - if (u2 < 0xDC00 || 0xDFFF < u) - return UTF16_DECODE_INVALID_SURROGATE; - u = ((u - 0xD7C0) << 10) + (u2 - 0xDC00); - ++ridx; - } - else if (0xDC00 <= u && u <= 0xDFFF) - return UTF16_DECODE_UNPAIRED_SURROGATE; - if (!utf_isValidDchar(u)) - return UTF16_DECODE_INVALID_CODE_POINT; - rresult = u; - return UTF16_DECODE_OK; -} diff --git a/gcc/d/dmd/utils.d b/gcc/d/dmd/utils.d index 6cd5d20..f8e7e48 100644 --- a/gcc/d/dmd/utils.d +++ b/gcc/d/dmd/utils.d @@ -1,9 +1,9 @@ /** * This module defines some utility functions for DMD. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/utils.d, _utils.d) * Documentation: https://dlang.org/phobos/dmd_utils.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/utils.d diff --git a/gcc/d/dmd/version.h b/gcc/d/dmd/version.h index 6c5e2f0..afc4557 100644 --- a/gcc/d/dmd/version.h +++ b/gcc/d/dmd/version.h @@ -1,10 +1,10 @@ /* Compiler implementation of the D programming language - * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved + * Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved * written by Walter Bright - * http://www.digitalmars.com + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/version.h */ diff --git a/gcc/d/dmd/visitor.d b/gcc/d/dmd/visitor.d index 8b9c012..e6dfa11 100644 --- a/gcc/d/dmd/visitor.d +++ b/gcc/d/dmd/visitor.d @@ -1,9 +1,9 @@ /** * Provides a visitor class visiting all AST nodes present in the compiler. * - * Copyright: Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved - * Authors: $(LINK2 http://www.digitalmars.com, Walter Bright) - * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) + * Copyright: Copyright (C) 1999-2022 by The D Language Foundation, All Rights Reserved + * Authors: $(LINK2 https://www.digitalmars.com, Walter Bright) + * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/visitor.d, _visitor.d) * Documentation: https://dlang.org/phobos/dmd_visitor.html * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/visitor.d diff --git a/gcc/d/dmd/visitor.h b/gcc/d/dmd/visitor.h index e61f16d..5bad56b 100644 --- a/gcc/d/dmd/visitor.h +++ b/gcc/d/dmd/visitor.h @@ -1,9 +1,9 @@ /* Compiler implementation of the D programming language - * Copyright (C) 2013-2021 by The D Language Foundation, All Rights Reserved - * http://www.digitalmars.com + * Copyright (C) 2013-2022 by The D Language Foundation, All Rights Reserved + * https://www.digitalmars.com * Distributed under the Boost Software License, Version 1.0. - * http://www.boost.org/LICENSE_1_0.txt + * https://www.boost.org/LICENSE_1_0.txt * https://github.com/dlang/dmd/blob/master/src/dmd/visitor.h */ diff --git a/gcc/testsuite/gdc.test/compilable/99bottles.d b/gcc/testsuite/gdc.test/compilable/99bottles.d index 09360a8..5341a49 100644 --- a/gcc/testsuite/gdc.test/compilable/99bottles.d +++ b/gcc/testsuite/gdc.test/compilable/99bottles.d @@ -1,5 +1,5 @@ // written by Don Clugston: -// http://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html +// https://www.digitalmars.com/d/archives/digitalmars/D/announce/4374.html // http://www.99-bottles-of-beer.net/language-d-1212.html // Generates the "99 bottles of beer" song at compile time, diff --git a/gcc/testsuite/gdc.test/compilable/art4769.d b/gcc/testsuite/gdc.test/compilable/art4769.d index 34adcda..dfffe77 100644 --- a/gcc/testsuite/gdc.test/compilable/art4769.d +++ b/gcc/testsuite/gdc.test/compilable/art4769.d @@ -1,4 +1,4 @@ -// http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.bugs&article_id=4769 +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4769.html // COMPILED_IMPORTS: imports/art4769a.d imports/art4769b.d // PERMUTE_ARGS: diff --git a/gcc/testsuite/gdc.test/compilable/test69.d b/gcc/testsuite/gdc.test/compilable/test69.d index 66662dc..395a49f 100644 --- a/gcc/testsuite/gdc.test/compilable/test69.d +++ b/gcc/testsuite/gdc.test/compilable/test69.d @@ -1,7 +1,7 @@ // PERMUTE_ARGS: // ICE(expression.c) DMD 0.110 -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2966.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2966.html string str255() { return "\255"; } void fromFail49() diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail11.d b/gcc/testsuite/gdc.test/fail_compilation/fail11.d index 8ba05df..9a5a815 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail11.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail11.d @@ -5,7 +5,7 @@ fail_compilation/fail11.d(12): Error: `int*` has no effect --- */ -// http://forum.dlang.org/thread/c738o9$1p7i$1@digitaldaemon.com +// https://forum.dlang.org/thread/c738o9$1p7i$1@digitaldaemon.com void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail15.d b/gcc/testsuite/gdc.test/fail_compilation/fail15.d index 0386b9a..cd18485 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail15.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail15.d @@ -6,7 +6,7 @@ fail_compilation/fail15.d(24): Error: cannot use `[]` operator on expression of */ /* Segfault on DMD 0.095 -http://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html +https://www.digitalmars.com/d/archives/digitalmars/D/bugs/926.html */ module test; diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail35.d b/gcc/testsuite/gdc.test/fail_compilation/fail35.d index c35dfe1..4f47a62 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail35.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail35.d @@ -5,7 +5,7 @@ fail_compilation/fail35.d(15): Error: variable `t` cannot be read at compile tim --- */ -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2372.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2372.html // allegedly crashes, but cannot reproduce void main() diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail73.d b/gcc/testsuite/gdc.test/fail_compilation/fail73.d index b9b480d..0242201 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/fail73.d +++ b/gcc/testsuite/gdc.test/fail_compilation/fail73.d @@ -6,7 +6,7 @@ fail_compilation/fail73.d(20): Error: `case` not in `switch` statement */ // segfault DMD 0.120 -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4634.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4634.html void main() { diff --git a/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d b/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d index df169e19..22cf392 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d +++ b/gcc/testsuite/gdc.test/fail_compilation/misc_parser_err_cov1.d @@ -15,14 +15,18 @@ fail_compilation/misc_parser_err_cov1.d(35): Error: `key:value` expected for ass fail_compilation/misc_parser_err_cov1.d(36): Error: basic type expected, not `;` fail_compilation/misc_parser_err_cov1.d(36): Error: `{ members }` expected for anonymous class fail_compilation/misc_parser_err_cov1.d(38): Error: template argument expected following `!` -fail_compilation/misc_parser_err_cov1.d(38): Error: found `if` when expecting `)` -fail_compilation/misc_parser_err_cov1.d(38): Error: found `)` instead of statement +fail_compilation/misc_parser_err_cov1.d(38): Error: missing closing `)` after `if (parseShift!()` +fail_compilation/misc_parser_err_cov1.d(38): Error: found `)` when expecting `(` +fail_compilation/misc_parser_err_cov1.d(39): Error: missing closing `)` after `if (` fail_compilation/misc_parser_err_cov1.d(39): Error: identifier expected following `(type)`. fail_compilation/misc_parser_err_cov1.d(39): Error: expression expected, not `;` fail_compilation/misc_parser_err_cov1.d(40): Error: semicolon expected following auto declaration, not `auto` fail_compilation/misc_parser_err_cov1.d(40): Error: identifier or `new` expected following `.`, not `+` -fail_compilation/misc_parser_err_cov1.d(41): Error: declaration expected, not `(` -fail_compilation/misc_parser_err_cov1.d(42): Error: unrecognized declaration +fail_compilation/misc_parser_err_cov1.d(41): Error: identifier or new keyword expected following `(...)`. +fail_compilation/misc_parser_err_cov1.d(41): Error: found `.` when expecting `;` following statement +fail_compilation/misc_parser_err_cov1.d(41): Error: expression expected, not `;` +fail_compilation/misc_parser_err_cov1.d(42): Error: found `}` when expecting `;` following statement +fail_compilation/misc_parser_err_cov1.d(43): Error: found `End of File` when expecting `}` following compound statement --- */ module misc_parser_err_cov1; diff --git a/gcc/testsuite/gdc.test/fail_compilation/parseStc.d b/gcc/testsuite/gdc.test/fail_compilation/parseStc.d index e0ce2c3..c9c4288 100644 --- a/gcc/testsuite/gdc.test/fail_compilation/parseStc.d +++ b/gcc/testsuite/gdc.test/fail_compilation/parseStc.d @@ -1,9 +1,10 @@ /* TEST_OUTPUT: --- -fail_compilation/parseStc.d(11): Error: found `;` when expecting `)` -fail_compilation/parseStc.d(11): Error: found `)` when expecting `;` following statement -fail_compilation/parseStc.d(12): Error: redundant attribute `const` +fail_compilation/parseStc.d(12): Error: missing closing `)` after `if (x` +fail_compilation/parseStc.d(12): Error: use `{ }` for an empty statement, not `;` +fail_compilation/parseStc.d(12): Error: found `)` when expecting `;` following statement +fail_compilation/parseStc.d(13): Error: redundant attribute `const` --- */ void test1() @@ -15,9 +16,9 @@ void test1() /* TEST_OUTPUT: --- -fail_compilation/parseStc.d(25): Error: redundant attribute `const` fail_compilation/parseStc.d(26): Error: redundant attribute `const` -fail_compilation/parseStc.d(27): Error: conflicting attribute `immutable` +fail_compilation/parseStc.d(27): Error: redundant attribute `const` +fail_compilation/parseStc.d(28): Error: conflicting attribute `immutable` --- */ void test2() @@ -30,8 +31,8 @@ void test2() /* TEST_OUTPUT: --- -fail_compilation/parseStc.d(37): Error: redundant attribute `const` fail_compilation/parseStc.d(38): Error: redundant attribute `const` +fail_compilation/parseStc.d(39): Error: redundant attribute `const` --- */ struct S3 { const const test3() {} } diff --git a/gcc/testsuite/gdc.test/runnable/mars1.d b/gcc/testsuite/gdc.test/runnable/mars1.d index 30aa950..c981334 100644 --- a/gcc/testsuite/gdc.test/runnable/mars1.d +++ b/gcc/testsuite/gdc.test/runnable/mars1.d @@ -1923,7 +1923,7 @@ void test20050() //////////////////////////////////////////////////////////////////////// -// http://github.com/dlang/dmd/pull/11238 +// https://github.com/dlang/dmd/pull/11238 int testCpStatic1(int y) { @@ -1960,7 +1960,7 @@ void test7() //////////////////////////////////////////////////////////////////////// -// http://github.com/dlang/dmd/pull/11388 +// https://github.com/dlang/dmd/pull/11388 ushort byteswap(ushort x) pure { diff --git a/gcc/testsuite/gdc.test/runnable/template1.d b/gcc/testsuite/gdc.test/runnable/template1.d index dde9213..ed237d8 100644 --- a/gcc/testsuite/gdc.test/runnable/template1.d +++ b/gcc/testsuite/gdc.test/runnable/template1.d @@ -1554,7 +1554,7 @@ void test64() } /******************************************/ -// http://www.digitalmars.com/d/archives/28052.html +// https://www.digitalmars.com/d/archives/28052.html alias int value_type; @@ -1923,7 +1923,7 @@ specialization:: first int /******************************************/ -// http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2117 +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2117.html class Conversion(T,U){ alias char Small; diff --git a/gcc/testsuite/gdc.test/runnable/template2.d b/gcc/testsuite/gdc.test/runnable/template2.d index fe08a6c0..234cb71 100644 --- a/gcc/testsuite/gdc.test/runnable/template2.d +++ b/gcc/testsuite/gdc.test/runnable/template2.d @@ -1,5 +1,5 @@ // original post to the D newsgroup: -// http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D&artnum=10554&header +// https://www.digitalmars.com/d/archives/10510.html#N10554 // Test to manipulate 3D vectors, in D! // by Sean L Palmer (seanpalmer@directvinternet.com) // This code is released without any warranty. Use at your own risk. diff --git a/gcc/testsuite/gdc.test/runnable/template9.d b/gcc/testsuite/gdc.test/runnable/template9.d index 63620dd..cb3de5b 100644 --- a/gcc/testsuite/gdc.test/runnable/template9.d +++ b/gcc/testsuite/gdc.test/runnable/template9.d @@ -4706,7 +4706,7 @@ void test14735() { char[64] buf; - // Supported from 2.063: (http://dlang.org/changelog#implicitarraycast) + // Supported from 2.063: (https://dlang.org/changelog/2.063.html#implicitarraycast) assert(indexOf14735a(buf[0..32], '\0') == 2); assert(indexOf14735b(buf[0..32], '\0') == 2); diff --git a/gcc/testsuite/gdc.test/runnable/test12.d b/gcc/testsuite/gdc.test/runnable/test12.d index dac4ed6..01c7486 100644 --- a/gcc/testsuite/gdc.test/runnable/test12.d +++ b/gcc/testsuite/gdc.test/runnable/test12.d @@ -832,7 +832,7 @@ void test38() /**************************************/ -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/2409.html class C39 { diff --git a/gcc/testsuite/gdc.test/runnable/test15.d b/gcc/testsuite/gdc.test/runnable/test15.d index 222742c..70e3a82 100644 --- a/gcc/testsuite/gdc.test/runnable/test15.d +++ b/gcc/testsuite/gdc.test/runnable/test15.d @@ -515,7 +515,7 @@ void test30() /************************************/ -// http://www.digitalmars.com/d/archives/18204.html +// https://www.digitalmars.com/d/archives/18204.html // DMD0.050 also failed with alias. alias int recls_bool_t; diff --git a/gcc/testsuite/gdc.test/runnable/test20855.d b/gcc/testsuite/gdc.test/runnable/test20855.d index 7e43ec8..30152fe 100644 --- a/gcc/testsuite/gdc.test/runnable/test20855.d +++ b/gcc/testsuite/gdc.test/runnable/test20855.d @@ -1,3 +1,4 @@ +// PERMUTE_ARGS: -O // https://issues.dlang.org/show_bug.cgi?id=20855 string exp() diff --git a/gcc/testsuite/gdc.test/runnable/test22.d b/gcc/testsuite/gdc.test/runnable/test22.d index 1d806d6..38a9cc3 100644 --- a/gcc/testsuite/gdc.test/runnable/test22.d +++ b/gcc/testsuite/gdc.test/runnable/test22.d @@ -16,7 +16,7 @@ extern(C) /*************************************/ -// http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html +// https://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html // Only with -O real randx() diff --git a/gcc/testsuite/gdc.test/runnable/testarray.d b/gcc/testsuite/gdc.test/runnable/testarray.d index 4784f47..02bf771 100644 --- a/gcc/testsuite/gdc.test/runnable/testarray.d +++ b/gcc/testsuite/gdc.test/runnable/testarray.d @@ -3,7 +3,7 @@ import core.memory; -// see http://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info +// see https://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info // failure case for bug fixed by druntime rev 282 // how it works: diff --git a/gcc/testsuite/gdc.test/runnable/testcontracts.d b/gcc/testsuite/gdc.test/runnable/testcontracts.d index 7869691..ba0dc69 100644 --- a/gcc/testsuite/gdc.test/runnable/testcontracts.d +++ b/gcc/testsuite/gdc.test/runnable/testcontracts.d @@ -239,7 +239,7 @@ void test6() /*******************************************/ /+ -// http://d.puremagic.com/issues/show_bug.cgi?id=3722 +// https://issues.dlang.org/show_bug.cgi?id=3722 class Bug3722A { diff --git a/gcc/testsuite/gdc.test/runnable/testsafe.d b/gcc/testsuite/gdc.test/runnable/testsafe.d index 40496f5..11813a0 100644 --- a/gcc/testsuite/gdc.test/runnable/testsafe.d +++ b/gcc/testsuite/gdc.test/runnable/testsafe.d @@ -1,6 +1,6 @@ // PERMUTE_ARGS: -//http://d.puremagic.com/issues/show_bug.cgi?id=5415 +//https://issues.dlang.org/show_bug.cgi?id=5415 @safe void pointercast() @@ -31,7 +31,7 @@ void pointercast2() @safe void pointerarithmetic() -{//http://d.puremagic.com/issues/show_bug.cgi?id=4132 +{//https://issues.dlang.org/show_bug.cgi?id=4132 void* a; int b; @@ -273,7 +273,7 @@ void use__gshared() @safe void voidinitializers() -{//http://d.puremagic.com/issues/show_bug.cgi?id=4885 +{//https://issues.dlang.org/show_bug.cgi?id=4885 static assert(!__traits(compiles, () @safe { uint* ptr = void; } )); static assert( __traits(compiles, () @safe { uint i = void; } )); static assert( __traits(compiles, () @safe { uint[2] a = void; } )); @@ -290,14 +290,14 @@ void voidinitializers() @safe void pointerindex() -{//http://d.puremagic.com/issues/show_bug.cgi?id=9195 +{//https://issues.dlang.org/show_bug.cgi?id=9195 static assert(!__traits(compiles, () @safe { int* p; auto a = p[30]; })); static assert( __traits(compiles, () @safe{ int* p; auto a = p[0]; })); } @safe void basiccast() -{//http://d.puremagic.com/issues/show_bug.cgi?id=5088 +{//https://issues.dlang.org/show_bug.cgi?id=5088 auto a = cast(int)cast(const int)1; auto b = cast(real)cast(const int)1; auto c = cast(real)cast(const real)2.0; diff --git a/gcc/testsuite/gdc.test/runnable/traits_child.d b/gcc/testsuite/gdc.test/runnable/traits_child.d index 056b8f1..bea8511 100644 --- a/gcc/testsuite/gdc.test/runnable/traits_child.d +++ b/gcc/testsuite/gdc.test/runnable/traits_child.d @@ -64,7 +64,7 @@ alias cm = C.m; alias cmset = C.m.set; -// adapted from http://thecybershadow.net/d/dconf2017/#/21 +// adapted from https://thecybershadow.net/d/dconf2017/#/21 struct S { string a, b, c; } static string printField(alias field)() diff --git a/gcc/testsuite/gdc.test/runnable/xtest46.d b/gcc/testsuite/gdc.test/runnable/xtest46.d index 4fe6b00..a66e00f 100644 --- a/gcc/testsuite/gdc.test/runnable/xtest46.d +++ b/gcc/testsuite/gdc.test/runnable/xtest46.d @@ -5063,7 +5063,7 @@ class Bar6847 : Foo6847 } /***************************************************/ -// http://d.puremagic.com/issues/show_bug.cgi?id=6488 +// https://issues.dlang.org/show_bug.cgi?id=6488 struct TickDuration { @@ -6727,14 +6727,14 @@ void test9477() static bool isEq (T1, T2)(T1 s1, T2 s2) { return s1 == s2; } static bool isNeq(T1, T2)(T1 s1, T2 s2) { return s1 != s2; } - // Must be outside the loop due to http://d.puremagic.com/issues/show_bug.cgi?id=9748 + // Must be outside the loop due to https://issues.dlang.org/show_bug.cgi?id=9748 int order; - // Must be outside the loop due to http://d.puremagic.com/issues/show_bug.cgi?id=9756 + // Must be outside the loop due to https://issues.dlang.org/show_bug.cgi?id=9756 auto checkOrder(bool dyn, uint expected)() { assert(order==expected); order++; - // Use temporary ("v") to work around http://d.puremagic.com/issues/show_bug.cgi?id=9402 + // Use temporary ("v") to work around https://issues.dlang.org/show_bug.cgi?id=9402 auto v = cast(Select9477!(dyn, string, char[1]))"a"; return v; } @@ -6742,7 +6742,7 @@ void test9477() foreach (b1; Tuple9477!(false, true)) foreach (b2; Tuple9477!(false, true)) { - version (D_PIC) {} else version (D_PIE) {} else // Work around http://d.puremagic.com/issues/show_bug.cgi?id=9754 + version (D_PIC) {} else version (D_PIE) {} else // Work around https://issues.dlang.org/show_bug.cgi?id=9754 { assert( isEq (cast(Select9477!(b1, string, char[0]))"" , cast(Select9477!(b2, string, char[0]))"" )); assert(!isNeq(cast(Select9477!(b1, string, char[0]))"" , cast(Select9477!(b2, string, char[0]))"" )); -- cgit v1.1