mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
dmd: Remove all public C++ functions (#21149)
These are all exposed under a dmd namespace (#16155)
This commit is contained in:
parent
d48bdb8f78
commit
8bce4f5a1a
6 changed files with 13 additions and 27 deletions
|
@ -428,7 +428,4 @@ namespace dmd
|
|||
Dsymbols *include(Dsymbol *d, Scope *sc);
|
||||
void setScope(Dsymbol *d, Scope *sc);
|
||||
void importAll(Dsymbol *d, Scope *sc);
|
||||
void addComment(Dsymbol *d, const char *comment);
|
||||
bool oneMember(Dsymbol *d, Dsymbol *&ps, Identifier *ident);
|
||||
bool hasStaticCtorOrDtor(Dsymbol *d);
|
||||
}
|
||||
|
|
|
@ -7531,7 +7531,7 @@ private extern(C++) class NewScopeVisitor : Visitor
|
|||
}
|
||||
|
||||
|
||||
extern(C++) Dsymbols* include(Dsymbol d, Scope* sc)
|
||||
Dsymbols* include(Dsymbol d, Scope* sc)
|
||||
{
|
||||
scope icv = new ConditionIncludeVisitor(sc);
|
||||
d.accept(icv);
|
||||
|
@ -7891,7 +7891,7 @@ Lfail:
|
|||
return false;
|
||||
}
|
||||
|
||||
extern (C++) void addComment(Dsymbol d, const(char)* comment)
|
||||
void addComment(Dsymbol d, const(char)* comment)
|
||||
{
|
||||
scope v = new AddCommentVisitor(comment);
|
||||
d.accept(v);
|
||||
|
@ -8108,7 +8108,7 @@ private extern(C++) class OneMemberVisitor : Visitor
|
|||
* Return true if any of the members are static ctors or static dtors, or if
|
||||
* any members have members that are.
|
||||
*/
|
||||
extern(C++) bool hasStaticCtorOrDtor(Dsymbol d)
|
||||
bool hasStaticCtorOrDtor(Dsymbol d)
|
||||
{
|
||||
scope v = new HasStaticCtorOrDtor();
|
||||
d.accept(v);
|
||||
|
@ -8162,7 +8162,7 @@ private extern(C++) class HasStaticCtorOrDtor : Visitor
|
|||
}
|
||||
}
|
||||
|
||||
extern(C++) bool isFuncHidden(ClassDeclaration cd, FuncDeclaration fd)
|
||||
bool isFuncHidden(ClassDeclaration cd, FuncDeclaration fd)
|
||||
{
|
||||
import dmd.funcsem : overloadApply;
|
||||
//printf("ClassDeclaration.isFuncHidden(class = %s, fd = %s)\n", toChars(), fd.toPrettyChars());
|
||||
|
@ -8211,7 +8211,7 @@ Dsymbol vtblSymbol(ClassDeclaration cd)
|
|||
return cd.vtblsym;
|
||||
}
|
||||
|
||||
extern(C++) bool isAbstract(ClassDeclaration cd)
|
||||
bool isAbstract(ClassDeclaration cd)
|
||||
{
|
||||
enum log = false;
|
||||
if (cd.isabstract != ThreeState.none)
|
||||
|
|
|
@ -51,7 +51,6 @@ namespace dmd
|
|||
{
|
||||
// in expressionsem.d
|
||||
Expression *expressionSemantic(Expression *e, Scope *sc);
|
||||
void lowerNonArrayAggregate(StaticForeach *sfe, Scope *sc);
|
||||
// in typesem.d
|
||||
Expression *defaultInit(Type *mt, Loc loc, const bool isCfile = false);
|
||||
|
||||
|
|
|
@ -17511,7 +17511,7 @@ bool fill(StructDeclaration sd, Loc loc, ref Expressions elements, bool ctorinit
|
|||
* sfe = The 'static foreach'.
|
||||
* sc = The current scope.
|
||||
*/
|
||||
extern (C++) void lowerNonArrayAggregate(StaticForeach sfe, Scope* sc)
|
||||
void lowerNonArrayAggregate(StaticForeach sfe, Scope* sc)
|
||||
{
|
||||
import dmd.statement;
|
||||
|
||||
|
@ -17726,7 +17726,7 @@ extern(D) void lowerArrayAggregate(StaticForeach sfe, Scope* sc)
|
|||
sfe.aggrfe.aggr = sfe.aggrfe.aggr.ctfeInterpret();
|
||||
}
|
||||
|
||||
extern(C++) int include(Condition c, Scope* sc)
|
||||
int include(Condition c, Scope* sc)
|
||||
{
|
||||
scope v = new IncludeVisitor(sc);
|
||||
c.accept(v);
|
||||
|
|
|
@ -7532,8 +7532,6 @@ public:
|
|||
void visit(StaticForeachDeclaration* _) override;
|
||||
};
|
||||
|
||||
extern Array<Dsymbol* >* include(Dsymbol* d, Scope* sc);
|
||||
|
||||
class ConditionIncludeVisitor : public Visitor
|
||||
{
|
||||
public:
|
||||
|
@ -7547,8 +7545,6 @@ public:
|
|||
void visit(StaticForeachDeclaration* sfd) override;
|
||||
};
|
||||
|
||||
extern void addComment(Dsymbol* d, const char* comment);
|
||||
|
||||
class AddCommentVisitor : public Visitor
|
||||
{
|
||||
public:
|
||||
|
@ -7561,16 +7557,6 @@ public:
|
|||
void visit(StaticForeachDeclaration* sfd) override;
|
||||
};
|
||||
|
||||
extern bool hasStaticCtorOrDtor(Dsymbol* d);
|
||||
|
||||
extern bool isFuncHidden(ClassDeclaration* cd, FuncDeclaration* fd);
|
||||
|
||||
extern bool isAbstract(ClassDeclaration* cd);
|
||||
|
||||
extern void lowerNonArrayAggregate(StaticForeach* sfe, Scope* sc);
|
||||
|
||||
extern int32_t include(Condition* c, Scope* sc);
|
||||
|
||||
class NrvoWalker final : public StatementRewriteWalker
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -1721,10 +1721,11 @@ int main(int argc, char **argv)
|
|||
/**********************************/
|
||||
// Link Tests
|
||||
|
||||
void aggregate_h(StructDeclaration *sd)
|
||||
void aggregate_h(StructDeclaration *sd, ClassDeclaration *cd, FuncDeclaration *fd)
|
||||
{
|
||||
dmd::search_toString(sd);
|
||||
dmd::semanticTypeInfoMembers(sd);
|
||||
dmd::isFuncHidden(cd, fd);
|
||||
}
|
||||
|
||||
void argtypes_h(Type *t)
|
||||
|
@ -1736,7 +1737,8 @@ void argtypes_h(Type *t)
|
|||
//dmd::isHFVA(t);
|
||||
}
|
||||
|
||||
void declaration_h(FuncDeclaration *fd, Loc loc, Expressions* args, Parameters* params)
|
||||
void declaration_h(FuncDeclaration *fd, Loc loc, Expressions* args, Parameters* params,
|
||||
ClassDeclaration *cd)
|
||||
{
|
||||
dmd::functionSemantic(fd);
|
||||
dmd::functionSemantic3(fd);
|
||||
|
@ -1744,6 +1746,7 @@ void declaration_h(FuncDeclaration *fd, Loc loc, Expressions* args, Parameters*
|
|||
::isBuiltin(fd);
|
||||
dmd::genCfunc(params, fd->type, "test");
|
||||
dmd::genCfunc(params, fd->type, Identifier::idPool("test"));
|
||||
dmd::isAbstract(cd);
|
||||
}
|
||||
|
||||
void doc_h(Module *m, const char *ptr, d_size_t length, const char *date,
|
||||
|
@ -1761,6 +1764,7 @@ void dsymbol_h(Dsymbol *d, Scope *sc, ScopeDsymbol *sds, Loc loc, Identifier *id
|
|||
dmd::search(d, loc, ident);
|
||||
dmd::setScope(d, sc);
|
||||
dmd::importAll(d, sc);
|
||||
dmd::include(d, sc);
|
||||
}
|
||||
|
||||
void expression_h(Expression *e, Scope *sc, Type *t, Loc loc, Expressions *es)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue