dmd
dmd copied to clipboard
cod4.d: make even more use of opAssLoadReg() and more
Thanks for your pull request, @WalterBright!
Bugzilla references
Your PR doesn't reference any Bugzilla issue.
If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#11511"
C++ interop tests Heisenbug filed as https://issues.dlang.org/show_bug.cgi?id=21130
C++ interop tests Heisenbug filed as https://issues.dlang.org/show_bug.cgi?id=21130
Please don't open bug reports that can't be fixed. In this case, absolutely nothing we can do. And re-triggering the CI will most likely fix it.
@WalterBright, rebase + force push please for the buildkite failure, unless you can retrigger a buildkite manually.
Restarted the failures but the segfault in libmir/mir-algorithm might not be unrelated.
@MoonlightSentinel, yeah we'll see.
can I have an invite for buildkite ? I'm not sure that if I register I'll be able to retrigger.
As expected, libmir/mir-algorith is persistent.
This PR conflates mutliple changes that should at least be separate commits:
- Refactoring to use
opAssLoadReg - Additions to
opAssLoadReg. - Comment fixes (allthough this one is neglegible)
This PR conflates mutliple changes that should at least be separate commits:
I don't think any other dev here cares about the DMD backend (anymore), so as long as Walter doesn't break the testsuite there is no need to review, enforce style guidelines or stop his PRs.
reminder: "Needs Works" b/c of libmir
Found a reduced test case for the mir segfault.
(Ignore the weird names, the test is adapted from the -vcg-ast output to manually expand the templates):
unittest
{
uint[2] data = 0u;
Slice_uintPtr sliced = Slice_uintPtr(data.length, data.ptr);
Slice_FieldIterator_BitpackField_uintPtr_18u packed = bitpack(sliced);
sort(packed);
}
struct Slice_uintPtr
{
ulong[1] _structure;
uint* _iterator;
}
Slice_FieldIterator_BitpackField_uintPtr_18u bitpack(Slice_uintPtr slice)
{
ulong[1] structure = [0LU];
structure = slice._structure;
structure[] *= 4LU;
structure[0] /= 18LU;
return Slice_FieldIterator_BitpackField_uintPtr_18u(
structure,
FieldIterator_BitpackField_uintPtr_18u(
0L,
BitpackField_uintPtr_18u(slice._iterator)
)
);
}
struct BitpackField_uintPtr_18u
{
uint* _field;
uint opIndex(ulong index)
{
uint ret = this._field[index];
return ret;
}
uint opIndexAssign(uint value, ulong index)
{
index *= 18LU;
this._field[index] = this._field[1];
return value;
}
}
struct FieldIterator_BitpackField_uintPtr_18u
{
long _index;
BitpackField_uintPtr_18u _field;
}
struct Slice_FieldIterator_BitpackField_uintPtr_18u
{
ulong[1] _structure;
FieldIterator_BitpackField_uintPtr_18u _iterator;
}
Slice_FieldIterator_BitpackField_uintPtr_18u sort(Slice_FieldIterator_BitpackField_uintPtr_18u slice)
{
FieldIterator_BitpackField_uintPtr_18u r = slice._iterator;
r._field[r._index] = r._field[r._index];
return slice;
}
> dmd\generated\windows\release\64\dmd.exe -m64 -unittest -main -run test.d
> Exit -1073741819
> dmd -m64 -unittest -main -run test.d
1 unittests passed
> Exit 0