mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
82e6a91 Resolve rvalue reference on template function arguments 3708457 Implement rvalue reference for struct literal & construction 530a59f Revert "struct literals are lvalues again" f199933 struct literals are lvalues again 5f181da better error message for Issue 7815 - Mixin template forward reference (?) regression e5452d5 fix Issue 7888 - derivedMembers forward reference error with nested imports b77ae4f merge with D1 5fed58d fix Issue 7886 - derivedMembers infinite recursion 0cf5ecd Merge pull request #872 from 9rnsr/fix7873 744f102 fix Issue 7695 - Regression(2.058): ICE(mtype.c) on associative array with keys of struct type with const members 80fc228 fix Issue 7873 - IFTI with inout does not properly match template parameter if called from inout function for pointers 4a5d365 fix CTFE bugs reported in beta df22942 add kind() d36a3b4 Merge pull request #871 from 9rnsr/fix7871 66d1302 fix Issue 7871 - RangeViolation with findSplitBefore 020ab91 fix Issue 7811 - "not a property" error instead of real error on UFCS array template property c349458 fix Issue 7862 - Accepts-invalid template forward reference bug related to derivedMembers 00d8ec8 fix Issue 7861 - Segfault during __error propagation with self-referencing module 4c9652d fix fwd ref bug 477c357 fix Issue 7859 - Crash on invalid alias template parameter type c35f67a fix Issue 7858 - __traits(getOverloads) returns incorrect symbol bc840e8 fix Issue 7815 - Mixin template forward reference (?) regression 18a1485 fix auto test break ceef368 fix Issue 7826 - [D2 Beta] Cannot use getHash in toHash without a warning d747fd6 fix Issue 7820 - regression(DMD 2.059head) Wrong error on forward reference to 'front' with -property switch 1094601 fix Issue 7823 - Can't use a struct initializer to initialize a nested enum used as a default function argument initializer git-subtree-dir: dmd2 git-subtree-split: 82e6a91f234843be7f660b242f8b8819c1eae20c
107 lines
2.8 KiB
C
107 lines
2.8 KiB
C
|
|
// Compiler implementation of the D programming language
|
|
// Copyright (c) 1999-2012 by Digital Mars
|
|
// All Rights Reserved
|
|
// written by Walter Bright
|
|
// http://www.digitalmars.com
|
|
// License for redistribution is by either the Artistic License
|
|
// in artistic.txt, or the GNU General Public License in gnu.txt.
|
|
// See the included readme.txt for details.
|
|
|
|
#ifndef DMD_DEBCOND_H
|
|
#define DMD_DEBCOND_H
|
|
|
|
struct Expression;
|
|
struct Identifier;
|
|
struct OutBuffer;
|
|
struct Module;
|
|
struct Scope;
|
|
struct ScopeDsymbol;
|
|
struct DebugCondition;
|
|
#include "lexer.h" // dmdhg
|
|
enum TOK;
|
|
struct HdrGenState;
|
|
|
|
int findCondition(Strings *ids, Identifier *ident);
|
|
|
|
struct Condition
|
|
{
|
|
Loc loc;
|
|
int inc; // 0: not computed yet
|
|
// 1: include
|
|
// 2: do not include
|
|
|
|
Condition(Loc loc);
|
|
|
|
virtual Condition *syntaxCopy() = 0;
|
|
virtual int include(Scope *sc, ScopeDsymbol *s) = 0;
|
|
virtual void toCBuffer(OutBuffer *buf, HdrGenState *hgs) = 0;
|
|
virtual DebugCondition *isDebugCondition() { return NULL; }
|
|
};
|
|
|
|
struct DVCondition : Condition
|
|
{
|
|
unsigned level;
|
|
Identifier *ident;
|
|
Module *mod;
|
|
|
|
DVCondition(Module *mod, unsigned level, Identifier *ident);
|
|
|
|
Condition *syntaxCopy();
|
|
};
|
|
|
|
struct DebugCondition : DVCondition
|
|
{
|
|
static void setGlobalLevel(unsigned level);
|
|
static void addGlobalIdent(const char *ident);
|
|
static void addPredefinedGlobalIdent(const char *ident);
|
|
|
|
DebugCondition(Module *mod, unsigned level, Identifier *ident);
|
|
|
|
int include(Scope *sc, ScopeDsymbol *s);
|
|
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
|
DebugCondition *isDebugCondition() { return this; }
|
|
};
|
|
|
|
struct VersionCondition : DVCondition
|
|
{
|
|
static void setGlobalLevel(unsigned level);
|
|
static void checkPredefined(Loc loc, const char *ident);
|
|
static void addGlobalIdent(const char *ident);
|
|
static void addPredefinedGlobalIdent(const char *ident);
|
|
|
|
VersionCondition(Module *mod, unsigned level, Identifier *ident);
|
|
|
|
int include(Scope *sc, ScopeDsymbol *s);
|
|
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
|
};
|
|
|
|
struct StaticIfCondition : Condition
|
|
{
|
|
Expression *exp;
|
|
int nest; // limit circular dependencies
|
|
|
|
StaticIfCondition(Loc loc, Expression *exp);
|
|
Condition *syntaxCopy();
|
|
int include(Scope *sc, ScopeDsymbol *s);
|
|
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
|
};
|
|
|
|
struct IftypeCondition : Condition
|
|
{
|
|
/* iftype (targ id tok tspec)
|
|
*/
|
|
Type *targ;
|
|
Identifier *id; // can be NULL
|
|
enum TOK tok; // ':' or '=='
|
|
Type *tspec; // can be NULL
|
|
|
|
IftypeCondition(Loc loc, Type *targ, Identifier *id, enum TOK tok, Type *tspec);
|
|
Condition *syntaxCopy();
|
|
int include(Scope *sc, ScopeDsymbol *s);
|
|
void toCBuffer(OutBuffer *buf, HdrGenState *hgs);
|
|
};
|
|
|
|
|
|
#endif
|