Skip to content

CTFE support for Appender #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2011

Conversation

donc
Copy link
Collaborator

@donc donc commented Jun 30, 2011

This isn't a very sophisticated patch, it just uses the new CTFE capabilities (pointers + heap-allocated structs) and bypasses the low-level stuff in Appender.
It makes a large chunk of Phobos usable in CTFE. For example, it fixes:
5632 replace() not evaluatable at compile-time anymore

Makes a large chunk of Phobos usable in CTFE. Fixes:
5632 replace() not evaluatable at compile-time anymore

This is still not very efficient, for CTFE it's a bit more efficient to just
use ~= for appending.
@donc
Copy link
Collaborator Author

donc commented Jul 1, 2011

Eventually, yes, but it won't work yet because CTFE can't do bit intrinsics yet.There are still some horrific inefficiencies in the CTFE engine anyway which would mean that the speed and memory consumption are dominated by other things (eg, indexing an array isn't yet an O(1) operation in all cases!)

@schveiguy
Copy link
Member

OK, in that case, I think the changes are fine as is. I wonder if it wouldn't be better to just replace the entire implementation with a simple array and use builtin append operations.

andralex added a commit that referenced this pull request Jul 3, 2011
CTFE support for Appender
@andralex andralex merged commit 96d34d5 into dlang:master Jul 3, 2011
kuettler pushed a commit to kuettler/phobos that referenced this pull request Feb 6, 2018
Update to DDOX 0.9.19 with multiple declarations per page support.
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.

3 participants