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: 2 additions & 2 deletions compiler/src/dmd/declaration.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,9 @@ class FuncDeclaration : public Declaration

// Sibling nested functions which called this one
FuncDeclarations siblingCallers;

#if MARS
FuncDeclarations *inlinedNestedCallees;

#endif
AttributeViolation* safetyViolation;
AttributeViolation* nogcViolation;
AttributeViolation* pureViolation;
Expand Down
1 change: 0 additions & 1 deletion compiler/src/dmd/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -3962,7 +3962,6 @@ class FuncDeclaration : public Declaration
Array<VarDeclaration* > outerVars;
static FuncDeclaration* lastMain;
Array<FuncDeclaration* > siblingCallers;
Array<FuncDeclaration* >* inlinedNestedCallees;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of this, I'd rather not start hiding fields behind versions.

AttributeViolation* safetyViolation;
AttributeViolation* nogcViolation;
AttributeViolation* pureViolation;
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/func.d
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ extern (C++) class FuncDeclaration : Declaration
/// Sibling nested functions which called this one
FuncDeclarations siblingCallers;

version(MARS)
FuncDeclarations* inlinedNestedCallees;

/// In case of failed `@safe` inference, store the error that made the function `@system` for
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/glue/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ void FuncDeclaration_toObjFile(FuncDeclaration fd, bool multiobj)
}
}

version(MARS)
if (fd.inlinedNestedCallees)
Comment on lines +562 to 563
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unnecessary.

{
/* https://issues.dlang.org/show_bug.cgi?id=15333
Expand Down
1 change: 1 addition & 0 deletions compiler/src/dmd/inline.d
Original file line number Diff line number Diff line change
Expand Up @@ -2033,6 +2033,7 @@ private void expandInline(Loc callLoc, FuncDeclaration fd, FuncDeclaration paren
}
scope ids = new InlineDoState(parent, fd);

version(MARS)
if (fd.isNested())
{
if (!parent.inlinedNestedCallees)
Expand Down
Loading