Skip to content

druntime: Move accumulatePure from core.internal.array to rt.profilegc#23408

Open
QuantumSegfault wants to merge 7 commits into
dlang:stablefrom
QuantumSegfault:move-accumulate-pure
Open

druntime: Move accumulatePure from core.internal.array to rt.profilegc#23408
QuantumSegfault wants to merge 7 commits into
dlang:stablefrom
QuantumSegfault:move-accumulate-pure

Conversation

@QuantumSegfault

Copy link
Copy Markdown
Contributor

Moves accumulatePure (which is a thin wrapper around rt.profilegc.accumulate, adding forcing purity on it) out of core.internal.array and into rt.profilegc.

This helps prevent rt.profilegc from being dragged in (and thus its module destructors) when D_ProfileGC isn't enabled, reducing the size of statically linked binaries.

See ldc-developers/ldc#5186 (comment)


This problem should be solved on master by #22859. This improvement is for 1.113.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

@kinke
@thewilsonator

@thewilsonator

Copy link
Copy Markdown
Contributor

cc @dkorpel as you wrote the fix for master, and this PR seems to do it slightly differently to what you did (and may cause merge conflicts).

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

@kinke

This hasn't been working so far. CTFE tries to instantiate the hooks, causing weird bugs.

@QuantumSegfault

Copy link
Copy Markdown
Contributor Author

Okay, I think I coaxed it into working...still some test failures to figure out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants