Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merged
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
14 changes: 7 additions & 7 deletions src/rt/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ void[] _d_newarrayOpT(alias op)(const TypeInfo ti, size_t[] dims)
}

auto allocsize = (void[]).sizeof * dim;
auto info = GC.qalloc(allocsize + __arrayPad(allocsize, tinext), 0, ti);
auto info = __arrayAlloc(allocsize, ti, tinext);
auto isshared = typeid(ti) is typeid(TypeInfo_Shared);
__setArrayAllocLength(info, allocsize, isshared, tinext);
auto p = __arrayStart(info)[0 .. dim];
Expand Down Expand Up @@ -1632,11 +1632,11 @@ body
// a chance that flags have changed since this was cached, we should fetch the most recent flags
info.attr = GC.getAttr(info.base) | BlkAttr.APPENDABLE;
}
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), info.attr, ti);
info = __arrayAlloc(newsize, info, ti, tinext);
}
else
{
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
info = __arrayAlloc(newsize, ti, tinext);
}
__setArrayAllocLength(info, newsize, isshared, tinext);
if(!isshared)
Expand Down Expand Up @@ -1816,11 +1816,11 @@ body
// a chance that flags have changed since this was cached, we should fetch the most recent flags
info.attr = GC.getAttr(info.base) | BlkAttr.APPENDABLE;
}
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), info.attr, ti);
info = __arrayAlloc(newsize, info, ti, tinext);
}
else
{
info = GC.qalloc(newsize + __arrayPad(newsize, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
info = __arrayAlloc(newsize, ti, tinext);
}
__setArrayAllocLength(info, newsize, isshared, tinext);
if(!isshared)
Expand Down Expand Up @@ -2057,11 +2057,11 @@ byte[] _d_arrayappendcTX(const TypeInfo ti, ref byte[] px, size_t n)
// a chance that flags have changed since this was cached, we should fetch the most recent flags
info.attr = GC.getAttr(info.base) | BlkAttr.APPENDABLE;
}
info = GC.qalloc(newcap + __arrayPad(newcap, tinext), info.attr, ti);
info = __arrayAlloc(newcap, info, ti, tinext);
}
else
{
info = GC.qalloc(newcap + __arrayPad(newcap, tinext), !(ti.next.flags & 1) ? (BlkAttr.NO_SCAN | BlkAttr.APPENDABLE) : BlkAttr.APPENDABLE, ti);
info = __arrayAlloc(newcap, ti, tinext);
}
__setArrayAllocLength(info, newsize, isshared, tinext);
if(!isshared)
Expand Down