aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/dsymbol.h
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2024-02-17 21:03:38 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2024-02-17 21:28:58 +0100
commit5aff58e5ed8f634e0b20892452bde484db93039b (patch)
tree64900b511f0dbee5f61fb9e3e19c1ee8274f166a /gcc/d/dmd/dsymbol.h
parenta71d87431d0c4e04a402ef6566be090c470b2b53 (diff)
downloadgcc-5aff58e5ed8f634e0b20892452bde484db93039b.zip
gcc-5aff58e5ed8f634e0b20892452bde484db93039b.tar.gz
gcc-5aff58e5ed8f634e0b20892452bde484db93039b.tar.bz2
d: Merge dmd, druntime 9471b25db9, phobos 547886846.
D front-end changes: - Import dmd v2.107.1-rc.1. D runtime changes: - Import druntime v2.107.1-rc.1. Phobos changes: - Import phobos v2.107.1-rc.1. gcc/d/ChangeLog: * dmd/MERGE: Merge upstream dmd 9471b25db9. * dmd/VERSION: Bump version to v2.107.1-rc.1. * Make-lang.in (D_FRONTEND_OBJS): Add d/cxxfrontend.o. * d-attribs.cc (build_attributes): Update for new front-end interface. * d-builtins.cc (build_frontend_type): Likewise. (strip_type_modifiers): Likewise. (covariant_with_builtin_type_p): Likewise. * d-codegen.cc (declaration_type): Likewise. (parameter_type): Likewise. (build_array_struct_comparison): Likewise. (void_okay_p): Likewise. * d-convert.cc (convert_expr): Likewise. (check_valist_conversion): Likewise. * d-lang.cc (d_generate_ddoc_file): Likewise. (d_parse_file): Likewise. * d-target.cc (TargetCPP::toMangle): Likewise. (TargetCPP::typeInfoMangle): Likewise. (TargetCPP::thunkMangle): Likewise. (TargetCPP::parameterType): Likewise. * decl.cc (d_mangle_decl): Likewise. (DeclVisitor::visit): Likewise. (DeclVisitor::visit (CAsmDeclaration *)): New method. (get_symbol_decl): Update for new front-end interface. (layout_class_initializer): Likewise. * expr.cc (ExprVisitor::visit): Likewise. * intrinsics.cc (maybe_set_intrinsic): Likewise. (expand_intrinsic_rotate): Likewise. * modules.cc (layout_moduleinfo_fields): Likewise. (layout_moduleinfo): Likewise. * runtime.cc (get_libcall_type): Likewise. * typeinfo.cc (make_frontend_typeinfo): Likewise. (TypeInfoVisitor::visit): Likewise. (create_typeinfo): Likewise. * types.cc (same_type_p): Likewise. (build_ctype): Likewise. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 9471b25db9. * src/MERGE: Merge upstream phobos 547886846.
Diffstat (limited to 'gcc/d/dmd/dsymbol.h')
-rw-r--r--gcc/d/dmd/dsymbol.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/gcc/d/dmd/dsymbol.h b/gcc/d/dmd/dsymbol.h
index db23627..f845435 100644
--- a/gcc/d/dmd/dsymbol.h
+++ b/gcc/d/dmd/dsymbol.h
@@ -73,6 +73,7 @@ class AliasAssign;
class OverloadSet;
class StaticAssert;
class StaticIfDeclaration;
+class CAsmDeclaration;
struct AA;
#ifdef IN_GCC
typedef union tree_node Symbol;
@@ -95,9 +96,16 @@ enum class ThreeState : uint8_t
yes, // value is true
};
-void dsymbolSemantic(Dsymbol *dsym, Scope *sc);
-void semantic2(Dsymbol *dsym, Scope *sc);
-void semantic3(Dsymbol *dsym, Scope* sc);
+namespace dmd
+{
+ void dsymbolSemantic(Dsymbol *dsym, Scope *sc);
+ void semantic2(Dsymbol *dsym, Scope *sc);
+ void semantic3(Dsymbol *dsym, Scope* sc);
+ // in iasm.d
+ void asmSemantic(CAsmDeclaration *ad, Scope *sc);
+ // in iasmgcc.d
+ void gccAsmSemantic(CAsmDeclaration *ad, Scope *sc);
+}
struct Visibility
{
@@ -315,6 +323,7 @@ public:
virtual MixinDeclaration *isMixinDeclaration() { return NULL; }
virtual StaticAssert *isStaticAssert() { return NULL; }
virtual StaticIfDeclaration *isStaticIfDeclaration() { return NULL; }
+ virtual CAsmDeclaration *isCAsmDeclaration() { return NULL; }
void accept(Visitor *v) override { v->visit(this); }
};
@@ -404,6 +413,15 @@ public:
ExpressionDsymbol *isExpressionDsymbol() override { return this; }
};
+class CAsmDeclaration final : public Dsymbol
+{
+public:
+ Expression *code; // string expression
+
+ CAsmDeclaration *isCAsmDeclaration() override { return this; }
+ void accept(Visitor *v) override { v->visit(this); }
+};
+
// Table of Dsymbol's
class DsymbolTable final : public RootObject
@@ -425,7 +443,10 @@ public:
size_t length() const;
};
-void addMember(Dsymbol *dsym, Scope *sc, ScopeDsymbol *sds);
-Dsymbol *search(Dsymbol *d, const Loc &loc, Identifier *ident, SearchOptFlags flags = (SearchOptFlags)SearchOpt::localsOnly);
-void setScope(Dsymbol *d, Scope *sc);
-void importAll(Dsymbol *d, Scope *sc);
+namespace dmd
+{
+ void addMember(Dsymbol *dsym, Scope *sc, ScopeDsymbol *sds);
+ Dsymbol *search(Dsymbol *d, const Loc &loc, Identifier *ident, SearchOptFlags flags = (SearchOptFlags)SearchOpt::localsOnly);
+ void setScope(Dsymbol *d, Scope *sc);
+ void importAll(Dsymbol *d, Scope *sc);
+}