Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions compiler/src/dmd/declaration.h
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,6 @@ class FuncDeclaration : public Declaration
// Sibling nested functions which called this one
FuncDeclarations siblingCallers;

FuncDeclarations *inlinedNestedCallees;

AttributeViolation* safetyViolation;
AttributeViolation* nogcViolation;
AttributeViolation* pureViolation;
Expand Down Expand Up @@ -666,8 +664,6 @@ class FuncDeclaration : public Declaration
bool inferRetType(bool v);
bool hasDualContext() const;
bool hasDualContext(bool v);
bool hasAlwaysInlines() const;
bool hasAlwaysInlines(bool v);
bool isCrtCtor() const;
bool isCrtCtor(bool v);
bool isCrtDtor() const;
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dmd/dmodule.d
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ extern (C++) final class Module : Package
uint errors; // if any errors in file
uint numlines; // number of lines in source file
FileType filetype; // source file type
bool hasAlwaysInlines; // contains references to functions that must be inlined
bool isPackageFile; // if it is a package.d
Package pkg; // if isPackageFile is true, the Package that contains this package.d
Strings contentImportedFiles; // array of files whose content was imported
Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dmd/dsymbol.d
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ enum PASS : ubyte
semantic2done, // semantic2() done
semantic3, // semantic3() started
semantic3done, // semantic3() done
inline, // inline started
inlinedone, // inline done
obj, // toObjFile() run
}

Expand Down
2 changes: 0 additions & 2 deletions compiler/src/dmd/dsymbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ enum class PASS : uint8_t
semantic2done, // semantic2() done
semantic3, // semantic3() started
semantic3done, // semantic3() done
inline_, // inline started
inlinedone, // inline done
obj // toObjFile() run
};

Expand Down
11 changes: 0 additions & 11 deletions compiler/src/dmd/expressionsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -2880,17 +2880,6 @@ private bool functionParameters(const ref Loc loc, Scope* sc,
}
}

/* If calling a pragma(inline, true) function,
* set flag to later scan for inlines.
*/
if (fd && fd.inlining == PINLINE.always)
{
if (sc._module)
sc._module.hasAlwaysInlines = true;
if (sc.func)
sc.func.hasAlwaysInlines = true;
}

const isCtorCall = fd && fd.needThis() && fd.isCtorDeclaration();

const size_t n = (nargs > nparams) ? nargs : nparams; // n = max(nargs, nparams)
Expand Down
8 changes: 1 addition & 7 deletions compiler/src/dmd/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,7 @@ enum class PASS : uint8_t
semantic2done = 4u,
semantic3 = 5u,
semantic3done = 6u,
inline_ = 7u,
inlinedone = 8u,
obj = 9u,
obj = 7u,
};

struct Ungag final
Expand Down Expand Up @@ -3709,7 +3707,6 @@ class FuncDeclaration : public Declaration
Array<VarDeclaration* > closureVars;
Array<VarDeclaration* > outerVars;
Array<FuncDeclaration* > siblingCallers;
Array<FuncDeclaration* >* inlinedNestedCallees;
AttributeViolation* safetyViolation;
AttributeViolation* nogcViolation;
AttributeViolation* pureViolation;
Expand Down Expand Up @@ -3754,8 +3751,6 @@ class FuncDeclaration : public Declaration
bool inferRetType(bool v);
bool hasDualContext() const;
bool hasDualContext(bool v);
bool hasAlwaysInlines() const;
bool hasAlwaysInlines(bool v);
bool isCrtCtor() const;
bool isCrtCtor(bool v);
bool isCrtDtor() const;
Expand Down Expand Up @@ -7195,7 +7190,6 @@ class Module final : public Package
uint32_t errors;
uint32_t numlines;
FileType filetype;
bool hasAlwaysInlines;
bool isPackageFile;
Package* pkg;
Array<const char* > contentImportedFiles;
Expand Down
3 changes: 0 additions & 3 deletions compiler/src/dmd/func.d
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ private struct FUNCFLAG
bool inferRetType; /// Return type is to be inferred
bool hasDualContext; /// has a dual-context 'this' parameter

bool hasAlwaysInlines; /// Contains references to functions that must be inlined
bool isCrtCtor; /// Has attribute pragma(crt_constructor)
bool isCrtDtor; /// Has attribute pragma(crt_destructor)
bool hasEscapingSiblings;/// Has sibling functions that escape
Expand Down Expand Up @@ -372,8 +371,6 @@ extern (C++) class FuncDeclaration : Declaration
/// Sibling nested functions which called this one
FuncDeclarations siblingCallers;

FuncDeclarations *inlinedNestedCallees;

/// In case of failed `@safe` inference, store the error that made the function `@system` for
/// better diagnostics
AttributeViolation* safetyViolation;
Expand Down
17 changes: 0 additions & 17 deletions compiler/src/dmd/glue.d
Original file line number Diff line number Diff line change
Expand Up @@ -857,23 +857,6 @@ public void FuncDeclaration_toObjFile(FuncDeclaration fd, bool multiobj)
}
}

if (fd.inlinedNestedCallees)
{
/* https://issues.dlang.org/show_bug.cgi?id=15333
* If fd contains inlined expressions that come from
* nested function bodies, the enclosing of the functions must be
* generated first, in order to calculate correct frame pointer offset.
*/
foreach (fdc; *fd.inlinedNestedCallees)
{
FuncDeclaration fp = fdc.toParent2().isFuncDeclaration();
if (fp && fp.semanticRun < PASS.obj)
{
toObjFile(fp, multiobj);
}
}
}

if (fd.isNested())
{
//if (!(config.flags3 & CFG3pic))
Expand Down
Loading