Skip to content

Commit

Permalink
Move functions from func.d to funcsem.d. (#16286)
Browse files Browse the repository at this point in the history
These require `import dscope` that we want to remove from func.d in pursuit of https://github.com/orgs/dlang/projects/41.

Other functions that still need to be moved include `overloadApply()`, `isUnique()` and `equals()`, the latter needing a visitor akin #15782.
  • Loading branch information
veelo authored Mar 3, 2024
1 parent 5bb882c commit cd6a32f
Show file tree
Hide file tree
Showing 11 changed files with 820 additions and 866 deletions.
1 change: 1 addition & 0 deletions compiler/src/dmd/dclass.d
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import dmd.dsymbol;
import dmd.dsymbolsem;
import dmd.errors;
import dmd.func;
import dmd.funcsem;
import dmd.id;
import dmd.identifier;
import dmd.location;
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/declaration.d
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.funcsem;
import dmd.globals;
import dmd.gluelayer;
import dmd.id;
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/dmangle.d
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.funcsem;
import dmd.globals;
import dmd.id;
import dmd.identifier;
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/dstruct.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import dmd.dtemplate;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.funcsem;
import dmd.globals;
import dmd.id;
import dmd.identifier;
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/escape.d
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import dmd.dsymbol;
import dmd.errors;
import dmd.expression;
import dmd.func;
import dmd.funcsem;
import dmd.globals : FeatureState;
import dmd.id;
import dmd.identifier;
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dmd/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -3786,7 +3786,6 @@ class FuncDeclaration : public Declaration
bool isCodeseg() const final override;
bool isOverloadable() const final override;
bool isAbstract() final override;
bool canInferAttributes(Scope* sc);
void initInferAttributes();
PURE isPure();
bool isSafe();
Expand All @@ -3806,7 +3805,6 @@ class FuncDeclaration : public Declaration
bool checkClosure();
bool hasNestedFrameRefs();
static bool needsFensure(FuncDeclaration* fd);
void buildEnsureRequire();
ParameterList getParameterList();
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, const char* name, StorageClass stc = 0);
static FuncDeclaration* genCfunc(Array<Parameter* >* fparams, Type* treturn, Identifier* id, StorageClass stc = 0);
Expand Down
Loading

0 comments on commit cd6a32f

Please sign in to comment.