Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
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 src/core/gc/gcinterface.d
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ interface GC
/**
* run finalizers
*/
void runFinalizers(in void[] segment) nothrow;
void runFinalizers(const scope void[] segment) nothrow;

/*
*
Expand Down
16 changes: 8 additions & 8 deletions src/core/memory.d
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ private
extern (C) GC.Stats gc_stats ( ) nothrow @nogc;
extern (C) GC.ProfileStats gc_profileStats ( ) nothrow @nogc @safe;

extern (C) void gc_addRoot( const scope void* p ) nothrow @nogc;
extern (C) void gc_addRange( const scope void* p, size_t sz, const TypeInfo ti = null ) nothrow @nogc;
extern (C) void gc_addRoot(const void* p ) nothrow @nogc;
extern (C) void gc_addRange(const void* p, size_t sz, const TypeInfo ti = null ) nothrow @nogc;

extern (C) void gc_removeRoot( const scope void* p ) nothrow @nogc;
extern (C) void gc_removeRange( const scope void* p ) nothrow @nogc;
extern (C) void gc_removeRoot(const void* p ) nothrow @nogc;
extern (C) void gc_removeRange(const void* p ) nothrow @nogc;
extern (C) void gc_runFinalizers( const scope void[] segment );

package extern (C) bool gc_inFinalizer();
Expand Down Expand Up @@ -764,7 +764,7 @@ struct GC
* }
* ---
*/
static void addRoot( const scope void* p ) nothrow @nogc /* FIXME pure */
static void addRoot(const void* p ) nothrow @nogc /* FIXME pure */
{
gc_addRoot( p );
}
Expand All @@ -778,7 +778,7 @@ struct GC
* Params:
* p = A pointer into a GC-managed memory block or null.
*/
static void removeRoot( const scope void* p ) nothrow @nogc /* FIXME pure */
static void removeRoot(const void* p ) nothrow @nogc /* FIXME pure */
{
gc_removeRoot( p );
}
Expand Down Expand Up @@ -812,7 +812,7 @@ struct GC
* // rawMemory will be recognized on collection.
* ---
*/
static void addRange( const scope void* p, size_t sz, const TypeInfo ti = null ) @nogc nothrow /* FIXME pure */
static void addRange(const void* p, size_t sz, const TypeInfo ti = null ) @nogc nothrow /* FIXME pure */
{
gc_addRange( p, sz, ti );
}
Expand All @@ -827,7 +827,7 @@ struct GC
* Params:
* p = A pointer to a valid memory address or to null.
*/
static void removeRange( const scope void* p ) nothrow @nogc /* FIXME pure */
static void removeRange(const void* p ) nothrow @nogc /* FIXME pure */
{
gc_removeRange( p );
}
Expand Down
10 changes: 5 additions & 5 deletions src/gc/impl/conservative/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -970,9 +970,9 @@ class ConservativeGC : GC
}


void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
static void go(Gcx* gcx, in void[] segment) nothrow
static void go(Gcx* gcx, const scope void[] segment) nothrow
{
gcx.runFinalizers(segment);
}
Expand Down Expand Up @@ -1459,7 +1459,7 @@ struct Gcx
/**
*
*/
void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
ConservativeGC._inFinalizer = true;
scope (failure) ConservativeGC._inFinalizer = false;
Expand Down Expand Up @@ -3641,7 +3641,7 @@ struct LargeObjectPool
return info;
}

void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
foreach (pn; 0 .. npages)
{
Expand Down Expand Up @@ -3755,7 +3755,7 @@ struct SmallObjectPool
return info;
}

void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
foreach (pn; 0 .. npages)
{
Expand Down
2 changes: 1 addition & 1 deletion src/gc/impl/manual/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class ManualGC : GC
return 0;
}

void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/gc/impl/proto/gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ private
extern (C) void* gc_realloc( void* p, size_t sz, uint ba = 0, const TypeInfo = null ) pure nothrow;
extern (C) size_t gc_reserve( size_t sz ) nothrow;

extern (C) void gc_addRange( void* p, size_t sz, const TypeInfo ti = null ) nothrow @nogc;
extern (C) void gc_addRoot( void* p ) nothrow @nogc;
extern (C) void gc_addRange(const void* p, size_t sz, const TypeInfo ti = null ) nothrow @nogc;
extern (C) void gc_addRoot(const void* p ) nothrow @nogc;
}

class ProtoGC : GC
Expand Down Expand Up @@ -232,7 +232,7 @@ class ProtoGC : GC
return 0;
}

void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
}

Expand Down
2 changes: 1 addition & 1 deletion src/gc/proxy.d
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ extern (C)
return instance.removeRange( p );
}

void gc_runFinalizers( in void[] segment ) nothrow
void gc_runFinalizers(const scope void[] segment ) nothrow
{
return instance.runFinalizers( segment );
}
Expand Down
2 changes: 1 addition & 1 deletion test/init_fini/src/custom_gc.d
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ nothrow @nogc:
return null;
}

void runFinalizers(in void[] segment) nothrow
void runFinalizers(const scope void[] segment) nothrow
{
}

Expand Down