Skip to content
Merged
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
2 changes: 1 addition & 1 deletion compiler/src/dmd/argtypes_sysv_x64.d
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ extern (C++) final class ToClassesVisitor : Visitor
classifyFields(baseOffset, cast(size_t) t.dim.toInteger(), &getNthElement);
}

extern(D) void classifyFields(uint baseOffset, size_t nfields, Type delegate(size_t, out uint, out uint) getFieldInfo)
extern(D) void classifyFields(uint baseOffset, size_t nfields, scope Type delegate(size_t, out uint, out uint) getFieldInfo)
{
// classify each field (recursively for aggregates) and merge all classes per eightbyte
foreach (n; 0 .. nfields)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/argtypes_x86.d
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ TypeTuple toArgTypes_x86(Type t)
* nfields = number of fields in the aggregate (dimension for static arrays)
* getFieldInfo = get information about the nth field in the aggregate
*/
extern (D) void aggregate(ulong sz, size_t nfields, Type delegate(size_t, out uint, out uint) getFieldInfo)
extern (D) void aggregate(ulong sz, size_t nfields, scope Type delegate(size_t, out uint, out uint) getFieldInfo)
{
if (nfields == 0)
return memory();
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/attrib.d
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ bool isCoreUda(Dsymbol sym, Identifier ident)
* If `dg` returns `!= 0`, stops the iteration and returns that value.
* Otherwise, returns 0.
*/
int foreachUdaNoSemantic(Dsymbol sym, int delegate(Expression) dg)
int foreachUdaNoSemantic(Dsymbol sym, scope int delegate(Expression) dg)
{
if (sym.userAttribDecl is null || sym.userAttribDecl.atts is null)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/attribsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Expressions* getAttributes(UserAttributeDeclaration a)
* If `dg` returns `!= 0`, stops the iteration and returns that value.
* Otherwise, returns 0.
*/
int foreachUda(Dsymbol sym, Scope* sc, int delegate(Expression) dg)
int foreachUda(Dsymbol sym, Scope* sc, scope int delegate(Expression) dg)
{
if (!sym.userAttribDecl)
return 0;
Expand Down
8 changes: 6 additions & 2 deletions compiler/src/dmd/canthrow.d
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,14 @@ CT canThrow(Expression e, FuncDeclaration func, ErrorSink eSink)
{
alias visit = typeof(super).visit;
CT result;
FuncDeclaration func;
ErrorSink eSink;

public:
extern (D) this() scope @safe
extern (D) this(FuncDeclaration func, ErrorSink eSink) scope @safe
{
this.func = func;
this.eSink = eSink;
}

void checkFuncThrows(Expression e, FuncDeclaration f)
Expand Down Expand Up @@ -213,7 +217,7 @@ CT canThrow(Expression e, FuncDeclaration func, ErrorSink eSink)
}
}

scope CanThrow ct = new CanThrow();
scope CanThrow ct = new CanThrow(func, eSink);
walkPostorder(e, ct);
return ct.result;
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dmd/expressionsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -8030,7 +8030,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
}

FuncDeclaration resolveOverloadSet(Loc loc, Scope* sc,
OverloadSet os, Objects* tiargs, Type tthis, ArgumentList argumentList)
OverloadSet os, Objects* tiargs, Type tthis, ArgumentList argumentList) scope
{
FuncDeclaration f = null;
foreach (s; os.a)
Expand Down
8 changes: 4 additions & 4 deletions compiler/src/dmd/glue/toobj.d
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,17 @@ void toObjFile(Dsymbol ds, bool multiobj)
{
//printf("toObjFile(%s %s)\n", ds.kind(), ds.toChars());

bool isCfile = ds.isCsymbol();

extern (C++) final class ToObjFile : Visitor
{
alias visit = Visitor.visit;
public:
bool multiobj;
bool isCfile;

this(bool multiobj) scope @safe
this(bool multiobj, bool isCfile) scope @safe
{
this.multiobj = multiobj;
this.isCfile = isCfile;
}

void visitNoMultiObj(Dsymbol ds)
Expand Down Expand Up @@ -1020,7 +1020,7 @@ void toObjFile(Dsymbol ds, bool multiobj)
}
}

scope v = new ToObjFile(multiobj);
scope v = new ToObjFile(multiobj, ds.isCsymbol());
ds.accept(v);
}

Expand Down
Loading
Loading