-
Notifications
You must be signed in to change notification settings - Fork 12
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
Intern no crc32 #5
Conversation
…o endian_fixes
This fixes the last of the issues with Enum on big-endian machines. The problems we caused by the assumption that 64-, 32-, 16- and 8-bit integers would align on the LSB, which is the case for little-endian machines (but not big...). In several places where reinterpret_cast<>() was used I first assigned the Enum _value_ to a temp variable of the correct size and then passed the address of that to the checksum calculation function. High cost in one sense, but really, scalar Enum variables will be rare and Arrays of Enums are handled differently. I also have dropped the overly-complex design that used a union. It eliminated some casts, but was based on the erroneous assumption regarding alignment.
One for big- and one for litte-endian machines. I made the little endian set.
…ndian ...There's still an issue, however.
D4MarshallerTest now works
This copy of the tests hould work on both little- and big-endian hosts.
This seems better - I htink computing the CRC code when interning values is not necessary. Those should only be computed when the server is going to send values.
…ksum It is only computed by the code that serializes the response - sends it to a remote client. I added baselines specifically for the intern tests on little endian machines. Will add ones for big endian next...
I dropped computing the checksum in the intern_data() method, so the baselines for the tests had to be updated.
When will you tackle the signed 8-bit mapping issue? Kent So, I got to thinking, while I'm fixing the big-endian crc issue, maybe this is a good time to sort out another lingering issue: that computing the checksum during intern_data() is silly - the values are only going to be used by the server again. So this branch undoes that error. You can view, comment on, or merge this pull request online at: Commit Summary
File Changes
Patch Links: — |
I’m going to try for that in the next two weeks. James
James Gallagher |
So, I got to thinking, while I'm fixing the big-endian crc issue, maybe this is a good time to sort out another lingering issue: that computing the checksum during intern_data() is silly - the values are only going to be used by the server again. So this branch undoes that error.