diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2024-01-18 02:39:20 +0100 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2024-02-03 00:49:46 +0100 |
commit | f204359931866b917856fc959c70dbf55f28c14d (patch) | |
tree | ba1c671045e384fa49a6381f79abf7c1b84a55ea /gcc/d/dmd/mtype.h | |
parent | 5470a9b176c2b3030ff3891c7e9403db2b0685b8 (diff) | |
download | gcc-f204359931866b917856fc959c70dbf55f28c14d.zip gcc-f204359931866b917856fc959c70dbf55f28c14d.tar.gz gcc-f204359931866b917856fc959c70dbf55f28c14d.tar.bz2 |
d: Merge dmd, druntime bce5c1f7b5, phobos e4d0dd513.
D front-end changes:
- Import latest changes from dmd v2.107.0-beta.1.
- Keywords like `__FILE__' are now always evaluated at the
callsite.
D runtime changes:
- Import latest changes from druntime v2.107.0-beta.1.
- Added `nameSig' field to TypeInfo_Class in object.d.
Phobos changes:
- Import latest changes from phobos v2.107.0-beta.1.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd bce5c1f7b5.
* d-attribs.cc (build_attributes): Update for new front-end interface.
* d-lang.cc (d_parse_file): Likewise.
* decl.cc (DeclVisitor::visit (VarDeclaration *)): Likewise.
* expr.cc (build_lambda_tree): New function.
(ExprVisitor::visit (FuncExp *)): Use build_lambda_tree.
(ExprVisitor::visit (SymOffExp *)): Likewise.
(ExprVisitor::visit (VarExp *)): Likewise.
* typeinfo.cc (create_tinfo_types): Add two ulong fields to internal
TypeInfo representation.
(TypeInfoVisitor::visit (TypeInfoClassDeclaration *)): Emit stub data
for TypeInfo_Class.nameSig.
(TypeInfoVisitor::visit (TypeInfoStructDeclaration *)): Update for new
front-end interface.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime bce5c1f7b5.
* src/MERGE: Merge upstream phobos e4d0dd513.
Diffstat (limited to 'gcc/d/dmd/mtype.h')
-rw-r--r-- | gcc/d/dmd/mtype.h | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/gcc/d/dmd/mtype.h b/gcc/d/dmd/mtype.h index 97a7ae3..c777f35 100644 --- a/gcc/d/dmd/mtype.h +++ b/gcc/d/dmd/mtype.h @@ -233,7 +233,6 @@ public: uinteger_t size(); virtual uinteger_t size(const Loc &loc); virtual unsigned alignsize(); - Type *trySemantic(const Loc &loc, Scope *sc); Type *merge2(); void modToBuffer(OutBuffer& buf) const; char *modToChars() const; @@ -287,9 +286,7 @@ public: virtual Type *makeSharedWild(); virtual Type *makeSharedWildConst(); virtual Type *makeMutable(); - virtual Dsymbol *toDsymbol(Scope *sc); Type *toBasetype(); - virtual bool isBaseOf(Type *t, int *poffset); virtual MATCH implicitConvTo(Type *to); virtual MATCH constConv(Type *to); virtual unsigned char deduceWild(Type *t, bool isRef); @@ -302,9 +299,7 @@ public: virtual structalign_t alignment(); virtual Expression *defaultInitLiteral(const Loc &loc); virtual bool isZeroInit(const Loc &loc = Loc()); // if initializer is 0 - Identifier *getTypeInfoIdent(); virtual int hasWild() const; - virtual bool hasPointers(); virtual bool hasVoidInitPointers(); virtual bool hasSystemFields(); virtual bool hasInvariant(); @@ -451,7 +446,6 @@ public: MATCH constConv(Type *to) override; MATCH implicitConvTo(Type *to) override; Expression *defaultInitLiteral(const Loc &loc) override; - bool hasPointers() override; bool hasSystemFields() override; bool hasVoidInitPointers() override; bool hasInvariant() override; @@ -474,7 +468,6 @@ public: bool isZeroInit(const Loc &loc) override; bool isBoolean() override; MATCH implicitConvTo(Type *to) override; - bool hasPointers() override; void accept(Visitor *v) override { v->visit(this); } }; @@ -491,7 +484,6 @@ public: uinteger_t size(const Loc &loc) override; bool isZeroInit(const Loc &loc) override; bool isBoolean() override; - bool hasPointers() override; MATCH implicitConvTo(Type *to) override; MATCH constConv(Type *to) override; @@ -509,7 +501,6 @@ public: MATCH constConv(Type *to) override; bool isscalar() override; bool isZeroInit(const Loc &loc) override; - bool hasPointers() override; void accept(Visitor *v) override { v->visit(this); } }; @@ -605,10 +596,8 @@ public: static TypeFunction *create(Parameters *parameters, Type *treturn, VarArg varargs, LINK linkage, StorageClass stc = 0); const char *kind() override; TypeFunction *syntaxCopy() override; - void purityLevel(); bool hasLazyParameters(); bool isDstyleVariadic() const; - StorageClass parameterStorageClass(Type* tthis, Parameter *p, VarDeclarations* outerVars = nullptr, bool indirect = false); Type *addStorageClass(StorageClass stc) override; Type *substWildTo(unsigned mod) override; @@ -659,7 +648,6 @@ public: MATCH implicitConvTo(Type *to) override; bool isZeroInit(const Loc &loc) override; bool isBoolean() override; - bool hasPointers() override; void accept(Visitor *v) override { v->visit(this); } }; @@ -675,7 +663,6 @@ class TypeTraits final : public Type const char *kind() override; TypeTraits *syntaxCopy() override; uinteger_t size(const Loc &loc) override; - Dsymbol *toDsymbol(Scope *sc) override; void accept(Visitor *v) override { v->visit(this); } }; @@ -687,7 +674,6 @@ class TypeMixin final : public Type const char *kind() override; TypeMixin *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; void accept(Visitor *v) override { v->visit(this); } }; @@ -713,7 +699,6 @@ public: static TypeIdentifier *create(const Loc &loc, Identifier *ident); const char *kind() override; TypeIdentifier *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; void accept(Visitor *v) override { v->visit(this); } }; @@ -726,7 +711,6 @@ public: const char *kind() override; TypeInstance *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; void accept(Visitor *v) override { v->visit(this); } }; @@ -738,7 +722,6 @@ public: const char *kind() override; TypeTypeof *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; uinteger_t size(const Loc &loc) override; void accept(Visitor *v) override { v->visit(this); } }; @@ -748,7 +731,6 @@ class TypeReturn final : public TypeQualified public: const char *kind() override; TypeReturn *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; void accept(Visitor *v) override { v->visit(this); } }; @@ -776,7 +758,6 @@ public: uinteger_t size(const Loc &loc) override; unsigned alignsize() override; TypeStruct *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; structalign_t alignment() override; Expression *defaultInitLiteral(const Loc &loc) override; bool isZeroInit(const Loc &loc) override; @@ -785,7 +766,6 @@ public: bool needsDestruction() override; bool needsCopyOrPostblit() override; bool needsNested() override; - bool hasPointers() override; bool hasVoidInitPointers() override; bool hasSystemFields() override; bool hasInvariant() override; @@ -806,8 +786,7 @@ public: TypeEnum *syntaxCopy() override; uinteger_t size(const Loc &loc) override; unsigned alignsize() override; - Type *memType(const Loc &loc = Loc()); - Dsymbol *toDsymbol(Scope *sc) override; + Type *memType(const Loc &loc); bool isintegral() override; bool isfloating() override; bool isreal() override; @@ -824,7 +803,6 @@ public: MATCH implicitConvTo(Type *to) override; MATCH constConv(Type *to) override; bool isZeroInit(const Loc &loc) override; - bool hasPointers() override; bool hasVoidInitPointers() override; bool hasSystemFields() override; bool hasInvariant() override; @@ -843,9 +821,7 @@ public: const char *kind() override; uinteger_t size(const Loc &loc) override; TypeClass *syntaxCopy() override; - Dsymbol *toDsymbol(Scope *sc) override; ClassDeclaration *isClassHandle() override; - bool isBaseOf(Type *t, int *poffset) override; MATCH implicitConvTo(Type *to) override; MATCH constConv(Type *to) override; unsigned char deduceWild(Type *t, bool isRef) override; @@ -853,7 +829,6 @@ public: bool isZeroInit(const Loc &loc) override; bool isscope() override; bool isBoolean() override; - bool hasPointers() override; void accept(Visitor *v) override { v->visit(this); } }; @@ -894,7 +869,6 @@ public: TypeNull *syntaxCopy() override; MATCH implicitConvTo(Type *to) override; - bool hasPointers() override; bool isBoolean() override; uinteger_t size(const Loc &loc) override; @@ -925,6 +899,13 @@ public: /**************************************************************/ + // If the type is a class or struct, returns the symbol for it, else null. AggregateDeclaration *isAggregate(Type *t); +bool hasPointers(Type *t); +// return the symbol to which type t resolves +Dsymbol *toDsymbol(Type *t, Scope *sc); Covariant covariant(Type *, Type *, StorageClass * = NULL, bool = false); +bool isBaseOf(Type *tthis, Type *t, int *poffset); +Type *trySemantic(Type *type, const Loc &loc, Scope *sc); +void purityLevel(TypeFunction *type); |