From 89c504ccde618d7e7bb27d7a9688a095c842a8d1 Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Mon, 7 Oct 2024 15:59:21 +0800 Subject: [PATCH] restrict semantic imports for AST files --- compiler/src/dmd/cond.d | 2 +- compiler/src/dmd/declaration.d | 8 ++++---- compiler/src/dmd/dtemplate.d | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/compiler/src/dmd/cond.d b/compiler/src/dmd/cond.d index 18f735d90af9..838cdb4d6216 100644 --- a/compiler/src/dmd/cond.d +++ b/compiler/src/dmd/cond.d @@ -24,7 +24,7 @@ import dmd.dscope; import dmd.dsymbol; import dmd.errors; import dmd.expression; -import dmd.expressionsem; +import dmd.expressionsem : expressionSemantic, evalStaticCondition; import dmd.globals; import dmd.identifier; import dmd.location; diff --git a/compiler/src/dmd/declaration.d b/compiler/src/dmd/declaration.d index 8f3a0ce71093..08f81c7b4cf2 100644 --- a/compiler/src/dmd/declaration.d +++ b/compiler/src/dmd/declaration.d @@ -22,18 +22,18 @@ import dmd.delegatize; import dmd.dscope; import dmd.dstruct; import dmd.dsymbol; -import dmd.dsymbolsem; +import dmd.dsymbolsem : dsymbolSemantic, aliasSemantic; import dmd.dtemplate; import dmd.errors; import dmd.expression; import dmd.func; -import dmd.funcsem; +import dmd.funcsem : overloadApply, getLevelAndCheck; import dmd.globals; import dmd.gluelayer; import dmd.id; import dmd.identifier; import dmd.init; -import dmd.initsem; +import dmd.initsem : initializerToExpression, initializerSemantic; import dmd.intrange; import dmd.location; import dmd.mtype; @@ -42,7 +42,7 @@ import dmd.rootobject; import dmd.root.filename; import dmd.target; import dmd.tokens; -import dmd.typesem; +import dmd.typesem : toDsymbol, typeSemantic, size, hasPointers; import dmd.visitor; version (IN_GCC) {} diff --git a/compiler/src/dmd/dtemplate.d b/compiler/src/dmd/dtemplate.d index 2bf7ad17a766..e4b9546bf0a9 100644 --- a/compiler/src/dmd/dtemplate.d +++ b/compiler/src/dmd/dtemplate.d @@ -53,20 +53,19 @@ import dmd.dinterpret; import dmd.dmodule; import dmd.dscope; import dmd.dsymbol; -import dmd.dsymbolsem; +import dmd.dsymbolsem : dsymbolSemantic, checkDeprecated, aliasSemantic, search, search_correct, setScope, importAll; import dmd.errors; import dmd.errorsink; import dmd.expression; -import dmd.expressionsem; +import dmd.expressionsem : resolveLoc, expressionSemantic, resolveProperties; import dmd.func; -import dmd.funcsem; +import dmd.funcsem : functionSemantic, leastAsSpecialized, overloadApply; import dmd.globals; import dmd.hdrgen; import dmd.id; import dmd.identifier; import dmd.impcnvtab; import dmd.init; -import dmd.initsem; import dmd.location; import dmd.mangle; import dmd.mtype; @@ -75,11 +74,12 @@ import dmd.optimize; import dmd.root.array; import dmd.common.outbuffer; import dmd.rootobject; -import dmd.semantic2; -import dmd.semantic3; -import dmd.templatesem; +import dmd.semantic3 : semantic3; +import dmd.templatesem : matchWithInstance, formatParamsWithTiargs, leastAsSpecialized, declareParameter; import dmd.tokens; -import dmd.typesem; +import dmd.typesem : hasPointers, typeSemantic, merge, merge2, resolve, toDsymbol, + addStorageClass, isBaseOf, equivalent, sarrayOf, constOf, mutableOf, unSharedOf, + unqualify, aliasthisOf, castMod, substWildTo, addMod; import dmd.visitor; import dmd.templateparamsem;