Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Conversation

quickfur
Copy link
Member

Add builtin typeinfo for const(char)[] so that it will use the same hash function as char[] and string.

Subsidiary pull for dlang/dmd#2479

Add builtin typeinfo for const(char)[] so that it will use the same hash
function as char[] and string.
@quickfur
Copy link
Member Author

Hmph. This fix requires dmd to be patched with dlang/dmd#2479, but obviously the autotester isn't using the patched compiler. How to get around this? The patched compiler can't work without this pull either, since it'd reference a non-existent typeinfo. What's the usual way to get the autotester to use both a patched dmd and druntime?

@yebblies
Copy link
Contributor

There isn't a way, unless you feel like patching the autotester.

What kind of performance hit does the non-string hash give? Is it possible (without performance regressions) to remove the built-in typeinfo instead of adding a new one for const?

MartinNowak added a commit that referenced this pull request Aug 15, 2013
Subsidiary fix for issue 6210.
@MartinNowak MartinNowak merged commit 8aa3ebf into dlang:master Aug 15, 2013
@quickfur
Copy link
Member Author

@yebblies TBH I've no idea about the performance of string's toHash vs. const(char)[]'s toHash. It's code from before the D source code was put on github. I'll see if I can run some benchmarks later today when I have some free time.

@quickfur quickfur deleted the issue6210 branch July 16, 2014 04:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants