Skip to content

dmd.toir: Merge 32 and 64bit intrinsic arrays#10655

Closed
ibuclaw wants to merge 1 commit intodlang:masterfrom
ibuclaw:intrinsicops
Closed

dmd.toir: Merge 32 and 64bit intrinsic arrays#10655
ibuclaw wants to merge 1 commit intodlang:masterfrom
ibuclaw:intrinsicops

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Dec 10, 2019

As for the intrinsic names, there's only 4 places where they differ between the two.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

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 fetch digger
dub run digger -- build "master + dmd#10655"

@ibuclaw
Copy link
Member Author

ibuclaw commented Dec 11, 2019

Looks like @thewilsonator had a better idea in #10656. :-o

"4math6rndtolFNaNbNiNfeZl",
"4math6yl2xp1FNaNbNiNfeeZe",
];
__gshared immutable(char)*[11] std_namearray;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for runtime initialization here, just use static immutable.

__gshared immutable(char)*[62] core_namearray;
if (init_guard < 2)
{
core_namearray = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this assignment will cause the an allocation of the array literal. Happens only once, but maybe better to just use static initialization and then patching the 4 entries?

@ibuclaw ibuclaw closed this Dec 11, 2019
@ibuclaw ibuclaw deleted the intrinsicops branch December 11, 2019 09:34
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