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 to D v2.081.0 #2752

Merged
merged 38 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
97a470b
Upgrade to D v2.081.0-beta.1
kinke Jun 18, 2018
90a1c6b
druntime: Fix rt.backtrace merge regressions
kinke Jun 18, 2018
acf7de3
Initialize new Target::twoDtorInVtable appropriately
kinke Jun 18, 2018
a2badc2
Fix trivial test regressions (catch statements without type etc.)
kinke Jun 19, 2018
2b76e23
tests/codegen/inlining_stdlib.d: Find another Phobos function to be i…
kinke Jun 19, 2018
6dfaebb
Adapt to new special-ref result variables in out contracts
kinke Jun 20, 2018
34c6ae5
Fixup dmd/root/longdouble.d for LDC
kinke Jun 21, 2018
306bdb7
Allow all linkages for implicit ABI returns of naked functions
kinke Jun 21, 2018
218fe52
Phobos: Fix std.math.logb() for MSVC
kinke Jun 21, 2018
3aedadc
druntime: Cherry-pick upstream typo fix
kinke Jun 21, 2018
6f7e0d4
dmd-testsuite: Disable runnable/minimal2.d for now
kinke Jun 21, 2018
37e0fbc
dmd/root/longdouble.d: Fix unittest compile errors
kinke Jun 21, 2018
75fda89
dmd-testsuite: Also disable _compilable_/minimal2.d
kinke Jun 21, 2018
7548b2b
Merge upstream stable (663625bce0)
kinke Jun 22, 2018
ef1e655
Handle new special vtbl symbol
kinke Jun 23, 2018
14c74ef
Support new explicitly direct calls of struct methods
kinke Jun 23, 2018
9aae50e
dmd.dsymbol: Make sure LDC-specific Dsymbol dtor is not virtual
kinke Jun 23, 2018
7dbd07d
Use new extern(D) dtor shims for struct/class TypeInfos
kinke Jun 23, 2018
77e4b38
dmd-testsuite: Fix runnable/paranoia.sh for LDC and Win32
kinke Jun 23, 2018
64f4ee9
Emit debuginfo for NRVO/result variables
kinke Jun 23, 2018
6c7cf88
Clean up dmd/root/longdouble.{d,h}
kinke Jun 24, 2018
3da5a12
Use 80-bit compile-time reals on Windows/MSVC hosts
kinke Jun 24, 2018
e8985ae
MSVC: Fix dmd.constfold compile errors with older D host compilers
kinke Jun 24, 2018
35cb2c4
MSVC: Fix dmd.root.longdouble for DMD host compiler
kinke Jun 24, 2018
2e19f53
dmd-testsuite: Fix buffer overflow in runnable/cppa.d
kinke Jun 25, 2018
abcd7ee
Upgrade to D v2.081.0-beta.2
kinke Jun 25, 2018
6490630
[MSVC] dmd-testsuite: Disable NRVO variable debuginfo test for now
kinke Jun 26, 2018
cf96500
Circle & AppVeyor: Upgrade dub to v1.9 and host LDC to v1.10
kinke Jun 26, 2018
65d14e0
dmd-testsuite: Disable OSX-specific runnable/debug_info.d
kinke Jun 26, 2018
3083785
Merge branch 'master' into merge-2.081
kinke Jun 27, 2018
3c86332
Slightly revise stripped-down llvm-ar code in driver/archiver.cpp
kinke Jun 27, 2018
9bcd7ca
[macOS] CMake: Work around ranlib potentially corrupting libldc-jit-rt.a
kinke Jun 27, 2018
36ce2ec
[macOS] CMake: Avoid ranlib for all installed static libraries
kinke Jun 28, 2018
08d758d
Merge v2.081.0-rc.1
kinke Jun 28, 2018
5bb8ec8
Merge pull request #2757 from kinke/osx_archiver
kinke Jun 29, 2018
2642b3a
dmd-testsuite: Fix runnable/testprofile.d for non-x86 targets
kinke Jul 2, 2018
f0d66eb
dmd.semantic3: Disable DMD backend hack for Win32 and synchronized me…
kinke Jul 2, 2018
92842c7
Merge upstream stable
kinke Jul 3, 2018
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
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ jobs:
environment:
- CI_OS: linux
- LLVM_VERSION: 6.0.0
- HOST_LDC_VERSION: 1.8.0
- HOST_LDC_VERSION: 1.10.0
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DD_FLAGS='-w;-flto=thin' -DCMAKE_EXE_LINKER_FLAGS=-static-libstdc++ -DLDC_INSTALL_LTOPLUGIN=ON -DLDC_INSTALL_LLVM_RUNTIME_LIBS=ON"
- DUB_VERSION: v1.8.1
- DUB_VERSION: v1.9.0
build-osx:
<<: *commonSteps
macos:
Expand All @@ -276,10 +276,10 @@ jobs:
- MACOSX_DEPLOYMENT_TARGET: 10.8
- USE_LIBCPP: true
- LLVM_VERSION: 6.0.0
- HOST_LDC_VERSION: 1.8.0
- HOST_LDC_VERSION: 1.10.0
- BOOTSTRAP_CMAKE_FLAGS: "-DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
- EXTRA_CMAKE_FLAGS: "-DMULTILIB=ON -DBUILD_LTO_LIBS=ON -DD_FLAGS='-w;-flto=thin' -DCMAKE_CXX_FLAGS='-stdlib=libc++' -DCMAKE_EXE_LINKER_FLAGS=-lc++"
- DUB_VERSION: v1.8.1
- DUB_VERSION: v1.9.0

workflows:
version: 2
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ endfunction()
#

# Version information
set(LDC_VERSION "1.10.0") # May be overridden by git hash tag
set(LDC_VERSION "1.11.0") # May be overridden by git hash tag
set(DMDFE_MAJOR_VERSION 2)
set(DMDFE_MINOR_VERSION 0)
set(DMDFE_PATCH_VERSION 80)
set(DMDFE_FIX_LEVEL 1) # Comment out if not used
set(DMDFE_PATCH_VERSION 81)
set(DMDFE_FIX_LEVEL 0) # Comment out if not used

set(DMD_VERSION ${DMDFE_MAJOR_VERSION}.${DMDFE_MINOR_VERSION}${DMDFE_PATCH_VERSION})
if(DEFINED DMDFE_FIX_LEVEL)
Expand Down
8 changes: 4 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ environment:
- APPVEYOR_JOB_ARCH: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
LLVM_VERSION: 6.0.0
HOST_LDC_VERSION: 1.8.0
DUB_VERSION: v1.8.1
HOST_LDC_VERSION: 1.10.0
DUB_VERSION: v1.9.0
- APPVEYOR_JOB_ARCH: x86
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
LLVM_VERSION: 5.0.1
HOST_LDC_VERSION: 1.8.0
DUB_VERSION: v1.8.1
HOST_LDC_VERSION: 1.10.0
DUB_VERSION: v1.9.0

# scripts that are called at very beginning, before repo cloning
init:
Expand Down
21 changes: 19 additions & 2 deletions dmd/access.d
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ extern (C++) bool checkSymbolAccess(Scope *sc, Dsymbol s)
* but doesn't recurse nor resolve aliases because protection/visibility is an
* attribute of the alias not the aliasee.
*/
public Dsymbol mostVisibleOverload(Dsymbol s)
public Dsymbol mostVisibleOverload(Dsymbol s, Module mod = null)
{
if (!s.isOverloadable())
return s;
Expand Down Expand Up @@ -612,7 +612,24 @@ public Dsymbol mostVisibleOverload(Dsymbol s)
else
break;

if (next && mostVisible.prot().isMoreRestrictiveThan(next.prot()))
/**
* Return the "effective" protection attribute of a symbol when accessed in a module.
* The effective protection attribute is the same as the regular protection attribute,
* except package() is "private" if the module is outside the package;
* otherwise, "public".
*/
static Prot protectionSeenFromModule(Dsymbol d, Module mod = null)
{
Prot prot = d.prot();
if (mod && prot.kind == Prot.Kind.package_)
{
return hasPackageAccess(mod, d) ? Prot(Prot.Kind.public_) : Prot(Prot.Kind.private_);
}
return prot;
}

if (next &&
protectionSeenFromModule(mostVisible, mod).isMoreRestrictiveThan(protectionSeenFromModule(next, mod)))
mostVisible = next;
}
return mostVisible;
Expand Down
25 changes: 23 additions & 2 deletions dmd/aggregate.d
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,22 @@ enum Baseok : int
semanticdone, // all base classes semantic done
}

/**
* The ClassKind enum is used in AggregateDeclaration AST nodes to
* specify the linkage type of the struct/class/interface or if it
* is an anonymous class. If the class is anonymous it is also
* considered to be a D class.
*/
enum ClassKind : int
{
/// the aggregate is a d(efault) class
d,
/// the aggregate is a C++ struct/class/interface
cpp,
/// the aggregate is an Objective-C class/interface
objc,
}

/***********************************************************
*/
extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
Expand All @@ -64,6 +80,9 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
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;

/* !=null if is nested
* pointing to the dsymbol that directly enclosing it.
* 1. The function that enclosing it (nested struct and class)
Expand Down Expand Up @@ -91,8 +110,10 @@ extern (C++) abstract class AggregateDeclaration : ScopeDsymbol
Dsymbol aliasthis; // forward unresolved lookups to aliasthis
bool noDefaultCtor; // no default construction

FuncDeclarations dtors; // Array of destructors
FuncDeclaration dtor; // aggregate destructor
DtorDeclarations dtors; // Array of destructors
DtorDeclaration dtor; // aggregate destructor
DtorDeclaration primaryDtor; // non-deleting C++ destructor, same as dtor for D
DtorDeclaration tidtor; // aggregate destructor used in TypeInfo (must have extern(D) ABI)

Expression getRTInfo; // pointer to GC info generated by object.RTInfo(this)

Expand Down
35 changes: 20 additions & 15 deletions dmd/aggregate.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,19 @@ FuncDeclaration *buildXopEquals(StructDeclaration *sd, Scope *sc);
FuncDeclaration *buildXopCmp(StructDeclaration *sd, Scope *sc);
FuncDeclaration *buildXtoHash(StructDeclaration *ad, Scope *sc);
FuncDeclaration *buildPostBlit(StructDeclaration *sd, Scope *sc);
FuncDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc);
DtorDeclaration *buildDtor(AggregateDeclaration *ad, Scope *sc);
FuncDeclaration *buildInv(AggregateDeclaration *ad, Scope *sc);

enum ClassKind
{
/// the aggregate is a d(efault) struct/class/interface
d,
/// the aggregate is a C++ struct/class/interface
cpp,
/// the aggregate is an Objective-C class/interface
objc
};

class AggregateDeclaration : public ScopeDsymbol
{
public:
Expand All @@ -88,6 +98,8 @@ class AggregateDeclaration : public ScopeDsymbol
Dsymbol *deferred; // any deferred semantic2() or semantic3() symbol
bool isdeprecated; // true if deprecated

ClassKind classKind; // specifies the linkage type

/* !=NULL if is nested
* pointing to the dsymbol that directly enclosing it.
* 1. The function that enclosing it (nested struct and class)
Expand All @@ -112,8 +124,10 @@ class AggregateDeclaration : public ScopeDsymbol
Dsymbol *aliasthis; // forward unresolved lookups to aliasthis
bool noDefaultCtor; // no default construction

FuncDeclarations dtors; // Array of destructors
FuncDeclaration *dtor; // aggregate destructor
DtorDeclarations dtors; // Array of destructors
DtorDeclaration *dtor; // aggregate destructor
DtorDeclaration *primaryDtor; // non-deleting C++ destructor, same as dtor for D
DtorDeclaration *tidtor; // aggregate destructor used in TypeInfo (must have extern(D) ABI)

Expression *getRTInfo; // pointer to GC info generated by object.RTInfo(this)

Expand Down Expand Up @@ -246,16 +260,6 @@ struct ClassFlags
};
};

enum ClassKind
{
/// the class is a d(efault) class
d,
/// the class is a C++ interface
cpp,
/// the class is an Objective-C class/interface
objc
};

class ClassDeclaration : public AggregateDeclaration
{
public:
Expand Down Expand Up @@ -283,7 +287,7 @@ class ClassDeclaration : public AggregateDeclaration
TypeInfoClassDeclaration *vclassinfo; // the ClassInfo object for this ClassDeclaration
bool com; // true if this is a COM class (meaning it derives from IUnknown)
bool stack; // true if this is a scope class
ClassKind classKind; // specifies the linkage type
int cppDtorVtblIndex; // slot reserved for the virtual destructor [extern(C++)]
bool inuse; // to prevent recursive attempts
bool isActuallyAnonymous; // true if this class has an identifier, but was originally declared anonymous
// used in support of https://issues.dlang.org/show_bug.cgi?id=17371
Expand Down Expand Up @@ -320,7 +324,8 @@ class ClassDeclaration : public AggregateDeclaration
void addLocalClass(ClassDeclarations *);

// Back end
Symbol *vtblsym;
Dsymbol *vtblsym;
Dsymbol *vtblSymbol();

ClassDeclaration *isClassDeclaration() { return (ClassDeclaration *)this; }
void accept(Visitor *v) { v->visit(this); }
Expand Down
2 changes: 1 addition & 1 deletion dmd/apply.d
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import dmd.visitor;
*/
private extern (C++) final class PostorderExpressionVisitor : StoppableVisitor
{
alias visit = super.visit;
alias visit = typeof(super).visit;
public:
StoppableVisitor v;

Expand Down
2 changes: 2 additions & 0 deletions dmd/arraytypes.d
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ alias BaseClasses = Array!(BaseClass*);
alias ClassDeclarations = Array!(ClassDeclaration);
alias Dsymbols = Array!(Dsymbol);
alias Objects = Array!(RootObject);
alias DtorDeclarations = Array!(DtorDeclaration);
alias FuncDeclarations = Array!(FuncDeclaration);
alias Parameters = Array!(Parameter);
alias Initializers = Array!(Initializer);
Expand All @@ -51,3 +52,4 @@ alias GotoCaseStatements = Array!(GotoCaseStatement);
alias ReturnStatements = Array!(ReturnStatement);
alias GotoStatements = Array!(GotoStatement);
alias TemplateInstances = Array!(TemplateInstance);
alias Ensures = Array!(Ensure);
4 changes: 4 additions & 0 deletions dmd/arraytypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ typedef Array<class Dsymbol *> Dsymbols;

typedef Array<class RootObject *> Objects;

typedef Array<class DtorDeclaration *> DtorDeclarations;

typedef Array<class FuncDeclaration *> FuncDeclarations;

typedef Array<class Parameter *> Parameters;
Expand Down Expand Up @@ -67,4 +69,6 @@ typedef Array<class GotoStatement *> GotoStatements;

typedef Array<class TemplateInstance *> TemplateInstances;

typedef Array<struct Ensure> Ensures;

#endif
1 change: 1 addition & 0 deletions dmd/astcodegen.d
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct ASTCodegen
alias initializerToExpression = dmd.initsem.initializerToExpression;
alias typeToExpression = dmd.typesem.typeToExpression;
alias UserAttributeDeclaration = dmd.attrib.UserAttributeDeclaration;
alias Ensure = dmd.func.Ensure; // workaround for bug in older DMD frontends

alias MODFlags = dmd.mtype.MODFlags;
alias Type = dmd.mtype.Type;
Expand Down
2 changes: 1 addition & 1 deletion dmd/canthrow.d
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extern (C++) bool canThrow(Expression e, FuncDeclaration func, bool mustNotThrow
// stop walking if we determine this expression can throw
extern (C++) final class CanThrow : StoppableVisitor
{
alias visit = super.visit;
alias visit = typeof(super).visit;
FuncDeclaration func;
bool mustNotThrow;

Expand Down
Loading