Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade frontend & libs to v2.091.0 #3333

Merged
merged 19 commits into from
Mar 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,13 @@ script:
- ctest -V -R "lit-tests"
# Run DMD testsuite
- |
# The -lowmem tests don't work with an ltsmaster host compiler
if [[ "$($DC --version | head -n 1)" == *0.17.* ]]; then
# The -lowmem tests don't work with an ltsmaster host compiler
rm tests/d2/dmd-testsuite/runnable/{testptrref,xtest46}_gc.d
rm tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d
# The @live tests neither (LDC segfaults)
rm tests/d2/dmd-testsuite/compilable/ob1.d
rm tests/d2/dmd-testsuite/fail_compilation/fob{1,2}.d
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
# dmd-testsuite-debug only to reduce time-outs
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ include(GetLinuxDistribution)
#

# Version information
set(LDC_VERSION "1.20.1") # May be overridden by git hash tag
set(LDC_VERSION "1.21.0") # May be overridden by git hash tag
set(DMDFE_MAJOR_VERSION 2)
set(DMDFE_MINOR_VERSION 0)
set(DMDFE_PATCH_VERSION 90)
set(DMDFE_FIX_LEVEL 1)
set(DMDFE_PATCH_VERSION 91)
set(DMDFE_FIX_LEVEL 0)

set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}${DMDFE_PATCH_VERSION})
if(DEFINED DMDFE_FIX_LEVEL)
Expand Down
5 changes: 2 additions & 3 deletions dmd/access.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/access.d, _access.d)
Expand Down Expand Up @@ -211,7 +211,6 @@ bool checkAccess(Loc loc, Scope* sc, Expression e, Declaration d)
* Check access to package/module `p` from scope `sc`.
*
* Params:
* loc = source location for issued error message
* sc = scope from which to access to a fully qualified package name
* p = the package/module to check access for
* Returns: true if the package is not accessible.
Expand All @@ -221,7 +220,7 @@ bool checkAccess(Loc loc, Scope* sc, Expression e, Declaration d)
* (see https://issues.dlang.org/show_bug.cgi?id=313).
*
*/
bool checkAccess(Loc loc, Scope* sc, Package p)
bool checkAccess(Scope* sc, Package p)
{
if (sc._module == p)
return false;
Expand Down
14 changes: 9 additions & 5 deletions dmd/aggregate.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/aggregate.d, _aggregate.d)
Expand Down Expand Up @@ -79,7 +79,6 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
VarDeclarations fields; // VarDeclaration fields
Sizeok sizeok = Sizeok.none; // set when structsize contains valid data
Dsymbol deferred; // any deferred semantic2() or semantic3() symbol
bool isdeprecated; // true if deprecated

/// specifies whether this is a D, C++, Objective-C or anonymous struct/class/interface
ClassKind classKind;
Expand All @@ -100,7 +99,6 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
FuncDeclarations invs; // Array of invariants
FuncDeclaration inv; // invariant
NewDeclaration aggNew; // allocator
DeleteDeclaration aggDelete; // deallocator

// CtorDeclaration or TemplateDeclaration
Dsymbol ctor;
Expand Down Expand Up @@ -133,7 +131,7 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
Scope* newScope(Scope* sc)
{
auto sc2 = sc.push(this);
sc2.stc &= STC.safeGroup;
sc2.stc &= STCFlowThruAggregate;
sc2.parent = this;
sc2.inunion = isUnionDeclaration();
sc2.protection = Prot(Prot.Kind.public_);
Expand Down Expand Up @@ -636,7 +634,13 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
// is aggregate deprecated?
override final bool isDeprecated() const
{
return isdeprecated;
return !!(this.storage_class & STC.deprecated_);
}

/// Flag this aggregate as deprecated
final void setDeprecated()
{
this.storage_class |= STC.deprecated_;
}

/****************************************
Expand Down
6 changes: 2 additions & 4 deletions dmd/aggregate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Compiler implementation of the D programming language
* Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright (C) 1999-2020 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.
Expand All @@ -22,7 +22,6 @@ class FuncDeclaration;
class CtorDeclaration;
class DtorDeclaration;
class NewDeclaration;
class DeleteDeclaration;
class InterfaceDeclaration;
class TypeInfoClassDeclaration;
class VarDeclaration;
Expand Down Expand Up @@ -83,7 +82,6 @@ class AggregateDeclaration : public ScopeDsymbol
VarDeclarations fields; // VarDeclaration fields
Sizeok sizeok; // set when structsize contains valid data
Dsymbol *deferred; // any deferred semantic2() or semantic3() symbol
bool isdeprecated; // true if deprecated

ClassKind::Type classKind; // specifies the linkage type

Expand All @@ -101,7 +99,6 @@ class AggregateDeclaration : public ScopeDsymbol
FuncDeclarations invs; // Array of invariants
FuncDeclaration *inv; // invariant
NewDeclaration *aggNew; // allocator
DeleteDeclaration *aggDelete; // deallocator

Dsymbol *ctor; // CtorDeclaration or TemplateDeclaration

Expand Down Expand Up @@ -130,6 +127,7 @@ class AggregateDeclaration : public ScopeDsymbol
bool fill(Loc loc, Expressions *elements, bool ctorinit);
Type *getType();
bool isDeprecated() const; // is aggregate deprecated?
void setDeprecated();
bool isNested() const;
bool isExport() const;
Dsymbol *searchCtor();
Expand Down
2 changes: 1 addition & 1 deletion dmd/aliasthis.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/aliasthis.d, _aliasthis.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/aliasthis.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Compiler implementation of the D programming language
* Copyright (C) 2009-2019 by The D Language Foundation, All Rights Reserved
* Copyright (C) 2009-2020 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.
Expand Down
2 changes: 1 addition & 1 deletion dmd/apply.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/apply.d, _apply.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/argtypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/argtypes.d, _argtypes.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/argtypes_sysv_x64.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2018 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved
* Authors: Martin Kinkelin
* 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/argtypes_sysv_x64.d, _argtypes_sysv_x64.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/arrayop.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/arrayop.d, _arrayop.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/arraytypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/arraytypes.d, _arraytypes.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/arraytypes.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Compiler implementation of the D programming language
* Copyright (C) 2006-2019 by The D Language Foundation, All Rights Reserved
* Copyright (C) 2006-2020 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.
Expand Down
2 changes: 1 addition & 1 deletion dmd/ast_node.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/ast_node.d, _ast_node.d)
Expand Down
2 changes: 1 addition & 1 deletion dmd/ast_node.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Compiler implementation of the D programming language
* Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright (C) 1999-2020 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.
Expand Down
7 changes: 6 additions & 1 deletion dmd/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/attrib.d, _attrib.d)
Expand Down Expand Up @@ -1225,6 +1225,11 @@ extern(C++) final class ForwardingAttribDeclaration: AttribDeclaration
{
return this;
}

override void accept(Visitor v)
{
v.visit(this);
}
}


Expand Down
8 changes: 5 additions & 3 deletions dmd/attrib.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* Compiler implementation of the D programming language
* Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright (C) 1999-2020 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.
Expand Down Expand Up @@ -188,11 +188,12 @@ class StaticIfDeclaration : public ConditionalDeclaration
void accept(Visitor *v) { v->visit(this); }
};

class StaticForeachDeclaration : public ConditionalDeclaration
class StaticForeachDeclaration : public AttribDeclaration
{
public:
StaticForeach *sfe;
ScopeDsymbol *scopesym;
bool onStack;
bool cached;
Dsymbols *cache;

Expand All @@ -207,14 +208,15 @@ class StaticForeachDeclaration : public ConditionalDeclaration
void accept(Visitor *v) { v->visit(this); }
};

class ForwardingAttribDeclaration : AttribDeclaration
class ForwardingAttribDeclaration : public AttribDeclaration
{
public:
ForwardingScopeDsymbol *sym;

Scope *newScope(Scope *sc);
void addMember(Scope *sc, ScopeDsymbol *sds);
ForwardingAttribDeclaration *isForwardingAttribDeclaration() { return this; }
void accept(Visitor *v) { v->visit(this); }
};

// Mixin declarations
Expand Down
2 changes: 1 addition & 1 deletion dmd/blockexit.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/blockexit.d, _blockexit.d)
Expand Down
9 changes: 6 additions & 3 deletions dmd/builtin.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/builtin.d, _builtin.d)
Expand Down Expand Up @@ -665,11 +665,11 @@ public extern (C++) void builtin_init()
{
version (IN_LLVM)
{
builtins._init(201);
builtins._init(204);
}
else
{
builtins._init(65);
builtins._init(113);
}
// @safe @nogc pure nothrow real function(real)
add_builtin("_D4core4math3sinFNaNbNiNfeZe", &eval_sin);
Expand Down Expand Up @@ -724,14 +724,17 @@ else
add_builtin("_D4core4math6rndtolFNaNbNiNfeZl", &eval_unimp);
// @safe @nogc pure nothrow real function(real)
add_builtin("_D3std4math3tanFNaNbNiNfeZe", &eval_tan);
add_builtin("_D3std4math4trig3tanFNaNbNiNfeZe", &eval_tan);
add_builtin("_D3std4math5expm1FNaNbNiNfeZe", &eval_unimp);
// @trusted @nogc pure nothrow real function(real)
add_builtin("_D3std4math3tanFNaNbNiNeeZe", &eval_tan);
add_builtin("_D3std4math4trig3tanFNaNbNiNeeZe", &eval_tan);
add_builtin("_D3std4math3expFNaNbNiNeeZe", &eval_exp);
add_builtin("_D3std4math5expm1FNaNbNiNeeZe", &eval_expm1);
add_builtin("_D3std4math4exp2FNaNbNiNeeZe", &eval_exp2);
// @safe @nogc pure nothrow real function(real, real)
add_builtin("_D3std4math5atan2FNaNbNiNfeeZe", &eval_unimp);
add_builtin("_D3std4math4trig5atan2FNaNbNiNfeeZe", &eval_unimp);
version (IN_LLVM)
{
// LDC's core.math.ldexp is defined as alias to core.stdc.math.ldexpl
Expand Down
5 changes: 1 addition & 4 deletions dmd/canthrow.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Compiler implementation of the
* $(LINK2 http://www.dlang.org, D programming language).
*
* Copyright: Copyright (C) 1999-2019 by The D Language Foundation, All Rights Reserved
* Copyright: Copyright (C) 1999-2020 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/canthrow.d, _canthrow.d)
Expand Down Expand Up @@ -144,9 +144,6 @@ extern (C++) bool canThrow(Expression e, FuncDeclaration func, bool mustNotThrow

if (ad.dtor)
checkFuncThrows(de, ad.dtor);

if (ad.aggDelete && tb.ty != Tarray)
checkFuncThrows(de, ad.aggDelete);
}

override void visit(AssignExp ae)
Expand Down
Loading